Gentoo Archives: gentoo-commits

From: Mike Frysinger <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/ncurses/
Date: Thu, 27 Aug 2015 06:53:23
Message-Id: 1440658344.125fb7a6cdcde8fb1c7dd59edf87dbf276025ef4.vapier@gentoo
1 commit: 125fb7a6cdcde8fb1c7dd59edf87dbf276025ef4
2 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
3 AuthorDate: Thu Aug 27 06:49:36 2015 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Thu Aug 27 06:52:24 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=125fb7a6
7
8 sys-libs/ncurses: add dummy package to bridge SLOT move #558856
9
10 Since the slotmove operator does not properly update implicit subslots
11 in generated dependencies in the vdb, add a dummy ebuild to bridge the
12 old SLOT=5[/5] and the new SLOT=0/5.
13
14 .../{ncurses-6.0.ebuild => ncurses-5.9-r5.ebuild} | 185 ++++++++-------------
15 sys-libs/ncurses/ncurses-5.9-r99.ebuild | 18 ++
16 sys-libs/ncurses/ncurses-6.0.ebuild | 2 +-
17 3 files changed, 92 insertions(+), 113 deletions(-)
18
19 diff --git a/sys-libs/ncurses/ncurses-6.0.ebuild b/sys-libs/ncurses/ncurses-5.9-r5.ebuild
20 similarity index 55%
21 copy from sys-libs/ncurses/ncurses-6.0.ebuild
22 copy to sys-libs/ncurses/ncurses-5.9-r5.ebuild
23 index 145960b..3668c97 100644
24 --- a/sys-libs/ncurses/ncurses-6.0.ebuild
25 +++ b/sys-libs/ncurses/ncurses-5.9-r5.ebuild
26 @@ -4,7 +4,7 @@
27
28 EAPI="5"
29
30 -inherit eutils flag-o-matic toolchain-funcs multilib-minimal multiprocessing
31 +inherit eutils flag-o-matic toolchain-funcs multilib-minimal
32
33 MY_PV=${PV:0:3}
34 PV_SNAP=${PV:4}
35 @@ -15,33 +15,37 @@ SRC_URI="mirror://gnu/ncurses/${MY_P}.tar.gz"
36
37 LICENSE="MIT"
38 # The subslot reflects the SONAME.
39 -SLOT="0/6"
40 +SLOT="0/5"
41 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
42 -IUSE="ada +cxx debug doc gpm minimal profile static-libs test threads tinfo trace unicode"
43 +IUSE="ada +cxx debug doc gpm minimal profile static-libs tinfo trace unicode"
44
45 -DEPEND="gpm? ( sys-libs/gpm[${MULTILIB_USEDEP}] )"
46 +DEPEND="gpm? ( sys-libs/gpm )"
47 # berkdb? ( sys-libs/db )"
48 # Block the older ncurses that installed all files w/SLOT=5. #557472
49 RDEPEND="${DEPEND}
50 - !<=sys-libs/ncurses-5.9-r4:0
51 + !<=sys-libs/ncurses-5.9-r4:5
52 !<x11-terms/rxvt-unicode-9.06-r3
53 - !<x11-terms/st-0.6-r1
54 - !app-emulation/emul-linux-x86-baselibs"
55 + abi_x86_32? (
56 + !<=app-emulation/emul-linux-x86-baselibs-20130224-r12
57 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
58 + )"
59 +# Put the MULTILIB_USEDEP on gpm in PDEPEND only to avoid circular deps.
60 +# We can move it to DEPEND and drop the --with-gpm=libgpm.so.1 from the econf
61 +# line below once we can assume multilib gpm is available everywhere.
62 +PDEPEND="gpm? ( sys-libs/gpm[${MULTILIB_USEDEP}] )"
63
64 S=${WORKDIR}/${MY_P}
65 -
66 -PATCHES=(
67 - "${FILESDIR}/${PN}-6.0-gfbsd.patch"
68 - "${FILESDIR}/${PN}-5.7-nongnu.patch"
69 - "${FILESDIR}/${PN}-6.0-rxvt-unicode-9.15.patch" #192083 #383871
70 - "${FILESDIR}/${PN}-6.0-pkg-config.patch"
71 - "${FILESDIR}/${PN}-5.9-gcc-5.patch" #545114
72 - "${FILESDIR}/${PN}-6.0-ticlib.patch" #557360
73 -)
74 +HOSTTIC_DIR=${WORKDIR}/${P}-host
75
76 src_prepare() {
77 [[ -n ${PV_SNAP} ]] && epatch "${WORKDIR}"/${MY_P}-${PV_SNAP}-patch.sh
78 - epatch "${PATCHES[@]}"
79 + epatch "${FILESDIR}"/${PN}-5.8-gfbsd.patch
80 + epatch "${FILESDIR}"/${PN}-5.7-nongnu.patch
81 + epatch "${FILESDIR}"/${PN}-5.9-rxvt-unicode-9.15.patch #192083 #383871
82 + epatch "${FILESDIR}"/${PN}-5.9-fix-clang-build.patch #417763
83 + epatch "${FILESDIR}"/${PN}-5.9-pkg-config.patch
84 + epatch "${FILESDIR}"/${P}-no-I-usr-include.patch #522586
85 + epatch "${FILESDIR}"/${P}-gcc-5.patch #545114
86 }
87
88 src_configure() {
89 @@ -49,51 +53,31 @@ src_configure() {
90 tc-export_build_env BUILD_{CC,CPP}
91 BUILD_CPPFLAGS+=" -D_GNU_SOURCE" #214642
92
93 - # Build the various variants of ncurses -- narrow, wide, and threaded. #510440
94 - # Order matters here -- we want unicode/thread versions to come last so that the
95 - # binaries in /usr/bin support both wide and narrow.
96 - # The naming is also important as we use these directly with filenames and when
97 - # checking configure flags.
98 - NCURSES_TARGETS=(
99 - ncurses
100 - $(usex unicode 'ncursesw' '')
101 - $(usex threads 'ncursest' '')
102 - $(use unicode && usex threads 'ncursestw' '')
103 - )
104 -
105 - multijob_init
106 -
107 - # When installing ncurses, we have to use a compatible version of tic.
108 - # This comes up when cross-compiling, doing multilib builds, upgrading,
109 - # or installing for the first time. Build a local copy of tic whenever
110 - # the host version isn't available. #249363 #557598
111 - if ! ROOT=/ has_version "~sys-libs/${P}" ; then
112 - # We can't re-use the multilib BUILD_DIR because we run outside of it.
113 - BUILD_DIR="${WORKDIR}" \
114 + # when cross-compiling, we need to build up our own tic
115 + # because people often don't keep matching host/target
116 + # ncurses versions #249363
117 + if tc-is-cross-compiler && ! ROOT=/ has_version ~sys-libs/${P} ; then
118 CHOST=${CBUILD} \
119 CFLAGS=${BUILD_CFLAGS} \
120 CXXFLAGS=${BUILD_CXXFLAGS} \
121 CPPFLAGS=${BUILD_CPPFLAGS} \
122 LDFLAGS="${BUILD_LDFLAGS} -static" \
123 - multijob_child_init do_configure cross --without-shared --with-normal
124 + BUILD_DIR="${HOSTTIC_DIR}" do_configure cross --without-shared --with-normal
125 fi
126 multilib-minimal_src_configure
127 - multijob_finish
128 }
129
130 multilib_src_configure() {
131 - local t
132 - for t in "${NCURSES_TARGETS[@]}" ; do
133 - multijob_child_init do_configure "${t}"
134 - done
135 + do_configure narrowc
136 + use unicode && do_configure widec --enable-widec --includedir="${EPREFIX}"/usr/include/ncursesw
137 }
138
139 do_configure() {
140 - local target=$1
141 - shift
142 + ECONF_SOURCE=${S}
143
144 - mkdir "${BUILD_DIR}/${target}"
145 - cd "${BUILD_DIR}/${target}" || die
146 + mkdir "${BUILD_DIR}"-$1
147 + cd "${BUILD_DIR}"-$1 || die
148 + shift
149
150 local conf=(
151 # We need the basic terminfo files in /etc, bug #37026. We will
152 @@ -110,7 +94,7 @@ do_configure() {
153 --enable-pc-files
154 --with-pkg-config="$(tc-getPKG_CONFIG)"
155 # This path is used to control where the .pc files are installed.
156 - --with-pkg-config-libdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig"
157 + PKG_CONFIG_LIBDIR="${EPREFIX}/usr/$(get_libdir)/pkgconfig"
158
159 # Now the rest of the various standard flags.
160 --with-shared
161 @@ -118,7 +102,6 @@ do_configure() {
162 $(use_with ada)
163 $(use_with cxx)
164 $(use_with cxx cxx-binding)
165 - --with-cxx-shared
166 $(use_with debug)
167 $(use_with profile)
168 # The configure script uses ldd to parse the linked output which
169 @@ -130,68 +113,51 @@ do_configure() {
170 --with-manpage-format=normal
171 --enable-const
172 --enable-colorfgbg
173 - --enable-hard-tabs
174 --enable-echo
175 $(use_enable !ada warnings)
176 $(use_with debug assertions)
177 $(use_enable !debug leaks)
178 $(use_with debug expanded)
179 $(use_with !debug macros)
180 - $(multilib_native_with progs)
181 - $(use_with test tests)
182 $(use_with trace)
183 $(use_with tinfo termlib)
184 - )
185
186 - if [[ ${target} == ncurses*w ]] ; then
187 - conf+=( --enable-widec )
188 - else
189 - conf+=( --disable-widec )
190 - fi
191 - if [[ ${target} == ncursest* ]] ; then
192 - conf+=( --with-{pthread,reentrant} )
193 - else
194 - conf+=( --without-{pthread,reentrant} )
195 - fi
196 - # Make sure each variant goes in a unique location.
197 - if [[ ${target} != "ncurses" ]] ; then
198 - conf+=( --includedir="${EPREFIX}"/usr/include/${target} )
199 - fi
200 - # See comments in src_configure.
201 - if [[ ${target} != "cross" ]] ; then
202 - local tic_path="${WORKDIR}/cross/progs/tic"
203 - [[ -d ${tic_path} ]] && export TIC_PATH=${tic_path}
204 - fi
205 + # The chtype/mmask-t settings below are to retain ABI compat
206 + # with ncurses-5.4 so dont change em !
207 + --with-chtype=long
208 + --with-mmask-t=long
209 + --disable-ext-colors
210 + --disable-ext-mouse
211 + --without-pthread
212 + --without-reentrant
213 + )
214
215 # Force bash until upstream rebuilds the configure script with a newer
216 # version of autotools. #545532
217 - CONFIG_SHELL=/bin/bash \
218 - ECONF_SOURCE=${S} \
219 - econf "${conf[@]}" "$@"
220 + CONFIG_SHELL=/bin/bash econf "${conf[@]}" "$@"
221 }
222
223 src_compile() {
224 - # See comments in src_configure.
225 - if ! ROOT=/ has_version "~sys-libs/${P}" ; then
226 - BUILD_DIR="${WORKDIR}" \
227 - do_compile cross -C progs tic
228 + # when cross-compiling, we need to build up our own tic
229 + # because people often don't keep matching host/target
230 + # ncurses versions #249363
231 + if tc-is-cross-compiler && ! ROOT=/ has_version ~sys-libs/${P} ; then
232 + make_flags="-C progs tic"
233 + BUILD_DIR="${HOSTTIC_DIR}" do_compile cross
234 fi
235
236 multilib-minimal_src_compile
237 }
238
239 multilib_src_compile() {
240 - local t
241 - for t in "${NCURSES_TARGETS[@]}" ; do
242 - do_compile "${t}"
243 - done
244 + make_flags=""
245 + multilib_is_native_abi || make_flags="PROGS= "
246 + do_compile narrowc
247 + use unicode && do_compile widec
248 }
249
250 do_compile() {
251 - local target=$1
252 - shift
253 -
254 - cd "${BUILD_DIR}/${target}" || die
255 + cd "${BUILD_DIR}"-$1 || die
256
257 # A little hack to fix parallel builds ... they break when
258 # generating sources so if we generate the sources first (in
259 @@ -204,27 +170,32 @@ do_compile() {
260 # Manually delete the pc-files file so the install step will
261 # create the .pc files we want.
262 rm -f misc/pc-files
263 - emake "$@"
264 + emake ${make_flags}
265 }
266
267 multilib_src_install() {
268 - local target
269 - for target in "${NCURSES_TARGETS[@]}" ; do
270 - emake -C "${BUILD_DIR}/${target}" DESTDIR="${D}" install
271 - done
272 -
273 - # Move main libraries into /.
274 - if multilib_is_native_abi ; then
275 - gen_usr_ldscript -a \
276 - "${NCURSES_TARGETS[@]}"
277 - $(use tinfo && usex unicode 'tinfow' '') \
278 - $(usev tinfo)
279 + # use the cross-compiled tic (if need be) #249363
280 + export PATH="${HOSTTIC_DIR}-cross/progs:${PATH}"
281 +
282 + # install unicode version second so that the binaries in /usr/bin
283 + # support both wide and narrow
284 + cd "${BUILD_DIR}"-narrowc || die
285 + emake DESTDIR="${D}" install
286 + if use unicode ; then
287 + cd "${BUILD_DIR}"-widec || die
288 + emake DESTDIR="${D}" install
289 fi
290 +
291 + # Move libncurses{,w} into /lib
292 + multilib_is_native_abi && gen_usr_ldscript -a \
293 + ncurses \
294 + $(usex unicode 'ncursesw' '') \
295 + $(use tinfo && usex unicode 'tinfow' '') \
296 + $(usev tinfo)
297 if ! tc-is-static-only ; then
298 - # Provide a link for -lcurses.
299 ln -sf libncurses$(get_libname) "${ED}"/usr/$(get_libdir)/libcurses$(get_libname) || die
300 fi
301 - use static-libs || find "${ED}"/usr/ -name '*.a' -delete
302 + use static-libs || find "${ED}"/usr/ -name '*.a' -a '!' -name '*curses++*.a' -delete
303
304 # Build fails to create this ...
305 dosym ../share/terminfo /usr/$(get_libdir)/terminfo
306 @@ -260,13 +231,3 @@ multilib_src_install_all() {
307 dodoc ANNOUNCE MANIFEST NEWS README* TO-DO doc/*.doc
308 use doc && dohtml -r doc/html/
309 }
310 -
311 -pkg_preinst() {
312 - preserve_old_lib /$(get_libdir)/libncurses.so.5
313 - use unicode && preserve_old_lib /$(get_libdir)/libncursesw.so.5
314 -}
315 -
316 -pkg_postinst() {
317 - preserve_old_lib_notify /$(get_libdir)/libncurses.so.5
318 - use unicode && preserve_old_lib_notify /$(get_libdir)/libncursesw.so.5
319 -}
320
321 diff --git a/sys-libs/ncurses/ncurses-5.9-r99.ebuild b/sys-libs/ncurses/ncurses-5.9-r99.ebuild
322 new file mode 100644
323 index 0000000..4b40743
324 --- /dev/null
325 +++ b/sys-libs/ncurses/ncurses-5.9-r99.ebuild
326 @@ -0,0 +1,18 @@
327 +# Copyright 1999-2015 Gentoo Foundation
328 +# Distributed under the terms of the GNU General Public License v2
329 +# $Id$
330 +
331 +# Bridge the old SLOT=5[/5] ebuild to the new SLOT=0/5 since the slotmove
332 +# functionality does not handle implicit subslots correctly. #558856
333 +
334 +EAPI="5"
335 +
336 +DESCRIPTION="transitional package"
337 +HOMEPAGE="https://www.gnu.org/software/ncurses/ http://dickey.his.com/ncurses/"
338 +
339 +LICENSE="metapackage"
340 +SLOT="5/5"
341 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
342 +IUSE="ada +cxx gpm static-libs tinfo unicode"
343 +
344 +RDEPEND="sys-libs/ncurses:0/5[ada?,cxx?,gpm?,static-libs?,tinfo?,unicode?]"
345
346 diff --git a/sys-libs/ncurses/ncurses-6.0.ebuild b/sys-libs/ncurses/ncurses-6.0.ebuild
347 index 145960b..a8b1c1e 100644
348 --- a/sys-libs/ncurses/ncurses-6.0.ebuild
349 +++ b/sys-libs/ncurses/ncurses-6.0.ebuild
350 @@ -23,7 +23,7 @@ DEPEND="gpm? ( sys-libs/gpm[${MULTILIB_USEDEP}] )"
351 # berkdb? ( sys-libs/db )"
352 # Block the older ncurses that installed all files w/SLOT=5. #557472
353 RDEPEND="${DEPEND}
354 - !<=sys-libs/ncurses-5.9-r4:0
355 + !<=sys-libs/ncurses-5.9-r4:5
356 !<x11-terms/rxvt-unicode-9.06-r3
357 !<x11-terms/st-0.6-r1
358 !app-emulation/emul-linux-x86-baselibs"