diff options
author | Tom Rini <tom_rini@mentor.com> | 2011-04-06 17:50:40 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-04-08 06:18:21 -0700 |
commit | 2588569c9781d59b7f3f4f28ed94dea48d29fd68 (patch) | |
tree | 9ed0bb23fc8ca55596c1d5915de7e2d06f6bc7de /meta | |
parent | 5a780eb38821f3b6fb8d1be007e3f3323f6f2b83 (diff) | |
download | poky-2588569c9781d59b7f3f4f28ed94dea48d29fd68.tar.gz |
ncurses: Update to 5.9
The previous 5.7 release was relatively close to 5.8 due to it bringing
in a patch to sync with upstream work-in-progress. We skip over the
5.8 release and move to 5.9. Also, we move most of the contents of the
main recipe into the previously unused ncurses.inc file.
(From OE-Core rev: 296ac8b2b0fe5b84f04a272b33d1df37bdac986f)
Signed-off-by: Tom Rini <tom_rini@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-core/ncurses/ncurses-5.9/config.cache (renamed from meta/recipes-core/ncurses/ncurses-5.7/config.cache) | 0 | ||||
-rw-r--r-- | meta/recipes-core/ncurses/ncurses-5.9/tic-hang.patch (renamed from meta/recipes-core/ncurses/ncurses-5.7/tic-hang.patch) | 0 | ||||
-rw-r--r-- | meta/recipes-core/ncurses/ncurses.inc | 256 | ||||
-rw-r--r-- | meta/recipes-core/ncurses/ncurses_5.7.bb | 246 | ||||
-rw-r--r-- | meta/recipes-core/ncurses/ncurses_5.9.bb | 10 |
5 files changed, 204 insertions, 308 deletions
diff --git a/meta/recipes-core/ncurses/ncurses-5.7/config.cache b/meta/recipes-core/ncurses/ncurses-5.9/config.cache index 6a9217d5bb..6a9217d5bb 100644 --- a/meta/recipes-core/ncurses/ncurses-5.7/config.cache +++ b/meta/recipes-core/ncurses/ncurses-5.9/config.cache | |||
diff --git a/meta/recipes-core/ncurses/ncurses-5.7/tic-hang.patch b/meta/recipes-core/ncurses/ncurses-5.9/tic-hang.patch index 1678b885c4..1678b885c4 100644 --- a/meta/recipes-core/ncurses/ncurses-5.7/tic-hang.patch +++ b/meta/recipes-core/ncurses/ncurses-5.9/tic-hang.patch | |||
diff --git a/meta/recipes-core/ncurses/ncurses.inc b/meta/recipes-core/ncurses/ncurses.inc index 3f897f6ad2..e244eb8b4f 100644 --- a/meta/recipes-core/ncurses/ncurses.inc +++ b/meta/recipes-core/ncurses/ncurses.inc | |||
@@ -2,7 +2,7 @@ SUMMARY = "The New Curses library" | |||
2 | DESCRIPTION = "SVr4 and XSI-Curses compatible curses library and terminfo tools including tic, infocmp, captoinfo. Supports color, multiple highlights, forms-drawing characters, and automatic recognition of keypad and function-key sequences. Extensions include resizable windows and mouse support on both xterm and Linux console using the gpm library." | 2 | DESCRIPTION = "SVr4 and XSI-Curses compatible curses library and terminfo tools including tic, infocmp, captoinfo. Supports color, multiple highlights, forms-drawing characters, and automatic recognition of keypad and function-key sequences. Extensions include resizable windows and mouse support on both xterm and Linux console using the gpm library." |
3 | HOMEPAGE = "http://www.gnu.org/software/ncurses/ncurses.html" | 3 | HOMEPAGE = "http://www.gnu.org/software/ncurses/ncurses.html" |
4 | LICENSE = "MIT" | 4 | LICENSE = "MIT" |
5 | LIC_FILES_CHKSUM = "file://ncurses/base/version.c;beginline=1;endline=27;md5=cf3c7ab00720a1b83391f49ea9956277" | 5 | LIC_FILES_CHKSUM = "file://ncurses/base/version.c;beginline=1;endline=27;md5=cbc180a8c44ca642e97c35452fab5f66" |
6 | SECTION = "libs" | 6 | SECTION = "libs" |
7 | DEPENDS = "ncurses-native" | 7 | DEPENDS = "ncurses-native" |
8 | DEPENDS_virtclass-native = "" | 8 | DEPENDS_virtclass-native = "" |
@@ -11,53 +11,121 @@ PACKAGES_append = " ncurses-terminfo" | |||
11 | FILES_ncurses_append = " ${datadir}/tabset" | 11 | FILES_ncurses_append = " ${datadir}/tabset" |
12 | RSUGGESTS_${PN} = "ncurses-terminfo" | 12 | RSUGGESTS_${PN} = "ncurses-terminfo" |
13 | RPROVIDES = "libncurses5" | 13 | RPROVIDES = "libncurses5" |
14 | INC_PR = "r0" | ||
14 | 15 | ||
15 | inherit autotools | 16 | inherit autotools binconfig |
16 | 17 | ||
17 | # This keeps only tput/tset in ncurses | 18 | # Upstream has useful patches at times at ftp://invisible-island.net/ncurses/ |
18 | # clear/reset are in already busybox | 19 | SRC_URI = "${GNU_MIRROR}/ncurses/ncurses-${PV}.tar.gz" |
19 | FILES_ncurses-tools = "${bindir}/tic ${bindir}/toe ${bindir}/infotocap ${bindir}/captoinfo ${bindir}/infocmp ${bindir}/clear.${PN} ${bindir}/reset.${PN} ${bindir}/tack " | 20 | |
20 | FILES_ncurses-terminfo = "${datadir}/terminfo" | 21 | EXTRA_AUTORECONF = "-I m4" |
21 | FILES_${PN} = "${bindir}/tput ${bindir}/tset ${libdir}/lib*.so.* /usr/share/tabset /etc/terminfo" | 22 | CONFIG_SITE =+ "${WORKDIR}/config.cache" |
22 | 23 | ||
23 | PARALLEL_MAKE="" | 24 | # Whether to enable separate widec libraries; must be 'true' or 'false' |
24 | 25 | # | |
25 | FILESPATH = "${FILE_DIRNAME}/local:${FILE_DIRNAME}/ncurses-${PV}-${PR}:${FILE_DIRNAME}/ncurses-${PV}:${FILE_DIRNAME}/ncurses:${FILE_DIRNAME}" | 26 | # TODO: remove this variable when widec is supported in every setup? |
26 | 27 | ENABLE_WIDEC = "true" | |
27 | EXTRA_OECONF = "--with-shared \ | 28 | |
28 | --with-libtool \ | 29 | # _GNU_SOURCE is required for widec stuff and is detected automatically |
29 | --without-profile \ | 30 | # for target objects. But it must be set manually for native and sdk |
30 | --without-debug \ | 31 | # builds. |
31 | --disable-rpath \ | 32 | BUILD_CPPFLAGS += "-D_GNU_SOURCE" |
32 | --enable-echo \ | 33 | |
33 | --enable-const \ | 34 | # Override the function from the autotools class; ncurses requires a |
34 | --without-ada \ | 35 | # patched autoconf213 to generate the configure script. This autoconf |
35 | --enable-termcap \ | 36 | # is not available so that the shipped script will be used. |
36 | --without-cxx-binding \ | 37 | do_configure() { |
37 | --with-terminfo-dirs=${sysconfdir}/terminfo:${datadir}/terminfo \ | 38 | # check does not work with cross-compiling and is generally |
38 | --enable-overwrite \ | 39 | # broken because it requires stdin to be pollable (which is |
39 | --with-build-ldflags='' \ | 40 | # not the case for /dev/null redirections) |
40 | --with-build-ccflags='' " | 41 | export cf_cv_working_poll=yes |
41 | export BUILD_CCFLAGS = "-I${S}/ncurses -I${S}/include ${BUILD_CFLAGS}" | 42 | |
42 | export BUILD_LDFLAGS = "" | 43 | for i in \ |
43 | export EXTRA_OEMAKE = '"BUILD_LDFLAGS=" "BUILD_CCFLAGS=${BUILD_CCFLAGS}"' | 44 | 'narrowc' \ |
45 | 'widec --enable-widec --without-progs'; do | ||
46 | set -- $i | ||
47 | mkdir -p $1 | ||
48 | cd $1 | ||
49 | shift | ||
50 | |||
51 | oe_runconf \ | ||
52 | --disable-static \ | ||
53 | --without-debug \ | ||
54 | --without-ada \ | ||
55 | --without-gpm \ | ||
56 | --enable-hard-tabs \ | ||
57 | --enable-xmc-glitch \ | ||
58 | --enable-colorfgbg \ | ||
59 | --with-termpath='${sysconfdir}/termcap:${datadir}/misc/termcap' \ | ||
60 | --with-terminfo-dirs='${sysconfdir}/terminfo:${datadir}/terminfo' \ | ||
61 | --with-shared \ | ||
62 | --disable-big-core \ | ||
63 | --program-prefix= \ | ||
64 | --with-ticlib \ | ||
65 | --with-termlib=tinfo \ | ||
66 | --enable-sigwinch \ | ||
67 | --enable-pc-files \ | ||
68 | --disable-rpath-hack \ | ||
69 | "$@" | ||
70 | cd .. | ||
71 | done | ||
72 | } | ||
73 | |||
74 | do_compile() { | ||
75 | oe_runmake -C narrowc libs | ||
76 | oe_runmake -C narrowc/progs | ||
77 | |||
78 | ! ${ENABLE_WIDEC} || \ | ||
79 | oe_runmake -C widec libs | ||
80 | } | ||
81 | |||
82 | # set of expected differences between narrowc and widec header | ||
83 | # | ||
84 | # TODO: the NCURSES_CH_T difference can cause real problems :( | ||
85 | _unifdef_cleanup = " \ | ||
86 | -e '\!/\* \$Id: curses.wide,v!,\!/\* \$Id: curses.tail,v!d' \ | ||
87 | -e '/^#define NCURSES_CH_T /d' \ | ||
88 | -e '/^#include <wchar.h>/d' \ | ||
89 | -e '\!^/\* .* \*/!d' \ | ||
90 | " | ||
91 | |||
92 | do_test[depends] = "unifdef-native:do_populate_sysroot" | ||
93 | do_test[dirs] = "${S}" | ||
94 | do_test() { | ||
95 | ${ENABLE_WIDEC} || return 0 | ||
96 | |||
97 | # make sure that the narrow and widec header are compatible | ||
98 | # and differ only in minor details. | ||
99 | unifdef -k narrowc/include/curses.h | \ | ||
100 | sed ${_unifdef_cleanup} > curses-narrowc.h | ||
101 | unifdef -k widec/include/curses.h | \ | ||
102 | sed ${_unifdef_cleanup} > curses-widec.h | ||
103 | |||
104 | diff curses-narrowc.h curses-widec.h | ||
105 | } | ||
106 | |||
107 | _install_opts = "\ | ||
108 | DESTDIR='${D}' \ | ||
109 | PKG_CONFIG_LIBDIR='${libdir}/pkgconfig' \ | ||
110 | install.libs install.includes install.man \ | ||
111 | " | ||
44 | 112 | ||
45 | do_install() { | 113 | do_install() { |
46 | # This is necessary so that the "tic" command executed during the install can | 114 | # Order of installation is important; widec installs a 'curses.h' |
47 | # link with the correct libary in staging. | 115 | # header with more definitions and must be installed last hence. |
48 | export LD_LIBRARY_PATH="${STAGING_LIBDIR_NATIVE}" | 116 | # Compatibility of these headers will be checked in 'do_test()'. |
117 | oe_runmake -C narrowc ${_install_opts} \ | ||
118 | install.data install.progs | ||
49 | 119 | ||
50 | autotools_do_install | 120 | ! ${ENABLE_WIDEC} || \ |
121 | oe_runmake -C widec ${_install_opts} | ||
51 | 122 | ||
52 | ln -sf curses.h ${D}${includedir}/ncurses.h | ||
53 | 123 | ||
54 | # our ncurses has termcap support | 124 | cd narrowc |
55 | ln -sf libncurses.so ${D}${libdir}/libtermcap.so | ||
56 | ln -sf libncurses.a ${D}${libdir}/libtermcap.a | ||
57 | 125 | ||
58 | # include some basic terminfo files | 126 | # include some basic terminfo files |
59 | # stolen ;) from gentoo and modified a bit | 127 | # stolen ;) from gentoo and modified a bit |
60 | for x in ansi console dumb linux rxvt screen sun vt{52,100,102,200,220} xterm-color xterm-xfree86 | 128 | for x in ansi console dumb linux rxvt screen sun vt{52,100,102,200,220} xterm-color xterm-xfree86 |
61 | do | 129 | do |
62 | local termfile="$(find "${D}${datadir}/terminfo/" -name "${x}" 2>/dev/null)" | 130 | local termfile="$(find "${D}${datadir}/terminfo/" -name "${x}" 2>/dev/null)" |
63 | local basedir="$(basename $(dirname "${termfile}"))" | 131 | local basedir="$(basename $(dirname "${termfile}"))" |
@@ -70,32 +138,96 @@ do_install() { | |||
70 | ${D}${datadir}/terminfo/${basedir}/${x} | 138 | ${D}${datadir}/terminfo/${basedir}/${x} |
71 | fi | 139 | fi |
72 | done | 140 | done |
73 | # i think we can use xterm-color as default xterm | 141 | # i think we can use xterm-color as default xterm |
74 | if [ -e ${D}${sysconfdir}/terminfo/x/xterm-color ] | 142 | if [ -e ${D}${sysconfdir}/terminfo/x/xterm-color ] |
75 | then | 143 | then |
76 | ln -sf xterm-color ${D}${sysconfdir}/terminfo/x/xterm | 144 | ln -sf xterm-color ${D}${sysconfdir}/terminfo/x/xterm |
77 | fi | 145 | fi |
78 | 146 | ||
79 | if [ "${PN}" = "ncurses" ]; then | 147 | if [ "${PN}" = "ncurses" ]; then |
80 | mv ${D}${bindir}/clear ${D}${bindir}/clear.${PN} | 148 | mv ${D}${bindir}/clear ${D}${bindir}/clear.${PN} |
81 | mv ${D}${bindir}/reset ${D}${bindir}/reset.${PN} | 149 | mv ${D}${bindir}/reset ${D}${bindir}/reset.${PN} |
82 | fi | 150 | fi |
151 | |||
152 | |||
153 | # create linker scripts for libcurses.so and libncurses to | ||
154 | # link against -ltinfo when needed. Some builds might break | ||
155 | # else when '-Wl,--no-copy-dt-needed-entries' has been set in | ||
156 | # linker flags. | ||
157 | for i in libncurses libncursesw; do | ||
158 | f=${D}${libdir}/$i.so | ||
159 | test -h $f || continue | ||
160 | rm -f $f | ||
161 | echo '/* GNU ld script */' >$f | ||
162 | echo "INPUT($i.so.5 AS_NEEDED(-ltinfo))" >>$f | ||
163 | done | ||
164 | |||
165 | # create libtermcap.so linker script for backward compatibility | ||
166 | f=${D}${libdir}/libtermcap.so | ||
167 | echo '/* GNU ld script */' >$f | ||
168 | echo 'INPUT(AS_NEEDED(-ltinfo))' >>$f | ||
83 | } | 169 | } |
84 | 170 | ||
85 | 171 | python populate_packages_prepend () { | |
172 | libdir = bb.data.expand("${libdir}", d) | ||
173 | pnbase = bb.data.expand("${PN}-lib%s", d) | ||
174 | do_split_packages(d, libdir, '^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True) | ||
175 | } | ||
176 | |||
177 | |||
86 | pkg_postinst_ncurses-tools () { | 178 | pkg_postinst_ncurses-tools () { |
87 | if [ "${PN}" = "ncurses" ]; then | 179 | if [ "${PN}" = "ncurses" ]; then |
88 | update-alternatives --install ${bindir}/clear clear clear.${PN} 100 | 180 | update-alternatives --install ${bindir}/clear clear clear.${PN} 100 |
89 | update-alternatives --install ${bindir}/reset reset reset.${PN} 100 | 181 | update-alternatives --install ${bindir}/reset reset reset.${PN} 100 |
90 | fi | 182 | fi |
91 | } | 183 | } |
92 | 184 | ||
93 | |||
94 | pkg_prerm_ncurses-tools () { | 185 | pkg_prerm_ncurses-tools () { |
95 | if [ "${PN}" = "ncurses" ]; then | 186 | if [ "${PN}" = "ncurses" ]; then |
96 | update-alternatives --remove clear clear.${PN} | 187 | update-alternatives --remove clear clear.${PN} |
97 | update-alternatives --remove reset reset.${PN} | 188 | update-alternatives --remove reset reset.${PN} |
98 | fi | 189 | fi |
99 | } | 190 | } |
100 | 191 | ||
101 | BBCLASSEXTEND = "native nativesdk" | 192 | BBCLASSEXTEND = "native nativesdk" |
193 | |||
194 | PACKAGES += " \ | ||
195 | ${PN}-tools \ | ||
196 | ${PN}-terminfo \ | ||
197 | ${PN}-terminfo-base \ | ||
198 | " | ||
199 | |||
200 | FILES_${PN} = "\ | ||
201 | ${bindir}/tput \ | ||
202 | ${bindir}/tset \ | ||
203 | ${bindir}/ncurses5-config \ | ||
204 | ${bindir}/ncursesw5-config \ | ||
205 | ${datadir}/tabset \ | ||
206 | " | ||
207 | |||
208 | # This keeps only tput/tset in ncurses | ||
209 | # clear/reset are in already busybox | ||
210 | FILES_${PN}-tools = "\ | ||
211 | ${bindir}/tic \ | ||
212 | ${bindir}/toe \ | ||
213 | ${bindir}/infotocap \ | ||
214 | ${bindir}/captoinfo \ | ||
215 | ${bindir}/infocmp \ | ||
216 | ${bindir}/clear.${PN} \ | ||
217 | ${bindir}/reset.${PN} \ | ||
218 | ${bindir}/tack \ | ||
219 | ${bindir}/tabs \ | ||
220 | " | ||
221 | # 'reset' is a symlink to 'tset' which is in the 'ncurses' package | ||
222 | RDEPENDS_${PN}-tools = "${PN}" | ||
223 | |||
224 | FILES_${PN}-terminfo = "\ | ||
225 | ${datadir}/terminfo \ | ||
226 | " | ||
227 | |||
228 | FILES_${PN}-terminfo-base = "\ | ||
229 | ${sysconfdir}/terminfo \ | ||
230 | " | ||
231 | |||
232 | RSUGGESTS_${PN}-libtinfo = "${PN}-terminfo" | ||
233 | RRECOMMENDS_${PN}-libtinfo = "${PN}-terminfo-base" | ||
diff --git a/meta/recipes-core/ncurses/ncurses_5.7.bb b/meta/recipes-core/ncurses/ncurses_5.7.bb deleted file mode 100644 index 7ab078d6aa..0000000000 --- a/meta/recipes-core/ncurses/ncurses_5.7.bb +++ /dev/null | |||
@@ -1,246 +0,0 @@ | |||
1 | DESCRIPTION = "Ncurses library" | ||
2 | HOMEPAGE = "http://www.gnu.org/software/ncurses/ncurses.html" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://ncurses/base/version.c;beginline=1;endline=27;md5=cbc180a8c44ca642e97c35452fab5f66" | ||
5 | SECTION = "libs" | ||
6 | PATCHDATE = "20100501" | ||
7 | PKGV = "${PV}+${PATCHDATE}" | ||
8 | PR = "r1" | ||
9 | |||
10 | DEPENDS = "ncurses-native" | ||
11 | DEPENDS_virtclass-native = "" | ||
12 | |||
13 | inherit autotools binconfig | ||
14 | |||
15 | SRC_URI = "${GNU_MIRROR}/ncurses/ncurses-${PV}.tar.gz;name=tarball \ | ||
16 | ftp://invisible-island.net/ncurses/5.7/ncurses-5.7-20100424-patch.sh.bz2;apply=yes;name=p20100424sh \ | ||
17 | \ | ||
18 | http://autobuilder.yoctoproject.org/sources/ncurses-5.7-${PATCHDATE}.patch.gz;name=p20100501 \ | ||
19 | file://tic-hang.patch \ | ||
20 | file://config.cache \ | ||
21 | " | ||
22 | |||
23 | |||
24 | # ftp://invisible-island.net/ncurses/5.7/ncurses-5.7-${PATCHDATE}.patch.gz;name=p20100501 | ||
25 | |||
26 | SRC_URI[tarball.md5sum] = "cce05daf61a64501ef6cd8da1f727ec6" | ||
27 | SRC_URI[tarball.sha256sum] = "0a9bdea5c7de8ded5c9327ed642915f2cc380753f12d4ad120ef7da3ea3498f4" | ||
28 | SRC_URI[p20100424sh.md5sum] = "3a5f76613f0f7ec3e0e73b835bc24864" | ||
29 | SRC_URI[p20100424sh.sha256sum] = "1e9d70d2d1fe1fea471868832c52f1b9cc6065132102e49e2a3755f2f4f5be53" | ||
30 | SRC_URI[p20100501.md5sum] = "6518cfa5d45e9069a1e042468161448b" | ||
31 | SRC_URI[p20100501.sha256sum] = "a97ccc30e4bd6fbb89564f3058db0fe84bd35cfefee831556c500793b477abde" | ||
32 | |||
33 | #PARALLEL_MAKE = "" | ||
34 | EXTRA_AUTORECONF = "-I m4" | ||
35 | CONFIG_SITE =+ "${WORKDIR}/config.cache" | ||
36 | |||
37 | # Whether to enable separate widec libraries; must be 'true' or 'false' | ||
38 | # | ||
39 | # TODO: remove this variable when widec is supported in every setup? | ||
40 | ENABLE_WIDEC = "true" | ||
41 | |||
42 | # _GNU_SOURCE is required for widec stuff and is detected automatically | ||
43 | # for target objects. But it must be set manually for native and sdk | ||
44 | # builds. | ||
45 | BUILD_CPPFLAGS += "-D_GNU_SOURCE" | ||
46 | |||
47 | # Override the function from the autotools class; ncurses requires a | ||
48 | # patched autoconf213 to generate the configure script. This autoconf | ||
49 | # is not available so that the shipped script will be used. | ||
50 | do_configure() { | ||
51 | # check does not work with cross-compiling and is generally | ||
52 | # broken because it requires stdin to be pollable (which is | ||
53 | # not the case for /dev/null redirections) | ||
54 | export cf_cv_working_poll=yes | ||
55 | |||
56 | for i in \ | ||
57 | 'narrowc' \ | ||
58 | 'widec --enable-widec --without-progs'; do | ||
59 | set -- $i | ||
60 | mkdir -p $1 | ||
61 | cd $1 | ||
62 | shift | ||
63 | |||
64 | oe_runconf \ | ||
65 | --disable-static \ | ||
66 | --without-debug \ | ||
67 | --without-ada \ | ||
68 | --without-gpm \ | ||
69 | --enable-hard-tabs \ | ||
70 | --enable-xmc-glitch \ | ||
71 | --enable-colorfgbg \ | ||
72 | --with-termpath='${sysconfdir}/termcap:${datadir}/misc/termcap' \ | ||
73 | --with-terminfo-dirs='${sysconfdir}/terminfo:${datadir}/terminfo' \ | ||
74 | --with-shared \ | ||
75 | --disable-big-core \ | ||
76 | --program-prefix= \ | ||
77 | --with-ticlib \ | ||
78 | --with-termlib=tinfo \ | ||
79 | --enable-sigwinch \ | ||
80 | --enable-pc-files \ | ||
81 | --disable-rpath-hack \ | ||
82 | "$@" | ||
83 | cd .. | ||
84 | done | ||
85 | } | ||
86 | |||
87 | do_compile() { | ||
88 | oe_runmake -C narrowc libs | ||
89 | oe_runmake -C narrowc/progs | ||
90 | |||
91 | ! ${ENABLE_WIDEC} || \ | ||
92 | oe_runmake -C widec libs | ||
93 | } | ||
94 | |||
95 | # set of expected differences between narrowc and widec header | ||
96 | # | ||
97 | # TODO: the NCURSES_CH_T difference can cause real problems :( | ||
98 | _unifdef_cleanup = " \ | ||
99 | -e '\!/\* \$Id: curses.wide,v!,\!/\* \$Id: curses.tail,v!d' \ | ||
100 | -e '/^#define NCURSES_CH_T /d' \ | ||
101 | -e '/^#include <wchar.h>/d' \ | ||
102 | -e '\!^/\* .* \*/!d' \ | ||
103 | " | ||
104 | |||
105 | do_test[depends] = "unifdef-native:do_populate_sysroot" | ||
106 | do_test[dirs] = "${S}" | ||
107 | do_test() { | ||
108 | ${ENABLE_WIDEC} || return 0 | ||
109 | |||
110 | # make sure that the narrow and widec header are compatible | ||
111 | # and differ only in minor details. | ||
112 | unifdef -k narrowc/include/curses.h | \ | ||
113 | sed ${_unifdef_cleanup} > curses-narrowc.h | ||
114 | unifdef -k widec/include/curses.h | \ | ||
115 | sed ${_unifdef_cleanup} > curses-widec.h | ||
116 | |||
117 | diff curses-narrowc.h curses-widec.h | ||
118 | } | ||
119 | |||
120 | _install_opts = "\ | ||
121 | DESTDIR='${D}' \ | ||
122 | PKG_CONFIG_LIBDIR='${libdir}/pkgconfig' \ | ||
123 | install.libs install.includes install.man \ | ||
124 | " | ||
125 | |||
126 | do_install() { | ||
127 | # Order of installation is important; widec installs a 'curses.h' | ||
128 | # header with more definitions and must be installed last hence. | ||
129 | # Compatibility of these headers will be checked in 'do_test()'. | ||
130 | oe_runmake -C narrowc ${_install_opts} \ | ||
131 | install.data install.progs | ||
132 | |||
133 | ! ${ENABLE_WIDEC} || \ | ||
134 | oe_runmake -C widec ${_install_opts} | ||
135 | |||
136 | |||
137 | cd narrowc | ||
138 | |||
139 | # include some basic terminfo files | ||
140 | # stolen ;) from gentoo and modified a bit | ||
141 | for x in ansi console dumb linux rxvt screen sun vt{52,100,102,200,220} xterm-color xterm-xfree86 | ||
142 | do | ||
143 | local termfile="$(find "${D}${datadir}/terminfo/" -name "${x}" 2>/dev/null)" | ||
144 | local basedir="$(basename $(dirname "${termfile}"))" | ||
145 | |||
146 | if [ -n "${termfile}" ] | ||
147 | then | ||
148 | install -d ${D}${sysconfdir}/terminfo/${basedir} | ||
149 | mv ${termfile} ${D}${sysconfdir}/terminfo/${basedir}/ | ||
150 | ln -s /etc/terminfo/${basedir}/${x} \ | ||
151 | ${D}${datadir}/terminfo/${basedir}/${x} | ||
152 | fi | ||
153 | done | ||
154 | # i think we can use xterm-color as default xterm | ||
155 | if [ -e ${D}${sysconfdir}/terminfo/x/xterm-color ] | ||
156 | then | ||
157 | ln -sf xterm-color ${D}${sysconfdir}/terminfo/x/xterm | ||
158 | fi | ||
159 | |||
160 | if [ "${PN}" = "ncurses" ]; then | ||
161 | mv ${D}${bindir}/clear ${D}${bindir}/clear.${PN} | ||
162 | mv ${D}${bindir}/reset ${D}${bindir}/reset.${PN} | ||
163 | fi | ||
164 | |||
165 | |||
166 | # create linker scripts for libcurses.so and libncurses to | ||
167 | # link against -ltinfo when needed. Some builds might break | ||
168 | # else when '-Wl,--no-copy-dt-needed-entries' has been set in | ||
169 | # linker flags. | ||
170 | for i in libncurses libncursesw; do | ||
171 | f=${D}${libdir}/$i.so | ||
172 | test -h $f || continue | ||
173 | rm -f $f | ||
174 | echo '/* GNU ld script */' >$f | ||
175 | echo "INPUT($i.so.5 AS_NEEDED(-ltinfo))" >>$f | ||
176 | done | ||
177 | |||
178 | # create libtermcap.so linker script for backward compatibility | ||
179 | f=${D}${libdir}/libtermcap.so | ||
180 | echo '/* GNU ld script */' >$f | ||
181 | echo 'INPUT(AS_NEEDED(-ltinfo))' >>$f | ||
182 | } | ||
183 | |||
184 | python populate_packages_prepend () { | ||
185 | libdir = bb.data.expand("${libdir}", d) | ||
186 | pnbase = bb.data.expand("${PN}-lib%s", d) | ||
187 | do_split_packages(d, libdir, '^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True) | ||
188 | } | ||
189 | |||
190 | |||
191 | pkg_postinst_ncurses-tools () { | ||
192 | if [ "${PN}" = "ncurses" ]; then | ||
193 | update-alternatives --install ${bindir}/clear clear clear.${PN} 100 | ||
194 | update-alternatives --install ${bindir}/reset reset reset.${PN} 100 | ||
195 | fi | ||
196 | } | ||
197 | |||
198 | pkg_prerm_ncurses-tools () { | ||
199 | if [ "${PN}" = "ncurses" ]; then | ||
200 | update-alternatives --remove clear clear.${PN} | ||
201 | update-alternatives --remove reset reset.${PN} | ||
202 | fi | ||
203 | } | ||
204 | |||
205 | BBCLASSEXTEND = "native nativesdk" | ||
206 | |||
207 | PACKAGES += " \ | ||
208 | ${PN}-tools \ | ||
209 | ${PN}-terminfo \ | ||
210 | ${PN}-terminfo-base \ | ||
211 | " | ||
212 | |||
213 | FILES_${PN} = "\ | ||
214 | ${bindir}/tput \ | ||
215 | ${bindir}/tset \ | ||
216 | ${bindir}/ncurses5-config \ | ||
217 | ${bindir}/ncursesw5-config \ | ||
218 | ${datadir}/tabset \ | ||
219 | " | ||
220 | |||
221 | # This keeps only tput/tset in ncurses | ||
222 | # clear/reset are in already busybox | ||
223 | FILES_${PN}-tools = "\ | ||
224 | ${bindir}/tic \ | ||
225 | ${bindir}/toe \ | ||
226 | ${bindir}/infotocap \ | ||
227 | ${bindir}/captoinfo \ | ||
228 | ${bindir}/infocmp \ | ||
229 | ${bindir}/clear.${PN} \ | ||
230 | ${bindir}/reset.${PN} \ | ||
231 | ${bindir}/tack \ | ||
232 | ${bindir}/tabs \ | ||
233 | " | ||
234 | # 'reset' is a symlink to 'tset' which is in the 'ncurses' package | ||
235 | RDEPENDS_${PN}-tools = "${PN}" | ||
236 | |||
237 | FILES_${PN}-terminfo = "\ | ||
238 | ${datadir}/terminfo \ | ||
239 | " | ||
240 | |||
241 | FILES_${PN}-terminfo-base = "\ | ||
242 | ${sysconfdir}/terminfo \ | ||
243 | " | ||
244 | |||
245 | RSUGGESTS_${PN}-libtinfo = "${PN}-terminfo" | ||
246 | RRECOMMENDS_${PN}-libtinfo = "${PN}-terminfo-base" | ||
diff --git a/meta/recipes-core/ncurses/ncurses_5.9.bb b/meta/recipes-core/ncurses/ncurses_5.9.bb new file mode 100644 index 0000000000..4e1f143ef3 --- /dev/null +++ b/meta/recipes-core/ncurses/ncurses_5.9.bb | |||
@@ -0,0 +1,10 @@ | |||
1 | require ncurses.inc | ||
2 | |||
3 | PR = "${INC_PR}.0" | ||
4 | |||
5 | SRC_URI += "file://tic-hang.patch \ | ||
6 | file://config.cache \ | ||
7 | " | ||
8 | |||
9 | SRC_URI[md5sum] = "8cb9c412e5f2d96bc6f459aa8c6282a1" | ||
10 | SRC_URI[sha256sum] = "9046298fb440324c9d4135ecea7879ffed8546dd1b58e59430ea07a4633f563b" | ||