diff options
Diffstat (limited to 'meta/recipes-core/ncurses/ncurses.inc')
-rw-r--r-- | meta/recipes-core/ncurses/ncurses.inc | 83 |
1 files changed, 47 insertions, 36 deletions
diff --git a/meta/recipes-core/ncurses/ncurses.inc b/meta/recipes-core/ncurses/ncurses.inc index 1f21cd413d..761b6a3d31 100644 --- a/meta/recipes-core/ncurses/ncurses.inc +++ b/meta/recipes-core/ncurses/ncurses.inc @@ -2,10 +2,10 @@ SUMMARY = "The New Curses library" 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." HOMEPAGE = "http://www.gnu.org/software/ncurses/ncurses.html" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://ncurses/base/version.c;beginline=1;endline=27;md5=cbc180a8c44ca642e97c35452fab5f66" +LIC_FILES_CHKSUM = "file://COPYING;md5=c5a4600fdef86384c41ca33ecc70a4b8;endline=27" SECTION = "libs" DEPENDS = "ncurses-native" -DEPENDS_class-native = "" +DEPENDS:class-native = "" BINCONFIG = "${bindir}/ncurses5-config ${bindir}/ncursesw5-config \ ${bindir}/ncurses6-config ${bindir}/ncursesw6-config" @@ -13,10 +13,12 @@ BINCONFIG = "${bindir}/ncurses5-config ${bindir}/ncursesw5-config \ inherit autotools binconfig-disabled multilib_header pkgconfig # Upstream has useful patches at times at ftp://invisible-island.net/ncurses/ -SRC_URI = "git://anonscm.debian.org/collab-maint/ncurses.git" +SRC_URI = "git://github.com/mirror/ncurses.git;protocol=https;branch=master" EXTRA_AUTORECONF = "-I m4" -CONFIG_SITE =+ "${WORKDIR}/config.cache" + +CACHED_CONFIGUREVARS = "cf_cv_func_nanosleep=yes" +CACHED_CONFIGUREVARS:append:linux = " cf_cv_working_poll=yes" EXTRASITECONFIG = "CFLAGS='${CFLAGS} -I${SYSROOT_DESTDIR}${includedir}'" @@ -25,23 +27,21 @@ EXTRASITECONFIG = "CFLAGS='${CFLAGS} -I${SYSROOT_DESTDIR}${includedir}'" # TODO: remove this variable when widec is supported in every setup? ENABLE_WIDEC ?= "true" -# _GNU_SOURCE is required for widec stuff and is detected automatically -# for target objects. But it must be set manually for native and sdk -# builds. -BUILD_CPPFLAGS += "-D_GNU_SOURCE" +# _GNU_SOURCE is required for widec stuff and is not detected automatically +CPPFLAGS += "-D_GNU_SOURCE" # natives don't generally look in base_libdir -base_libdir_class-native = "${libdir}" +base_libdir:class-native = "${libdir}" # Display corruption occurs on 64 bit hosts without these settings # This was derrived from the upstream debian ncurses which uses # these settings for 32 and 64 bit hosts. EXCONFIG_ARGS = "" -EXCONFIG_ARGS_class-native = " \ +EXCONFIG_ARGS:class-native = " \ --disable-lp64 \ --with-chtype='long' \ --with-mmask-t='long'" -EXCONFIG_ARGS_class-nativesdk = " \ +EXCONFIG_ARGS:class-nativesdk = " \ --disable-lp64 \ --with-chtype='long' \ --with-mmask-t='long'" @@ -54,11 +54,12 @@ PACKAGES_DYNAMIC = "^${PN}-lib.*" # because the sstate had a hard coded search path. Until this is fixed # another way this is deemed good enough. EX_TERMCAP = "" -EX_TERMCAP_class-native = ":/etc/termcap:/usr/share/misc/termcap" -EX_TERMCAP_class-nativesdk = ":/etc/termcap:/usr/share/misc/termcap" +EX_TERMCAP:class-native = ":/etc/termcap:/usr/share/misc/termcap" +EX_TERMCAP:class-nativesdk = ":/etc/termcap:/usr/share/misc/termcap" EX_TERMINFO = "" -EX_TERMINFO_class-native = ":/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo" -EX_TERMINFO_class-nativesdk = ":/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo" +EX_TERMINFO:class-native = ":/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo" +EX_TERMINFO:class-nativesdk = ":/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo" +EX_TERMLIB ?= "tinfo" # Helper function for do_configure to allow multiple configurations # $1 the directory to run configure in @@ -80,12 +81,14 @@ ncurses_configure() { --disable-big-core \ --program-prefix= \ --with-ticlib \ - --with-termlib=tinfo \ + --with-termlib=${EX_TERMLIB} \ --enable-sigwinch \ --enable-pc-files \ --disable-rpath-hack \ ${EXCONFIG_ARGS} \ --with-manpage-format=normal \ + --without-manpage-renames \ + --disable-stripping \ "$@" || return 1 cd .. } @@ -94,10 +97,6 @@ ncurses_configure() { # patched autoconf213 to generate the configure script. This autoconf # is not available so that the shipped script will be used. do_configure() { - # check does not work with cross-compiling and is generally - # broken because it requires stdin to be pollable (which is - # not the case for /dev/null redirections) - export cf_cv_working_poll=yes #Remove ${includedir} from CPPFLAGS, need for cross compile sed -i 's#-I${cf_includedir}##g' ${S}/configure || die "sed CPPFLAGS" @@ -201,7 +200,10 @@ do_install() { ln -sf xterm-color ${D}${sysconfdir}/terminfo/x/xterm fi - rm -f ${D}${libdir}/terminfo + # When changing ${libdir} to e.g. /usr/lib/myawesomelib/ ncurses + # still installs '/usr/lib/terminfo', so try to rm both + # the proper path and a slightly hardcoded one + rm -f ${D}${libdir}/terminfo ${D}${prefix}/lib/terminfo # create linker scripts for libcurses.so and libncurses to # link against -ltinfo when needed. Some builds might break @@ -227,7 +229,7 @@ do_install() { if [ ! -d "${D}${base_libdir}" ]; then # Setting base_libdir to libdir as is done in the -native # case will skip this code - mkdir ${D}${base_libdir} + mkdir -p ${D}${base_libdir} mv ${D}${libdir}/libncurses.so.* ${D}${base_libdir} ! ${ENABLE_WIDEC} || \ mv ${D}${libdir}/libncursesw.so.* ${D}${base_libdir} @@ -235,10 +237,9 @@ do_install() { mv ${D}${libdir}/libtinfo.so.* ${D}${base_libdir} rm ${D}${libdir}/libtinfo.so - # Use lnr to ensure this is a relative link despite absolute paths + # Use ln -rs to ensure this is a relative link despite absolute paths # (as we can't know the relationship between base_libdir and libdir). - # At some point we can rely on coreutils 8.16 which has ln -r. - lnr ${D}${base_libdir}/libtinfo.so.5 ${D}${libdir}/libtinfo.so + ln -rs ${D}${base_libdir}/libtinfo.so.5 ${D}${libdir}/libtinfo.so fi if [ -d "${D}${includedir}/ncurses" ]; then for f in `find ${D}${includedir}/ncurses -name "*.h"` @@ -251,13 +252,13 @@ do_install() { oe_multilib_header curses.h } -python populate_packages_prepend () { +python populate_packages:prepend () { libdir = d.expand("${libdir}") base_libdir = d.expand("${base_libdir}") pnbase = d.expand("${PN}-lib%s") - do_split_packages(d, libdir, '^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True) + do_split_packages(d, libdir, r'^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True) if libdir is not base_libdir: - do_split_packages(d, base_libdir, '^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True) + do_split_packages(d, base_libdir, r'^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True) } @@ -265,7 +266,12 @@ inherit update-alternatives ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE_ncurses-tools_class-target = "clear reset" +ALTERNATIVE:ncurses-tools:class-target = "clear reset" +ALTERNATIVE:ncurses-terminfo:class-target = "st st-256color" + +ALTERNATIVE_LINK_NAME[st] = "${datadir}/terminfo/s/st" + +ALTERNATIVE_LINK_NAME[st-256color] = "${datadir}/terminfo/s/st-256color" BBCLASSEXTEND = "native nativesdk" @@ -275,7 +281,7 @@ PACKAGES += " \ ${PN}-terminfo \ " -FILES_${PN} = "\ +FILES:${PN} = "\ ${bindir}/tput \ ${bindir}/tset \ ${bindir}/ncurses5-config \ @@ -287,7 +293,7 @@ FILES_${PN} = "\ # This keeps only tput/tset in ncurses # clear/reset are in already busybox -FILES_${PN}-tools = "\ +FILES:${PN}-tools = "\ ${bindir}/tic \ ${bindir}/toe \ ${bindir}/infotocap \ @@ -300,15 +306,20 @@ FILES_${PN}-tools = "\ " # 'reset' is a symlink to 'tset' which is in the 'ncurses' package -RDEPENDS_${PN}-tools = "${PN}" +RDEPENDS:${PN}-tools = "${PN} ${PN}-terminfo-base" -FILES_${PN}-terminfo = "\ +FILES:${PN}-terminfo = "\ ${datadir}/terminfo \ " -FILES_${PN}-terminfo-base = "\ +FILES:${PN}-terminfo-base = "\ ${sysconfdir}/terminfo \ " -RSUGGESTS_${PN}-libtinfo = "${PN}-terminfo" -RRECOMMENDS_${PN}-libtinfo = "${PN}-terminfo-base" +RSUGGESTS:${PN}-libtinfo = "${PN}-terminfo" +RRECOMMENDS:${PN}-libtinfo = "${PN}-terminfo-base" + +# Putting terminfo into the sysroot adds around 2800 files to +# each recipe specific sysroot. We can live without this, particularly +# as many recipes may have native and target copies. +SYSROOT_DIRS:remove = "${datadir}" |