summaryrefslogtreecommitdiff
path: root/pcr/pencil2d
diff options
context:
space:
mode:
authorcoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2014-07-24 18:52:48 -0300
committercoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2014-07-24 18:52:48 -0300
commit67a2af695512d455d925a28378806d9baac68a15 (patch)
tree932c2196a91e0cbdd3ad82c7038b41387072173a /pcr/pencil2d
parentcb9b3a84087f8ee776d3d03a0a7097eab4cdf42c (diff)
downloadabslibre-67a2af695512d455d925a28378806d9baac68a15.tar.gz
abslibre-67a2af695512d455d925a28378806d9baac68a15.tar.bz2
abslibre-67a2af695512d455d925a28378806d9baac68a15.zip
add pencil2d to pcr
Diffstat (limited to 'pcr/pencil2d')
-rw-r--r--pcr/pencil2d/PKGBUILD107
-rw-r--r--pcr/pencil2d/pencil.desktop11
-rw-r--r--pcr/pencil2d/pencil.pngbin0 -> 16354 bytes
-rw-r--r--pcr/pencil2d/pencil.xml11
-rw-r--r--pcr/pencil2d/pencil2d.install13
5 files changed, 142 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
+}
diff --git a/pcr/pencil2d/pencil.desktop b/pcr/pencil2d/pencil.desktop
new file mode 100644
index 000000000..dbe25130c
--- /dev/null
+++ b/pcr/pencil2d/pencil.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=Pencil 2D
+Comment=2D Traditional Animation
+Exec=pencil2d
+Icon=pencil.png
+Terminal=false
+Type=Application
+Categories=Graphics;Application;
+MimeType=application/x-pencil;
+X-Desktop-File-Install-Version=0.15
diff --git a/pcr/pencil2d/pencil.png b/pcr/pencil2d/pencil.png
new file mode 100644
index 000000000..0fe4d1cd8
--- /dev/null
+++ b/pcr/pencil2d/pencil.png
Binary files differ
diff --git a/pcr/pencil2d/pencil.xml b/pcr/pencil2d/pencil.xml
new file mode 100644
index 000000000..0f13b8830
--- /dev/null
+++ b/pcr/pencil2d/pencil.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
+ <mime-type type="application/x-pencil">
+ <comment xml:lang="en">Pencil Animation</comment>
+ <glob pattern="*.pcl" />
+ <magic priority="80">
+ <match value="&lt;!DOCTYPE PencilDocument" type="string" offset="0:64"/>
+ </magic>
+ <icon name="pencil"/>
+ </mime-type>
+</mime-info>
diff --git a/pcr/pencil2d/pencil2d.install b/pcr/pencil2d/pencil2d.install
new file mode 100644
index 000000000..724bfce00
--- /dev/null
+++ b/pcr/pencil2d/pencil2d.install
@@ -0,0 +1,13 @@
+post_install() {
+ update-desktop-database -q
+ update-mime-database usr/share/mime &> /dev/null
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}