From: Andreas Oberritter <obi@opendreambox.org>
To: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 2/3] ncurses: move only libncurses and libtinfo to base_libdir
Date: Tue, 13 Mar 2012 21:51:54 +0100 [thread overview]
Message-ID: <4F5FB36A.8020007@opendreambox.org> (raw)
In-Reply-To: <f876555e0b49baed50840adb1d93e8338ab9d7ef.1331604310.git.scott.a.garman@intel.com>
On 13.03.2012 03:08, Scott Garman wrote:
> 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].
Hello Scott,
package splitting doesn't seem to work anymore. Libs that previously had
their own package now end up being stored in the main ncurses package.
Regards,
Andreas
> Signed-off-by: Scott Garman <scott.a.garman@intel.com>
> ---
> 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 3b10c43..e450868 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
next prev parent reply other threads:[~2012-03-13 21:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-13 2:08 [PATCH 0/3] ncurses library location fix Scott Garman
2012-03-13 2:08 ` [PATCH 1/3] path.py: add make_relative_symlink method Scott Garman
2012-03-13 2:08 ` [PATCH 2/3] ncurses: move only libncurses and libtinfo to base_libdir Scott Garman
2012-03-13 20:51 ` Andreas Oberritter [this message]
2012-03-13 22:11 ` Scott Garman
2012-03-13 2:08 ` [PATCH 3/3] gettext: do not set libncurses prefix explicitly Scott Garman
2012-03-13 13:16 ` Richard Purdie
2012-03-13 19:58 ` Scott Garman
2012-03-13 5:30 ` [PATCH 0/3] ncurses library location fix Scott Garman
2012-03-13 8:09 ` Koen Kooi
2012-03-13 8:52 ` Scott Garman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F5FB36A.8020007@opendreambox.org \
--to=obi@opendreambox.org \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox