summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-05-10 08:35:08 +0000
committerMike Frysinger <vapier@gentoo.org>2008-05-10 08:35:08 +0000
commite30e8142bbe011eea9483106a9d51784cf409869 (patch)
treed274a2e2eb467b1f1b357ed5cbd7a7313c6505eb /app-arch
parentversion bump (diff)
downloadgentoo-2-e30e8142bbe011eea9483106a9d51784cf409869.tar.gz
gentoo-2-e30e8142bbe011eea9483106a9d51784cf409869.tar.bz2
gentoo-2-e30e8142bbe011eea9483106a9d51784cf409869.zip
If building with USE=nocxx, neuter lzma-utils to only provide decompressor #220899 by Ulrich Müller.
(Portage version: 2.2_pre5)
Diffstat (limited to 'app-arch')
-rw-r--r--app-arch/lzma-utils/ChangeLog7
-rwxr-xr-xapp-arch/lzma-utils/files/lzma-nocxx.sh12
-rw-r--r--app-arch/lzma-utils/lzma-utils-4.32.5.ebuild32
3 files changed, 46 insertions, 5 deletions
diff --git a/app-arch/lzma-utils/ChangeLog b/app-arch/lzma-utils/ChangeLog
index 1e98b8fd7932..96e89b63dc80 100644
--- a/app-arch/lzma-utils/ChangeLog
+++ b/app-arch/lzma-utils/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for app-arch/lzma-utils
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-arch/lzma-utils/ChangeLog,v 1.31 2008/04/03 18:19:14 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-arch/lzma-utils/ChangeLog,v 1.32 2008/05/10 08:35:08 vapier Exp $
+
+ 10 May 2008; Mike Frysinger <vapier@gentoo.org> +files/lzma-nocxx.sh,
+ lzma-utils-4.32.5.ebuild:
+ If building with USE=nocxx, neuter lzma-utils to only provide decompressor
+ #220899 by Ulrich Müller.
03 Apr 2008; Raúl Porcel <armin76@gentoo.org> lzma-utils-4.32.5.ebuild:
Add ~sparc-fbsd
diff --git a/app-arch/lzma-utils/files/lzma-nocxx.sh b/app-arch/lzma-utils/files/lzma-nocxx.sh
new file mode 100755
index 000000000000..cc81029b4d61
--- /dev/null
+++ b/app-arch/lzma-utils/files/lzma-nocxx.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+if [ "$1" = "-dc" ] ; then
+ shift
+ cat "$@" | lzmadec
+else
+ (
+ echo "You've built lzma-utils without C++ support."
+ echo "If you want lzma support, rebuild with C++ support."
+ ) 1>&2
+ exit 1
+fi
diff --git a/app-arch/lzma-utils/lzma-utils-4.32.5.ebuild b/app-arch/lzma-utils/lzma-utils-4.32.5.ebuild
index a6701d0e78c2..40a606aa9d36 100644
--- a/app-arch/lzma-utils/lzma-utils-4.32.5.ebuild
+++ b/app-arch/lzma-utils/lzma-utils-4.32.5.ebuild
@@ -1,21 +1,45 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-arch/lzma-utils/lzma-utils-4.32.5.ebuild,v 1.8 2008/04/03 18:19:14 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-arch/lzma-utils/lzma-utils-4.32.5.ebuild,v 1.9 2008/05/10 08:35:08 vapier Exp $
+# Remember: we cannot leverage autotools in this ebuild in order
+# to avoid circular deps with autotools
+
+inherit eutils
+
+MY_P="lzma-${PV/_}"
DESCRIPTION="LZMA interface made easy"
HOMEPAGE="http://tukaani.org/lzma/"
-SRC_URI="http://tukaani.org/lzma/lzma-${PV/_}.tar.gz"
+SRC_URI="http://tukaani.org/lzma/${MY_P}.tar.gz
+ nocxx? ( mirror://gentoo/${P}-nocxx.patch.bz2 )"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd"
-IUSE=""
+IUSE="nocxx"
RDEPEND="!app-arch/lzma"
-S=${WORKDIR}/lzma-${PV/_}
+S=${WORKDIR}/${MY_P}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ if use nocxx ; then
+ epatch "${WORKDIR}"/${P}-nocxx.patch
+ epunt_cxx
+ fi
+}
src_install() {
emake install DESTDIR="${D}" || die
dodoc AUTHORS ChangeLog NEWS README THANKS
+ use nocxx && newbin "${FILESDIR}"/lzma-nocxx.sh lzma
+}
+
+pkg_postinst() {
+ if use nocxx ; then
+ ewarn "You have a neutered lzma package install due to USE=nocxx."
+ ewarn "You will only be able to unpack lzma archives."
+ fi
}