Gentoo Archives: gentoo-commits

From: "Andreas Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/glibc/
Date: Sat, 14 Oct 2017 21:11:29
Message-Id: 1508015455.199b5b1ddb668f9adc2777f31c417013f63a32cd.dilfridge@gentoo
1 commit: 199b5b1ddb668f9adc2777f31c417013f63a32cd
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 14 21:10:20 2017 +0000
4 Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 14 21:10:55 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=199b5b1d
7
8 sys-libs/glibc: Various updates to live ebuild
9
10 * Remove references to add-on mechanism (removed upstream)
11 * Fix install phase with new ChangeLog.old directory
12 * Use https:// git clone URI
13 * Minor simplifications
14 * Some annotations about possible improvements
15
16 Package-Manager: Portage-2.3.11, Repoman-2.3.3
17
18 sys-libs/glibc/glibc-9999.ebuild | 58 ++++++++++++++++------------------------
19 1 file changed, 23 insertions(+), 35 deletions(-)
20
21 diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
22 index dacec0b7e24..f8e270e663f 100644
23 --- a/sys-libs/glibc/glibc-9999.ebuild
24 +++ b/sys-libs/glibc/glibc-9999.ebuild
25 @@ -15,7 +15,7 @@ EMULTILIB_PKG="true"
26 # Configuration variables
27
28 if [[ ${PV} == 9999* ]]; then
29 - EGIT_REPO_URI="git://sourceware.org/git/glibc.git"
30 + EGIT_REPO_URI="https://sourceware.org/git/glibc.git"
31 inherit git-r3
32 else
33 # KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
34 @@ -64,6 +64,10 @@ is_crosscompile() {
35 [[ ${CHOST} != ${CTARGET} ]]
36 }
37
38 +just_headers() {
39 + is_crosscompile && use crosscompile_opts_headers-only
40 +}
41 +
42 SLOT="2.2"
43
44 # General: We need a new-enough binutils/gcc to match upstream baseline.
45 @@ -108,6 +112,8 @@ fi
46 # the phases
47 #
48
49 +# pkg_pretend
50 +
51 pkg_pretend() {
52 # Make sure devpts is mounted correctly for use w/out setuid pt_chown
53 check_devpts
54 @@ -191,6 +197,10 @@ pkg_pretend() {
55 fi
56 fi
57 }
58 +# todo: shouldn't most of these checks be called also in src_configure again?
59 +# (since consistency is not guaranteed between pkg_ and src_)
60 +
61 +# src_unpack
62
63 src_unpack() {
64 use multilib && unpack gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2
65 @@ -199,6 +209,7 @@ src_unpack() {
66
67 # Check NPTL support _before_ we unpack things to save some time
68 check_nptl_support
69 + # todo: 1) move this to pkg_pretend? 2) use proper functions for kv
70
71 if [[ -n ${EGIT_REPO_URI} ]] ; then
72 git-r3_src_unpack
73 @@ -211,13 +222,6 @@ src_unpack() {
74
75 cd "${WORKDIR}"
76 unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2
77 - # pull out all the addons
78 - local d
79 - for d in extra/*/configure ; do
80 - d=${d%/configure}
81 - [[ -d ${S}/${d} ]] && die "${d} already exists in \${S}"
82 - mv "${d}" "${S}" || die "moving ${d} failed"
83 - done
84 }
85
86 src_prepare() {
87 @@ -277,7 +281,7 @@ glibc_do_configure() {
88 # we accumulate crap across abis
89 unset CXX
90
91 - einfo "Configuring glibc for $1"
92 + einfo "Configuring glibc for nptl"
93
94 local v
95 for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS ; do
96 @@ -296,18 +300,6 @@ glibc_do_configure() {
97
98 local myconf=()
99
100 - # set addons
101 - pushd "${S}" > /dev/null
102 - local addons=$(echo */configure | sed \
103 - -e 's:/configure::g' \
104 - -e 's:\(linuxthreads\|nptl\|rtkaio\|glibc-compat\)\( \|$\)::g' \
105 - -e 's: \+$::' \
106 - -e 's! !,!g' \
107 - -e 's!^!,!' \
108 - -e '/^,\*$/d')
109 - [[ -d ports ]] && addons+=",ports"
110 - popd > /dev/null
111 -
112 case ${CTARGET} in
113 powerpc-*)
114 # Currently gcc on powerpc32 generates invalid code for
115 @@ -325,12 +317,7 @@ glibc_do_configure() {
116
117 [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp )
118
119 - if [[ $1 == "nptl" ]] ; then
120 - myconf+=( --enable-kernel=${NPTL_KERN_VER} )
121 - else
122 - die "invalid pthread option"
123 - fi
124 - myconf+=( --enable-add-ons="${addons#,}" )
125 + myconf+=( --enable-kernel=${NPTL_KERN_VER} )
126
127 # Since SELinux support is only required for nscd, only enable it if:
128 # 1. USE selinux
129 @@ -399,7 +386,7 @@ glibc_do_configure() {
130 # this overriding check. #347761
131 export libc_cv_hashstyle=no
132
133 - local builddir=$(builddir "$1")
134 + local builddir=$(builddir nptl)
135 mkdir -p "${builddir}"
136 cd "${builddir}"
137 set -- "${S}"/configure "${myconf[@]}"
138 @@ -420,6 +407,10 @@ glibc_do_configure() {
139 # to lie and use a local copy of gcc. Like if the system
140 # is built with MULTILIB_ABIS="amd64 x86" but we want to
141 # add x32 to it, gcc/glibc don't yet support x32.
142 + #
143 + # This reqires net-libs/rpcsvc-proto now (which provides
144 + # rpcgen) !!! Needs analysis how to best add to deps.
145 + #
146 if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib ; then
147 echo 'main(){}' > "${T}"/test.c
148 if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then
149 @@ -504,10 +495,6 @@ glibc_headers_configure() {
150 ${EXTRA_ECONF}
151 )
152
153 - local addons
154 - [[ -d ${S}/ports ]] && addons+=",ports"
155 - myconf+=( --enable-add-ons="${addons#,}" )
156 -
157 # Nothing is compiled here which would affect the headers for the target.
158 # So forcing CC/CFLAGS is sane.
159 set -- "${S}"/configure "${myconf[@]}"
160 @@ -544,14 +531,14 @@ src_compile() {
161 }
162
163 glibc_src_test() {
164 - cd "$(builddir $1)"
165 + cd "$(builddir nptl)"
166 emake -j1 check
167 }
168
169 do_src_test() {
170 local ret=0
171
172 - glibc_src_test nptl
173 + glibc_src_test
174 : $(( ret |= $? ))
175
176 return ${ret}
177 @@ -719,9 +706,10 @@ glibc_do_src_install() {
178 echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc
179 doenvd "${T}"/00glibc
180
181 - for d in BUGS ChangeLog* CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do
182 + for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do
183 [[ -s ${d} ]] && dodoc ${d}
184 done
185 + dodoc -r ChangeLog.old
186
187 # Prevent overwriting of the /etc/localtime symlink. We'll handle the
188 # creation of the "factory" symlink in pkg_postinst().