public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mike Frysinger" <vapier@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/zlib/files/, sys-libs/zlib/
Date: Thu, 21 Jun 2018 02:57:49 +0000 (UTC)	[thread overview]
Message-ID: <1529549826.89cbe844bb4c4363270c692f50df5741cc2e78d7.vapier@gentoo> (raw)

commit:     89cbe844bb4c4363270c692f50df5741cc2e78d7
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 21 02:55:38 2018 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu Jun 21 02:57:06 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89cbe844

sys-libs/zlib: drop install of minizip/crypt.h #658536

Closes: https://bugs.gentoo.org/658536

 .../zlib-1.2.11-minizip-drop-crypt-header.patch    |  38 +++++++
 sys-libs/zlib/zlib-1.2.11-r2.ebuild                | 123 +++++++++++++++++++++
 2 files changed, 161 insertions(+)

diff --git a/sys-libs/zlib/files/zlib-1.2.11-minizip-drop-crypt-header.patch b/sys-libs/zlib/files/zlib-1.2.11-minizip-drop-crypt-header.patch
new file mode 100644
index 00000000000..2e0a93e9194
--- /dev/null
+++ b/sys-libs/zlib/files/zlib-1.2.11-minizip-drop-crypt-header.patch
@@ -0,0 +1,38 @@
+https://bugs.gentoo.org/658536
+https://github.com/madler/zlib/pull/229
+
+From e490ddad3091574a0c2e3b5a66a8fee9a7ab212f Mon Sep 17 00:00:00 2001
+From: Pavel Raiskup <praiskup@redhat.com>
+Date: Sun, 19 Feb 2017 16:42:12 +0100
+Subject: [PATCH] minizip: don't install crypt.h
+
+People did mistakenly or unintentionally include crypt.h before,
+don't install this internal header from now.
+---
+ contrib/minizip/Makefile.am | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/contrib/minizip/Makefile.am b/contrib/minizip/Makefile.am
+index d343011ebc3b..4f46610238d2 100644
+--- a/contrib/minizip/Makefile.am
++++ b/contrib/minizip/Makefile.am
+@@ -26,13 +26,15 @@ libminizip_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0 -lz
+ 
+ minizip_includedir = $(includedir)/minizip
+ minizip_include_HEADERS = \
+-	crypt.h \
+ 	ioapi.h \
+ 	mztools.h \
+ 	unzip.h \
+ 	zip.h \
+ 	${iowin32_h}
+ 
++noinst_HEADERS = \
++	crypt.h
++
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = minizip.pc
+ 
+-- 
+2.17.1
+

diff --git a/sys-libs/zlib/zlib-1.2.11-r2.ebuild b/sys-libs/zlib/zlib-1.2.11-r2.ebuild
new file mode 100644
index 00000000000..3133384c67c
--- /dev/null
+++ b/sys-libs/zlib/zlib-1.2.11-r2.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+AUTOTOOLS_AUTO_DEPEND="no"
+
+inherit autotools toolchain-funcs multilib multilib-minimal
+
+DESCRIPTION="Standard (de)compression library"
+HOMEPAGE="https://zlib.net/"
+SRC_URI="https://zlib.net/${P}.tar.gz
+	http://www.gzip.org/zlib/${P}.tar.gz
+	http://www.zlib.net/current/beta/${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0/1" # subslot = SONAME
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="minizip static-libs"
+
+DEPEND="minizip? ( ${AUTOTOOLS_DEPEND} )"
+RDEPEND="!<dev-libs/libxml2-2.7.7" #309623
+
+src_prepare() {
+	epatch "${FILESDIR}"/${PN}-1.2.11-fix-deflateParams-usage.patch
+	epatch "${FILESDIR}"/${PN}-1.2.11-minizip-drop-crypt-header.patch #658536
+
+	if use minizip ; then
+		cd contrib/minizip || die
+		eautoreconf
+	fi
+
+	case ${CHOST} in
+	*-mingw*|mingw*)
+		# uses preconfigured Makefile rather than configure script
+		multilib_copy_sources
+		;;
+	esac
+}
+
+echoit() { echo "$@"; "$@"; }
+
+multilib_src_configure() {
+	case ${CHOST} in
+	*-mingw*|mingw*)
+		;;
+	*)      # not an autoconf script, so can't use econf
+		local uname=$("${EPREFIX}"/usr/share/gnuconfig/config.sub "${CHOST}" | cut -d- -f3) #347167
+		echoit "${S}"/configure \
+			--shared \
+			--prefix="${EPREFIX}/usr" \
+			--libdir="${EPREFIX}/usr/$(get_libdir)" \
+			${uname:+--uname=${uname}} \
+			|| die
+		;;
+	esac
+
+	if use minizip ; then
+		local minizipdir="contrib/minizip"
+		mkdir -p "${BUILD_DIR}/${minizipdir}" || die
+		cd ${minizipdir} || die
+		ECONF_SOURCE="${S}/${minizipdir}" \
+		econf $(use_enable static-libs static)
+	fi
+}
+
+multilib_src_compile() {
+	case ${CHOST} in
+	*-mingw*|mingw*)
+		emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}-
+		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
+		;;
+	*)
+		emake
+		;;
+	esac
+	use minizip && emake -C contrib/minizip
+}
+
+sed_macros() {
+	# 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' "$@" || die
+}
+
+multilib_src_install() {
+	case ${CHOST} in
+	*-mingw*|mingw*)
+		emake -f win32/Makefile.gcc install \
+			BINARY_PATH="${ED}/usr/bin" \
+			LIBRARY_PATH="${ED}/usr/$(get_libdir)" \
+			INCLUDE_PATH="${ED}/usr/include" \
+			SHARED_MODE=1
+		# overwrites zlib.pc created from win32/Makefile.gcc #620136
+		insinto /usr/$(get_libdir)/pkgconfig
+		doins zlib.pc
+		;;
+
+	*)
+		emake install DESTDIR="${D}" LDCONFIG=:
+		gen_usr_ldscript -a z
+		;;
+	esac
+	sed_macros "${ED}"/usr/include/*.h
+
+	if use minizip ; then
+		emake -C contrib/minizip install DESTDIR="${D}"
+		sed_macros "${ED}"/usr/include/minizip/*.h
+	fi
+
+	use static-libs || rm -f "${ED}"/usr/$(get_libdir)/lib{z,minizip}.{a,la} #419645
+}
+
+multilib_src_install_all() {
+	dodoc FAQ README ChangeLog doc/*.txt
+	use minizip && dodoc contrib/minizip/*.txt
+}


             reply	other threads:[~2018-06-21  2:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-21  2:57 Mike Frysinger [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-01-22  7:24 [gentoo-commits] repo/gentoo:master commit in: sys-libs/zlib/files/, sys-libs/zlib/ Sam James
2022-11-25  8:19 Sam James
2022-10-14 19:04 Sam James
2022-08-16  0:52 Sam James
2022-03-31  0:21 Sam James
2022-03-29  2:00 Sam James
2022-01-28 12:25 Ionen Wolkens
2017-09-22 21:53 Thomas Deutschmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1529549826.89cbe844bb4c4363270c692f50df5741cc2e78d7.vapier@gentoo \
    --to=vapier@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox