diff options
author | Fabian Groffen <grobian@gentoo.org> | 2019-10-13 20:09:59 +0200 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2019-10-13 20:12:46 +0200 |
commit | badffc150a3131970425cc5a8fa86a7ef41e3b99 (patch) | |
tree | fcf98fe373fcccfa3285b872eee5c12b9ae2f477 /dev-libs/libmissing | |
parent | x11-misc/mugshot: update remote section (diff) | |
download | gentoo-badffc150a3131970425cc5a8fa86a7ef41e3b99.tar.gz gentoo-badffc150a3131970425cc5a8fa86a7ef41e3b99.tar.bz2 gentoo-badffc150a3131970425cc5a8fa86a7ef41e3b99.zip |
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 <grobian@gentoo.org>
Diffstat (limited to 'dev-libs/libmissing')
-rw-r--r-- | dev-libs/libmissing/libmissing-1.1.0.ebuild (renamed from dev-libs/libmissing/libmissing-1.0.0-r1.ebuild) | 54 |
1 files 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 index c1371f6d4faf..b7099ebe7775 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 } |