From 8fc5b428566df979cf6ef2b6d47fae399c736ac4 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 5 Feb 2013 14:47:34 +0100 Subject: [PATCH] bzip2, chroot-bzip2: make this cross buildable. --- .../Makefile_libbz2_so_fix_soname.diff | 36 +++++++++++++++++-- srcpkgs/bzip2/template | 23 +----------- srcpkgs/chroot-bzip2/patches | 1 + .../Makefile_libbz2_so_fix_soname.diff | 15 -------- srcpkgs/chroot-bzip2/template | 25 +------------ 5 files changed, 37 insertions(+), 63 deletions(-) create mode 120000 srcpkgs/chroot-bzip2/patches delete mode 100644 srcpkgs/chroot-bzip2/patches/Makefile_libbz2_so_fix_soname.diff diff --git a/srcpkgs/bzip2/patches/Makefile_libbz2_so_fix_soname.diff b/srcpkgs/bzip2/patches/Makefile_libbz2_so_fix_soname.diff index 0b1471af8c..56d039058c 100644 --- a/srcpkgs/bzip2/patches/Makefile_libbz2_so_fix_soname.diff +++ b/srcpkgs/bzip2/patches/Makefile_libbz2_so_fix_soname.diff @@ -1,5 +1,17 @@ ---- Makefile-libbz2_so.orig 2010-10-21 23:53:37.730855571 +0200 -+++ Makefile-libbz2_so 2010-10-21 23:54:25.784425275 +0200 +--- Makefile-libbz2_so.orig 2010-09-11 01:07:52.000000000 +0200 ++++ Makefile-libbz2_so 2013-02-05 14:40:44.940114622 +0100 +@@ -22,9 +22,9 @@ + + + SHELL=/bin/sh +-CC=gcc ++CC ?= gcc + BIGFILES=-D_FILE_OFFSET_BITS=64 +-CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES) ++CFLAGS += -fpic -fPIC -Wall -Winline $(BIGFILES) + + OBJS= blocksort.o \ + huffman.o \ @@ -35,10 +35,11 @@ OBJS= blocksort.o \ bzlib.o @@ -13,3 +25,23 @@ clean: rm -f $(OBJS) bzip2.o libbz2.so.1.0.6 libbz2.so.1.0 bzip2-shared +--- Makefile.orig 2013-02-05 14:41:08.980543085 +0100 ++++ Makefile 2013-02-05 14:41:34.306940942 +0100 +@@ -15,13 +15,13 @@ + SHELL=/bin/sh + + # To assist in cross-compiling +-CC=gcc +-AR=ar +-RANLIB=ranlib ++CC ?= gcc ++AR ?= ar ++RANLIB ?= ranlib + LDFLAGS= + + BIGFILES=-D_FILE_OFFSET_BITS=64 +-CFLAGS=-Wall -Winline -O2 -g $(BIGFILES) ++CFLAGS += -Wall -Winline -O2 $(BIGFILES) + + # Where you want it installed when you do 'make install' + PREFIX=/usr/local diff --git a/srcpkgs/bzip2/template b/srcpkgs/bzip2/template index 7fd4ab9617..58734bb218 100644 --- a/srcpkgs/bzip2/template +++ b/srcpkgs/bzip2/template @@ -1,39 +1,18 @@ # Template build file for 'bzip2'. pkgname=bzip2 version=1.0.6 -revision=5 +revision=6 homepage="http://www.bzip.org" distfiles="http://www.bzip.org/$version/$pkgname-$version.tar.gz" short_desc="The bzip2 compression library" license="BSD" maintainer="Juan RP " checksum=a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd -long_desc=" - bzip2 is a freely available, patent free, high-quality data compressor. - It typically compresses files to within 10%% to 15%% of the best available - techniques, whilst being around twice as fast at compression and six times - faster at decompression. - - bzip2 compresses files using the Burrows-Wheeler block-sorting text - compression algorithm, and Huffman coding. Compression is generally - considerably better than that achieved by more conventional LZ77/LZ78-based - compressors, and approaches the performance of the PPM family of statistical - compressors. - - The archive file format of bzip2 (.bz2) is incompatible with that of its - predecessor, bzip (.bz)." subpackages="bzip2-devel" conflicts="chroot-bzip2>=0" do_build() { - # 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 - make ${makejobs} -f Makefile-libbz2_so make ${makejobs} bzip2recover libbz2.a } diff --git a/srcpkgs/chroot-bzip2/patches b/srcpkgs/chroot-bzip2/patches new file mode 120000 index 0000000000..39d78bca0d --- /dev/null +++ b/srcpkgs/chroot-bzip2/patches @@ -0,0 +1 @@ +../bzip2/patches \ No newline at end of file diff --git a/srcpkgs/chroot-bzip2/patches/Makefile_libbz2_so_fix_soname.diff b/srcpkgs/chroot-bzip2/patches/Makefile_libbz2_so_fix_soname.diff deleted file mode 100644 index 0b1471af8c..0000000000 --- a/srcpkgs/chroot-bzip2/patches/Makefile_libbz2_so_fix_soname.diff +++ /dev/null @@ -1,15 +0,0 @@ ---- Makefile-libbz2_so.orig 2010-10-21 23:53:37.730855571 +0200 -+++ Makefile-libbz2_so 2010-10-21 23:54:25.784425275 +0200 -@@ -35,10 +35,11 @@ OBJS= blocksort.o \ - bzlib.o - - all: $(OBJS) -- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS) -+ $(CC) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.6 $(OBJS) - $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6 - rm -f libbz2.so.1.0 - ln -s libbz2.so.1.0.6 libbz2.so.1.0 -+ ln -s libbz2.so.1.0.6 libbz2.so.1 - - clean: - rm -f $(OBJS) bzip2.o libbz2.so.1.0.6 libbz2.so.1.0 bzip2-shared diff --git a/srcpkgs/chroot-bzip2/template b/srcpkgs/chroot-bzip2/template index 5a37ee89f8..6ea32d4603 100644 --- a/srcpkgs/chroot-bzip2/template +++ b/srcpkgs/chroot-bzip2/template @@ -1,7 +1,7 @@ # Template build file for 'chroot-bzip2'. pkgname=chroot-bzip2 version=1.0.6 -revision=1 +revision=2 wrksrc="bzip2-${version}" homepage="http://www.bzip.org" distfiles="http://www.bzip.org/$version/bzip2-$version.tar.gz" @@ -9,22 +9,6 @@ short_desc="The bzip2 compression library" license="BSD" maintainer="Juan RP " checksum=a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd -long_desc=" - bzip2 is a freely available, patent free, high-quality data compressor. - It typically compresses files to within 10%% to 15%% of the best available - techniques, whilst being around twice as fast at compression and six times - faster at decompression. - - bzip2 compresses files using the Burrows-Wheeler block-sorting text - compression algorithm, and Huffman coding. Compression is generally - considerably better than that achieved by more conventional LZ77/LZ78-based - compressors, and approaches the performance of the PPM family of statistical - compressors. - - The archive file format of bzip2 (.bz2) is incompatible with that of its - predecessor, bzip (.bz). - - This package is only meant to be used by xbps-src, don't install it manually." noverifyrdeps=yes bootstrap=yes @@ -32,13 +16,6 @@ provides="bzip2-${version} bzip2-devel-${version}" conflicts="bzip2>=0" do_build() { - # 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 - make ${makejobs} -f Makefile-libbz2_so make ${makejobs} bzip2recover libbz2.a }