summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libre/bzip2-static/PKGBUILD47
-rw-r--r--libre/bzip2-static/bzip2-1.0.4-bzip2recover.patch12
2 files changed, 59 insertions, 0 deletions
diff --git a/libre/bzip2-static/PKGBUILD b/libre/bzip2-static/PKGBUILD
new file mode 100644
index 000000000..059195fab
--- /dev/null
+++ b/libre/bzip2-static/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Márcio Silva <coadde@parabola.nu>
+# based of bzip2
+
+_pkgname=bzip2
+pkgname=bzip2-static
+pkgver=1.0.6
+pkgrel=5
+pkgdesc="A high-quality data compression program (static libraries only)"
+arch=('i686' 'x86_64' 'armv7h')
+license=('custom')
+url="http://sources.redhat.com/bzip2"
+groups=('base')
+depends=('bzip2')
+options=('staticlibs')
+source=(http://www.bzip.org/$pkgver/bzip2-$pkgver.tar.gz
+ bzip2-1.0.4-bzip2recover.patch)
+sha1sums=('3f89f861209ce81a6bab1fd1998c0ef311712002'
+ '85ce76fdb67f52f152bba368c1de81132dcdbdb5')
+
+build() {
+ cd "$srcdir/$_pkgname-$pkgver"
+
+ # add large-file support
+ sed -e 's/^CFLAGS=\(.*\)$/CFLAGS=\1 \$(BIGFILES)/' -i ./Makefile-libbz2_so
+
+ # use our optimization
+ sed -i "s|-O2|${CFLAGS}|g" Makefile
+ sed -i "s|-O2|${CFLAGS}|g" Makefile-libbz2_so
+
+ patch -Np1 < ../bzip2-1.0.4-bzip2recover.patch
+
+ make -f Makefile-libbz2_so
+ make bzip2 bzip2recover
+}
+
+check() {
+ cd "$srcdir/$_pkgname-$pkgver"
+ make test
+}
+
+package() {
+ cd "$srcdir/$_pkgname-$pkgver"
+
+ install -dm755 $pkgdir/usr/lib
+
+ install -m755 libbz2.a $pkgdir/usr/lib
+}
diff --git a/libre/bzip2-static/bzip2-1.0.4-bzip2recover.patch b/libre/bzip2-static/bzip2-1.0.4-bzip2recover.patch
new file mode 100644
index 000000000..e2bfe1cc1
--- /dev/null
+++ b/libre/bzip2-static/bzip2-1.0.4-bzip2recover.patch
@@ -0,0 +1,12 @@
+--- bzip2-1.0.4/bzip2recover.c.pom 2007-01-03 03:00:55.000000000 +0100
++++ bzip2-1.0.4/bzip2recover.c 2007-02-05 11:55:17.000000000 +0100
+@@ -309,7 +309,8 @@
+ UInt32 buffHi, buffLo, blockCRC;
+ Char* p;
+
+- strcpy ( progName, argv[0] );
++ strncpy ( progName, argv[0], BZ_MAX_FILENAME-1);
++ progName[BZ_MAX_FILENAME-1]='\0';
+ inFileName[0] = outFileName[0] = 0;
+
+ fprintf ( stderr,