diff options
Diffstat (limited to 'pcr/pencil2d/PKGBUILD')
-rw-r--r-- | pcr/pencil2d/PKGBUILD | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/pcr/pencil2d/PKGBUILD b/pcr/pencil2d/PKGBUILD new file mode 100644 index 000000000..944792e91 --- /dev/null +++ b/pcr/pencil2d/PKGBUILD @@ -0,0 +1,107 @@ +# Maintainer: Márcio Silva <coadde@parabola.nu> + +pkgname=pencil2d +pkgver=0.5.4.git20140720 +pkgcommit=52528802ed2b33f60ae6d4370e6fe09f66ccb45c # July 20, 2014 +pkgrel=1 +pkgdesc='Pencil is an animation/drawing software' +arch=( + x86_64 + i686 +) +url=http://http://www.pencil2d.org/ +license=GPL2 +depends=( + desktop-file-utils + ming + qt5-multimedia + qt5-svg + shared-mime-info + xdg-utils +) +makedepends=( + git + qt5-tools +) +install=$pkgname.install +options=(!libtool) +source=( + $pkgname-$pkgver::git+https://github.com/pencil2d/pencil#commit=$pkgcommit + ${pkgname%2d}.{desktop,png,xml} +) +sha512sums=( + SKIP + bd291f9f484077260751220de4723f1f005f97f4340904283ba7ecda52888dd2562e5d6424e3063b1e72b5ffd0af4c658b09742473106262910f1f50aec0dfff + 2158141d405290ef018d5fa19e35c9b909c8e85b0f2d41e74a652eab35749727fa9b15993b594fff78659954d30a7df71323a563ea10ac17c17d3ce86a15f687 + 654a2adc27c015414d122b11f70c9381097abc9f972a914c01f8fefa18c3f8ab7e97aa4b573115d9c8ff70115af21c5e6f3daa535a84a7a1044c56daa97444f8 +) +no3rdlib=no # !!! unstable build !!! +[ $no3rdlib == yes ] && depends+=(quazip) # build with qt4 (zlib included) +nostaticlib=no # !!! crash in test and app compilation !!! + # $srcdir/$pkgname-$pkgver/{app,tests}/../core_lib//libcore_lib.so: undefined reference to `vtable for LayerImage' + +prepare() { + cd $srcdir/$pkgname-$pkgver + + if [ $no3rdlib == yes ]; then + # remove unused 3rdlib (quazip and zlib) source + rm -vr 3rdlib + sed -i '\|^quazip|d + \|^zlib|d + \|^SUBDIRS| s| quazip zlib|| + \|core_lib.depends|d + ' pencil.pro + sed -i '\|DEPENDPATH| s|$$PWD/../3rdlib/quazip|/usr/lib| + \|DEPENDPATH| s|$$PWD/../3rdlib/zlib|/usr/lib| + \|INCLUDEPATH| s|$$PWD/../3rdlib/quazip|/usr/include/quazip| + \|INCLUDEPATH| s|$$PWD/../3rdlib/zlib|/usr/include| + \|LIBS| s|$$OUT_PWD/../3rdlib/quazip/|/usr/lib| + \|LIBS| s|$$OUT_PWD/../3rdlib/zlib/ -lzlib|/usr/lib| + \|PRE_TARGETDEPS| s|$$OUT_PWD/../3rdlib/quazip/libquazip.a|/usr/lib/libquazip.so| + \|PRE_TARGETDEPS| s|$$OUT_PWD/../3rdlib/zlib/libzlib.a|/usr/lib/libz.so| + ' app/app.pro core_lib/core_lib.pro tests/tests.pro + fi + + if [ $nostaticlib == yes ]; then + # remove staticlib configuration + sed -i '\|^CONFIG| s| staticlib|| + s|libcore_lib.a|libcore_lib.so| + ' core_lib/core_lib.pro + fi +} + +build() { + cd $srcdir/$pkgname-$pkgver + export QTDIR=/usr + qmake-qt5 PREFIX=$pkgdir/usr && make +} + +package() { + cd $srcdir/$pkgname-$pkgver + make DESTDIR=$pkgdir install + + # package executable files that's not added in Makefile + install -vd $pkgdir/usr/bin + install -vD $srcdir/$pkgname-$pkgver/app/Pencil2D $pkgdir/usr/bin/pencil2d + install -vD $srcdir/$pkgname-$pkgver/tests/tests $pkgdir/usr/bin/pencil2d-tests + + # remove 3rdlib conflicting headers + [ $no3rdlib == no ] && rm -vr $pkgdir/usr/include + + if [ $nostaticlib == yes ]; then + # package library files that's not added in Makefile + install -vd $pkgdir/usr/lib + install -vD $srcdir/$pkgname-$pkgver/core_lib/libcore_lib.so $pkgdir/usr/lib + install -vD $srcdir/$pkgname-$pkgver/core_lib/libcore_lib.so.1 $pkgdir/usr/lib + install -vD $srcdir/$pkgname-$pkgver/core_lib/libcore_lib.so.1.0 $pkgdir/usr/lib + install -vD $srcdir/$pkgname-$pkgver/core_lib/libcore_lib.so.1.0.0 $pkgdir/usr/lib + else + # remove unused lib files + rm -vr $pkgdir/usr/lib + fi + + install -vdp $pkgdir/usr/share/{applications,mime/packages,pixmaps} + install -vD $srcdir/${pkgname%2d}.desktop $pkgdir/usr/share/applications + install -vD $srcdir/${pkgname%2d}.png $pkgdir/usr/share/mime/packages + install -vD $srcdir/${pkgname%2d}.xml $pkgdir/usr/share/pixmaps +} |