ncurses: update to latest upstream Gentoo ebuild

The newer ncurses includes fun pkg-config files which other packages
can now use instead of the crappy ncurses5-config scripts.

For example, newer gpsd ebuilds will utilize these .pc files.

BUG=chromium-os:467
TEST=`emerge ncurses` works
TEST=`emerge-amd64-generic ncurses` works
TEST=`emerge-arm-generic ncurses` works
TEST=`emerge-x86-generic ncurses` works
TEST=build_packages+build_image for x86-alex boots up

Change-Id: Ib084c0e219be14622b5e38c6c2ae552368273bb5
Reviewed-on: https://gerrit.chromium.org/gerrit/12393
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
Mike Frysinger 2011-12-02 15:37:34 -05:00 committed by Gerrit
parent a7792b05fa
commit 980e269d2e
6 changed files with 20 additions and 205 deletions

View File

@ -1,44 +0,0 @@
http://bugs.gentoo.org/270527
Add entry for eterm-color to terminfo file
Part of upstream patch, available at:
ftp://invisible-island.net/ncurses/5.7/ncurses-5.7-20081129.patch
--- ncurses-5.7-20081122+/misc/terminfo.src 2008-11-15 21:54:35.000000000 +0000
+++ ncurses-5.7-20081129/misc/terminfo.src 2008-11-29 15:27:35.000000000 +0000
@@ -4357,6 +4357,26 @@
sgr0=\E[m, smcup=\E7\E[?47h, smir=\E[4h, smso=\E[7m,
smul=\E[4m,
+# The codes supported by the term.el terminal emulation in GNU Emacs 22.2
+eterm-color|Emacs term.el terminal emulator term-protocol-version 0.96,
+ am, mir, msgr, xenl,
+ colors#8, cols#80, lines#24, pairs#64,
+ bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=^M,
+ csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
+ cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
+ cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
+ dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J,
+ el=\E[K, el1=\E[1K, home=\E[H, ht=^I, ich=\E[%p1%d@,
+ il=\E[%p1%dL, il1=\E[L, ind=^J, invis=\E[8m, kbs=\177,
+ kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
+ kdch1=\E[3~, kend=\E[4~, khome=\E[1~, kich1=\E[2~,
+ knp=\E[6~, kpp=\E[5~, op=\E[39;49m, rc=\E8, rev=\E[7m,
+ ri=\EM, rmir=\E[4l, rmso=\E[27m, rmul=\E[24m, rs1=\Ec,
+ sc=\E7, setab=\E[%p1%'('%+%dm, setaf=\E[%p1%{30}%+%dm,
+ sgr=\E[0%?%p1%p3%|%t;7%;%?%p2%t;4%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;m,
+ sgr0=\E[m, smir=\E[4h, smso=\E[7m, smul=\E[4m,
+ u6=\E[%i%d;%dR, u7=\E[6n,
+
# Entries for use by the `screen' program by Juergen Weigert,
# Michael Schroeder, Oliver Laumann. The screen and
# screen-w entries came with version 3.7.1. The screen2 and screen3 entries
@@ -21795,6 +21815,9 @@
# * change several \E[2g (clear tab at current column) to \E[3g
# (clear all tabs) to match definition for tbc capability -TD
#
+# 2008-11-29
+# * add eterm-color -TD
+#
# The following sets edit modes for GNU EMACS.
# Local Variables:
# fill-prefix:"\t"

View File

@ -1,88 +0,0 @@
http://bugs.gentoo.org/245370
ripped from ncurses-5.7-20081213.patch
20081213
+ add check for failure to open hashed-database needed for db4.6
(GenToo #245370).
--- ncurses-5.7-20081206+/ncurses/tinfo/hashed_db.c 2006-08-19 19:48:38.000000000 +0000
+++ ncurses-5.7-20081213/ncurses/tinfo/hashed_db.c 2008-12-13 20:59:02.000000000 +0000
@@ -49,27 +49,30 @@
_nc_db_open(const char *path, bool modify)
{
DB *result = 0;
+ int code;
#if HASHED_DB_API >= 4
db_create(&result, NULL, 0);
- result->open(result,
- NULL,
- path,
- NULL,
- DB_HASH,
- modify ? DB_CREATE : DB_RDONLY,
- 0644);
+ if ((code = result->open(result,
+ NULL,
+ path,
+ NULL,
+ DB_HASH,
+ modify ? DB_CREATE : DB_RDONLY,
+ 0644)) != 0) {
+ result = 0;
+ }
#elif HASHED_DB_API >= 3
db_create(&result, NULL, 0);
- result->open(result,
- path,
- NULL,
- DB_HASH,
- modify ? DB_CREATE : DB_RDONLY,
- 0644);
+ if ((code = result->open(result,
+ path,
+ NULL,
+ DB_HASH,
+ modify ? DB_CREATE : DB_RDONLY,
+ 0644)) != 0) {
+ result = 0;
+ }
#elif HASHED_DB_API >= 2
- int code;
-
if ((code = db_open(path,
DB_HASH,
modify ? DB_CREATE : DB_RDONLY,
@@ -77,21 +80,22 @@
(DB_ENV *) 0,
(DB_INFO *) 0,
&result)) != 0) {
- T(("cannot open %s: %s", path, strerror(code)));
result = 0;
- } else {
- T(("opened %s", path));
}
#else
- result = dbopen(path,
- modify ? (O_CREAT | O_RDWR) : O_RDONLY,
- 0644,
- DB_HASH,
- NULL);
+ if ((result = dbopen(path,
+ modify ? (O_CREAT | O_RDWR) : O_RDONLY,
+ 0644,
+ DB_HASH,
+ NULL)) == 0) {
+ code = errno;
+ }
+#endif
if (result != 0) {
T(("opened %s", path));
+ } else {
+ T(("cannot open %s: %s", path, strerror(code)));
}
-#endif
return result;
}

View File

@ -1,58 +0,0 @@
use $cross_compiling that autotools already set up rather than trying to
do a custom & fragile job with compiler names
configure.in also needs AC_SUBST(cross_compiling) ...
http://bugs.gentoo.org/288881
--- a/configure
+++ b/configure
@@ -17300,6 +17300,7 @@
s,@build_alias@,$build_alias,;t t
s,@host_alias@,$host_alias,;t t
s,@target_alias@,$target_alias,;t t
+s,@cross_compiling@,$cross_compiling,;t t
s,@ECHO_C@,$ECHO_C,;t t
s,@ECHO_N@,$ECHO_N,;t t
s,@ECHO_T@,$ECHO_T,;t t
--- a/misc/run_tic.in
+++ b/misc/run_tic.in
@@ -52,8 +52,7 @@
: ${ticdir=@TERMINFO@}
: ${source=@TERMINFO_SRC@}
: ${LN_S="@LN_S@"}
-: ${THAT_CC=cc}
-: ${THIS_CC=cc}
+: ${cross_compiling=@cross_compiling@}
: ${ext_funcs=@NCURSES_EXT_FUNCS@}
test -z "${DESTDIR}" && DESTDIR=
@@ -61,7 +60,7 @@
# Allow tic to run either from the install-path, or from the build-directory.
# Do not do this if we appear to be cross-compiling. In that case, we rely
# on the host's copy of tic to compile the terminfo database.
-if test "$THAT_CC" = "$THIS_CC" ; then
+if test "$cross_compiling" != "yes" ; then
case "$PATH" in
:*) PATH=../progs:../lib:${DESTDIR}$bindir$PATH ;;
*) PATH=../progs:../lib:${DESTDIR}$bindir:$PATH ;;
--- a/misc/Makefile.in
+++ b/misc/Makefile.in
@@ -59,6 +59,7 @@
CC = @CC@
HOSTCC = @BUILD_CC@
+cross_compiling = @cross_compiling@
tabsetdir = $(datadir)/tabset
ticdir = @TERMINFO@
@@ -91,8 +92,7 @@
datadir=${datadir} \
ticdir=${ticdir} \
source=terminfo.tmp \
- THIS_CC="$(CC)" \
- THAT_CC="$(HOSTCC)" \
+ cross_compiling="${cross_compiling}" \
$(SHELL) ./run_tic.sh
@cd $(srcdir)/tabset && \
$(SHELL) -c 'for i in * ; do \

View File

@ -3,22 +3,22 @@ we'll hijack the freebsd* case that comes later
--- ncurses-5.6/aclocal.m4 --- ncurses-5.6/aclocal.m4
+++ ncurses-5.6/aclocal.m4 +++ ncurses-5.6/aclocal.m4
@@ -3806,7 +3806,7 @@ @@ -3806,7 +3806,7 @@
MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $[@]` -o $[@]' fi
cf_cv_rm_so_locs=yes cf_cv_rm_so_locs=yes
;; ;;
- linux*|gnu*|k*bsd*-gnu) - linux*|gnu*|k*bsd*-gnu) #(vi
+ linux*|gnu*|k*bsd*-gnu|freebsd*|dragonfly*) + linux*|gnu*|k*bsd*-gnu|freebsd*|dragonfly*) #(vi
if test "$DFT_LWR_MODEL" = "shared" ; then if test "$DFT_LWR_MODEL" = "shared" ; then
LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)" LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
--- ncurses-5.6/configure --- ncurses-5.6/configure
+++ ncurses-5.6/configure +++ ncurses-5.6/configure
@@ -3806,7 +3806,7 @@ @@ -3806,7 +3806,7 @@
MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@' fi
cf_cv_rm_so_locs=yes cf_cv_rm_so_locs=yes
;; ;;
- linux*|gnu*|k*bsd*-gnu) - linux*|gnu*|k*bsd*-gnu) #(vi
+ linux*|gnu*|k*bsd*-gnu|freebsd*|dragonfly*) + linux*|gnu*|k*bsd*-gnu|freebsd*|dragonfly*) #(vi
if test "$DFT_LWR_MODEL" = "shared" ; then if test "$DFT_LWR_MODEL" = "shared" ; then
LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)" LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"

View File

@ -184,6 +184,6 @@ which adds support for 256 colors.
+ pairs#32767, + pairs#32767,
+ use=rxvt-unicode, + use=rxvt-unicode,
+ +
# mrxvt 0.5.3 # mrxvt 0.5.4
# #
# mrxvt is based on rxvt 2.7.11, but has by default XTERM_FKEYS defined, which # mrxvt is based on rxvt 2.7.11, but has by default XTERM_FKEYS defined, which

View File

@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation # Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-libs/ncurses/ncurses-5.7-r7.ebuild,v 1.9 2011/05/22 18:19:56 xarthisius Exp $ # $Header: /var/cvsroot/gentoo-x86/sys-libs/ncurses/ncurses-5.9-r1.ebuild,v 1.1 2011/11/21 22:08:23 vapier Exp $
EAPI="1" EAPI="1"
inherit eutils flag-o-matic toolchain-funcs inherit eutils flag-o-matic toolchain-funcs
@ -14,7 +14,7 @@ SRC_URI="mirror://gnu/ncurses/${MY_P}.tar.gz"
LICENSE="MIT" LICENSE="MIT"
SLOT="5" SLOT="5"
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd" KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd"
IUSE="ada +cxx debug doc gpm minimal profile static-libs trace unicode" IUSE="ada +cxx debug doc gpm minimal profile static-libs trace unicode"
DEPEND="gpm? ( sys-libs/gpm )" DEPEND="gpm? ( sys-libs/gpm )"
@ -27,13 +27,12 @@ src_unpack() {
unpack ${A} unpack ${A}
cd "${S}" cd "${S}"
[[ -n ${PV_SNAP} ]] && epatch "${WORKDIR}"/${MY_P}-${PV_SNAP}-patch.sh [[ -n ${PV_SNAP} ]] && epatch "${WORKDIR}"/${MY_P}-${PV_SNAP}-patch.sh
epatch "${FILESDIR}"/${PN}-5.6-gfbsd.patch epatch "${FILESDIR}"/${PN}-5.8-gfbsd.patch
epatch "${FILESDIR}"/${PN}-5.7-emacs.patch #270527
epatch "${FILESDIR}"/${PN}-5.7-nongnu.patch epatch "${FILESDIR}"/${PN}-5.7-nongnu.patch
epatch "${FILESDIR}"/${PN}-5.7-tic-cross-detection.patch #288881 epatch "${FILESDIR}"/${PN}-5.8-rxvt-unicode.patch #192083
epatch "${FILESDIR}"/${PN}-5.7-rxvt-unicode-9.09.patch #192083 sed -i \
epatch "${FILESDIR}"/${P}-hashdb-open.patch #245370 -e '/^PKG_CONFIG_LIBDIR/s:=.*:=$(libdir)/pkgconfig:' \
sed -i '/with_no_leaks=yes/s:=.*:=$enableval:' configure #305889 misc/Makefile.in || die
} }
src_compile() { src_compile() {
@ -96,6 +95,7 @@ do_compile() {
--enable-const \ --enable-const \
--enable-colorfgbg \ --enable-colorfgbg \
--enable-echo \ --enable-echo \
--enable-pc-files \
$(use_enable !ada warnings) \ $(use_enable !ada warnings) \
$(use_with debug assertions) \ $(use_with debug assertions) \
$(use_enable debug leaks) \ $(use_enable debug leaks) \
@ -111,6 +111,11 @@ do_compile() {
# in parallel. This is not really a perf hit since the source # in parallel. This is not really a perf hit since the source
# generation is quite small. # generation is quite small.
emake -j1 sources || die emake -j1 sources || die
# For some reason, sources depends on pc-files which depends on
# compiled libraries which depends on sources which ...
# Manually delete the pc-files file so the install step will
# create the .pc files we want.
rm -f misc/pc-files
emake ${make_flags} || die emake ${make_flags} || die
} }