diff options
author | Kang Kai <kai.kang@windriver.com> | 2011-03-03 12:32:01 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-03-03 23:49:16 +0000 |
commit | 7eccde3bdc2033ca0d68a30ea011a5eee875d16a (patch) | |
tree | 83db18820cfa616a359ba3892c9e2744a7eec4e5 /meta/recipes-extended | |
parent | b9c46b377cbec794b1dd343df3d6f764160ef368 (diff) | |
download | poky-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.patch | 71 | ||||
-rw-r--r-- | meta/recipes-extended/newt/libnewt_0.52.12.bb | 37 |
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 @@ | |||
1 | From 3d13bbbb769050fac4cc6c904c174edc27e4f03d Mon Sep 17 00:00:00 2001 | ||
2 | From: Otavio Salvador <otavio@ossystems.com.br> | ||
3 | Date: Thu, 20 Jan 2011 14:14:51 -0200 | ||
4 | Subject: [PATCH] build: add -without-python | ||
5 | |||
6 | Signed-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 | |||
12 | diff --git a/Makefile.in b/Makefile.in | ||
13 | index 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" | ||
48 | diff --git a/configure.ac b/configure.ac | ||
49 | index 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 | -- | ||
70 | 1.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 @@ | |||
1 | SUMMARY = "A library for text mode user interfaces" | ||
2 | |||
3 | DESCRIPTION = "Newt is a programming library for color text mode, widget based user \ | ||
4 | interfaces. Newt can be used to add stacked windows, entry widgets, \ | ||
5 | checkboxes, radio buttons, labels, plain text fields, scrollbars, \ | ||
6 | etc., to text mode user interfaces. This package also contains the \ | ||
7 | shared library needed by programs built with newt, as well as a \ | ||
8 | /usr/bin/dialog replacement called whiptail. Newt is based on the \ | ||
9 | slang library." | ||
10 | |||
11 | HOMEPAGE = "https://fedorahosted.org/newt/" | ||
12 | SECTION = "libs" | ||
13 | |||
14 | LICENSE = "LGPL" | ||
15 | LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605" | ||
16 | |||
17 | # slang needs to be >= 2.2 | ||
18 | DEPENDS = "slang popt" | ||
19 | |||
20 | PR = "r0" | ||
21 | |||
22 | SRCREV = "c3c7be75f6ef1adfc2be5f99c1e8ef3f0ab58c38" | ||
23 | SRC_URI = "git://git.fedorahosted.org/git/newt;protocol=git \ | ||
24 | file://include-without-python.patch" | ||
25 | S = "${WORKDIR}/git" | ||
26 | |||
27 | EXTRA_OECONF = "--without-python --without-tcl" | ||
28 | |||
29 | inherit autotools | ||
30 | |||
31 | PACKAGES_prepend = "whiptail " | ||
32 | |||
33 | do_configure_prepend() { | ||
34 | sh autogen.sh | ||
35 | } | ||
36 | |||
37 | FILES_whiptail = "${bindir}/whiptail" | ||