diff options
author | Pacho Ramos <pacho@gentoo.org> | 2013-06-23 07:42:43 +0000 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2013-06-23 07:42:43 +0000 |
commit | d0b0d1326cd2b4cfb2dc0e85bad9b7ef955e39a4 (patch) | |
tree | 405e194374d07d24e22c79e4576b8c42c74b5fb2 /app-arch | |
parent | Mask packages currently included in emul-linux-x86-baselibs that are incorpor... (diff) | |
download | gentoo-2-d0b0d1326cd2b4cfb2dc0e85bad9b7ef955e39a4.tar.gz gentoo-2-d0b0d1326cd2b4cfb2dc0e85bad9b7ef955e39a4.tar.bz2 gentoo-2-d0b0d1326cd2b4cfb2dc0e85bad9b7ef955e39a4.zip |
Add ebuild supporting native multilib (#457134, thanks to mgorny and vapier for their help)
(Portage version: 2.1.12.9/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
Diffstat (limited to 'app-arch')
-rw-r--r-- | app-arch/bzip2/ChangeLog | 8 | ||||
-rw-r--r-- | app-arch/bzip2/bzip2-1.0.6-r4.ebuild | 86 |
2 files changed, 93 insertions, 1 deletions
diff --git a/app-arch/bzip2/ChangeLog b/app-arch/bzip2/ChangeLog index 4b7d6cb6e245..74704a2532af 100644 --- a/app-arch/bzip2/ChangeLog +++ b/app-arch/bzip2/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-arch/bzip2 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/bzip2/ChangeLog,v 1.105 2013/06/05 00:08:52 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-arch/bzip2/ChangeLog,v 1.106 2013/06/23 07:42:43 pacho Exp $ + +*bzip2-1.0.6-r4 (23 Jun 2013) + + 23 Jun 2013; Pacho Ramos <pacho@gentoo.org> +bzip2-1.0.6-r4.ebuild: + Add ebuild supporting native multilib (#457134, thanks to mgorny and vapier + for their help) 05 Jun 2013; Mike Frysinger <vapier@gentoo.org> metadata.xml: Add upstream CPE tag (security info) from ChromiumOS. diff --git a/app-arch/bzip2/bzip2-1.0.6-r4.ebuild b/app-arch/bzip2/bzip2-1.0.6-r4.ebuild new file mode 100644 index 000000000000..a6f51bfe8154 --- /dev/null +++ b/app-arch/bzip2/bzip2-1.0.6-r4.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-arch/bzip2/bzip2-1.0.6-r4.ebuild,v 1.1 2013/06/23 07:42:43 pacho Exp $ + +# XXX: atm, libbz2.a is always PIC :(, so it is always built quickly +# (since we're building shared libs) ... + +EAPI=4 + +inherit eutils toolchain-funcs flag-o-matic multilib multilib-minimal + +DESCRIPTION="A high-quality data compressor used extensively by Gentoo Linux" +HOMEPAGE="http://www.bzip.org/" +SRC_URI="http://www.bzip.org/${PV}/${P}.tar.gz" + +LICENSE="BZIP2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" +IUSE="static static-libs" + +RDEPEND="abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224 )" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-1.0.4-makefile-CFLAGS.patch + epatch "${FILESDIR}"/${PN}-1.0.6-saneso.patch + epatch "${FILESDIR}"/${PN}-1.0.4-man-links.patch #172986 + epatch "${FILESDIR}"/${PN}-1.0.6-progress.patch + epatch "${FILESDIR}"/${PN}-1.0.3-no-test.patch + epatch "${FILESDIR}"/${PN}-1.0.4-POSIX-shell.patch #193365 + epatch "${FILESDIR}"/${PN}-1.0.6-mingw.patch #393573 + + # - Use right man path + # - Generate symlinks instead of hardlinks + # - pass custom variables to control libdir + sed -i \ + -e 's:\$(PREFIX)/man:\$(PREFIX)/share/man:g' \ + -e 's:ln -s -f $(PREFIX)/bin/:ln -f -s :' \ + -e 's:$(PREFIX)/lib:$(PREFIX)/$(LIBDIR):g' \ + -e 's:ln -s bzip2.1:& -f:g' \ + Makefile || die + + multilib_copy_sources +} + +bemake() { + emake \ + CC="$(tc-getCC)" \ + AR="$(tc-getAR)" \ + RANLIB="$(tc-getRANLIB)" \ + "$@" +} + +multilib_src_compile() { + bemake -f Makefile-libbz2_so all + use static && append-flags -static + bemake all +} + +multilib_src_install() { + emake PREFIX="${ED}"/usr LIBDIR=$(get_libdir) install + + # Install the shared lib manually. We install: + # .x.x.x - standard shared lib behavior + # .x.x - SONAME some distros use #338321 + # .x - SONAME Gentoo uses + dolib.so libbz2.so.${PV} + local v + for v in libbz2.so{,.{${PV%%.*},${PV%.*}}} ; do + dosym libbz2.so.${PV} /usr/$(get_libdir)/${v} + done + gen_usr_ldscript -a bz2 + + use static || newbin bzip2-shared bzip2 +} + +multilib_src_install_all() { + dodoc README* CHANGES bzip2.txt manual.* + + # move "important" bzip2 binaries to /bin and use the shared libbz2.so + dodir /bin + mv "${ED}"/usr/bin/b{zip2,zcat,unzip2} "${ED}"/bin/ || die + dosym bzip2 /bin/bzcat + dosym bzip2 /bin/bunzip2 + + use static-libs || find "${ED}"/usr -name libbz2.a -delete +} |