python: updated patch on spec
authorStephane Desneux <stephane.desneux@eurogiciel.fr>
Thu, 11 Apr 2013 13:57:24 +0000 (15:57 +0200)
committerStephane Desneux <stephane.desneux@eurogiciel.fr>
Thu, 11 Apr 2013 13:57:24 +0000 (15:57 +0200)
meta-tizen-ivi/recipes-tizen/python/python/python.spec.patch

index 3fca0f4..9372065 100644 (file)
@@ -1,5 +1,5 @@
 diff --git a/packaging/python.spec b/packaging/python.spec
-index 865110b..13b25c1 100644
+index 865110b..2b5c402 100644
 --- a/packaging/python.spec
 +++ b/packaging/python.spec
 @@ -99,12 +99,16 @@ rm Demo/scripts/newslist.*
@@ -21,7 +21,7 @@ index 865110b..13b25c1 100644
  %configure \
      --docdir=%{_docdir}/python \
      --enable-ipv6 \
-@@ -112,7 +116,47 @@ touch Parser/asdl* Python/Python-ast.c Include/Python-ast.h
+@@ -112,9 +116,58 @@ touch Parser/asdl* Python/Python-ast.c Include/Python-ast.h
      --enable-shared \
      --enable-unicode=ucs4
  
@@ -69,4 +69,15 @@ index 865110b..13b25c1 100644
 +              OPT="${CFLAGS}"
  
  %install
++
++# make install needs the original Makefile, or otherwise the inclues would
++# go to ${D}${STAGING...}/...
++install -m 0644 Makefile.orig Makefile
++
++export CROSS_COMPILE="${TARGET_PREFIX}"
++export PYTHONBUILDDIR="${S}"
++
++
  # replace rest of /usr/local/bin/python or /usr/bin/python2.x with /usr/bin/python
+ find . -wholename "./Parser" -prune -o -name '*.py' -type f -print0 | xargs -0 grep -lE '^#! *(/usr/.*bin/(env +)?)?python' | xargs sed -r -i -e '1s@^#![[:space:]]*(/usr/(local/)?bin/(env +)?)?python([0-9]+\.[0-9]+)?@#!/usr/bin/python@'
+ # the grep inbetween makes it much faster