summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Husmann2015-06-09 00:51:58 +0200
committerStefan Husmann2015-06-09 00:51:58 +0200
commit0f1c2a4bcb1b9e7cbb6e412ad20417efbc307f56 (patch)
tree94480b4d0112b9da2a1062160a4835f7f0d28f39
downloadaur-0f1c2a4bcb1b9e7cbb6e412ad20417efbc307f56.tar.gz
initial version
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD39
-rw-r--r--do.sh.patch30
3 files changed, 87 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..9258a1f67f2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = tif22pnm
+ pkgdesc = converter used by sam2p if available
+ pkgver = 0.14
+ pkgrel = 1
+ url = http://pts.szit.bme.hu
+ arch = i686
+ arch = x86_64
+ license = GPL
+ depends = libpng
+ depends = libtiff
+ provides = tif22pnm
+ source = http://sam2p.googlecode.com/files/tif22pnm-0.14.tar.gz
+ source = do.sh.patch
+ md5sums = 7bb776bb2eca962f5237ea2cc6dcf85d
+ md5sums = 94a5d88cb8ddd234a6117a906c9d5a28
+
+pkgname = tif22pnm
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..8cb7e8062d0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,39 @@
+# Contributor: Stefan Husmann <stefan.husmann@t-systems.com>
+# Contributor: menta
+pkgname=tif22pnm
+pkgver=0.14
+pkgrel=1
+pkgdesc="converter used by sam2p if available"
+arch=('i686' 'x86_64')
+depends=('libpng' 'libtiff')
+url="http://pts.szit.bme.hu"
+license=('GPL')
+provides=(tif22pnm)
+source=(http://sam2p.googlecode.com/files/$pkgname-$pkgver.tar.gz do.sh.patch)
+md5sums=('7bb776bb2eca962f5237ea2cc6dcf85d'
+ '94a5d88cb8ddd234a6117a906c9d5a28')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ # patching do.sh
+ # Inspiration:
+ # http://code.google.com/p/pdfsizeopt/issues/detail?id=48#c9 --> -lz flag
+ # "undefined reference to symbol 'pow@@GLIBC_2.2.5'" --> -lm flag
+ # https://aur.archlinux.org/packages.php?ID=7573
+ cp "$srcdir/do.sh.patch" do.sh.patch
+ patch -p0 < do.sh.patch
+ rm do.sh.patch
+
+ ./configure --prefix=$pkgdir/usr
+ ./do.sh compile
+}
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ install -d $pkgdir/usr/share/tif22pnm
+ install -d $pkgdir/usr/bin
+ install -m644 README $pkgdir/usr/share/tif22pnm
+ install -m755 tif22pnm $pkgdir/usr/bin
+ install -m755 png22pnm $pkgdir/usr/bin
+}
diff --git a/do.sh.patch b/do.sh.patch
new file mode 100644
index 00000000000..2c9ca570812
--- /dev/null
+++ b/do.sh.patch
@@ -0,0 +1,30 @@
+--- do.sh.old 2011-12-15 23:43:08.000000000 +0100
++++ do.sh 2011-12-28 11:52:21.000000000 +0100
+@@ -98,11 +98,11 @@
+ for C in $SOURCES; do OS="$OS ${C%.*}.o"; done
+ set -e
+ for C in $SOURCES; do
+- echo + $L_CC $CPPFLAGS $CFLAGS $CFLAGSB -c $C
+- $L_CC $CPPFLAGS $CFLAGS $CFLAGSB -c $C
++ echo + $L_CC $CPPFLAGS $CFLAGS $CFLAGSB -c $C $EXTRAFLAGS
++ $L_CC $CPPFLAGS $CFLAGS $CFLAGSB -c $C $EXTRAFLAGS
+ done
+- echo + $L_LD $LDFLAGS $OS -o "$TARGET" $LIBS
+- $L_LD $LDFLAGS $OS -o "$TARGET" $LIBS
++ echo + $L_LD $LDFLAGS $OS -o "$TARGET" $LIBS $EXTRAFLAGS
++ $L_LD $LDFLAGS $OS -o "$TARGET" $LIBS $EXTRAFLAGS
+ set +e
+ export TARGET
+ echo "Created executable file: $TARGET (size: `perl -e 'print -s $ENV{TARGET}'`)."
+@@ -111,9 +111,11 @@
+ SOURCES='ptspnm.c minigimp.c miniglib.c ptstiff3.c tif22pnm.c'
+ TARGET=tif22pnm
+ LIBS="$LIBS_TIFF"
++EXTRAFLAGS=""
+ build
+
+ SOURCES='png22pnm.c'
+ TARGET=png22pnm
+ LIBS="$LIBS_PNG"
++EXTRAFLAGS="-lz -lm"
+ build