diff options
author | Scott Garman <scott.a.garman@intel.com> | 2012-03-09 20:47:12 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-13 11:51:45 +0000 |
commit | ccd370ab147b78de7a5bd74818f755f4d3ca6d81 (patch) | |
tree | af79451710416ef344dbc244230275ec5b4057e1 /meta | |
parent | 71062c1e0fb45a4b4e58ea5d217706aa2b402d88 (diff) | |
download | openembedded-core-ccd370ab147b78de7a5bd74818f755f4d3ca6d81.tar.gz openembedded-core-ccd370ab147b78de7a5bd74818f755f4d3ca6d81.tar.bz2 openembedded-core-ccd370ab147b78de7a5bd74818f755f4d3ca6d81.tar.xz openembedded-core-ccd370ab147b78de7a5bd74818f755f4d3ca6d81.zip |
ncurses: move only libncurses and libtinfo to base_libdir
The previous approach to moving the ncurses libraries to
base_libdir was too aggressive, and it broke curses support
in python.
Instead, move only libncurses, libncursesw, and libtinfo to
base_libdir and leave the remaining libraries in libdir.
Also delete ${libdir}/terminfo as it never gets packaged to
avoid a QA warning.
This fixes [YOCTO #2070] and is a partial fix for [YOCTO #1937].
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-core/ncurses/ncurses.inc | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/meta/recipes-core/ncurses/ncurses.inc b/meta/recipes-core/ncurses/ncurses.inc index 3b10c4329..e45086881 100644 --- a/meta/recipes-core/ncurses/ncurses.inc +++ b/meta/recipes-core/ncurses/ncurses.inc @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://ncurses/base/version.c;beginline=1;endline=27;md5=cbc SECTION = "libs" DEPENDS = "ncurses-native" DEPENDS_virtclass-native = "" -INC_PR = "r4" +INC_PR = "r5" inherit autotools binconfig multilib_header @@ -44,7 +44,6 @@ ncurses_configure() { --enable-hard-tabs \ --enable-xmc-glitch \ --enable-colorfgbg \ - --libdir=${base_libdir} \ --with-termpath='${sysconfdir}/termcap:${datadir}/misc/termcap' \ --with-terminfo-dirs='${sysconfdir}/terminfo:${datadir}/terminfo' \ --with-shared \ @@ -114,7 +113,12 @@ _install_opts = "\ install.libs install.includes install.man \ " -do_install() { +python do_install () { + bb.build.exec_func("shell_do_install", d) + oe.path.make_relative_symlink(d.expand("${D}${libdir}/libtinfo.so")) +} + +shell_do_install() { # Order of installation is important; widec installs a 'curses.h' # header with more definitions and must be installed last hence. # Compatibility of these headers will be checked in 'do_test()'. @@ -147,6 +151,8 @@ do_install() { ln -sf xterm-color ${D}${sysconfdir}/terminfo/x/xterm fi + rm ${D}${libdir}/terminfo + if [ "${PN}" = "ncurses" ]; then mv ${D}${bindir}/clear ${D}${bindir}/clear.${PN} mv ${D}${bindir}/reset ${D}${bindir}/reset.${PN} @@ -158,7 +164,7 @@ do_install() { # else when '-Wl,--no-copy-dt-needed-entries' has been set in # linker flags. for i in libncurses libncursesw; do - f=${D}${base_libdir}/$i.so + f=${D}${libdir}/$i.so test -h $f || continue rm -f $f echo '/* GNU ld script */' >$f @@ -167,20 +173,33 @@ do_install() { # Make sure that libcurses is linked so that it gets -ltinfo # also, this should be addressed upstream really. - ln -sf libncurses.so ${D}${base_libdir}/libcurses.so + ln -sf libncurses.so ${D}${libdir}/libcurses.so # create libtermcap.so linker script for backward compatibility - f=${D}${base_libdir}/libtermcap.so + f=${D}${libdir}/libtermcap.so echo '/* GNU ld script */' >$f echo 'INPUT(AS_NEEDED(-ltinfo))' >>$f + 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} + mv ${D}${libdir}/libncurses.so.* ${D}${base_libdir} + mv ${D}${libdir}/libncursesw.so.* ${D}${base_libdir} + + mv ${D}${libdir}/libtinfo.so.* ${D}${base_libdir} + rm ${D}${libdir}/libtinfo.so + # We'll turn this into a relative symlink after do_install returns + ln -sf ${D}${base_libdir}/libtinfo.so.5 ${D}${libdir}/libtinfo.so + fi + oe_multilib_header curses.h } python populate_packages_prepend () { - base_libdir = d.expand("${base_libdir}") + libdir = d.expand("${libdir}") pnbase = d.expand("${PN}-lib%s") - do_split_packages(d, base_libdir, '^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True) + do_split_packages(d, libdir, '^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True) } @@ -212,10 +231,7 @@ FILES_${PN} = "\ ${bindir}/ncurses5-config \ ${bindir}/ncursesw5-config \ ${datadir}/tabset \ -" - -FILES_${PN}-dev += "\ - ${base_libdir}/*.so \ + ${base_libdir}/* \ " # This keeps only tput/tset in ncurses |