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:52:12 +0000 |
commit | 7ab3ab9bcbafc80a37bf0f552df36d149acda922 (patch) | |
tree | 6ca71846dc7b1db7c8b2d0cc092f6a3e593c2ca9 /meta | |
parent | 19e92dfe063968154d8744936ece19e6aca3466a (diff) | |
download | poky-7ab3ab9bcbafc80a37bf0f552df36d149acda922.tar.gz |
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].
(From OE-Core rev: ccd370ab147b78de7a5bd74818f755f4d3ca6d81)
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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 3b10c4329e..e450868817 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 | |||
6 | SECTION = "libs" | 6 | SECTION = "libs" |
7 | DEPENDS = "ncurses-native" | 7 | DEPENDS = "ncurses-native" |
8 | DEPENDS_virtclass-native = "" | 8 | DEPENDS_virtclass-native = "" |
9 | INC_PR = "r4" | 9 | INC_PR = "r5" |
10 | 10 | ||
11 | inherit autotools binconfig multilib_header | 11 | inherit autotools binconfig multilib_header |
12 | 12 | ||
@@ -44,7 +44,6 @@ ncurses_configure() { | |||
44 | --enable-hard-tabs \ | 44 | --enable-hard-tabs \ |
45 | --enable-xmc-glitch \ | 45 | --enable-xmc-glitch \ |
46 | --enable-colorfgbg \ | 46 | --enable-colorfgbg \ |
47 | --libdir=${base_libdir} \ | ||
48 | --with-termpath='${sysconfdir}/termcap:${datadir}/misc/termcap' \ | 47 | --with-termpath='${sysconfdir}/termcap:${datadir}/misc/termcap' \ |
49 | --with-terminfo-dirs='${sysconfdir}/terminfo:${datadir}/terminfo' \ | 48 | --with-terminfo-dirs='${sysconfdir}/terminfo:${datadir}/terminfo' \ |
50 | --with-shared \ | 49 | --with-shared \ |
@@ -114,7 +113,12 @@ _install_opts = "\ | |||
114 | install.libs install.includes install.man \ | 113 | install.libs install.includes install.man \ |
115 | " | 114 | " |
116 | 115 | ||
117 | do_install() { | 116 | python do_install () { |
117 | bb.build.exec_func("shell_do_install", d) | ||
118 | oe.path.make_relative_symlink(d.expand("${D}${libdir}/libtinfo.so")) | ||
119 | } | ||
120 | |||
121 | shell_do_install() { | ||
118 | # Order of installation is important; widec installs a 'curses.h' | 122 | # Order of installation is important; widec installs a 'curses.h' |
119 | # header with more definitions and must be installed last hence. | 123 | # header with more definitions and must be installed last hence. |
120 | # Compatibility of these headers will be checked in 'do_test()'. | 124 | # Compatibility of these headers will be checked in 'do_test()'. |
@@ -147,6 +151,8 @@ do_install() { | |||
147 | ln -sf xterm-color ${D}${sysconfdir}/terminfo/x/xterm | 151 | ln -sf xterm-color ${D}${sysconfdir}/terminfo/x/xterm |
148 | fi | 152 | fi |
149 | 153 | ||
154 | rm ${D}${libdir}/terminfo | ||
155 | |||
150 | if [ "${PN}" = "ncurses" ]; then | 156 | if [ "${PN}" = "ncurses" ]; then |
151 | mv ${D}${bindir}/clear ${D}${bindir}/clear.${PN} | 157 | mv ${D}${bindir}/clear ${D}${bindir}/clear.${PN} |
152 | mv ${D}${bindir}/reset ${D}${bindir}/reset.${PN} | 158 | mv ${D}${bindir}/reset ${D}${bindir}/reset.${PN} |
@@ -158,7 +164,7 @@ do_install() { | |||
158 | # else when '-Wl,--no-copy-dt-needed-entries' has been set in | 164 | # else when '-Wl,--no-copy-dt-needed-entries' has been set in |
159 | # linker flags. | 165 | # linker flags. |
160 | for i in libncurses libncursesw; do | 166 | for i in libncurses libncursesw; do |
161 | f=${D}${base_libdir}/$i.so | 167 | f=${D}${libdir}/$i.so |
162 | test -h $f || continue | 168 | test -h $f || continue |
163 | rm -f $f | 169 | rm -f $f |
164 | echo '/* GNU ld script */' >$f | 170 | echo '/* GNU ld script */' >$f |
@@ -167,20 +173,33 @@ do_install() { | |||
167 | 173 | ||
168 | # Make sure that libcurses is linked so that it gets -ltinfo | 174 | # Make sure that libcurses is linked so that it gets -ltinfo |
169 | # also, this should be addressed upstream really. | 175 | # also, this should be addressed upstream really. |
170 | ln -sf libncurses.so ${D}${base_libdir}/libcurses.so | 176 | ln -sf libncurses.so ${D}${libdir}/libcurses.so |
171 | 177 | ||
172 | # create libtermcap.so linker script for backward compatibility | 178 | # create libtermcap.so linker script for backward compatibility |
173 | f=${D}${base_libdir}/libtermcap.so | 179 | f=${D}${libdir}/libtermcap.so |
174 | echo '/* GNU ld script */' >$f | 180 | echo '/* GNU ld script */' >$f |
175 | echo 'INPUT(AS_NEEDED(-ltinfo))' >>$f | 181 | echo 'INPUT(AS_NEEDED(-ltinfo))' >>$f |
176 | 182 | ||
183 | if [ ! -d "${D}${base_libdir}" ]; then | ||
184 | # Setting base_libdir to libdir as is done in the -native | ||
185 | # case will skip this code | ||
186 | mkdir ${D}${base_libdir} | ||
187 | mv ${D}${libdir}/libncurses.so.* ${D}${base_libdir} | ||
188 | mv ${D}${libdir}/libncursesw.so.* ${D}${base_libdir} | ||
189 | |||
190 | mv ${D}${libdir}/libtinfo.so.* ${D}${base_libdir} | ||
191 | rm ${D}${libdir}/libtinfo.so | ||
192 | # We'll turn this into a relative symlink after do_install returns | ||
193 | ln -sf ${D}${base_libdir}/libtinfo.so.5 ${D}${libdir}/libtinfo.so | ||
194 | fi | ||
195 | |||
177 | oe_multilib_header curses.h | 196 | oe_multilib_header curses.h |
178 | } | 197 | } |
179 | 198 | ||
180 | python populate_packages_prepend () { | 199 | python populate_packages_prepend () { |
181 | base_libdir = d.expand("${base_libdir}") | 200 | libdir = d.expand("${libdir}") |
182 | pnbase = d.expand("${PN}-lib%s") | 201 | pnbase = d.expand("${PN}-lib%s") |
183 | do_split_packages(d, base_libdir, '^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True) | 202 | do_split_packages(d, libdir, '^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True) |
184 | } | 203 | } |
185 | 204 | ||
186 | 205 | ||
@@ -212,10 +231,7 @@ FILES_${PN} = "\ | |||
212 | ${bindir}/ncurses5-config \ | 231 | ${bindir}/ncurses5-config \ |
213 | ${bindir}/ncursesw5-config \ | 232 | ${bindir}/ncursesw5-config \ |
214 | ${datadir}/tabset \ | 233 | ${datadir}/tabset \ |
215 | " | 234 | ${base_libdir}/* \ |
216 | |||
217 | FILES_${PN}-dev += "\ | ||
218 | ${base_libdir}/*.so \ | ||
219 | " | 235 | " |
220 | 236 | ||
221 | # This keeps only tput/tset in ncurses | 237 | # This keeps only tput/tset in ncurses |