1 |
commit: 2594fae266f33b20fe11d36c4ce7e1f3573589f6 |
2 |
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Aug 12 21:27:58 2019 +0000 |
4 |
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Aug 12 21:27:58 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2594fae2 |
7 |
|
8 |
sys-libs/glibc: port to EAPI=7 |
9 |
|
10 |
Package-Manager: Portage-2.3.70, Repoman-2.3.16 |
11 |
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org> |
12 |
|
13 |
sys-libs/glibc/glibc-9999.ebuild | 47 ++++++++++++++-------------------------- |
14 |
1 file changed, 16 insertions(+), 31 deletions(-) |
15 |
|
16 |
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild |
17 |
index 191295bf288..6e19a44aaa1 100644 |
18 |
--- a/sys-libs/glibc/glibc-9999.ebuild |
19 |
+++ b/sys-libs/glibc/glibc-9999.ebuild |
20 |
@@ -1,17 +1,16 @@ |
21 |
# Copyright 1999-2019 Gentoo Authors |
22 |
# Distributed under the terms of the GNU General Public License v2 |
23 |
|
24 |
-EAPI=6 |
25 |
+EAPI=7 |
26 |
|
27 |
PYTHON_COMPAT=( python3_{5,6,7} ) |
28 |
|
29 |
-inherit python-any-r1 prefix eutils eapi7-ver toolchain-funcs flag-o-matic gnuconfig usr-ldscript \ |
30 |
+inherit python-any-r1 prefix eutils toolchain-funcs flag-o-matic gnuconfig usr-ldscript \ |
31 |
multilib systemd multiprocessing |
32 |
|
33 |
DESCRIPTION="GNU libc C library" |
34 |
HOMEPAGE="https://www.gnu.org/software/libc/" |
35 |
LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" |
36 |
-RESTRICT="strip" # Strip ourself #46186 |
37 |
SLOT="2.2" |
38 |
|
39 |
EMULTILIB_PKG="true" |
40 |
@@ -1167,7 +1166,7 @@ glibc_do_src_install() { |
41 |
local builddir=$(builddir nptl) |
42 |
cd "${builddir}" |
43 |
|
44 |
- emake install_root="${D}$(build_eprefix)$(alt_prefix)" install || die |
45 |
+ emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install || die |
46 |
|
47 |
# This version (2.26) provides some compatibility libraries for the NIS/NIS+ support |
48 |
# which come without headers etc. Only needed for binary packages since the |
49 |
@@ -1180,13 +1179,18 @@ glibc_do_src_install() { |
50 |
# '#define VERSION "2.26.90"' -> '2.26.90' |
51 |
local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) |
52 |
|
53 |
- if [[ -e ${ED}$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then |
54 |
+ # gdb is lame and requires some debugging information to remain in |
55 |
+ # libpthread. libthread_db makes no sense stripped as it is only used when debugging. |
56 |
+ dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so |
57 |
+ dostrip -x $(alt_libdir)/libthread_db-1.0.so |
58 |
+ |
59 |
+ if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then |
60 |
# Move versioned .a file out of libdir to evade portage QA checks |
61 |
# instead of using gen_usr_ldscript(). We fix ldscript as: |
62 |
# "GROUP ( /usr/lib64/libm-<pv>.a ..." -> "GROUP ( /usr/lib64/glibc-<pv>/libm-<pv>.a ..." |
63 |
- sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"$(alt_usrlibdir)/libm.a || die |
64 |
+ sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"/$(alt_usrlibdir)/libm.a || die |
65 |
dodir $(alt_usrlibdir)/${P} |
66 |
- mv "${ED}"$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die |
67 |
+ mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die |
68 |
fi |
69 |
|
70 |
# We'll take care of the cache ourselves |
71 |
@@ -1344,7 +1348,7 @@ glibc_do_src_install() { |
72 |
|
73 |
# Generate all locales if this is a native build as locale generation |
74 |
if use compile-locales && ! is_crosscompile ; then |
75 |
- run_locale_gen --inplace-glibc "${ED}" |
76 |
+ run_locale_gen --inplace-glibc "${ED%/}/" |
77 |
sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die |
78 |
fi |
79 |
} |
80 |
@@ -1352,7 +1356,7 @@ glibc_do_src_install() { |
81 |
glibc_headers_install() { |
82 |
local builddir=$(builddir "headers") |
83 |
cd "${builddir}" |
84 |
- emake install_root="${D}$(build_eprefix)$(alt_prefix)" install-headers |
85 |
+ emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers |
86 |
|
87 |
insinto $(alt_headers)/gnu |
88 |
doins "${S}"/include/gnu/stubs.h |
89 |
@@ -1363,23 +1367,6 @@ glibc_headers_install() { |
90 |
dosym usr/include $(alt_prefix)/sys-include |
91 |
} |
92 |
|
93 |
-src_strip() { |
94 |
- # gdb is lame and requires some debugging information to remain in |
95 |
- # libpthread, so we need to strip it by hand. libthread_db makes no |
96 |
- # sense stripped as it is only used when debugging. |
97 |
- local pthread=$(has splitdebug ${FEATURES} && echo "libthread_db" || echo "lib{pthread,thread_db}") |
98 |
- env \ |
99 |
- -uRESTRICT \ |
100 |
- CHOST=${CTARGET} \ |
101 |
- STRIP_MASK="/*/{,tls/}${pthread}*" \ |
102 |
- prepallstrip |
103 |
- # if user has stripping enabled and does not have split debug turned on, |
104 |
- # then leave the debugging sections in libpthread. |
105 |
- if ! has nostrip ${FEATURES} && ! has splitdebug ${FEATURES} ; then |
106 |
- ${STRIP:-${CTARGET}-strip} --strip-debug "${ED}"$(alt_prefix)/*/libpthread-*.so |
107 |
- fi |
108 |
-} |
109 |
- |
110 |
src_install() { |
111 |
if just_headers ; then |
112 |
export ABI=default |
113 |
@@ -1393,8 +1380,6 @@ src_install() { |
114 |
elog "Not installing static glibc libraries" |
115 |
find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete |
116 |
fi |
117 |
- |
118 |
- src_strip |
119 |
} |
120 |
|
121 |
# Simple test to make sure our new glibc isn't completely broken. |
122 |
@@ -1447,7 +1432,7 @@ pkg_preinst() { |
123 |
einfo "Defaulting /etc/host.conf:multi to on" |
124 |
fi |
125 |
|
126 |
- [[ ${ROOT} != "/" ]] && return 0 |
127 |
+ [[ -n ${ROOT} ]] && return 0 |
128 |
[[ -d ${ED}/$(get_libdir) ]] || return 0 |
129 |
[[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check |
130 |
} |
131 |
@@ -1458,10 +1443,10 @@ pkg_postinst() { |
132 |
|
133 |
if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then |
134 |
# Generate fastloading iconv module configuration file. |
135 |
- "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}" |
136 |
+ "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT%/}/" |
137 |
fi |
138 |
|
139 |
- if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then |
140 |
+ if ! is_crosscompile && [[ -z ${ROOT} ]] ; then |
141 |
# Reload init ... if in a chroot or a diff init package, ignore |
142 |
# errors from this step #253697 |
143 |
/sbin/telinit U 2>/dev/null |