diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-01 19:09:11 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-01 19:09:57 +0100 |
commit | d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612 (patch) | |
tree | f36fe3008f36ff75cbdd31b630f8f13f1f205ebb /meta/recipes-core/ncurses/ncurses.inc | |
parent | caab7fc509bf27706ff3248689f6afd04225cfda (diff) | |
download | openembedded-core-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.tar.gz openembedded-core-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.tar.bz2 openembedded-core-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.zip |
packages: Separate out most of the remaining packages into recipes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-core/ncurses/ncurses.inc')
-rw-r--r-- | meta/recipes-core/ncurses/ncurses.inc | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/meta/recipes-core/ncurses/ncurses.inc b/meta/recipes-core/ncurses/ncurses.inc new file mode 100644 index 0000000000..259750cb46 --- /dev/null +++ b/meta/recipes-core/ncurses/ncurses.inc @@ -0,0 +1,99 @@ +DESCRIPTION = "Ncurses library" +HOMEPAGE = "http://www.gnu.org/software/ncurses/ncurses.html" +LICENSE = "MIT" +SECTION = "libs" +DEPENDS = "ncurses-native" +DEPENDS_virtclass-native = "" +PACKAGES_prepend = "ncurses-tools " +PACKAGES_append = " ncurses-terminfo" +FILES_ncurses_append = " ${datadir}/tabset" +RSUGGESTS_${PN} = "ncurses-terminfo" +RPROVIDES = "libncurses5" + +inherit autotools + +# 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 " +FILES_ncurses-terminfo = "${datadir}/terminfo" +FILES_${PN} = "${bindir}/tput ${bindir}/tset ${libdir}/lib*.so.* /usr/share/tabset /etc/terminfo" + +PARALLEL_MAKE="" + +FILESPATH = "${FILE_DIRNAME}/local:${FILE_DIRNAME}/ncurses-${PV}-${PR}:${FILE_DIRNAME}/ncurses-${PV}:${FILE_DIRNAME}/ncurses:${FILE_DIRNAME}" + +EXTRA_OECONF = "--with-shared \ + --with-libtool \ + --without-profile \ + --without-debug \ + --disable-rpath \ + --enable-echo \ + --enable-const \ + --without-ada \ + --enable-termcap \ + --without-cxx-binding \ + --with-terminfo-dirs=${sysconfdir}/terminfo:${datadir}/terminfo \ + --enable-overwrite \ + --with-build-ldflags='' \ + --with-build-ccflags='' " +export BUILD_CCFLAGS = "-I${S}/ncurses -I${S}/include ${BUILD_CFLAGS}" +export BUILD_LDFLAGS = "" +export EXTRA_OEMAKE = '"BUILD_LDFLAGS=" "BUILD_CCFLAGS=${BUILD_CCFLAGS}"' + +# This is necessary so that the "tic" command executed during the install can +# link with the correct libary in staging. +export LD_LIBRARY_PATH = "${STAGING_LIBDIR_NATIVE}" + +do_install() { + autotools_do_install + + ln -sf curses.h ${D}${includedir}/ncurses.h + + # our ncurses has termcap support + ln -sf libncurses.so ${D}${libdir}/libtermcap.so + ln -sf libncurses.a ${D}${libdir}/libtermcap.a + + # 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 +} + + +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 nativesdk" |