diff options
| -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 |
