summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gentoo.org>2011-08-06 19:19:45 +0000
committerMatt Turner <mattst88@gentoo.org>2011-08-06 19:19:45 +0000
commit226818f3a1a1ea23f46539a7fb08f191ca29bf15 (patch)
treefff8bf8ec459020a1f853d14d33e3c132405a9ac /app-arch/lbzip2
parentmedia-sound/lltag: Fix dependencies (diff)
downloadgentoo-2-226818f3a1a1ea23f46539a7fb08f191ca29bf15.tar.gz
gentoo-2-226818f3a1a1ea23f46539a7fb08f191ca29bf15.tar.bz2
gentoo-2-226818f3a1a1ea23f46539a7fb08f191ca29bf15.zip
BSD fixes: Replaced dependency on app-shells/dash with app-shells/bash; Added option to use freebsd-ubin instead of sys-process/time. Removed _X_OPEN_SOURCE from Makefile. Thanks to Alexis Ballier, Laszlo Ersek, and Naohiro Aota for their suggestions in bug 370685.
(Portage version: 2.1.10.3/cvs/Linux x86_64)
Diffstat (limited to 'app-arch/lbzip2')
-rw-r--r--app-arch/lbzip2/ChangeLog11
-rw-r--r--app-arch/lbzip2/files/0.23-Makefile.patch44
-rw-r--r--app-arch/lbzip2/lbzip2-0.23-r2.ebuild59
3 files changed, 113 insertions, 1 deletions
diff --git a/app-arch/lbzip2/ChangeLog b/app-arch/lbzip2/ChangeLog
index 01cc1fffdad0..bcd75af1c60b 100644
--- a/app-arch/lbzip2/ChangeLog
+++ b/app-arch/lbzip2/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for app-arch/lbzip2
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-arch/lbzip2/ChangeLog,v 1.15 2011/08/06 18:53:43 mattst88 Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-arch/lbzip2/ChangeLog,v 1.16 2011/08/06 19:19:45 mattst88 Exp $
+
+*lbzip2-0.23-r2 (06 Aug 2011)
+
+ 06 Aug 2011; Matt Turner <mattst88@gentoo.org> +files/0.23-Makefile.patch,
+ +lbzip2-0.23-r2.ebuild:
+ BSD fixes: Replaced dependency on app-shells/dash with app-shells/bash; Added
+ option to use freebsd-ubin instead of sys-process/time. Removed
+ _X_OPEN_SOURCE from Makefile. Thanks to Alexis Ballier, Laszlo Ersek, and
+ Naohiro Aota for their suggestions in bug 370685.
06 Aug 2011; Matt Turner <mattst88@gentoo.org> metadata.xml:
Add myself as a maintainer.
diff --git a/app-arch/lbzip2/files/0.23-Makefile.patch b/app-arch/lbzip2/files/0.23-Makefile.patch
new file mode 100644
index 000000000000..9b8b439399cf
--- /dev/null
+++ b/app-arch/lbzip2/files/0.23-Makefile.patch
@@ -0,0 +1,44 @@
+--- Makefile 2009-04-04 00:33:49.000000000 +0200
++++ Makefile.new 2009-04-15 21:12:02.886390550 +0200
+@@ -1,34 +1,26 @@
+ # Makefile,v 1.9 2009-04-03 22:33:49 lacos Exp
+ .POSIX:
+
+-CC=gcc
+-CFLAGS=$$($(SHELL) lfs.sh CFLAGS) -D _XOPEN_SOURCE=500 -pipe -ansi -pedantic \
+- -O2
+-
+-
+-
+-
+-LDFLAGS=-s $$($(SHELL) lfs.sh LDFLAGS)
+-LIBS=-l pthread -l bz2 $$($(SHELL) lfs.sh LIBS)
++LIBS=-lpthread -lbz2
+
+ lbzip2: main.o lbzip2.o lbunzip2.o lbunzip2_single.o lacos_rbtree.o
+- $(CC) -o lbzip2 $(LDFLAGS) main.o lbzip2.o lbunzip2.o \
++ $(CC) $(CPPFLAGS) $(LDFLAGS) -o lbzip2 main.o lbzip2.o lbunzip2.o \
+ lbunzip2_single.o lacos_rbtree.o $(LIBS)
+
+ main.o: main.c main.h lbunzip2_single.h lbunzip2.h lbzip2.h
+- $(CC) $(CFLAGS) -c main.c
++ $(CC) $(CFLAGS) $(CPPFLAGS) -c main.c
+
+ lbzip2.o: lbzip2.c main.h lbzip2.h lacos_rbtree.h
+- $(CC) $(CFLAGS) -c lbzip2.c
++ $(CC) $(CFLAGS) $(CPPFLAGS) -c lbzip2.c
+
+ lbunzip2.o: lbunzip2.c main.h lbunzip2.h lacos_rbtree.h
+- $(CC) $(CFLAGS) -c lbunzip2.c
++ $(CC) $(CFLAGS) $(CPPFLAGS) -c lbunzip2.c
+
+ lbunzip2_single.o: lbunzip2_single.c main.h lbunzip2_single.h
+- $(CC) $(CFLAGS) -c lbunzip2_single.c
++ $(CC) $(CFLAGS) $(CPPFLAGS) -c lbunzip2_single.c
+
+ lacos_rbtree.o: lacos_rbtree.c lacos_rbtree.h
+- $(CC) $(CFLAGS) -c lacos_rbtree.c
++ $(CC) $(CFLAGS) $(CPPFLAGS) -c lacos_rbtree.c
+
+ clean:
+ rm -f lbzip2 main.o lbzip2.o lbunzip2.o lbunzip2_single.o \
diff --git a/app-arch/lbzip2/lbzip2-0.23-r2.ebuild b/app-arch/lbzip2/lbzip2-0.23-r2.ebuild
new file mode 100644
index 000000000000..8836d20c458c
--- /dev/null
+++ b/app-arch/lbzip2/lbzip2-0.23-r2.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-arch/lbzip2/lbzip2-0.23-r2.ebuild,v 1.1 2011/08/06 19:19:45 mattst88 Exp $
+
+EAPI="3"
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Parallel bzip2 utility"
+HOMEPAGE="http://lacos.hu/"
+SRC_URI="http://lacos.web.elte.hu/pub/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="symlink test"
+
+RDEPEND="app-arch/bzip2"
+DEPEND="${REDEPEND}
+ test? (
+ app-shells/bash
+ sys-devel/bc
+ || ( sys-process/time sys-freebsd/freebsd-ubin )
+ )"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-s_isreg.patch
+ epatch "${FILESDIR}"/0.23-Makefile.patch
+}
+
+src_compile() {
+ append-lfs-flags
+ emake CC=$(tc-getCC) || die "emake failed"
+}
+
+src_test() {
+ if [ -t 0 ] || return; then
+ rm -rf "${T}/scratch" "${T}/results" "${T}/rnd"
+ hexdump -n 10485760 /dev/urandom > "${T}/rnd"
+ emake -j1 SHELL="${EPREFIX}/bin/bash --posix" PATH="${S}:${PATH}" TESTFILE="${T}/rnd" check \
+ || die "make check failed"
+ else
+ ewarn "make check must be run attached to a terminal"
+ fi
+}
+
+src_install() {
+ dobin ${PN} || die "Installation of ${PN} failed"
+ dodoc ChangeLog README || die "no docs"
+ doman ${PN}.1 || die "no man"
+ insinto /usr/share/${PN}
+ doins corr-perf.sh malloc_trace.pl || die
+
+ if use symlink; then
+ dosym ${PN} /usr/bin/bzip2 || die
+ fi
+}