1 |
commit: 8cc8ae51e676d082f5c785a7463e54773cf96714 |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Aug 26 17:41:36 2015 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 26 18:19:51 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8cc8ae51 |
7 |
|
8 |
sys-libs/ncurses: rewrite SLOT=5 ebuild #557472 |
9 |
|
10 |
Delete code that doesn't make sense in an ABI-only ebuild, |
11 |
and backport changes from the ncurses-6 ebuild. |
12 |
|
13 |
sys-libs/ncurses/ncurses-5.9-r100.ebuild | 186 ---------------------------- |
14 |
sys-libs/ncurses/ncurses-5.9-r101.ebuild | 203 +++++++++++++++++++++++++++++++ |
15 |
2 files changed, 203 insertions(+), 186 deletions(-) |
16 |
|
17 |
diff --git a/sys-libs/ncurses/ncurses-5.9-r100.ebuild b/sys-libs/ncurses/ncurses-5.9-r100.ebuild |
18 |
deleted file mode 100644 |
19 |
index f37ebf4..0000000 |
20 |
--- a/sys-libs/ncurses/ncurses-5.9-r100.ebuild |
21 |
+++ /dev/null |
22 |
@@ -1,186 +0,0 @@ |
23 |
-# Copyright 1999-2015 Gentoo Foundation |
24 |
-# Distributed under the terms of the GNU General Public License v2 |
25 |
-# $Id$ |
26 |
- |
27 |
-EAPI="4" |
28 |
-inherit eutils flag-o-matic toolchain-funcs multilib-minimal |
29 |
- |
30 |
-MY_PV=${PV:0:3} |
31 |
-PV_SNAP=${PV:4} |
32 |
-MY_P=${PN}-${MY_PV} |
33 |
-DESCRIPTION="console display library" |
34 |
-HOMEPAGE="https://www.gnu.org/software/ncurses/ http://dickey.his.com/ncurses/" |
35 |
-SRC_URI="mirror://gnu/ncurses/${MY_P}.tar.gz" |
36 |
- |
37 |
-LICENSE="MIT" |
38 |
-SLOT="5" |
39 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" |
40 |
-IUSE="ada +cxx debug gpm profile tinfo trace unicode" |
41 |
- |
42 |
-DEPEND="gpm? ( sys-libs/gpm )" |
43 |
-# berkdb? ( sys-libs/db )" |
44 |
-# Block the older ncurses that installed all files w/SLOT=5. #557472 |
45 |
-RDEPEND="${DEPEND} |
46 |
- !<sys-libs/ncurses-6:0 |
47 |
- !<x11-terms/rxvt-unicode-9.06-r3 |
48 |
- abi_x86_32? ( |
49 |
- !<=app-emulation/emul-linux-x86-baselibs-20130224-r12 |
50 |
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] |
51 |
- )" |
52 |
-# Put the MULTILIB_USEDEP on gpm in PDEPEND only to avoid circular deps. |
53 |
-# We can move it to DEPEND and drop the --with-gpm=libgpm.so.1 from the econf |
54 |
-# line below once we can assume multilib gpm is available everywhere. |
55 |
-PDEPEND="gpm? ( sys-libs/gpm[${MULTILIB_USEDEP}] )" |
56 |
- |
57 |
-S=${WORKDIR}/${MY_P} |
58 |
-HOSTTIC_DIR=${WORKDIR}/${P}-host |
59 |
- |
60 |
-src_prepare() { |
61 |
- [[ -n ${PV_SNAP} ]] && epatch "${WORKDIR}"/${MY_P}-${PV_SNAP}-patch.sh |
62 |
- epatch "${FILESDIR}"/${PN}-5.8-gfbsd.patch |
63 |
- epatch "${FILESDIR}"/${PN}-5.7-nongnu.patch |
64 |
- epatch "${FILESDIR}"/${PN}-5.9-rxvt-unicode-9.15.patch #192083 #383871 |
65 |
- epatch "${FILESDIR}"/${PN}-5.9-fix-clang-build.patch #417763 |
66 |
- epatch "${FILESDIR}"/${PN}-5.9-pkg-config.patch |
67 |
- epatch "${FILESDIR}"/${P}-no-I-usr-include.patch #522586 |
68 |
- epatch "${FILESDIR}"/${P}-gcc-5.patch #545114 |
69 |
-} |
70 |
- |
71 |
-src_configure() { |
72 |
- unset TERMINFO #115036 |
73 |
- tc-export_build_env BUILD_{CC,CPP} |
74 |
- BUILD_CPPFLAGS+=" -D_GNU_SOURCE" #214642 |
75 |
- |
76 |
- # when cross-compiling, we need to build up our own tic |
77 |
- # because people often don't keep matching host/target |
78 |
- # ncurses versions #249363 |
79 |
- if tc-is-cross-compiler && ! ROOT=/ has_version ~sys-libs/${P} ; then |
80 |
- CHOST=${CBUILD} \ |
81 |
- CFLAGS=${BUILD_CFLAGS} \ |
82 |
- CXXFLAGS=${BUILD_CXXFLAGS} \ |
83 |
- CPPFLAGS=${BUILD_CPPFLAGS} \ |
84 |
- LDFLAGS="${BUILD_LDFLAGS} -static" \ |
85 |
- BUILD_DIR="${HOSTTIC_DIR}" do_configure cross --without-shared --with-normal |
86 |
- fi |
87 |
- multilib-minimal_src_configure |
88 |
-} |
89 |
- |
90 |
-multilib_src_configure() { |
91 |
- do_configure narrowc |
92 |
- use unicode && do_configure widec --enable-widec --includedir="${EPREFIX}"/usr/include/ncursesw |
93 |
-} |
94 |
- |
95 |
-do_configure() { |
96 |
- ECONF_SOURCE=${S} |
97 |
- |
98 |
- mkdir "${BUILD_DIR}"-$1 |
99 |
- cd "${BUILD_DIR}"-$1 || die |
100 |
- shift |
101 |
- |
102 |
- local conf=( |
103 |
- # We need the basic terminfo files in /etc, bug #37026. We will |
104 |
- # add '--with-terminfo-dirs' and then populate /etc/terminfo in |
105 |
- # src_install() ... |
106 |
- --with-terminfo-dirs="${EPREFIX}/etc/terminfo:${EPREFIX}/usr/share/terminfo" |
107 |
- |
108 |
- # Disabled until #245417 is sorted out. |
109 |
- #$(use_with berkdb hashed-db) |
110 |
- |
111 |
- # ncurses is dumb and doesn't install .pc files unless pkg-config |
112 |
- # is also installed. Force the tests to go our way. Note that it |
113 |
- # doesn't actually use pkg-config ... it just looks for set vars. |
114 |
- --enable-pc-files |
115 |
- --with-pkg-config="$(tc-getPKG_CONFIG)" |
116 |
- # This path is used to control where the .pc files are installed. |
117 |
- PKG_CONFIG_LIBDIR="${EPREFIX}/usr/$(get_libdir)/pkgconfig" |
118 |
- |
119 |
- # Now the rest of the various standard flags. |
120 |
- --with-shared |
121 |
- --without-hashed-db |
122 |
- $(use_with ada) |
123 |
- $(use_with cxx) |
124 |
- $(use_with cxx cxx-binding) |
125 |
- $(use_with debug) |
126 |
- $(use_with profile) |
127 |
- # The configure script uses ldd to parse the linked output which |
128 |
- # is flaky for cross-compiling/multilib/ldd versions/etc... |
129 |
- $(use_with gpm gpm libgpm.so.1) |
130 |
- --disable-termcap |
131 |
- --enable-symlinks |
132 |
- --with-rcs-ids |
133 |
- --with-manpage-format=normal |
134 |
- --enable-const |
135 |
- --enable-colorfgbg |
136 |
- --enable-echo |
137 |
- $(use_enable !ada warnings) |
138 |
- $(use_with debug assertions) |
139 |
- $(use_enable !debug leaks) |
140 |
- $(use_with debug expanded) |
141 |
- $(use_with !debug macros) |
142 |
- $(use_with trace) |
143 |
- $(use_with tinfo termlib) |
144 |
- |
145 |
- # The chtype/mmask-t settings below are to retain ABI compat |
146 |
- # with ncurses-5.4 so dont change em ! |
147 |
- --with-chtype=long |
148 |
- --with-mmask-t=long |
149 |
- --disable-ext-colors |
150 |
- --disable-ext-mouse |
151 |
- --without-pthread |
152 |
- --without-reentrant |
153 |
- ) |
154 |
- |
155 |
- # Force bash until upstream rebuilds the configure script with a newer |
156 |
- # version of autotools. #545532 |
157 |
- CONFIG_SHELL=/bin/bash econf "${conf[@]}" "$@" |
158 |
-} |
159 |
- |
160 |
-src_compile() { |
161 |
- # when cross-compiling, we need to build up our own tic |
162 |
- # because people often don't keep matching host/target |
163 |
- # ncurses versions #249363 |
164 |
- if tc-is-cross-compiler && ! ROOT=/ has_version ~sys-libs/${P} ; then |
165 |
- make_flags="-C progs tic" |
166 |
- BUILD_DIR="${HOSTTIC_DIR}" do_compile cross |
167 |
- fi |
168 |
- |
169 |
- multilib-minimal_src_compile |
170 |
-} |
171 |
- |
172 |
-multilib_src_compile() { |
173 |
- make_flags="" |
174 |
- multilib_is_native_abi || make_flags="PROGS= " |
175 |
- do_compile narrowc |
176 |
- use unicode && do_compile widec |
177 |
-} |
178 |
- |
179 |
-do_compile() { |
180 |
- cd "${BUILD_DIR}"-$1 || die |
181 |
- |
182 |
- # A little hack to fix parallel builds ... they break when |
183 |
- # generating sources so if we generate the sources first (in |
184 |
- # non-parallel), we can then build the rest of the package |
185 |
- # in parallel. This is not really a perf hit since the source |
186 |
- # generation is quite small. |
187 |
- emake -j1 sources |
188 |
- # For some reason, sources depends on pc-files which depends on |
189 |
- # compiled libraries which depends on sources which ... |
190 |
- # Manually delete the pc-files file so the install step will |
191 |
- # create the .pc files we want. |
192 |
- rm -f misc/pc-files |
193 |
- emake ${make_flags} |
194 |
-} |
195 |
- |
196 |
-multilib_src_install() { |
197 |
- local lib |
198 |
- cd "${BUILD_DIR}"-narrowc/lib || die |
199 |
- for lib in *5.9; do |
200 |
- newlib.so ${lib} ${lib%%.9} |
201 |
- done |
202 |
- if use unicode ; then |
203 |
- cd "${BUILD_DIR}"-widec/lib || die |
204 |
- for lib in *5.9; do |
205 |
- newlib.so ${lib} ${lib%%.9} |
206 |
- done |
207 |
- fi |
208 |
-} |
209 |
|
210 |
diff --git a/sys-libs/ncurses/ncurses-5.9-r101.ebuild b/sys-libs/ncurses/ncurses-5.9-r101.ebuild |
211 |
new file mode 100644 |
212 |
index 0000000..00166f6 |
213 |
--- /dev/null |
214 |
+++ b/sys-libs/ncurses/ncurses-5.9-r101.ebuild |
215 |
@@ -0,0 +1,203 @@ |
216 |
+# Copyright 1999-2015 Gentoo Foundation |
217 |
+# Distributed under the terms of the GNU General Public License v2 |
218 |
+# $Id$ |
219 |
+ |
220 |
+# This version is just for the ABI .5 library |
221 |
+ |
222 |
+EAPI="5" |
223 |
+ |
224 |
+inherit eutils toolchain-funcs multilib-minimal multiprocessing |
225 |
+ |
226 |
+MY_PV=${PV:0:3} |
227 |
+MY_P=${PN}-${MY_PV} |
228 |
+DESCRIPTION="console display library" |
229 |
+HOMEPAGE="https://www.gnu.org/software/ncurses/ http://dickey.his.com/ncurses/" |
230 |
+SRC_URI="mirror://gnu/ncurses/${MY_P}.tar.gz" |
231 |
+ |
232 |
+LICENSE="MIT" |
233 |
+# The subslot reflects the SONAME. |
234 |
+SLOT="5/5" |
235 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" |
236 |
+IUSE="gpm tinfo unicode" |
237 |
+ |
238 |
+DEPEND="gpm? ( sys-libs/gpm[${MULTILIB_USEDEP}] )" |
239 |
+# Block the ncurses-5 that installs the same lib. #557472 |
240 |
+RDEPEND="${DEPEND} |
241 |
+ !<sys-libs/ncurses-6:0" |
242 |
+ |
243 |
+S=${WORKDIR}/${MY_P} |
244 |
+ |
245 |
+PATCHES=( |
246 |
+ "${FILESDIR}"/${PN}-5.8-gfbsd.patch |
247 |
+ "${FILESDIR}"/${PN}-5.7-nongnu.patch |
248 |
+ "${FILESDIR}"/${PN}-5.9-rxvt-unicode-9.15.patch #192083 #383871 |
249 |
+ "${FILESDIR}"/${PN}-5.9-fix-clang-build.patch #417763 |
250 |
+ "${FILESDIR}"/${PN}-5.9-pkg-config.patch |
251 |
+ "${FILESDIR}"/${P}-no-I-usr-include.patch #522586 |
252 |
+ "${FILESDIR}"/${P}-gcc-5.patch #545114 |
253 |
+) |
254 |
+ |
255 |
+src_prepare() { |
256 |
+ epatch "${PATCHES[@]}" |
257 |
+} |
258 |
+ |
259 |
+src_configure() { |
260 |
+ unset TERMINFO #115036 |
261 |
+ tc-export_build_env BUILD_{CC,CPP} |
262 |
+ BUILD_CPPFLAGS+=" -D_GNU_SOURCE" #214642 |
263 |
+ |
264 |
+ # Build the various variants of ncurses -- narrow, wide, and threaded. #510440 |
265 |
+ # Order matters here -- we want unicode/thread versions to come last so that the |
266 |
+ # binaries in /usr/bin support both wide and narrow. |
267 |
+ # The naming is also important as we use these directly with filenames and when |
268 |
+ # checking configure flags. |
269 |
+ NCURSES_TARGETS=( |
270 |
+ ncurses |
271 |
+ $(usex unicode 'ncursesw' '') |
272 |
+ ) |
273 |
+ |
274 |
+ multijob_init |
275 |
+ |
276 |
+ # When installing ncurses, we have to use a compatible version of tic. |
277 |
+ # This comes up when cross-compiling, doing multilib builds, upgrading, |
278 |
+ # or installing for the first time. Build a local copy of tic whenever |
279 |
+ # the host version isn't available. #249363 #557598 |
280 |
+ if ! ROOT=/ has_version "~sys-libs/${P}" ; then |
281 |
+ # We can't re-use the multilib BUILD_DIR because we run outside of it. |
282 |
+ BUILD_DIR="${WORKDIR}" \ |
283 |
+ CHOST=${CBUILD} \ |
284 |
+ CFLAGS=${BUILD_CFLAGS} \ |
285 |
+ CXXFLAGS=${BUILD_CXXFLAGS} \ |
286 |
+ CPPFLAGS=${BUILD_CPPFLAGS} \ |
287 |
+ LDFLAGS="${BUILD_LDFLAGS} -static" \ |
288 |
+ multijob_child_init do_configure cross --without-shared --with-normal |
289 |
+ fi |
290 |
+ multilib-minimal_src_configure |
291 |
+ multijob_finish |
292 |
+} |
293 |
+ |
294 |
+multilib_src_configure() { |
295 |
+ local t |
296 |
+ for t in "${NCURSES_TARGETS[@]}" ; do |
297 |
+ multijob_child_init do_configure "${t}" |
298 |
+ done |
299 |
+} |
300 |
+ |
301 |
+do_configure() { |
302 |
+ local target=$1 |
303 |
+ shift |
304 |
+ |
305 |
+ mkdir "${BUILD_DIR}/${target}" |
306 |
+ cd "${BUILD_DIR}/${target}" || die |
307 |
+ |
308 |
+ local conf=( |
309 |
+ # We need the basic terminfo files in /etc, bug #37026. We will |
310 |
+ # add '--with-terminfo-dirs' and then populate /etc/terminfo in |
311 |
+ # src_install() ... |
312 |
+ --with-terminfo-dirs="${EPREFIX}/etc/terminfo:${EPREFIX}/usr/share/terminfo" |
313 |
+ |
314 |
+ # Now the rest of the various standard flags. |
315 |
+ --without-hashed-db |
316 |
+ --disable-pc-files |
317 |
+ --with-shared |
318 |
+ --without-hashed-db |
319 |
+ --without-ada |
320 |
+ --without-cxx |
321 |
+ --without-cxx-binding |
322 |
+ --without-debug |
323 |
+ --without-profile |
324 |
+ # The configure script uses ldd to parse the linked output which |
325 |
+ # is flaky for cross-compiling/multilib/ldd versions/etc... |
326 |
+ $(use_with gpm gpm libgpm.so.1) |
327 |
+ --disable-termcap |
328 |
+ --enable-symlinks |
329 |
+ --with-rcs-ids |
330 |
+ --with-manpage-format=normal |
331 |
+ --enable-const |
332 |
+ --enable-colorfgbg |
333 |
+ --enable-echo |
334 |
+ --disable-warnings |
335 |
+ --without-assertions |
336 |
+ --enable-leaks |
337 |
+ --without-expanded |
338 |
+ --with-macros |
339 |
+ --without-progs |
340 |
+ --without-tests |
341 |
+ --without-trace |
342 |
+ $(use_with tinfo termlib) |
343 |
+ |
344 |
+ # The chtype/mmask-t settings below are to retain ABI compat |
345 |
+ # with ncurses-5.4 so dont change em ! |
346 |
+ --with-chtype=long |
347 |
+ --with-mmask-t=long |
348 |
+ --disable-ext-colors |
349 |
+ --disable-ext-mouse |
350 |
+ --without-{pthread,reentrant} |
351 |
+ ) |
352 |
+ |
353 |
+ if [[ ${target} == ncurses*w ]] ; then |
354 |
+ conf+=( --enable-widec ) |
355 |
+ else |
356 |
+ conf+=( --disable-widec ) |
357 |
+ fi |
358 |
+ # Make sure each variant goes in a unique location. |
359 |
+ if [[ ${target} != "ncurses" ]] ; then |
360 |
+ conf+=( --includedir="${EPREFIX}"/usr/include/${target} ) |
361 |
+ fi |
362 |
+ # See comments in src_configure. |
363 |
+ if [[ ${target} != "cross" ]] ; then |
364 |
+ local tic_path="${WORKDIR}/cross/progs/tic" |
365 |
+ [[ -d ${tic_path} ]] && export TIC_PATH=${tic_path} |
366 |
+ else |
367 |
+ conf+=( --with-progs ) |
368 |
+ fi |
369 |
+ |
370 |
+ # Force bash until upstream rebuilds the configure script with a newer |
371 |
+ # version of autotools. #545532 |
372 |
+ CONFIG_SHELL=/bin/bash \ |
373 |
+ ECONF_SOURCE=${S} \ |
374 |
+ econf "${conf[@]}" "$@" |
375 |
+} |
376 |
+ |
377 |
+src_compile() { |
378 |
+ # See comments in src_configure. |
379 |
+ if ! ROOT=/ has_version "~sys-libs/${P}" ; then |
380 |
+ BUILD_DIR="${WORKDIR}" \ |
381 |
+ do_compile cross -C progs tic |
382 |
+ fi |
383 |
+ |
384 |
+ multilib-minimal_src_compile |
385 |
+} |
386 |
+ |
387 |
+ |
388 |
+multilib_src_compile() { |
389 |
+ local t |
390 |
+ for t in "${NCURSES_TARGETS[@]}" ; do |
391 |
+ do_compile "${t}" |
392 |
+ done |
393 |
+} |
394 |
+ |
395 |
+do_compile() { |
396 |
+ local target=$1 |
397 |
+ shift |
398 |
+ |
399 |
+ cd "${BUILD_DIR}/${target}" || die |
400 |
+ |
401 |
+ # A little hack to fix parallel builds ... they break when |
402 |
+ # generating sources so if we generate the sources first (in |
403 |
+ # non-parallel), we can then build the rest of the package |
404 |
+ # in parallel. This is not really a perf hit since the source |
405 |
+ # generation is quite small. |
406 |
+ emake -j1 sources |
407 |
+ emake "$@" |
408 |
+} |
409 |
+ |
410 |
+multilib_src_install() { |
411 |
+ local target lib |
412 |
+ for target in "${NCURSES_TARGETS[@]}" ; do |
413 |
+ cd "${BUILD_DIR}/${target}/lib" || die |
414 |
+ for lib in *5.9 ; do |
415 |
+ newlib.so "${lib}" "${lib%%.9}" |
416 |
+ done |
417 |
+ done |
418 |
+} |