diff options
author | Andreas K. Hüttel <dilfridge@gentoo.org> | 2019-08-12 23:27:58 +0200 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2019-08-12 23:27:58 +0200 |
commit | 2594fae266f33b20fe11d36c4ce7e1f3573589f6 (patch) | |
tree | 8f8c317ce9fa636fffbc3270d593863dbbd4656a /sys-libs | |
parent | dev-perl/Lab-Measurement: Remove old (diff) | |
download | gentoo-2594fae266f33b20fe11d36c4ce7e1f3573589f6.tar.gz gentoo-2594fae266f33b20fe11d36c4ce7e1f3573589f6.tar.bz2 gentoo-2594fae266f33b20fe11d36c4ce7e1f3573589f6.zip |
sys-libs/glibc: port to EAPI=7
Package-Manager: Portage-2.3.70, Repoman-2.3.16
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/glibc/glibc-9999.ebuild | 47 |
1 files changed, 16 insertions, 31 deletions
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild index 191295bf2889..6e19a44aaa10 100644 --- a/sys-libs/glibc/glibc-9999.ebuild +++ b/sys-libs/glibc/glibc-9999.ebuild @@ -1,17 +1,16 @@ # Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 PYTHON_COMPAT=( python3_{5,6,7} ) -inherit python-any-r1 prefix eutils eapi7-ver toolchain-funcs flag-o-matic gnuconfig usr-ldscript \ +inherit python-any-r1 prefix eutils toolchain-funcs flag-o-matic gnuconfig usr-ldscript \ multilib systemd multiprocessing DESCRIPTION="GNU libc C library" HOMEPAGE="https://www.gnu.org/software/libc/" LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" -RESTRICT="strip" # Strip ourself #46186 SLOT="2.2" EMULTILIB_PKG="true" @@ -1167,7 +1166,7 @@ glibc_do_src_install() { local builddir=$(builddir nptl) cd "${builddir}" - emake install_root="${D}$(build_eprefix)$(alt_prefix)" install || die + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install || die # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support # which come without headers etc. Only needed for binary packages since the @@ -1180,13 +1179,18 @@ glibc_do_src_install() { # '#define VERSION "2.26.90"' -> '2.26.90' local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) - if [[ -e ${ED}$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then + # gdb is lame and requires some debugging information to remain in + # libpthread. libthread_db makes no sense stripped as it is only used when debugging. + dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so + dostrip -x $(alt_libdir)/libthread_db-1.0.so + + if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then # Move versioned .a file out of libdir to evade portage QA checks # instead of using gen_usr_ldscript(). We fix ldscript as: # "GROUP ( /usr/lib64/libm-<pv>.a ..." -> "GROUP ( /usr/lib64/glibc-<pv>/libm-<pv>.a ..." - sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"$(alt_usrlibdir)/libm.a || die + sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"/$(alt_usrlibdir)/libm.a || die dodir $(alt_usrlibdir)/${P} - mv "${ED}"$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die + mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die fi # We'll take care of the cache ourselves @@ -1344,7 +1348,7 @@ glibc_do_src_install() { # Generate all locales if this is a native build as locale generation if use compile-locales && ! is_crosscompile ; then - run_locale_gen --inplace-glibc "${ED}" + run_locale_gen --inplace-glibc "${ED%/}/" sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die fi } @@ -1352,7 +1356,7 @@ glibc_do_src_install() { glibc_headers_install() { local builddir=$(builddir "headers") cd "${builddir}" - emake install_root="${D}$(build_eprefix)$(alt_prefix)" install-headers + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers insinto $(alt_headers)/gnu doins "${S}"/include/gnu/stubs.h @@ -1363,23 +1367,6 @@ glibc_headers_install() { dosym usr/include $(alt_prefix)/sys-include } -src_strip() { - # gdb is lame and requires some debugging information to remain in - # libpthread, so we need to strip it by hand. libthread_db makes no - # sense stripped as it is only used when debugging. - local pthread=$(has splitdebug ${FEATURES} && echo "libthread_db" || echo "lib{pthread,thread_db}") - env \ - -uRESTRICT \ - CHOST=${CTARGET} \ - STRIP_MASK="/*/{,tls/}${pthread}*" \ - prepallstrip - # if user has stripping enabled and does not have split debug turned on, - # then leave the debugging sections in libpthread. - if ! has nostrip ${FEATURES} && ! has splitdebug ${FEATURES} ; then - ${STRIP:-${CTARGET}-strip} --strip-debug "${ED}"$(alt_prefix)/*/libpthread-*.so - fi -} - src_install() { if just_headers ; then export ABI=default @@ -1393,8 +1380,6 @@ src_install() { elog "Not installing static glibc libraries" find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete fi - - src_strip } # Simple test to make sure our new glibc isn't completely broken. @@ -1447,7 +1432,7 @@ pkg_preinst() { einfo "Defaulting /etc/host.conf:multi to on" fi - [[ ${ROOT} != "/" ]] && return 0 + [[ -n ${ROOT} ]] && return 0 [[ -d ${ED}/$(get_libdir) ]] || return 0 [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check } @@ -1458,10 +1443,10 @@ pkg_postinst() { if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then # Generate fastloading iconv module configuration file. - "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}" + "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT%/}/" fi - if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then + if ! is_crosscompile && [[ -z ${ROOT} ]] ; then # Reload init ... if in a chroot or a diff init package, ignore # errors from this step #253697 /sbin/telinit U 2>/dev/null |