-rw-r--r-- root/root usr/include/python2.6/warnings.h
-rw-r--r-- root/root usr/include/python2.6/weakrefobject.h
drwxr-xr-x root/root usr/lib/
--r-xr-xr-x root/root usr/lib/libpython2.6.a
+lrwxrwxrwx root/root usr/lib/libpython2.6.so -> libpython2.6.so.1.0
+-rwxr-xr-x root/root usr/lib/libpython2.6.so.1.0
lrwxrwxrwx root/root usr/lib/python -> python2.6
drwxr-xr-x root/root usr/lib/python2.6/
-rw-r--r-- root/root usr/lib/python2.6/BaseHTTPServer.py
-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/_lsprof.so
-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/_multibytecodec.so
-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/_random.so
+-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/_socket.so
-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/_ssl.so
-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/_struct.so
-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/_testcapi.so
-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/cStringIO.so
-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/cmath.so
-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/crypt.so
--r-xr-xr-x root/root usr/lib/python2.6/lib-dynload/dbmmodule.so
+-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/datetime.so
+-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/dbmmodule.so
-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/dl.so
-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/fcntl.so
-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/future_builtins.so
-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/grp.so
-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/imageop.so
-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/itertools.so
+-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/linuxaudiodev.so
+-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/math.so
-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/mmap.so
-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/nis.so
-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/operator.so
-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/parser.so
-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/pyexpat.so
+-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/readline.so
-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/resource.so
+-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/select.so
-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/spwd.so
-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/strop.so
-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/syslog.so
-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/termios.so
+-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/time.so
-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/unicodedata.so
--r-xr-xr-x root/root usr/lib/python2.6/lib-dynload/xxsubtype.so
+-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/xxsubtype.so
-rwxr-xr-x root/root usr/lib/python2.6/lib-dynload/zlib.so
drwxr-xr-x root/root usr/lib/python2.6/lib-old/
drwxr-xr-x root/root usr/lib/python2.6/lib-tk/
fee5408634a54e721a93531aba37f8c1 Python-2.6.4.tar.bz2
-9922e0e671ae78ae2d5ece9ec9ef1761 python-2.6.4.cross_compilation.patch
-f1db504e47f716f058b6082309a45d15 python-2.6.patch
+69fe60cab7767d66192d2d1b8aac9a4e python-2.6.4.cross_compilation.patch
name=python
version=2.6.4
-release=1
+release=2
source=(http://www.python.org/ftp/$name/$version/Python-$version.tar.bz2 \
- $name-$version.cross_compilation.patch $name-2.6.patch)
+ $name-$version.cross_compilation.patch)
build () {
cd Python-$version
patch -p1 -i $SRC/$name-$version.cross_compilation.patch
- patch -p1 -i $SRC/$name-2.6.patch
SAVED_CFLAGS="$CFLAGS" SAVED_CXXFLAGS="$CXXFLAGS"
SAVED_AR="$AR" SAVED_RANLIB="$RANLIB"
unset CC CFLAGS CXX CXXFLAGS AR RANLIB
+
./configure
+
make python Parser/pgen
mv python hostpython
mv Parser/pgen Parser/hostpgen
make distclean
- CC="$CTARGET-gcc" CXX="$CTARGET-g++" AR="$AR" RANLIB="$RANLIB" \
- CFLAGS="$SAVED_CFLAGS" CXXFLAGS="$SAVED_CXXFLAGS" \
+ sed -i setup.py \
+ -e "s|'/usr/local|'$CLFS/usr|g" \
+ -e "s|'/lib|'$CLFS/lib|g" \
+ -e "s|'/usr/lib|'$CLFS/usr/lib|g" \
+ -e "s|'/usr/include|'$CLFS/usr/include|g"
+
+ CC="$CTARGET-gcc" CXX="$CTARGET-g++" \
+ CFLAGS="$SAVED_CFLAGS -I$CLFS/usr/include" CXXFLAGS="$CFLAGS" \
+ AR="$SAVED_AR" RANLIB="$SAVED_RANLIB" \
./configure --build=$CHOST \
--host=$CTARGET \
--prefix=/usr \
- --mandir=/usr/man
+ --mandir=/usr/man
+
make HOSTPYTHON="./hostpython" \
HOSTPGEN="./Parser/hostpgen" \
BLDSHARED="$CTARGET-gcc -shared" \
EXTRA_CFLAGS="$CFLAGS" \
CROSS_COMPILE="yes"
+
make HOSTPYTHON="./hostpython" \
HOSTPGEN="./Parser/hostpgen" \
DESTDIR=$PKG install
+
+ make libpython2.6.so
+ install -D -m 0755 libpython2.6.so $PKG/usr/lib/libpython2.6.so.1.0
+ ln -sf libpython2.6.so.1.0 $PKG/usr/lib/libpython2.6.so
+ rm -f $PKG/usr/lib/libpython2.6.a
+ mv $PKG/usr/lib/python2.6/lib-dynload/_socket{module,}.so
+ mv $PKG/usr/lib/python2.6/lib-dynload/datetime{module,}.so
+ mv $PKG/usr/lib/python2.6/lib-dynload/math{module,}.so
+ mv $PKG/usr/lib/python2.6/lib-dynload/select{module,}.so
+ mv $PKG/usr/lib/python2.6/lib-dynload/time{module,}.so
+ chmod 0755 $PKG/usr/lib/python2.6/lib-dynload/*.so
ln -sf python2.6 $PKG/usr/bin/$name
- ln -s python2.6 $PKG/usr/lib/$name
- ln -s python2.6 $PKG/usr/include/$name
- ln -s /usr/lib/libpython2.6.so $PKG/usr/lib/python2.6/config/libpython2.6.so
- rm -r $PKG/usr/lib/$name/{bsddb,ctypes,email,sqlite3}/test
- rm -r $PKG/usr/lib/$name/{distutils,json,lib2to3}/tests
- rm $PKG/usr/lib/$name/{distutils,site-packages,test}/README
- rm $PKG/usr/lib/$name/idlelib/{ChangeLog,{NEWS,README,TODO}.txt}
- rm $PKG/usr/lib/$name/ctypes/macholib/README.ctypes
+ ln -sf python2.6 $PKG/usr/lib/$name
+ ln -sf python2.6 $PKG/usr/include/$name
+ ln -sf /usr/lib/libpython2.6.so $PKG/usr/lib/python2.6/config/libpython2.6.so
+ rm -rf $PKG/usr/lib/$name/{bsddb,ctypes,email,sqlite3}/test
+ rm -rf $PKG/usr/lib/$name/{distutils,json,lib2to3}/tests
+ rm -f $PKG/usr/lib/$name/{distutils,site-packages,test}/README
+ rm -f $PKG/usr/lib/$name/idlelib/{ChangeLog,{NEWS,README,TODO}.txt}
+ rm -f $PKG/usr/lib/$name/ctypes/macholib/README.ctypes
}
-diff -purN Python-2.6.2.orig/Makefile.pre.in Python-2.6.2/Makefile.pre.in
---- Python-2.6.2.orig/Makefile.pre.in 2009-09-28 10:58:20.000000000 +0000
-+++ Python-2.6.2/Makefile.pre.in 2009-09-28 10:59:26.000000000 +0000
+diff -purN Python-2.6.4.orig/Lib/cgi.py Python-2.6.4/Lib/cgi.py
+--- Python-2.6.4.orig/Lib/cgi.py 2010-01-27 09:00:02.000000000 +0100
++++ Python-2.6.4/Lib/cgi.py 2010-01-27 09:02:58.000000000 +0100
+@@ -1,4 +1,4 @@
+-#! /usr/local/bin/python
++#! /usr/bin/python
+
+ # NOTE: the above "/usr/local/bin/python" is NOT a mistake. It is
+ # intentionally NOT "/usr/bin/env python". On many systems
+diff -purN Python-2.6.4.orig/Makefile.pre.in Python-2.6.4/Makefile.pre.in
+--- Python-2.6.4.orig/Makefile.pre.in 2010-01-27 09:00:02.000000000 +0100
++++ Python-2.6.4/Makefile.pre.in 2010-01-27 09:00:24.000000000 +0100
@@ -175,6 +175,7 @@ UNICODE_OBJS= @UNICODE_OBJS@
PYTHON= python$(EXE)
--install-scripts=$(BINDIR) \
--install-platlib=$(DESTSHARED) \
--root=/$(DESTDIR)
-diff -purN Python-2.6.2.orig/configure Python-2.6.2/configure
---- Python-2.6.2.orig/configure 2009-09-28 10:58:20.000000000 +0000
-+++ Python-2.6.2/configure 2009-09-28 10:59:26.000000000 +0000
-@@ -17054,151 +17054,17 @@ fi
+diff -purN Python-2.6.4.orig/Modules/Setup.dist Python-2.6.4/Modules/Setup.dist
+--- Python-2.6.4.orig/Modules/Setup.dist 2010-01-27 09:00:02.000000000 +0100
++++ Python-2.6.4/Modules/Setup.dist 2010-01-27 10:30:15.000000000 +0100
+@@ -152,7 +152,7 @@ GLHACK=-Dclear=__GLclear
+ # modules are to be built as shared libraries (see above for more
+ # detail; also note that *static* reverses this effect):
+
+-#*shared*
++*shared*
+
+ # GNU readline. Unlike previous Python incarnations, GNU readline is
+ # now incorporated in an optional module, configured in the Setup file
+@@ -162,16 +162,16 @@ GLHACK=-Dclear=__GLclear
+ # it, depending on your system -- see the GNU readline instructions.
+ # It's okay for this to be a shared library, too.
+
+-#readline readline.c -lreadline -ltermcap
++readline readline.c -lreadline #-ltermcap
+
+
+ # Modules that should always be present (non UNIX dependent):
+
+ #array arraymodule.c # array objects
+ #cmath cmathmodule.c # -lm # complex math library functions
+-#math mathmodule.c # -lm # math library functions, e.g. sin()
++math mathmodule.c # -lm # math library functions, e.g. sin()
+ #_struct _struct.c # binary structure packing/unpacking
+-#time timemodule.c # -lm # time operations and variables
++time timemodule.c # -lm # time operations and variables
+ #operator operator.c # operator.add() and similar goodies
+ #_weakref _weakref.c # basic weak reference support
+ #_testcapi _testcapimodule.c # Python C API test module
+@@ -182,7 +182,7 @@ GLHACK=-Dclear=__GLclear
+ #_functools _functoolsmodule.c # Tools for working with functions and callable objects
+ #_elementtree -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI _elementtree.c # elementtree accelerator
+ #_pickle _pickle.c # pickle accelerator
+-#datetime datetimemodule.c # date/time type
++datetime datetimemodule.c # date/time type
+ #_bisect _bisectmodule.c # Bisection algorithms
+
+ #unicodedata unicodedata.c # static Unicode character database
+@@ -198,7 +198,7 @@ GLHACK=-Dclear=__GLclear
+ #fcntl fcntlmodule.c # fcntl(2) and ioctl(2)
+ #spwd spwdmodule.c # spwd(3)
+ #grp grpmodule.c # grp(3)
+-#select selectmodule.c # select(2); not on ancient System V
++select selectmodule.c # select(2); not on ancient System V
+
+ # Memory-mapped files (also works on Win32).
+ #mmap mmapmodule.c
+@@ -207,7 +207,7 @@ GLHACK=-Dclear=__GLclear
+ #_csv _csv.c
+
+ # Socket module helper for socket(2)
+-#_socket socketmodule.c
++_socket socketmodule.c
+
+ # Socket module helper for SSL support; you must comment out the other
+ # socket line above, and possibly edit the SSL variable:
+@@ -302,7 +302,7 @@ GLHACK=-Dclear=__GLclear
+ # A Linux specific module -- off by default; this may also work on
+ # some *BSDs.
+
+-#linuxaudiodev linuxaudiodev.c
++linuxaudiodev linuxaudiodev.c
+
+
+ # George Neville-Neil's timing module:
+@@ -390,7 +390,7 @@ GLHACK=-Dclear=__GLclear
+ #
+ # First, look at Setup.config; configure may have set this for you.
+
+-#dbm dbmmodule.c # dbm(3) may require -lndbm or similar
++dbm dbmmodule.c -DHAVE_NDBM_H -lgdbm_compat -lgdbm # dbm(3) may require -lndbm or similar
+
+ # Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm:
+ #
+diff -purN Python-2.6.4.orig/configure Python-2.6.4/configure
+--- Python-2.6.4.orig/configure 2010-01-27 09:00:02.000000000 +0100
++++ Python-2.6.4/configure 2010-01-27 09:00:24.000000000 +0100
+@@ -17190,151 +17190,17 @@ fi
fi
;;
esac
-@@ -24324,95 +24190,11 @@ else
+@@ -24749,95 +24615,11 @@ else
echo "${ECHO_T}no" >&6; }
fi
{ echo "$as_me:$LINENO: checking for socklen_t" >&5
-diff -purN Python-2.6.2.orig/setup.py Python-2.6.2/setup.py
---- Python-2.6.2.orig/setup.py 2009-09-28 10:58:20.000000000 +0000
-+++ Python-2.6.2/setup.py 2009-09-28 10:59:31.000000000 +0000
+diff -purN Python-2.6.4.orig/setup.py Python-2.6.4/setup.py
+--- Python-2.6.4.orig/setup.py 2010-01-27 09:00:02.000000000 +0100
++++ Python-2.6.4/setup.py 2010-01-27 09:00:24.000000000 +0100
@@ -273,15 +273,15 @@ class PyBuildExt(build_ext):
try:
imp.load_dynamic(ext.name, ext_filename)
+++ /dev/null
-diff -Nru Python-2.6.orig/Lib/cgi.py Python-2.6/Lib/cgi.py
---- Python-2.6.orig/Lib/cgi.py 2008-09-03 13:30:35.000000000 +0200
-+++ Python-2.6/Lib/cgi.py 2008-09-03 13:32:35.000000000 +0200
-@@ -1,4 +1,4 @@
--#! /usr/local/bin/python
-+#! /usr/bin/python
-
- # NOTE: the above "/usr/local/bin/python" is NOT a mistake. It is
- # intentionally NOT "/usr/bin/env python". On many systems
-diff -Nru Python-2.6.orig/Modules/Setup.dist Python-2.6/Modules/Setup.dist
---- Python-2.6.orig/Modules/Setup.dist 2008-09-03 13:30:34.000000000 +0200
-+++ Python-2.6/Modules/Setup.dist 2008-09-03 13:32:35.000000000 +0200
-@@ -152,7 +152,7 @@
- # modules are to be built as shared libraries (see above for more
- # detail; also note that *static* reverses this effect):
-
--#*shared*
-+*shared*
-
- # GNU readline. Unlike previous Python incarnations, GNU readline is
- # now incorporated in an optional module, configured in the Setup file
-@@ -385,7 +385,7 @@
- #
- # First, look at Setup.config; configure may have set this for you.
-
--#dbm dbmmodule.c # dbm(3) may require -lndbm or similar
-+dbm dbmmodule.c -DHAVE_NDBM_H -lgdbm_compat -lgdbm # dbm(3) may require -lndbm or similar
-
- # Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm:
- #