summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/newt/files/include-without-python.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/newt/files/include-without-python.patch')
-rw-r--r--meta/recipes-extended/newt/files/include-without-python.patch71
1 files changed, 71 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