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