summaryrefslogtreecommitdiff
path: root/recipes/ncurses/ncurses.inc
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/ncurses/ncurses.inc
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/ncurses/ncurses.inc')
-rw-r--r--recipes/ncurses/ncurses.inc122
1 files changed, 122 insertions, 0 deletions
diff --git a/recipes/ncurses/ncurses.inc b/recipes/ncurses/ncurses.inc
new file mode 100644
index 0000000000..76a8ff0c3c
--- /dev/null
+++ b/recipes/ncurses/ncurses.inc
@@ -0,0 +1,122 @@
+DESCRIPTION = "Ncurses library"
+HOMEPAGE = "http://www.gnu.org/software/ncurses/ncurses.html"
+LICENSE = "MIT"
+SECTION = "libs"
+DEPENDS = "ncurses-native"
+
+inherit autotools
+
+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 \
+"
+
+export BUILD_CCFLAGS = "-I${S}/ncurses -I${S}/include ${BUILD_CFLAGS}"
+export BUILD_LDFLAGS = ""
+export EXTRA_OEMAKE = '"BUILD_LDFLAGS=" "BUILD_CCFLAGS=${BUILD_CCFLAGS}"'
+
+do_stage() {
+ autotools_stage_all
+ ln -sf curses.h ${STAGING_INCDIR}/ncurses.h
+ ln -sf libncurses.so ${STAGING_LIBDIR}/libtermcap.so
+ ln -sf libncurses.a ${STAGING_LIBDIR}/libtermcap.a
+}
+
+# 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
+
+ # 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
+ ln -sf rxvt ${D}${sysconfdir}/terminfo/r/rxvt-unicode
+
+ 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
+}
+
+PACKAGES =+ "${PN}-tools ${PN}-terminfo"
+
+# clear and reset are already in busybox
+FILES_${PN} = "\
+ ${bindir}/tput \
+ ${bindir}/tset \
+ ${libdir}/lib*.so.* \
+ ${datadir}/tabset \
+ ${sysconfdir}/terminfo \
+"
+FILES_${PN}-tools = "\
+ ${bindir}/tic \
+ ${bindir}/toe \
+ ${bindir}/infotocap \
+ ${bindir}/captoinfo \
+ ${bindir}/infocmp \
+ ${bindir}/clear.${PN} \
+ ${bindir}/reset.${PN} \
+ ${bindir}/tack \
+"
+FILES_${PN}-terminfo = "\
+ ${datadir}/terminfo \
+"
+
+RSUGGESTS_${PN} = "ncurses-terminfo"
+RPROVIDES_${PN} = "libncurses5"
+RCONFLICTS_${PN} = "libncurses5"
+RREPLACES_${PN} = "libncurses5"
+