summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/ncurses/ncurses.inc
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-09-01 19:09:11 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-09-01 19:09:57 +0100
commitd62ee7eaf2ba025c3f64b2d4e10dc7cec4637612 (patch)
treef36fe3008f36ff75cbdd31b630f8f13f1f205ebb /meta/recipes-core/ncurses/ncurses.inc
parentcaab7fc509bf27706ff3248689f6afd04225cfda (diff)
downloadpoky-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.tar.gz
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.inc99
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 @@
1DESCRIPTION = "Ncurses library"
2HOMEPAGE = "http://www.gnu.org/software/ncurses/ncurses.html"
3LICENSE = "MIT"
4SECTION = "libs"
5DEPENDS = "ncurses-native"
6DEPENDS_virtclass-native = ""
7PACKAGES_prepend = "ncurses-tools "
8PACKAGES_append = " ncurses-terminfo"
9FILES_ncurses_append = " ${datadir}/tabset"
10RSUGGESTS_${PN} = "ncurses-terminfo"
11RPROVIDES = "libncurses5"
12
13inherit autotools
14
15# This keeps only tput/tset in ncurses
16# clear/reset are in already busybox
17FILES_ncurses-tools = "${bindir}/tic ${bindir}/toe ${bindir}/infotocap ${bindir}/captoinfo ${bindir}/infocmp ${bindir}/clear.${PN} ${bindir}/reset.${PN} ${bindir}/tack "
18FILES_ncurses-terminfo = "${datadir}/terminfo"
19FILES_${PN} = "${bindir}/tput ${bindir}/tset ${libdir}/lib*.so.* /usr/share/tabset /etc/terminfo"
20
21PARALLEL_MAKE=""
22
23FILESPATH = "${FILE_DIRNAME}/local:${FILE_DIRNAME}/ncurses-${PV}-${PR}:${FILE_DIRNAME}/ncurses-${PV}:${FILE_DIRNAME}/ncurses:${FILE_DIRNAME}"
24
25EXTRA_OECONF = "--with-shared \
26 --with-libtool \
27 --without-profile \
28 --without-debug \
29 --disable-rpath \
30 --enable-echo \
31 --enable-const \
32 --without-ada \
33 --enable-termcap \
34 --without-cxx-binding \
35 --with-terminfo-dirs=${sysconfdir}/terminfo:${datadir}/terminfo \
36 --enable-overwrite \
37 --with-build-ldflags='' \
38 --with-build-ccflags='' "
39export BUILD_CCFLAGS = "-I${S}/ncurses -I${S}/include ${BUILD_CFLAGS}"
40export BUILD_LDFLAGS = ""
41export EXTRA_OEMAKE = '"BUILD_LDFLAGS=" "BUILD_CCFLAGS=${BUILD_CCFLAGS}"'
42
43# This is necessary so that the "tic" command executed during the install can
44# link with the correct libary in staging.
45export LD_LIBRARY_PATH = "${STAGING_LIBDIR_NATIVE}"
46
47do_install() {
48 autotools_do_install
49
50 ln -sf curses.h ${D}${includedir}/ncurses.h
51
52 # our ncurses has termcap support
53 ln -sf libncurses.so ${D}${libdir}/libtermcap.so
54 ln -sf libncurses.a ${D}${libdir}/libtermcap.a
55
56 # include some basic terminfo files
57 # stolen ;) from gentoo and modified a bit
58 for x in ansi console dumb linux rxvt screen sun vt{52,100,102,200,220} xterm-color xterm-xfree86
59 do
60 local termfile="$(find "${D}${datadir}/terminfo/" -name "${x}" 2>/dev/null)"
61 local basedir="$(basename $(dirname "${termfile}"))"
62
63 if [ -n "${termfile}" ]
64 then
65 install -d ${D}${sysconfdir}/terminfo/${basedir}
66 mv ${termfile} ${D}${sysconfdir}/terminfo/${basedir}/
67 ln -s /etc/terminfo/${basedir}/${x} \
68 ${D}${datadir}/terminfo/${basedir}/${x}
69 fi
70 done
71 # i think we can use xterm-color as default xterm
72 if [ -e ${D}${sysconfdir}/terminfo/x/xterm-color ]
73 then
74 ln -sf xterm-color ${D}${sysconfdir}/terminfo/x/xterm
75 fi
76
77 if [ "${PN}" = "ncurses" ]; then
78 mv ${D}${bindir}/clear ${D}${bindir}/clear.${PN}
79 mv ${D}${bindir}/reset ${D}${bindir}/reset.${PN}
80 fi
81}
82
83
84pkg_postinst_ncurses-tools () {
85 if [ "${PN}" = "ncurses" ]; then
86 update-alternatives --install ${bindir}/clear clear clear.${PN} 100
87 update-alternatives --install ${bindir}/reset reset reset.${PN} 100
88 fi
89}
90
91
92pkg_prerm_ncurses-tools () {
93 if [ "${PN}" = "ncurses" ]; then
94 update-alternatives --remove clear clear.${PN}
95 update-alternatives --remove reset reset.${PN}
96 fi
97}
98
99BBCLASSEXTEND = "native nativesdk"