summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/ncurses/ncurses.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/ncurses/ncurses.inc')
-rw-r--r--meta/recipes-core/ncurses/ncurses.inc68
1 files changed, 31 insertions, 37 deletions
diff --git a/meta/recipes-core/ncurses/ncurses.inc b/meta/recipes-core/ncurses/ncurses.inc
index ef59bc3b0a..951f96beb5 100644
--- a/meta/recipes-core/ncurses/ncurses.inc
+++ b/meta/recipes-core/ncurses/ncurses.inc
@@ -2,10 +2,10 @@ SUMMARY = "The New Curses library"
2DESCRIPTION = "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." 2DESCRIPTION = "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."
3HOMEPAGE = "http://www.gnu.org/software/ncurses/ncurses.html" 3HOMEPAGE = "http://www.gnu.org/software/ncurses/ncurses.html"
4LICENSE = "MIT" 4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://ncurses/base/version.c;beginline=1;endline=27;md5=5526f2f3a29edc95538b368a4771edda" 5LIC_FILES_CHKSUM = "file://COPYING;md5=6f291ee54551d9d8d992ecd623fe4bc7;endline=27"
6SECTION = "libs" 6SECTION = "libs"
7DEPENDS = "ncurses-native" 7DEPENDS = "ncurses-native"
8DEPENDS_class-native = "" 8DEPENDS:class-native = ""
9 9
10BINCONFIG = "${bindir}/ncurses5-config ${bindir}/ncursesw5-config \ 10BINCONFIG = "${bindir}/ncurses5-config ${bindir}/ncursesw5-config \
11 ${bindir}/ncurses6-config ${bindir}/ncursesw6-config" 11 ${bindir}/ncurses6-config ${bindir}/ncursesw6-config"
@@ -13,36 +13,36 @@ BINCONFIG = "${bindir}/ncurses5-config ${bindir}/ncursesw5-config \
13inherit autotools binconfig-disabled multilib_header pkgconfig 13inherit autotools binconfig-disabled multilib_header pkgconfig
14 14
15# Upstream has useful patches at times at ftp://invisible-island.net/ncurses/ 15# Upstream has useful patches at times at ftp://invisible-island.net/ncurses/
16SRC_URI = "git://salsa.debian.org/debian/ncurses.git;protocol=https" 16SRC_URI = "git://github.com/ThomasDickey/ncurses-snapshots.git;protocol=https;branch=master"
17 17
18EXTRA_AUTORECONF = "-I m4" 18EXTRA_AUTORECONF = "-I m4"
19 19
20CACHED_CONFIGUREVARS = "cf_cv_func_nanosleep=yes" 20CACHED_CONFIGUREVARS = "cf_cv_func_nanosleep=yes"
21 21CACHED_CONFIGUREVARS:append:linux = " cf_cv_working_poll=yes"
22EXTRASITECONFIG = "CFLAGS='${CFLAGS} -I${SYSROOT_DESTDIR}${includedir}'"
23 22
24# Whether to enable separate widec libraries; must be 'true' or 'false' 23# Whether to enable separate widec libraries; must be 'true' or 'false'
25# 24#
26# TODO: remove this variable when widec is supported in every setup? 25# TODO: remove this variable when widec is supported in every setup?
27ENABLE_WIDEC ?= "true" 26ENABLE_WIDEC ?= "true"
28 27
29# _GNU_SOURCE is required for widec stuff and is detected automatically 28# _GNU_SOURCE is required for widec stuff and is not detected automatically
30# for target objects. But it must be set manually for native and sdk 29CPPFLAGS += "-D_GNU_SOURCE"
31# builds. 30
32BUILD_CPPFLAGS += "-D_GNU_SOURCE" 31# Check if we still need it when next release (6.6) happens
32CFLAGS += "-std=gnu17"
33 33
34# natives don't generally look in base_libdir 34# natives don't generally look in base_libdir
35base_libdir_class-native = "${libdir}" 35base_libdir:class-native = "${libdir}"
36 36
37# Display corruption occurs on 64 bit hosts without these settings 37# Display corruption occurs on 64 bit hosts without these settings
38# This was derrived from the upstream debian ncurses which uses 38# This was derrived from the upstream debian ncurses which uses
39# these settings for 32 and 64 bit hosts. 39# these settings for 32 and 64 bit hosts.
40EXCONFIG_ARGS = "" 40EXCONFIG_ARGS = ""
41EXCONFIG_ARGS_class-native = " \ 41EXCONFIG_ARGS:class-native = " \
42 --disable-lp64 \ 42 --disable-lp64 \
43 --with-chtype='long' \ 43 --with-chtype='long' \
44 --with-mmask-t='long'" 44 --with-mmask-t='long'"
45EXCONFIG_ARGS_class-nativesdk = " \ 45EXCONFIG_ARGS:class-nativesdk = " \
46 --disable-lp64 \ 46 --disable-lp64 \
47 --with-chtype='long' \ 47 --with-chtype='long' \
48 --with-mmask-t='long'" 48 --with-mmask-t='long'"
@@ -55,11 +55,11 @@ PACKAGES_DYNAMIC = "^${PN}-lib.*"
55# because the sstate had a hard coded search path. Until this is fixed 55# because the sstate had a hard coded search path. Until this is fixed
56# another way this is deemed good enough. 56# another way this is deemed good enough.
57EX_TERMCAP = "" 57EX_TERMCAP = ""
58EX_TERMCAP_class-native = ":/etc/termcap:/usr/share/misc/termcap" 58EX_TERMCAP:class-native = ":/etc/termcap:/usr/share/misc/termcap"
59EX_TERMCAP_class-nativesdk = ":/etc/termcap:/usr/share/misc/termcap" 59EX_TERMCAP:class-nativesdk = ":/etc/termcap:/usr/share/misc/termcap"
60EX_TERMINFO = "" 60EX_TERMINFO = ""
61EX_TERMINFO_class-native = ":/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo" 61EX_TERMINFO:class-native = ":/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo"
62EX_TERMINFO_class-nativesdk = ":/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo" 62EX_TERMINFO:class-nativesdk = ":/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo"
63EX_TERMLIB ?= "tinfo" 63EX_TERMLIB ?= "tinfo"
64 64
65# Helper function for do_configure to allow multiple configurations 65# Helper function for do_configure to allow multiple configurations
@@ -73,6 +73,7 @@ ncurses_configure() {
73 --without-debug \ 73 --without-debug \
74 --without-ada \ 74 --without-ada \
75 --without-gpm \ 75 --without-gpm \
76 --with-xterm-kbs=del \
76 --enable-hard-tabs \ 77 --enable-hard-tabs \
77 --enable-xmc-glitch \ 78 --enable-xmc-glitch \
78 --enable-colorfgbg \ 79 --enable-colorfgbg \
@@ -98,10 +99,6 @@ ncurses_configure() {
98# patched autoconf213 to generate the configure script. This autoconf 99# patched autoconf213 to generate the configure script. This autoconf
99# is not available so that the shipped script will be used. 100# is not available so that the shipped script will be used.
100do_configure() { 101do_configure() {
101 # check does not work with cross-compiling and is generally
102 # broken because it requires stdin to be pollable (which is
103 # not the case for /dev/null redirections)
104 export cf_cv_working_poll=yes
105 #Remove ${includedir} from CPPFLAGS, need for cross compile 102 #Remove ${includedir} from CPPFLAGS, need for cross compile
106 sed -i 's#-I${cf_includedir}##g' ${S}/configure || die "sed CPPFLAGS" 103 sed -i 's#-I${cf_includedir}##g' ${S}/configure || die "sed CPPFLAGS"
107 104
@@ -178,7 +175,6 @@ do_install() {
178 oe_runmake -C narrowc ${_install_cfgs} \ 175 oe_runmake -C narrowc ${_install_cfgs} \
179 install.data 176 install.data
180 177
181
182 ! ${ENABLE_WIDEC} || \ 178 ! ${ENABLE_WIDEC} || \
183 oe_runmake -C widec ${_install_cfgs} ${_install_opts} 179 oe_runmake -C widec ${_install_cfgs} ${_install_opts}
184 180
@@ -186,7 +182,7 @@ do_install() {
186 182
187 # include some basic terminfo files 183 # include some basic terminfo files
188 # stolen ;) from gentoo and modified a bit 184 # stolen ;) from gentoo and modified a bit
189 for x in ansi console dumb linux rxvt screen screen-256color sun vt52 vt100 vt102 vt200 vt220 xterm-color xterm-xfree86 xterm-256color 185 for x in alacritty ansi console dumb linux rxvt screen screen-256color sun vt52 vt100 vt102 vt200 vt220 xterm-color xterm-xfree86 xterm-256color
190 do 186 do
191 local termfile="$(find "${D}${datadir}/terminfo/" -name "${x}" 2>/dev/null)" 187 local termfile="$(find "${D}${datadir}/terminfo/" -name "${x}" 2>/dev/null)"
192 local basedir="$(basename $(dirname "${termfile}"))" 188 local basedir="$(basename $(dirname "${termfile}"))"
@@ -242,10 +238,9 @@ do_install() {
242 mv ${D}${libdir}/libtinfo.so.* ${D}${base_libdir} 238 mv ${D}${libdir}/libtinfo.so.* ${D}${base_libdir}
243 rm ${D}${libdir}/libtinfo.so 239 rm ${D}${libdir}/libtinfo.so
244 240
245 # Use lnr to ensure this is a relative link despite absolute paths 241 # Use ln -rs to ensure this is a relative link despite absolute paths
246 # (as we can't know the relationship between base_libdir and libdir). 242 # (as we can't know the relationship between base_libdir and libdir).
247 # At some point we can rely on coreutils 8.16 which has ln -r. 243 ln -rs ${D}${base_libdir}/libtinfo.so.5 ${D}${libdir}/libtinfo.so
248 lnr ${D}${base_libdir}/libtinfo.so.5 ${D}${libdir}/libtinfo.so
249 fi 244 fi
250 if [ -d "${D}${includedir}/ncurses" ]; then 245 if [ -d "${D}${includedir}/ncurses" ]; then
251 for f in `find ${D}${includedir}/ncurses -name "*.h"` 246 for f in `find ${D}${includedir}/ncurses -name "*.h"`
@@ -258,7 +253,7 @@ do_install() {
258 oe_multilib_header curses.h 253 oe_multilib_header curses.h
259} 254}
260 255
261python populate_packages_prepend () { 256python populate_packages:prepend () {
262 libdir = d.expand("${libdir}") 257 libdir = d.expand("${libdir}")
263 base_libdir = d.expand("${base_libdir}") 258 base_libdir = d.expand("${base_libdir}")
264 pnbase = d.expand("${PN}-lib%s") 259 pnbase = d.expand("${PN}-lib%s")
@@ -267,13 +262,12 @@ python populate_packages_prepend () {
267 do_split_packages(d, base_libdir, r'^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True) 262 do_split_packages(d, base_libdir, r'^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True)
268} 263}
269 264
270
271inherit update-alternatives 265inherit update-alternatives
272 266
273ALTERNATIVE_PRIORITY = "100" 267ALTERNATIVE_PRIORITY = "100"
274 268
275ALTERNATIVE_ncurses-tools_class-target = "clear reset" 269ALTERNATIVE:ncurses-tools:class-target = "clear reset"
276ALTERNATIVE_ncurses-terminfo_class-target = "st st-256color" 270ALTERNATIVE:ncurses-terminfo:class-target = "st st-256color"
277 271
278ALTERNATIVE_LINK_NAME[st] = "${datadir}/terminfo/s/st" 272ALTERNATIVE_LINK_NAME[st] = "${datadir}/terminfo/s/st"
279 273
@@ -287,7 +281,7 @@ PACKAGES += " \
287 ${PN}-terminfo \ 281 ${PN}-terminfo \
288" 282"
289 283
290FILES_${PN} = "\ 284FILES:${PN} = "\
291 ${bindir}/tput \ 285 ${bindir}/tput \
292 ${bindir}/tset \ 286 ${bindir}/tset \
293 ${bindir}/ncurses5-config \ 287 ${bindir}/ncurses5-config \
@@ -299,7 +293,7 @@ FILES_${PN} = "\
299 293
300# This keeps only tput/tset in ncurses 294# This keeps only tput/tset in ncurses
301# clear/reset are in already busybox 295# clear/reset are in already busybox
302FILES_${PN}-tools = "\ 296FILES:${PN}-tools = "\
303 ${bindir}/tic \ 297 ${bindir}/tic \
304 ${bindir}/toe \ 298 ${bindir}/toe \
305 ${bindir}/infotocap \ 299 ${bindir}/infotocap \
@@ -312,20 +306,20 @@ FILES_${PN}-tools = "\
312" 306"
313 307
314# 'reset' is a symlink to 'tset' which is in the 'ncurses' package 308# 'reset' is a symlink to 'tset' which is in the 'ncurses' package
315RDEPENDS_${PN}-tools = "${PN} ${PN}-terminfo-base" 309RDEPENDS:${PN}-tools = "${PN} ${PN}-terminfo-base"
316 310
317FILES_${PN}-terminfo = "\ 311FILES:${PN}-terminfo = "\
318 ${datadir}/terminfo \ 312 ${datadir}/terminfo \
319" 313"
320 314
321FILES_${PN}-terminfo-base = "\ 315FILES:${PN}-terminfo-base = "\
322 ${sysconfdir}/terminfo \ 316 ${sysconfdir}/terminfo \
323" 317"
324 318
325RSUGGESTS_${PN}-libtinfo = "${PN}-terminfo" 319RSUGGESTS:${PN}-libtinfo = "${PN}-terminfo"
326RRECOMMENDS_${PN}-libtinfo = "${PN}-terminfo-base" 320RRECOMMENDS:${PN}-libtinfo = "${PN}-terminfo-base"
327 321
328# Putting terminfo into the sysroot adds around 2800 files to 322# Putting terminfo into the sysroot adds around 2800 files to
329# each recipe specific sysroot. We can live without this, particularly 323# each recipe specific sysroot. We can live without this, particularly
330# as many recipes may have native and target copies. 324# as many recipes may have native and target copies.
331SYSROOT_DIRS_remove = "${datadir}" 325SYSROOT_DIRS:remove = "${datadir}"