Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/ncurses/
Date: Wed, 21 Feb 2018 08:13:17
Message-Id: 1519200789.aaf71c039b607dc7ee9da2ca3992c14368203307.polynomial-c@gentoo
1 commit: aaf71c039b607dc7ee9da2ca3992c14368203307
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 21 08:13:09 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 21 08:13:09 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aaf71c03
7
8 sys-libs/ncurses: Removed old.
9
10 Package-Manager: Portage-2.3.24, Repoman-2.3.6
11
12 sys-libs/ncurses/ncurses-6.1.ebuild | 293 ------------------------------------
13 1 file changed, 293 deletions(-)
14
15 diff --git a/sys-libs/ncurses/ncurses-6.1.ebuild b/sys-libs/ncurses/ncurses-6.1.ebuild
16 deleted file mode 100644
17 index 69b591e2f70..00000000000
18 --- a/sys-libs/ncurses/ncurses-6.1.ebuild
19 +++ /dev/null
20 @@ -1,293 +0,0 @@
21 -# Copyright 1999-2018 Gentoo Foundation
22 -# Distributed under the terms of the GNU General Public License v2
23 -
24 -EAPI=6
25 -
26 -inherit flag-o-matic toolchain-funcs multilib-minimal
27 -
28 -MY_PV=${PV:0:3}
29 -PV_SNAP=${PV:4}
30 -MY_P=${PN}-${MY_PV}
31 -DESCRIPTION="console display library"
32 -HOMEPAGE="https://www.gnu.org/software/ncurses/ http://dickey.his.com/ncurses/"
33 -SRC_URI="mirror://gnu/ncurses/${MY_P}.tar.gz"
34 -
35 -LICENSE="MIT"
36 -# The subslot reflects the SONAME.
37 -SLOT="0/6"
38 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
39 -IUSE="ada +cxx debug doc gpm minimal profile static-libs test threads tinfo trace unicode"
40 -
41 -DEPEND="gpm? ( sys-libs/gpm[${MULTILIB_USEDEP}] )"
42 -# berkdb? ( sys-libs/db )"
43 -# Block the older ncurses that installed all files w/SLOT=5. #557472
44 -RDEPEND="${DEPEND}
45 - !<=sys-libs/ncurses-5.9-r4:5
46 - !<sys-libs/slang-2.3.2_pre23
47 - !<x11-terms/rxvt-unicode-9.06-r3
48 - !<x11-terms/st-0.6-r1
49 - !app-emulation/emul-linux-x86-baselibs"
50 -
51 -S=${WORKDIR}/${MY_P}
52 -
53 -PATCHES=(
54 - "${FILESDIR}/${PN}-6.0-gfbsd.patch"
55 - "${FILESDIR}/${PN}-5.7-nongnu.patch"
56 - "${FILESDIR}/${PN}-6.0-rxvt-unicode-9.15.patch" #192083 #383871
57 - "${FILESDIR}/${PN}-6.0-pkg-config.patch"
58 - "${FILESDIR}/${PN}-5.9-gcc-5.patch" #545114
59 - "${FILESDIR}/${PN}-6.0-ticlib.patch" #557360
60 - "${FILESDIR}/${PN}-6.0-cppflags-cross.patch" #601426
61 -)
62 -
63 -src_prepare() {
64 - [[ -n ${PV_SNAP} ]] && eapply "${WORKDIR}"/${MY_P}-${PV_SNAP}-patch.sh
65 - default
66 -}
67 -
68 -src_configure() {
69 - unset TERMINFO #115036
70 - tc-export_build_env BUILD_{CC,CPP}
71 - BUILD_CPPFLAGS+=" -D_GNU_SOURCE" #214642
72 -
73 - # Build the various variants of ncurses -- narrow, wide, and threaded. #510440
74 - # Order matters here -- we want unicode/thread versions to come last so that the
75 - # binaries in /usr/bin support both wide and narrow.
76 - # The naming is also important as we use these directly with filenames and when
77 - # checking configure flags.
78 - NCURSES_TARGETS=(
79 - ncurses
80 - $(usex unicode 'ncursesw' '')
81 - $(usex threads 'ncursest' '')
82 - $(use unicode && usex threads 'ncursestw' '')
83 - )
84 -
85 - # When installing ncurses, we have to use a compatible version of tic.
86 - # This comes up when cross-compiling, doing multilib builds, upgrading,
87 - # or installing for the first time. Build a local copy of tic whenever
88 - # the host version isn't available. #249363 #557598
89 - if ! ROOT=/ has_version "~sys-libs/${P}:0" ; then
90 - local lbuildflags="-static"
91 -
92 - # some toolchains don't quite support static linking
93 - local dbuildflags="-Wl,-rpath,${WORKDIR}/lib"
94 - case ${CHOST} in
95 - *-darwin*) dbuildflags= ;;
96 - *-aix*) dbuildflags= ;;
97 - esac
98 - echo "int main() {}" | \
99 - $(tc-getCC) -o x -x c - ${lbuildflags} -pipe >& /dev/null \
100 - || lbuildflags="${dbuildflags}"
101 -
102 - # We can't re-use the multilib BUILD_DIR because we run outside of it.
103 - BUILD_DIR="${WORKDIR}" \
104 - CHOST=${CBUILD} \
105 - CFLAGS=${BUILD_CFLAGS} \
106 - CXXFLAGS=${BUILD_CXXFLAGS} \
107 - CPPFLAGS=${BUILD_CPPFLAGS} \
108 - LDFLAGS="${BUILD_LDFLAGS} ${lbuildflags}" \
109 - do_configure cross --without-shared --with-normal
110 - fi
111 - multilib-minimal_src_configure
112 -}
113 -
114 -multilib_src_configure() {
115 - local t
116 - for t in "${NCURSES_TARGETS[@]}" ; do
117 - do_configure "${t}"
118 - done
119 -}
120 -
121 -do_configure() {
122 - local target=$1
123 - shift
124 -
125 - mkdir "${BUILD_DIR}/${target}"
126 - cd "${BUILD_DIR}/${target}" || die
127 -
128 - local conf=(
129 - # We need the basic terminfo files in /etc, bug #37026. We will
130 - # add '--with-terminfo-dirs' and then populate /etc/terminfo in
131 - # src_install() ...
132 - --with-terminfo-dirs="${EPREFIX}/etc/terminfo:${EPREFIX}/usr/share/terminfo"
133 -
134 - # Disabled until #245417 is sorted out.
135 - #$(use_with berkdb hashed-db)
136 -
137 - # ncurses is dumb and doesn't install .pc files unless pkg-config
138 - # is also installed. Force the tests to go our way. Note that it
139 - # doesn't actually use pkg-config ... it just looks for set vars.
140 - # This is fixed in newer versions:
141 - # https://lists.gnu.org/archive/html/bug-ncurses/2015-08/msg00026.html
142 - --enable-pc-files
143 - --with-pkg-config="$(tc-getPKG_CONFIG)"
144 - # This path is used to control where the .pc files are installed.
145 - --with-pkg-config-libdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig"
146 -
147 - # Now the rest of the various standard flags.
148 - --with-shared
149 - --without-hashed-db
150 - $(use_with ada)
151 - $(use_with cxx)
152 - $(use_with cxx cxx-binding)
153 - --with-cxx-shared
154 - $(use_with debug)
155 - $(use_with profile)
156 - # The configure script uses ldd to parse the linked output which
157 - # is flaky for cross-compiling/multilib/ldd versions/etc...
158 - $(use_with gpm gpm libgpm.so.1)
159 - --disable-termcap
160 - --enable-symlinks
161 - --with-rcs-ids
162 - --with-manpage-format=normal
163 - --enable-const
164 - --enable-colorfgbg
165 - --enable-hard-tabs
166 - --enable-echo
167 - $(use_enable !ada warnings)
168 - $(use_with debug assertions)
169 - $(use_enable !debug leaks)
170 - $(use_with debug expanded)
171 - $(use_with !debug macros)
172 - $(multilib_native_with progs)
173 - $(use_with test tests)
174 - $(use_with trace)
175 - $(use_with tinfo termlib)
176 - )
177 -
178 - if [[ ${target} == ncurses*w ]] ; then
179 - conf+=( --enable-widec )
180 - else
181 - conf+=( --disable-widec )
182 - fi
183 - if [[ ${target} == ncursest* ]] ; then
184 - conf+=( --with-{pthread,reentrant} )
185 - else
186 - conf+=( --without-{pthread,reentrant} )
187 - fi
188 - # Make sure each variant goes in a unique location.
189 - if [[ ${target} == "ncurses" ]] ; then
190 - # "ncurses" variant goes into "${EPREFIX}"/usr/include
191 - # It is needed on Prefix because the configure script appends
192 - # "ncurses" to "${prefix}/include" if "${prefix}" is not /usr.
193 - conf+=( --enable-overwrite )
194 - else
195 - conf+=( --includedir="${EPREFIX}"/usr/include/${target} )
196 - fi
197 - # See comments in src_configure.
198 - if [[ ${target} != "cross" ]] ; then
199 - local cross_path="${WORKDIR}/cross"
200 - [[ -d ${cross_path} ]] && export TIC_PATH="${cross_path}/progs/tic"
201 - fi
202 -
203 - # Force bash until upstream rebuilds the configure script with a newer
204 - # version of autotools. #545532
205 - CONFIG_SHELL=${EPREFIX}/bin/bash \
206 - ECONF_SOURCE="${S}" \
207 - econf "${conf[@]}" "$@"
208 -}
209 -
210 -src_compile() {
211 - # See comments in src_configure.
212 - if ! ROOT=/ has_version "~sys-libs/${P}:0" ; then
213 - BUILD_DIR="${WORKDIR}" \
214 - do_compile cross -C progs tic
215 - fi
216 -
217 - multilib-minimal_src_compile
218 -}
219 -
220 -multilib_src_compile() {
221 - local t
222 - for t in "${NCURSES_TARGETS[@]}" ; do
223 - do_compile "${t}"
224 - done
225 -}
226 -
227 -do_compile() {
228 - local target=$1
229 - shift
230 -
231 - cd "${BUILD_DIR}/${target}" || die
232 -
233 - # A little hack to fix parallel builds ... they break when
234 - # generating sources so if we generate the sources first (in
235 - # non-parallel), we can then build the rest of the package
236 - # in parallel. This is not really a perf hit since the source
237 - # generation is quite small.
238 - emake -j1 sources
239 - # For some reason, sources depends on pc-files which depends on
240 - # compiled libraries which depends on sources which ...
241 - # Manually delete the pc-files file so the install step will
242 - # create the .pc files we want.
243 - rm -f misc/pc-files
244 - emake "$@"
245 -}
246 -
247 -multilib_src_install() {
248 - local target
249 - for target in "${NCURSES_TARGETS[@]}" ; do
250 - emake -C "${BUILD_DIR}/${target}" DESTDIR="${D}" install
251 - done
252 -
253 - # Move main libraries into /.
254 - if multilib_is_native_abi ; then
255 - gen_usr_ldscript -a \
256 - "${NCURSES_TARGETS[@]}" \
257 - $(use tinfo && usex unicode 'tinfow' '') \
258 - $(usev tinfo)
259 - fi
260 - if ! tc-is-static-only ; then
261 - # Provide a link for -lcurses.
262 - ln -sf libncurses$(get_libname) "${ED}"/usr/$(get_libdir)/libcurses$(get_libname) || die
263 - fi
264 - use static-libs || find "${ED}"/usr/ -name '*.a' -delete
265 -
266 - # Build fails to create this ...
267 - dosym ../share/terminfo /usr/$(get_libdir)/terminfo
268 -}
269 -
270 -multilib_src_install_all() {
271 -# if ! use berkdb ; then
272 - # We need the basic terminfo files in /etc, bug #37026
273 - einfo "Installing basic terminfo files in /etc..."
274 - local x
275 - for x in ansi console dumb linux rxvt rxvt-unicode screen{,-256color} vt{52,100,102,200,220} \
276 - xterm xterm-{,256}color
277 - do
278 - local termfile=$(find "${ED}"/usr/share/terminfo/ -name "${x}" 2>/dev/null)
279 - local basedir=$(basename $(dirname "${termfile}"))
280 -
281 - if [[ -n ${termfile} ]] ; then
282 - dodir /etc/terminfo/${basedir}
283 - mv ${termfile} "${ED}"/etc/terminfo/${basedir}/
284 - dosym ../../../../etc/terminfo/${basedir}/${x} \
285 - /usr/share/terminfo/${basedir}/${x}
286 - fi
287 - done
288 -# fi
289 -
290 - echo "CONFIG_PROTECT_MASK=\"/etc/terminfo\"" > "${T}"/50ncurses
291 - doenvd "${T}"/50ncurses
292 -
293 - use minimal && rm -r "${ED}"/usr/share/terminfo*
294 - # Because ncurses5-config --terminfo returns the directory we keep it
295 - keepdir /usr/share/terminfo #245374
296 -
297 - cd "${S}"
298 - dodoc ANNOUNCE MANIFEST NEWS README* TO-DO doc/*.doc
299 - if use doc ; then
300 - docinto html
301 - dohtml -r doc/html/
302 - fi
303 -}
304 -
305 -pkg_preinst() {
306 - preserve_old_lib /$(get_libdir)/libncurses.so.5
307 - use unicode && preserve_old_lib /$(get_libdir)/libncursesw.so.5
308 -}
309 -
310 -pkg_postinst() {
311 - preserve_old_lib_notify /$(get_libdir)/libncurses.so.5
312 - use unicode && preserve_old_lib_notify /$(get_libdir)/libncursesw.so.5
313 -}