summaryrefslogtreecommitdiff
path: root/core/bzip2
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-09-26 23:14:33 +0000
committerroot <root@rshg054.dnsready.net>2011-09-26 23:14:33 +0000
commitabcf87c553a18aec8372de7f690b5aa91a7a0d24 (patch)
treebb3862ac84497766acac0ac182d5ad948e2a382a /core/bzip2
parent21efc9511d14394cc1d8426e2e0a6c668964fbe9 (diff)
Mon Sep 26 23:14:33 UTC 2011
Diffstat (limited to 'core/bzip2')
-rw-r--r--core/bzip2/PKGBUILD26
-rw-r--r--core/bzip2/bzip2-1.0.4-bzip2recover.patch12
2 files changed, 31 insertions, 7 deletions
diff --git a/core/bzip2/PKGBUILD b/core/bzip2/PKGBUILD
index 26634ee4a..dfd22798f 100644
--- a/core/bzip2/PKGBUILD
+++ b/core/bzip2/PKGBUILD
@@ -1,21 +1,23 @@
-# $Id: PKGBUILD 91051 2010-09-21 12:28:55Z ibiru $
+# $Id: PKGBUILD 138504 2011-09-25 17:23:16Z dan $
# Maintainer:
# Contributor: Judd <jvinet@zeroflux.org>
pkgname=bzip2
pkgver=1.0.6
-pkgrel=1
+pkgrel=2
pkgdesc="A high-quality data compression program"
arch=('i686' 'x86_64')
license=('custom')
url="http://sources.redhat.com/bzip2"
groups=('base')
depends=('glibc')
-source=(http://www.bzip.org/$pkgver/bzip2-$pkgver.tar.gz)
-md5sums=('00b516f4704d4a7cb50a1d97e6e8e15b')
+source=(http://www.bzip.org/$pkgver/bzip2-$pkgver.tar.gz
+ bzip2-1.0.4-bzip2recover.patch)
+md5sums=('00b516f4704d4a7cb50a1d97e6e8e15b'
+ '8a8bca02bdeaf2fd8913aeb549577e7e')
build() {
- cd $srcdir/$pkgname-$pkgver
+ cd "$srcdir/$pkgname-$pkgver"
# add large-file support
sed -e 's/^CFLAGS=\(.*\)$/CFLAGS=\1 \$(BIGFILES)/' -i ./Makefile-libbz2_so
@@ -24,8 +26,19 @@ build() {
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 bzip2recover libbz2.a
+ make bzip2 bzip2recover libbz2.a
+}
+
+check() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make test
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
install -dm755 $pkgdir/bin
install -m755 bzip2-shared $pkgdir/bin/bzip2
@@ -54,4 +67,3 @@ build() {
install -Dm644 $srcdir/${pkgname}-${pkgver}/LICENSE \
$pkgdir/usr/share/licenses/${pkgname}/LICENSE
}
-
diff --git a/core/bzip2/bzip2-1.0.4-bzip2recover.patch b/core/bzip2/bzip2-1.0.4-bzip2recover.patch
new file mode 100644
index 000000000..e2bfe1cc1
--- /dev/null
+++ b/core/bzip2/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,