aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/ncurses/ncurses_5.7.bb
diff options
context:
space:
mode:
authorEnrico Scholz <enrico.scholz@sigma-chemnitz.de>2010-07-30 14:27:50 +0200
committerEnrico Scholz <enrico.scholz@sigma-chemnitz.de>2010-08-05 11:48:03 +0200
commitfcae56e05c753376dc62e5b17af8b2862749ab82 (patch)
tree3632b3874c5abbbb15b3ea3ba5fdbbe3491b9dad /recipes/ncurses/ncurses_5.7.bb
parenteb74503cb601c636702dc15e66f5284e891127f6 (diff)
downloadopenembedded-fcae56e05c753376dc62e5b17af8b2862749ab82.tar.gz
ncurses: added 5.7 recipe
It uses ideas from the old 5.4 recipe but brings a lot of new features like widec libs, pkgconfig files or splitted library packages. As lot of packages depend on ncurses, whole distribution must be probably rebuild when updating to this new version. Due to this and the complex recipe, it has a negative DEFAULT_PREFERENCE for now. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Diffstat (limited to 'recipes/ncurses/ncurses_5.7.bb')
-rw-r--r--recipes/ncurses/ncurses_5.7.bb185
1 files changed, 185 insertions, 0 deletions
diff --git a/recipes/ncurses/ncurses_5.7.bb b/recipes/ncurses/ncurses_5.7.bb
new file mode 100644
index 0000000000..35626854fa
--- /dev/null
+++ b/recipes/ncurses/ncurses_5.7.bb
@@ -0,0 +1,185 @@
+DESCRIPTION = "Ncurses library"
+HOMEPAGE = "http://www.gnu.org/software/ncurses/ncurses.html"
+LICENSE = "MIT"
+SECTION = "libs"
+PATCHDATE = "20100501"
+PKGV = "${PV}+${PATCHDATE}"
+PR = "r10"
+
+# recipe is experimental for now...
+DEFAULT_PREFERENCE = "-99"
+
+DEPENDS = "ncurses-native"
+DEPENDS_virtclass-native = ""
+
+inherit autotools binconfig
+
+SRC_URI = "${GNU_MIRROR}/ncurses/ncurses-${PV}.tar.gz;name=tarball \
+ ftp://invisible-island.net/ncurses/5.7/ncurses-5.7-20100424-patch.sh.bz2;apply=yes;name=p20100424sh \
+\
+ ftp://invisible-island.net/ncurses/5.7/ncurses-5.7-${PATCHDATE}.patch.gz;name=p20100501 \
+ file://tic-hang.patch \
+"
+
+SRC_URI[tarball.md5sum] = "cce05daf61a64501ef6cd8da1f727ec6"
+SRC_URI[tarball.sha256sum] = "0a9bdea5c7de8ded5c9327ed642915f2cc380753f12d4ad120ef7da3ea3498f4"
+SRC_URI[p20100424sh.md5sum] = "3a5f76613f0f7ec3e0e73b835bc24864"
+SRC_URI[p20100424sh.sha256sum] = "1e9d70d2d1fe1fea471868832c52f1b9cc6065132102e49e2a3755f2f4f5be53"
+SRC_URI[p20100501.md5sum] = "6518cfa5d45e9069a1e042468161448b"
+SRC_URI[p20100501.sha256sum] = "a97ccc30e4bd6fbb89564f3058db0fe84bd35cfefee831556c500793b477abde"
+
+PARALLEL_MAKE = ""
+EXTRA_AUTORECONF = "-I m4"
+
+# Whether to enable separate widec libraries; must be 'true' or 'false'
+ENABLE_WIDEC = "true"
+# Build breaks on Ubuntu else :(
+ENABLE_WIDEC_virtclass-native = "false"
+
+
+# Override the function from the autotools class; ncurses requires a
+# patched autoconf213 to generate the configure script. This autoconf
+# is not available so that the shipped script will be used.
+do_configure() {
+ for i in \
+ 'narrowc --with-ticlib' \
+ 'widec --enable-widec --without-progs'; do
+ set -- $i
+ mkdir -p $1
+ cd $1
+ shift
+
+ oe_runconf \
+ --disable-static \
+ --without-debug \
+ --without-ada \
+ --enable-hard-tabs \
+ --enable-xmc-glitch \
+ --enable-colorfgbg \
+ --with-termpath='${sysconfdir}/termcap:${datadir}/misc/termcap' \
+ --with-terminfo-dirs='${sysconfdir}/terminfo:${datadir}/terminfo' \
+ --with-shared \
+ --disable-big-core \
+ --program-prefix= \
+ --with-termlib=tinfo \
+ --enable-sigwinch \
+ --enable-pc-files \
+ --with-build-cc="${BUILD_CC}" \
+ --with-build-cpp="${BUILD_CPP}" \
+ --with-build-ld="${BUILD_LD}" \
+ --with-build-cflags="${BUILD_CFLAGS}" \
+ --with-build-cppflags='${BUILD_CPPFLAGS} -D_GNU_SOURCE' \
+ --with-build-ldflags='${BUILD_LDFLAGS}' \
+ "$@"
+ cd ..
+ done
+}
+
+do_compile() {
+ oe_runmake -C narrowc libs
+ oe_runmake -C narrowc/progs
+
+ ! ${ENABLE_WIDEC} || \
+ oe_runmake -C widec libs
+}
+
+_install_opts = "\
+ DESTDIR='${D}' \
+ PKG_CONFIG_LIBDIR='${libdir}/pkgconfig' \
+ install.libs install.includes install.man \
+"
+
+do_install() {
+ ! ${ENABLE_WIDEC} || \
+ oe_runmake -C widec ${_install_opts}
+
+ oe_runmake -C narrowc ${_install_opts} \
+ install.data install.progs
+
+
+ cd narrowc
+
+ # include some basic terminfo files
+ # stolen ;) from gentoo and modified a bit
+ for x in ansi console dumb linux rxvt screen sun vt{52,100,102,200,220} xterm-color xterm-xfree86
+ do
+ local termfile="$(find "${D}${datadir}/terminfo/" -name "${x}" 2>/dev/null)"
+ local basedir="$(basename $(dirname "${termfile}"))"
+
+ if [ -n "${termfile}" ]
+ then
+ install -d ${D}${sysconfdir}/terminfo/${basedir}
+ mv ${termfile} ${D}${sysconfdir}/terminfo/${basedir}/
+ ln -s /etc/terminfo/${basedir}/${x} \
+ ${D}${datadir}/terminfo/${basedir}/${x}
+ fi
+ done
+ # i think we can use xterm-color as default xterm
+ if [ -e ${D}${sysconfdir}/terminfo/x/xterm-color ]
+ then
+ ln -sf xterm-color ${D}${sysconfdir}/terminfo/x/xterm
+ fi
+
+ if [ "${PN}" = "ncurses" ]; then
+ mv ${D}${bindir}/clear ${D}${bindir}/clear.${PN}
+ mv ${D}${bindir}/reset ${D}${bindir}/reset.${PN}
+ fi
+}
+
+python populate_packages_prepend () {
+ libdir = bb.data.expand("${libdir}", d)
+ do_split_packages(d, libdir, '^lib(.*)\.so\..*', 'ncurses-lib%s', 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True)
+}
+
+
+pkg_postinst_ncurses-tools () {
+ if [ "${PN}" = "ncurses" ]; then
+ update-alternatives --install ${bindir}/clear clear clear.${PN} 100
+ update-alternatives --install ${bindir}/reset reset reset.${PN} 100
+ fi
+}
+
+pkg_prerm_ncurses-tools () {
+ if [ "${PN}" = "ncurses" ]; then
+ update-alternatives --remove clear clear.${PN}
+ update-alternatives --remove reset reset.${PN}
+ fi
+}
+
+BBCLASSEXTEND = "native sdk"
+
+PACKAGES = " \
+ ncurses-dbg \
+ ncurses-dev \
+ ncurses-doc \
+ ncurses-tools \
+ ncurses \
+ ncurses-static \
+ ncurses-terminfo \
+"
+RSUGGESTS_${PN} = "ncurses-terminfo"
+
+FILES_${PN} = "\
+ ${bindir}/tput \
+ ${bindir}/tset \
+ ${datadir}/tabset \
+ ${sysconfdir}/terminfo \
+"
+
+# This keeps only tput/tset in ncurses
+# clear/reset are in already busybox
+FILES_ncurses-tools = "\
+ ${bindir}/tic \
+ ${bindir}/toe \
+ ${bindir}/infotocap \
+ ${bindir}/captoinfo \
+ ${bindir}/infocmp \
+ ${bindir}/clear.${PN} \
+ ${bindir}/reset.${PN} \
+ ${bindir}/tack \
+ ${bindir}/tabs \
+"
+
+FILES_ncurses-terminfo = "\
+ ${datadir}/terminfo \
+"