diff options
author | Mike Frysinger <vapier@gentoo.org> | 2008-05-02 04:13:33 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2008-05-02 04:13:33 +0000 |
commit | 803ba3298b173ef42962d8b94205ddce338eecbf (patch) | |
tree | d54b594102b9ef01000314424fcbd2180a78449d /sys-libs | |
parent | Version bump. Added dep for dev-python/coverage, removed broken pudge build i... (diff) | |
download | gentoo-2-803ba3298b173ef42962d8b94205ddce338eecbf.tar.gz gentoo-2-803ba3298b173ef42962d8b94205ddce338eecbf.tar.bz2 gentoo-2-803ba3298b173ef42962d8b94205ddce338eecbf.zip |
Fixes from kerzol for mingw targets #182903.
(Portage version: 2.2_pre5)
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/zlib/ChangeLog | 8 | ||||
-rw-r--r-- | sys-libs/zlib/files/zlib-1.2.3-build.patch | 66 | ||||
-rw-r--r-- | sys-libs/zlib/zlib-1.2.3-r1.ebuild | 49 |
3 files changed, 102 insertions, 21 deletions
diff --git a/sys-libs/zlib/ChangeLog b/sys-libs/zlib/ChangeLog index 1fffae211412..927417040493 100644 --- a/sys-libs/zlib/ChangeLog +++ b/sys-libs/zlib/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-libs/zlib -# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/zlib/ChangeLog,v 1.69 2007/05/12 09:15:08 kumba Exp $ +# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/zlib/ChangeLog,v 1.70 2008/05/02 04:13:33 vapier Exp $ + + 02 May 2008; Mike Frysinger <vapier@gentoo.org> + +files/zlib-1.2.3-build.patch, zlib-1.2.3-r1.ebuild: + Fixes from kerzol for mingw targets #182903. 12 May 2007; Joshua Kinard <kumba@gentoo.org> zlib-1.2.3-r1.ebuild: Stable on mips. diff --git a/sys-libs/zlib/files/zlib-1.2.3-build.patch b/sys-libs/zlib/files/zlib-1.2.3-build.patch new file mode 100644 index 000000000000..10435b85fbd6 --- /dev/null +++ b/sys-libs/zlib/files/zlib-1.2.3-build.patch @@ -0,0 +1,66 @@ +--- zlib-1.2.3/configure ++++ zlib-1.2.3/configure +@@ -23,7 +23,7 @@ + VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h` + VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h` + VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h` +-AR=${AR-"ar rc"} ++AR=${AR-"ar"} + RANLIB=${RANLIB-"ranlib"} + prefix=${prefix-/usr/local} + exec_prefix=${exec_prefix-'${prefix}'} +--- zlib-1.2.3/Makefile.in ++++ zlib-1.2.3/Makefile.in +@@ -70,7 +70,7 @@ + fi + + libz.a: $(OBJS) $(OBJA) +- $(AR) $@ $(OBJS) $(OBJA) ++ $(AR) rc $@ $(OBJS) $(OBJA) + -@ ($(RANLIB) $@ || true) >/dev/null 2>&1 + + match.o: match.S +--- zlib-1.2.3/win32/Makefile.gcc ++++ zlib-1.2.3/win32/Makefile.gcc +@@ -30,21 +30,23 @@ + #LOC = -DASMV + #LOC = -DDEBUG -g + +-CC = gcc +-CFLAGS = $(LOC) -O3 -Wall ++CC ?= gcc ++CFLAGS ?= $(LOC) -O3 -Wall + +-AS = $(CC) +-ASFLAGS = $(LOC) -Wall ++AS ?= $(CC) ++ASFLAGS ?= $(LOC) -Wall + + LD = $(CC) +-LDFLAGS = $(LOC) -s ++LDFLAGS ?= $(LOC) -s + +-AR = ar ++AR ?= ar + ARFLAGS = rcs + +-RC = windres ++RC ?= windres + RCFLAGS = --define GCC_WINDRES + ++DLLWRAP ?= dllwrap ++ + CP = cp -fp + # If GNU install is available, replace $(CP) with install. + INSTALL = $(CP) +@@ -79,9 +81,8 @@ + $(IMPLIB): $(SHAREDLIB) + + $(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlibrc.o +- dllwrap --driver-name $(CC) --def win32/zlib.def \ ++ $(DLLWRAP) --driver-name $(CC) --def win32/zlib.def \ + --implib $(IMPLIB) -o $@ $(OBJS) $(OBJA) zlibrc.o +- strip $@ + + example: example.o $(STATICLIB) + $(LD) $(LDFLAGS) -o $@ example.o $(STATICLIB) diff --git a/sys-libs/zlib/zlib-1.2.3-r1.ebuild b/sys-libs/zlib/zlib-1.2.3-r1.ebuild index db80e4947d3a..e40adea053dc 100644 --- a/sys-libs/zlib/zlib-1.2.3-r1.ebuild +++ b/sys-libs/zlib/zlib-1.2.3-r1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2007 Gentoo Foundation +# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/zlib/zlib-1.2.3-r1.ebuild,v 1.12 2007/05/14 23:51:14 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/zlib/zlib-1.2.3-r1.ebuild,v 1.13 2008/05/02 04:13:33 vapier Exp $ inherit eutils flag-o-matic toolchain-funcs @@ -19,24 +19,30 @@ RDEPEND="" src_unpack() { unpack ${A} cd "${S}" + epatch "${FILESDIR}"/${P}-build.patch epatch "${FILESDIR}"/${P}-visibility-support.patch #149929 - # Make sure we link with glibc at all times epatch "${FILESDIR}"/${PN}-1.2.1-glibc.patch - # Needed for Alpha and prelink epatch "${FILESDIR}"/${PN}-1.2.1-build-fPIC.patch epatch "${FILESDIR}"/${PN}-1.2.1-configure.patch #55434 - # fix shared library test on -fPIC dependant archs epatch "${FILESDIR}"/${PN}-1.2.1-fPIC.patch epatch "${FILESDIR}"/${PN}-1.2.3-r1-bsd-soname.patch #123571 epatch "${FILESDIR}"/${PN}-1.2.3-LDFLAGS.patch #126718 - sed -i -e '/ldconfig/d' Makefile.in + sed -i -e '/ldconfig/d' Makefile* } src_compile() { - tc-export CC RANLIB - export AR="$(tc-getAR) rc" - ./configure --shared --prefix=/usr --libdir=/$(get_libdir) || die - emake || die + tc-export AR CC RANLIB + case ${CHOST} in + *-mingw*|mingw*) + export RC=${CHOST}-windres DLLWRAP=${CHOST}-dllwrap + emake -f win32/Makefile.gcc prefix=/usr || die + ;; + *) + # not an autoconf script, so cant use econf + ./configure --shared --prefix=/usr --libdir=/$(get_libdir) || die + emake || die + ;; + esac } src_install() { @@ -46,9 +52,7 @@ src_install() { doins zconf.h zlib.h doman zlib.3 - dodoc FAQ README ChangeLog - docinto txt - dodoc algorithm.txt + dodoc FAQ README ChangeLog algorithm.txt # we don't need the static lib in /lib # as it's only for compiling against @@ -56,10 +60,17 @@ src_install() { # all the shared libs go into /lib # for NFS based /usr - into / - dolib libz.so.${PV} - ( cd "${D}"/$(get_libdir) ; chmod 755 libz.so.* ) - dosym libz.so.${PV} /$(get_libdir)/libz.so - dosym libz.so.${PV} /$(get_libdir)/libz.so.1 - gen_usr_ldscript libz.so + case ${CHOST} in + *-mingw*|mingw*) + dolib zlib1.dll libzdll.a || die + ;; + *) + into / + dolib libz.so.${PV} + ( cd "${D}"/$(get_libdir) ; chmod 755 libz.so.* ) + dosym libz.so.${PV} /$(get_libdir)/libz.so + dosym libz.so.${PV} /$(get_libdir)/libz.so.1 + gen_usr_ldscript libz.so + ;; + esac } |