From 98088db2fb578462243693df554e5b755f6a5ea7 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 28 Feb 2012 22:03:19 +0100 Subject: [PATCH] chroot-bzip2: provides bzip2 and bzip2-devel vpkgs. --- srcpkgs/chroot-bzip2/chroot-bzip2.rshlibs | 1 + .../Makefile_libbz2_so_fix_soname.diff | 15 ++++++++++++ srcpkgs/chroot-bzip2/template | 23 +++++++++++++++++-- 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/chroot-bzip2/patches/Makefile_libbz2_so_fix_soname.diff diff --git a/srcpkgs/chroot-bzip2/chroot-bzip2.rshlibs b/srcpkgs/chroot-bzip2/chroot-bzip2.rshlibs index 631aa1dda40..08f4ea85448 100644 --- a/srcpkgs/chroot-bzip2/chroot-bzip2.rshlibs +++ b/srcpkgs/chroot-bzip2/chroot-bzip2.rshlibs @@ -1 +1,2 @@ libc.so.6 +libbz2.so.1 diff --git a/srcpkgs/chroot-bzip2/patches/Makefile_libbz2_so_fix_soname.diff b/srcpkgs/chroot-bzip2/patches/Makefile_libbz2_so_fix_soname.diff new file mode 100644 index 00000000000..0b1471af8cd --- /dev/null +++ b/srcpkgs/chroot-bzip2/patches/Makefile_libbz2_so_fix_soname.diff @@ -0,0 +1,15 @@ +--- 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 fc916dd90d8..5a37ee89f88 100644 --- a/srcpkgs/chroot-bzip2/template +++ b/srcpkgs/chroot-bzip2/template @@ -1,6 +1,7 @@ # Template build file for 'chroot-bzip2'. pkgname=chroot-bzip2 version=1.0.6 +revision=1 wrksrc="bzip2-${version}" homepage="http://www.bzip.org" distfiles="http://www.bzip.org/$version/bzip2-$version.tar.gz" @@ -25,17 +26,35 @@ long_desc=" This package is only meant to be used by xbps-src, don't install it manually." +noverifyrdeps=yes bootstrap=yes +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 - make ${makejobs} + sed -i "s|-O2|${CFLAGS}|g" Makefile-libbz2_so + + make ${makejobs} -f Makefile-libbz2_so + make ${makejobs} bzip2recover libbz2.a } do_install() { - vinstall bzip2 755 usr/bin bzip2 + vinstall bzip2-shared 755 usr/bin bzip2 + vinstall bzip2recover 755 usr/bin ln -sf bzip2 ${DESTDIR}/usr/bin/bunzip2 ln -sf bzip2 ${DESTDIR}/usr/bin/bzcat + install -m755 bzdiff bzgrep bzmore ${DESTDIR}/usr/bin + + vinstall libbz2.so.${version} 755 usr/lib + ln -s libbz2.so.${version} ${DESTDIR}/usr/lib/libbz2.so + ln -s libbz2.so.${version} ${DESTDIR}/usr/lib/libbz2.so.1 + ln -s libbz2.so.${version} ${DESTDIR}/usr/lib/libbz2.so.1.0 + + vinstall libbz2.a 644 usr/lib + vinstall bzlib.h 644 usr/include }