From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 68925138334 for ; Sun, 13 Oct 2019 18:12:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9F40EE0830; Sun, 13 Oct 2019 18:12:58 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7CFF2E0830 for ; Sun, 13 Oct 2019 18:12:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E863A34BA3E for ; Sun, 13 Oct 2019 18:12:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EB5D088B for ; Sun, 13 Oct 2019 18:12:54 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1570990366.badffc150a3131970425cc5a8fa86a7ef41e3b99.grobian@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libmissing/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/libmissing/libmissing-1.0.0-r1.ebuild dev-libs/libmissing/libmissing-1.1.0.ebuild X-VCS-Directories: dev-libs/libmissing/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: badffc150a3131970425cc5a8fa86a7ef41e3b99 X-VCS-Branch: master Date: Sun, 13 Oct 2019 18:12:54 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 73fec896-da33-43c2-9305-6bbc44bafc77 X-Archives-Hash: 10ca4b0ac89a267d1e3906e81e0c2376 commit: badffc150a3131970425cc5a8fa86a7ef41e3b99 Author: Fabian Groffen gentoo org> AuthorDate: Sun Oct 13 18:09:59 2019 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Sun Oct 13 18:12:46 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=badffc15 dev-libs/libmissing: revbump to install fixed headers and static lib Package-Manager: Portage-2.3.76, Repoman-2.3.16 Signed-off-by: Fabian Groffen gentoo.org> ...ing-1.0.0-r1.ebuild => libmissing-1.1.0.ebuild} | 54 +++++++++++++++++++--- 1 file changed, 48 insertions(+), 6 deletions(-) diff --git a/dev-libs/libmissing/libmissing-1.0.0-r1.ebuild b/dev-libs/libmissing/libmissing-1.1.0.ebuild similarity index 62% rename from dev-libs/libmissing/libmissing-1.0.0-r1.ebuild rename to dev-libs/libmissing/libmissing-1.1.0.ebuild index c1371f6d4fa..b7099ebe777 100644 --- a/dev-libs/libmissing/libmissing-1.0.0-r1.ebuild +++ b/dev-libs/libmissing/libmissing-1.1.0.ebuild @@ -15,7 +15,7 @@ SRC_URI="https://git.savannah.gnu.org/cgit/gnulib.git/snapshot/gnulib-${GIT_TAG} LICENSE="GPL-2" SLOT="0" KEYWORDS="~ppc-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="static-libs" +#IUSE="static-libs" # dynamic won't work :( DEPEND="" RDEPEND="${DEPEND}" @@ -26,6 +26,25 @@ S="${WORKDIR}/gnulib-${GIT_TAG}" src_prepare() { default + # create a config file with just the definitions we need + mkdir extern-inline || die + cd extern-inline || die + + cat > configure.ac <<- EOS + AC_PREREQ([2.69]) + AC_INIT([${PN}], [${PV}], [prefix@gentoo.org]) + + AC_CONFIG_MACRO_DIR([../m4]) + AC_CONFIG_HEADER([missing-include.h]) + + gl_EXTERN_INLINE + EOS + + eautoreconf + sed -e '1,/PACKAGE_VERSION/d' missing-include.h.in \ + > "${T}"/missing-include.h + cd .. || die + mkdir "${PN}" || die cd "${PN}" || die cat > configure.ac <<- EOS @@ -92,11 +111,11 @@ src_prepare() { "${modules[@]}" sed -i -e '/^noinst_LTLIBRARIES /s/noinst_/lib_/' lib/Makefile.am || die - echo "libmissing_la_LDFLAGS += version-info ${PV//./:}" >> lib/Makefile.am + echo "libmissing_la_LDFLAGS += -version-info ${PV//./:}" >> lib/Makefile.am cat >> lib/Makefile.am << 'EOS' install-data-local: $(BUILT_SOURCES) @for hdr in $(BUILT_SOURCES); do \ - $(INSTALL_HEADER) -D "$$hdr" $(DESTDIR)$(includedir)/missing/$${hdr}; \ + $(INSTALL_HEADER) -D "$$hdr" $(DESTDIR)$(includedir)/$${hdr}; \ done; EOS @@ -107,12 +126,16 @@ src_configure() { cd "${PN}" || die # ensure we don't pick up installed libmissing + export CPPFLAGS+="-DDISABLE_LIBMISSING" # disable libmissing headers + export BINUTILS_CONFIG_DISABLE_MISSING=1 # disable -lmissing from ldwrapper export CPPFLAGS="${CPPFLAGS/-I${EPREFIX}\/usr\/include\/missing/}" export LIBS="${LIBS/-lmissing/}" einfo "CPPFLAGS: ${CPPFLAGS}" einfo "LIBS: ${LIBS}" - default + # gnulib cannot be used a shared library, doing so results in stack + # protector checks failing for reasons yet unknown to me + econf --disable-shared --enable-static || die } src_compile() { @@ -122,8 +145,27 @@ src_compile() { src_install() { cd "${PN}" || die + default - rm "${ED}"/usr/lib/libmissing.la \ - "$(use static-libs || echo "${ED}"/usr/lib/libmissing.a)" || die + rm -f "${ED}"/usr/lib/libmissing.la || die + + cd "${ED}/usr/include" || die + + # fix config.h dependency so we can can distribute it without + local f + for f in $(grep "_GL_INLINE_HEADER_BEGIN" -l *.h */*.h) ; do + cat "${T}"/missing-include.h "${f}" > "${f}.new" + [[ -s "${f}.new" ]] && mv "${f}.new" "${f}" + done + + # modify all header-files so we can disable them and that they won't + # clash with gnulib-based packages + for f in *.h */*.h ; do + sed -i \ + -e '1i#ifdef DISABLE_LIBMISSING\n# include_next <'"${f}"'>\n#else' \ + -e '$a#endif /* DISABLE_LIBMISSING */' \ + -e 's/_GL_/_LIBMISSING_/g' \ + "${f}" || die + done }