summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD35
-rw-r--r--hp2xx.install21
-rw-r--r--libpng.patch20
4 files changed, 96 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..d6ca169726d4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = hp2xx
+ pkgdesc = Convert vector-oriented graphics data from HP-GL plotter language into a variety of popular graphics formats.
+ pkgver = 3.4.4
+ pkgrel = 3
+ url = http://www.gnu.org/software/hp2xx/
+ install = hp2xx.install
+ arch = i686
+ arch = x86_64
+ license = GPL
+ depends = libpng
+ depends = libtiff
+ depends = libjpeg
+ depends = libx11
+ source = http://ftpmirror.gnu.org/hp2xx/hp2xx-3.4.4.tar.gz
+ source = libpng.patch
+ md5sums = 18808580d24b7caf2c4c7045c093329f
+ md5sums = 22d577c7f10ada9370e06cf095af9ae9
+
+pkgname = hp2xx
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..acc35dd29768
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>
+
+pkgname=hp2xx
+pkgver=3.4.4
+pkgrel=3
+pkgdesc="Convert vector-oriented graphics data from HP-GL plotter language into a variety of popular graphics formats."
+arch=('i686' 'x86_64')
+depends=('libpng' 'libtiff' 'libjpeg' 'libx11')
+url="http://www.gnu.org/software/$pkgname/"
+license=('GPL')
+source=("http://ftpmirror.gnu.org/$pkgname/$pkgname-$pkgver.tar.gz" libpng.patch)
+md5sums=('18808580d24b7caf2c4c7045c093329f'
+ '22d577c7f10ada9370e06cf095af9ae9')
+install=$pkgname.install
+
+prepare() {
+ cd $srcdir/$pkgname-$pkgver
+ patch -p1 < $srcdir/libpng.patch
+ sed -i '95s+\@+ at +' doc/hp2xxinf.tex
+}
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ make all
+ cd doc
+ makeinfo hp2xxinf.tex -o hp2xx.info
+}
+
+package () {
+ cd $srcdir/$pkgname-$pkgver
+ install -d "$pkgdir"/usr/share/{man/man1,info} "$pkgdir"/usr/bin
+ make install prefix="$pkgdir/usr" \
+ man1dir="$pkgdir/usr/share/man/man1" \
+ infodir="$pkgdir/usr/share/info"
+}
diff --git a/hp2xx.install b/hp2xx.install
new file mode 100644
index 000000000000..17d990a1c5a2
--- /dev/null
+++ b/hp2xx.install
@@ -0,0 +1,21 @@
+infodir=usr/share/info
+filelist=(hp2xx.info)
+
+post_install() {
+ [[ -x usr/bin/install-info ]] || return 0
+ for file in "${filelist[@]}"; do
+ install-info "$infodir/$file.gz" "$infodir/dir" 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+pre_remove() {
+ [[ -x usr/bin/install-info ]] || return 0
+ for file in "${filelist[@]}"; do
+ install-info --delete "$infodir/$file.gz" "$infodir/dir" 2> /dev/null
+ done
+}
+
diff --git a/libpng.patch b/libpng.patch
new file mode 100644
index 000000000000..97c20426fc82
--- /dev/null
+++ b/libpng.patch
@@ -0,0 +1,20 @@
+diff -Naur hp2xx-3.4.4.orig/sources/png.c hp2xx-3.4.4.new/sources/png.c
+--- hp2xx-3.4.4.orig/sources/png.c 2014-06-26 17:30:18.661919903 +0200
++++ hp2xx-3.4.4.new/sources/png.c 2014-06-26 17:32:10.554634712 +0200
+@@ -5,6 +5,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include "to_png.h"
++#include <zlib.h>
+ #include <png.h>
+
+ #define PDNCOL 256
+@@ -36,7 +37,7 @@
+ }
+
+ /* set up error handlimg for libpng */
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+ return;
+ }