summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorKang Kai <kai.kang@windriver.com>2011-03-03 12:32:01 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-03-03 23:49:16 +0000
commit7eccde3bdc2033ca0d68a30ea011a5eee875d16a (patch)
tree83db18820cfa616a359ba3892c9e2744a7eec4e5 /meta/recipes-extended
parentb9c46b377cbec794b1dd343df3d6f764160ef368 (diff)
downloadpoky-7eccde3bdc2033ca0d68a30ea011a5eee875d16a.tar.gz
recipe: add newt from OE
newt is a library for text mode user interfaces, and required by chkconfig because of LSB command test. (From OE-Core rev: 57c5da295855431160403b9ea356b2beae5cedca) Signed-off-by: Kang Kai <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/newt/files/include-without-python.patch71
-rw-r--r--meta/recipes-extended/newt/libnewt_0.52.12.bb37
2 files changed, 108 insertions, 0 deletions
diff --git a/meta/recipes-extended/newt/files/include-without-python.patch b/meta/recipes-extended/newt/files/include-without-python.patch
new file mode 100644
index 0000000000..277ee3324d
--- /dev/null
+++ b/meta/recipes-extended/newt/files/include-without-python.patch
@@ -0,0 +1,71 @@
1From 3d13bbbb769050fac4cc6c904c174edc27e4f03d Mon Sep 17 00:00:00 2001
2From: Otavio Salvador <otavio@ossystems.com.br>
3Date: Thu, 20 Jan 2011 14:14:51 -0200
4Subject: [PATCH] build: add -without-python
5
6Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
7---
8 Makefile.in | 8 ++++----
9 configure.ac | 10 ++++++++--
10 2 files changed, 12 insertions(+), 6 deletions(-)
11
12diff --git a/Makefile.in b/Makefile.in
13index e764e61..74e9097 100644
14--- a/Makefile.in
15+++ b/Makefile.in
16@@ -77,7 +77,7 @@ showkey: showkey.o $(LIBNEWT)
17 $(CC) -g -o showkey showkey.o $(LIBNEWT) $(LDFLAGS) $(LIBS)
18
19 _snackmodule.so: snackmodule.c $(LIBNEWTSH)
20- for ver in $(PYTHONVERS) ; do \
21+ [ -n "$(PYTHONVERS)" ] && for ver in $(PYTHONVERS) ; do \
22 mkdir -p $$ver ;\
23 PCFLAGS=`$$ver-config --cflags`; \
24 PIFLAGS=`$$ver-config --includes`; \
25@@ -85,7 +85,7 @@ _snackmodule.so: snackmodule.c $(LIBNEWTSH)
26 PLFLAGS=`$$ver-config --libs`; \
27 $(CC) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snackmodule.o snackmodule.c ;\
28 $(CC) --shared $$PLDFLAGS $$PLFLAGS $(LDFLAGS) -o $$ver/_snackmodule.so $$ver/snackmodule.o -L. -lnewt $(LIBS);\
29- done
30+ done || :
31 touch $@
32
33 whiptail: $(NDIALOGOBJS) $(LIBNEWTSH)
34@@ -141,11 +141,11 @@ install-sh: sharedlib $(WHIPTCLSO) _snackmodule.so
35 ln -sf $(LIBNEWTSONAME) $(instroot)/$(libdir)/libnewt.so
36 ln -sf $(LIBNEWTSH) $(instroot)/$(libdir)/$(LIBNEWTSONAME)
37 [ -n "$(WHIPTCLSO)" ] && install -m 755 whiptcl.so $(instroot)/$(libdir) || :
38- for ver in $(PYTHONVERS) ; do \
39+ [ -n "$(PYTHONVERS)" ] && for ver in $(PYTHONVERS) ; do \
40 [ -d $(instroot)/$(libdir)/$$ver/site-packages ] || install -m 755 -d $(instroot)/$(libdir)/$$ver/site-packages ;\
41 install -m 755 $$ver/_snackmodule.so $(instroot)/$(libdir)/$$ver/site-packages ;\
42 install -m 644 snack.py $(instroot)/$(libdir)/$$ver/site-packages ;\
43- done
44+ done || :
45
46 Makefile: newt.spec
47 echo "You need to rerun ./configure before continuing"
48diff --git a/configure.ac b/configure.ac
49index 7bc381a..dc04352 100644
50--- a/configure.ac
51+++ b/configure.ac
52@@ -54,8 +54,14 @@ fi
53 AC_CHECK_HEADERS([popt.h libintl.h])
54
55 AC_MSG_CHECKING([for python versions])
56-PYTHONVERS=$(echo /usr/include/python*/Python.h | sed "s|/usr/include/||g"| sed "s|/Python.h||g" 2> /dev/null)
57-AC_MSG_RESULT([$PYTHONVERS])
58+AC_ARG_WITH([python], [ --without-python do not compile python support])
59+if test "x$with_python" = "xno"; then
60+ AC_MSG_RESULT([skipped])
61+ PYTHONVERS=
62+else
63+ PYTHONVERS=$(ls /usr/include/python*/Python.h 2> /dev/null | sed "s|/usr/include/||g"| sed "s|/Python.h||g" 2> /dev/null)
64+ AC_MSG_RESULT([$PYTHONVERS])
65+fi
66 AC_SUBST([PYTHONVERS])
67
68 AC_ARG_WITH([tcl], [ --without-tcl do not compile whiptcl.so])
69--
701.7.2.3
71
diff --git a/meta/recipes-extended/newt/libnewt_0.52.12.bb b/meta/recipes-extended/newt/libnewt_0.52.12.bb
new file mode 100644
index 0000000000..eefd6bdfd9
--- /dev/null
+++ b/meta/recipes-extended/newt/libnewt_0.52.12.bb
@@ -0,0 +1,37 @@
1SUMMARY = "A library for text mode user interfaces"
2
3DESCRIPTION = "Newt is a programming library for color text mode, widget based user \
4interfaces. Newt can be used to add stacked windows, entry widgets, \
5checkboxes, radio buttons, labels, plain text fields, scrollbars, \
6etc., to text mode user interfaces. This package also contains the \
7shared library needed by programs built with newt, as well as a \
8/usr/bin/dialog replacement called whiptail. Newt is based on the \
9slang library."
10
11HOMEPAGE = "https://fedorahosted.org/newt/"
12SECTION = "libs"
13
14LICENSE = "LGPL"
15LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605"
16
17# slang needs to be >= 2.2
18DEPENDS = "slang popt"
19
20PR = "r0"
21
22SRCREV = "c3c7be75f6ef1adfc2be5f99c1e8ef3f0ab58c38"
23SRC_URI = "git://git.fedorahosted.org/git/newt;protocol=git \
24 file://include-without-python.patch"
25S = "${WORKDIR}/git"
26
27EXTRA_OECONF = "--without-python --without-tcl"
28
29inherit autotools
30
31PACKAGES_prepend = "whiptail "
32
33do_configure_prepend() {
34 sh autogen.sh
35}
36
37FILES_whiptail = "${bindir}/whiptail"