diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-09-16 21:40:42 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-09-16 21:40:42 +0000 |
commit | a42f4f2df7958da4cf50db5727d567d1ccb70484 (patch) | |
tree | ca151f90a2b9fcee79c777294eda2a24502d2fdd /sys-libs/zlib/zlib-1.2.5.1-r1.ebuild | |
parent | version bump (bug #383275) (diff) | |
download | gentoo-2-a42f4f2df7958da4cf50db5727d567d1ccb70484.tar.gz gentoo-2-a42f4f2df7958da4cf50db5727d567d1ccb70484.tar.bz2 gentoo-2-a42f4f2df7958da4cf50db5727d567d1ccb70484.zip |
Rename OF/ON defines in exported header to avoid collisions with other packages #383179 by Ben Longbons.
(Portage version: 2.2.0_alpha58/cvs/Linux x86_64)
Diffstat (limited to 'sys-libs/zlib/zlib-1.2.5.1-r1.ebuild')
-rw-r--r-- | sys-libs/zlib/zlib-1.2.5.1-r1.ebuild | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/sys-libs/zlib/zlib-1.2.5.1-r1.ebuild b/sys-libs/zlib/zlib-1.2.5.1-r1.ebuild new file mode 100644 index 000000000000..d55325d0f433 --- /dev/null +++ b/sys-libs/zlib/zlib-1.2.5.1-r1.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/zlib/zlib-1.2.5.1-r1.ebuild,v 1.1 2011/09/16 21:40:42 vapier Exp $ + +inherit eutils toolchain-funcs + +DESCRIPTION="Standard (de)compression library" +HOMEPAGE="http://www.zlib.net/" +SRC_URI="http://www.gzip.org/zlib/${P}.tar.gz + http://www.zlib.net/current/beta/${P}.tar.gz" + +LICENSE="ZLIB" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" +IUSE="" + +RDEPEND="!<dev-libs/libxml2-2.7.7" #309623 + +src_unpack() { + unpack ${A} + cd "${S}" + # trust exit status of the compiler rather than stderr #55434 + # -if test "`(...) 2>&1`" = ""; then + # +if (...) 2>/dev/null; then + sed -i 's|\<test "`\([^"]*\) 2>&1`" = ""|\1 2>/dev/null|' configure || die + + epatch "${FILESDIR}"/${P}-version.patch + epatch "${FILESDIR}"/${P}-symlinks.patch +} + +echoit() { echo "$@"; "$@"; } +src_compile() { + case ${CHOST} in + *-mingw*|mingw*) + emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}- || die + sed \ + -e 's|@prefix@|/usr|g' \ + -e 's|@exec_prefix@|${prefix}|g' \ + -e 's|@libdir@|${exec_prefix}/'$(get_libdir)'|g' \ + -e 's|@sharedlibdir@|${exec_prefix}/'$(get_libdir)'|g' \ + -e 's|@includedir@|${prefix}/include|g' \ + -e 's|@VERSION@|'${PV}'|g' \ + zlib.pc.in > zlib.pc || die + ;; + *) # not an autoconf script, so can't use econf + echoit ./configure --shared --prefix=/usr --libdir=/usr/$(get_libdir) || die + emake || die + ;; + esac +} + +src_install() { + case ${CHOST} in + *-mingw*|mingw*) + emake -f win32/Makefile.gcc install \ + BINARY_PATH="${D}/usr/bin" \ + LIBRARY_PATH="${D}/usr/$(get_libdir)" \ + INCLUDE_PATH="${D}/usr/include" \ + SHARED_MODE=1 \ + || die + insinto /usr/share/pkgconfig + doins zlib.pc || die + ;; + + *) + emake install DESTDIR="${D}" LDCONFIG=: || die + gen_usr_ldscript -a z + ;; + esac + + # clean up namespace a little #383179 + # we do it here so we only have to tweak 2 files + sed -i -r 's:\<(O[FN])\>:_Z_\1:g' "${D}"/usr/include/*.h + + dodoc FAQ README ChangeLog doc/*.txt +} |