diff options
Diffstat (limited to 'meta/recipes-core/ncurses/ncurses_5.7.bb')
-rw-r--r-- | meta/recipes-core/ncurses/ncurses_5.7.bb | 246 |
1 files changed, 0 insertions, 246 deletions
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" | ||