[oe-commits] org.oe.dreambox python: add python-2.4.4

tmbinc commit openembedded-commits at lists.openembedded.org
Sun Dec 10 22:48:45 UTC 2006


python: add python-2.4.4

Author: tmbinc at openembedded.org
Branch: org.openembedded.dreambox
Revision: 72aa69ee05acc3094793a054edfa504d236c71a5
ViewMTN: http://monotone.openembedded.org/revision.psp?id=72aa69ee05acc3094793a054edfa504d236c71a5
Files:
1
packages/python/python-2.4.4
packages/python/python-2.4.4/bindir-libdir.patch
packages/python/python-2.4.4/crosscompile.patch
packages/python/python-2.4.4/fix-tkinter-detection.patch
packages/python/python_2.4.4.bb
Diffs:

#
# mt diff -r6ddf5a80a062302372c3315d0f6bb59f5afd90b5 -r72aa69ee05acc3094793a054edfa504d236c71a5
#
# 
# 
# add_dir "packages/python/python-2.4.4"
# 
# add_file "packages/python/python-2.4.4/bindir-libdir.patch"
#  content [a909dca4a9e768c3e211ad76a9adbeb9b405dfa0]
# 
# add_file "packages/python/python-2.4.4/crosscompile.patch"
#  content [53b0d0f49ed68cdd17da926721d16df0864c860a]
# 
# add_file "packages/python/python-2.4.4/fix-tkinter-detection.patch"
#  content [f05b7fdb40361cea57c0e796ec13fc022466a025]
# 
# add_file "packages/python/python_2.4.4.bb"
#  content [5b12a81568e51ef75c15e434947ac902e95bc0e8]
# 
============================================================
--- packages/python/python-2.4.4/bindir-libdir.patch	a909dca4a9e768c3e211ad76a9adbeb9b405dfa0
+++ packages/python/python-2.4.4/bindir-libdir.patch	a909dca4a9e768c3e211ad76a9adbeb9b405dfa0
@@ -0,0 +1,18 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- Python-2.4c1/Makefile.pre.in~bindir-libdir.patch
++++ Python-2.4c1/Makefile.pre.in
+@@ -78,8 +78,8 @@
+ exec_prefix=	@exec_prefix@
+ 
+ # Expanded directories
+-BINDIR=		$(exec_prefix)/bin
+-LIBDIR=		$(exec_prefix)/lib
++BINDIR=		@bindir@
++LIBDIR=		@libdir@
+ MANDIR=		@mandir@
+ INCLUDEDIR=	@includedir@
+ CONFINCLUDEDIR=	$(exec_prefix)/include
============================================================
--- packages/python/python-2.4.4/crosscompile.patch	53b0d0f49ed68cdd17da926721d16df0864c860a
+++ packages/python/python-2.4.4/crosscompile.patch	53b0d0f49ed68cdd17da926721d16df0864c860a
@@ -0,0 +1,108 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- Python-2.4c1/Makefile.pre.in~crosscompile
++++ Python-2.4c1/Makefile.pre.in
+@@ -162,6 +162,7 @@
+ 
+ PYTHON=		python$(EXE)
+ BUILDPYTHON=	python$(BUILDEXE)
++HOSTPYTHON=	$(BUILDPYTHON)
+ 
+ # === Definitions added by makesetup ===
+ 
+@@ -188,7 +189,7 @@
+ ##########################################################################
+ # Parser
+ PGEN=		Parser/pgen$(EXE)
+-
++HOSTPGEN=	$(PGEN)$(EXE)
+ POBJS=		\
+ 		Parser/acceler.o \
+ 		Parser/grammar1.o \
+@@ -320,8 +321,8 @@
+ # Build the shared modules
+ sharedmods: $(BUILDPYTHON)
+ 	case $$MAKEFLAGS in \
+-	*-s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
+-	*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
++	*-s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \
++	*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
+ 	esac
+ 
+ # buildno should really depend on something like LIBRARY_SRC
+@@ -442,7 +443,7 @@
+ 
+ 
+ $(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
+-		-$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
++		-$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
+ 
+ $(PGEN):	$(PGENOBJS)
+ 		$(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
+@@ -718,19 +719,19 @@
+ 	done
+ 	$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
+ 	PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
+-		./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
++		$(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
+ 		-d $(LIBDEST) -f \
+ 		-x 'badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
+ 	PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+-		./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
++		$(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
+ 		-d $(LIBDEST) -f \
+ 		-x 'badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
+ 	-PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
+-		./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
++		$(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
+ 		-d $(LIBDEST)/site-packages -f \
+ 		-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+ 	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+-		./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
++		$(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
+ 		-d $(LIBDEST)/site-packages -f \
+ 		-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+ 
+@@ -825,7 +826,7 @@
+ # Install the dynamically loadable modules
+ # This goes into $(exec_prefix)
+ sharedinstall:
+-	$(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
++	$(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \
+ 	   	--prefix=$(prefix) \
+ 		--install-scripts=$(BINDIR) \
+ 		--install-platlib=$(DESTSHARED) \
+--- Python-2.4c1/setup.py~crosscompile
++++ Python-2.4c1/setup.py
+@@ -206,6 +206,7 @@
+         except ImportError, why:
+             self.announce('*** WARNING: renaming "%s" since importing it'
+                           ' failed: %s' % (ext.name, why), level=3)
++            return
+             assert not self.inplace
+             basename, tail = os.path.splitext(ext_filename)
+             newname = basename + "_failed" + tail
+@@ -239,8 +240,8 @@
+ 
+     def detect_modules(self):
+         # Ensure that /usr/local is always used
+-        add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
+-        add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
++        # add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
++        # add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+ 
+         # Add paths to popular package managers on OS X/darwin
+         if sys.platform == "darwin":
+@@ -293,6 +294,9 @@
+ 
+         # XXX Omitted modules: gl, pure, dl, SGI-specific modules
+ 
++        lib_dirs = [ os.getenv( "STAGING_LIBDIR" ) ]
++        inc_dirs = [ os.getenv( "STAGING_INCDIR" ) ]
++
+         #
+         # The following modules are all pretty straightforward, and compile
+         # on pretty much any POSIXish platform.
============================================================
--- packages/python/python-2.4.4/fix-tkinter-detection.patch	f05b7fdb40361cea57c0e796ec13fc022466a025
+++ packages/python/python-2.4.4/fix-tkinter-detection.patch	f05b7fdb40361cea57c0e796ec13fc022466a025
@@ -0,0 +1,39 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- Python-2.4.1/setup.py~fix-tkinter-detection
++++ Python-2.4.1/setup.py
+@@ -999,7 +999,7 @@
+                 dotversion = dotversion[:-1] + '.' + dotversion[-1]
+             tcl_include_sub = []
+             tk_include_sub = []
+-            for dir in inc_dirs:
++            for dir in [os.getenv("STAGING_INCDIR")]:
+                 tcl_include_sub += [dir + os.sep + "tcl" + dotversion]
+                 tk_include_sub += [dir + os.sep + "tk" + dotversion]
+             tk_include_sub += tcl_include_sub
+@@ -1018,22 +1018,6 @@
+             if dir not in include_dirs:
+                 include_dirs.append(dir)
+ 
+-        # Check for various platform-specific directories
+-        if platform == 'sunos5':
+-            include_dirs.append('/usr/openwin/include')
+-            added_lib_dirs.append('/usr/openwin/lib')
+-        elif os.path.exists('/usr/X11R6/include'):
+-            include_dirs.append('/usr/X11R6/include')
+-            added_lib_dirs.append('/usr/X11R6/lib64')
+-            added_lib_dirs.append('/usr/X11R6/lib')
+-        elif os.path.exists('/usr/X11R5/include'):
+-            include_dirs.append('/usr/X11R5/include')
+-            added_lib_dirs.append('/usr/X11R5/lib')
+-        else:
+-            # Assume default location for X11
+-            include_dirs.append('/usr/X11/include')
+-            added_lib_dirs.append('/usr/X11/lib')
+-
+         # If Cygwin, then verify that X is installed before proceeding
+         if platform == 'cygwin':
+             x11_inc = find_file('X11/Xlib.h', [], include_dirs)
============================================================
--- packages/python/python_2.4.4.bb	5b12a81568e51ef75c15e434947ac902e95bc0e8
+++ packages/python/python_2.4.4.bb	5b12a81568e51ef75c15e434947ac902e95bc0e8
@@ -0,0 +1,67 @@
+DESCRIPTION = "Python Programming Language"
+HOMEPAGE = "http://www.python.org"
+LICENSE = "PSF"
+SECTION = "devel/python"
+PRIORITY = "optional"
+MAINTAINER = "Michael 'Mickey' Lauer <mickey at Vanille.de>"
+DEPENDS = "python-native readline zlib gdbm openssl"
+PR = "ml0"
+
+PYTHON_MAJMIN = "2.4"
+
+SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
+           file://bindir-libdir.patch;patch=1 \
+           file://crosscompile.patch;patch=1 \
+           file://fix-tkinter-detection.patch;patch=1"
+S = "${WORKDIR}/Python-${PV}"
+
+inherit autotools
+
+EXTRA_OECONF = "--with-threads --with-pymalloc --with-cyclic-gc \
+                --without-cxx --with-signal-module --with-wctype-functions \
+                --enable-shared"
+
+#
+# copy config.h and an appropriate Makefile for distutils.sysconfig
+# which laters uses the information out of these to compile extensions
+#
+do_compile_prepend() {
+	install -d ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/
+	install -d ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/
+	install -m 0644 pyconfig.h ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/
+	install -m 0644 Makefile Makefile.orig
+	install -m 0644 Makefile Makefile.backup
+	sed -e 's,${includedir},${STAGING_INCDIR},' < Makefile.backup > Makefile
+	install -m 0644 Makefile Makefile.backup
+	sed -e 's,${libdir},${STAGING_LIBDIR},' < Makefile.backup > Makefile
+	install -m 0644 Makefile ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/
+}
+
+do_compile() {
+	oe_runmake HOSTPGEN=${STAGING_BINDIR}/pgen \
+		   HOSTPYTHON=${STAGING_BINDIR}/python \
+		   STAGING_LIBDIR=${STAGING_LIBDIR} \
+		   STAGING_INCDIR=${STAGING_INCDIR} \
+		   BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS}
+}
+
+do_stage() {
+	install -m 0644 Include/*.h ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/
+	oe_libinstall -a -so libpython2.4 ${STAGING_LIBDIR}
+}
+
+do_install() {
+	install -m 0644 Makefile.orig Makefile
+        oe_runmake HOSTPGEN=${STAGING_BINDIR}/pgen \
+                   HOSTPYTHON=${STAGING_BINDIR}/python \
+                   STAGING_LIBDIR=${STAGING_LIBDIR} \
+                   STAGING_INCDIR=${STAGING_INCDIR} \
+		   BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+		   DESTDIR=${D} install
+}
+
+include python-${PV}-manifest.inc
+
+PACKAGES =+ "libpython2"
+FILES_libpython2 = "${libdir}/libpython*"
+






More information about the Openembedded-commits mailing list