python-2.5.1: force largefile support to be available (instead of unavailable) when...
[vuplus_openembedded] / packages / python / python_2.5.1.bb
1 DESCRIPTION = "Python Programming Language"
2 HOMEPAGE = "http://www.python.org"
3 LICENSE = "PSF"
4 SECTION = "devel/python"
5 PRIORITY = "optional"
6 MAINTAINER = "Michael 'Mickey' Lauer <mickey@Vanille.de>"
7 DEPENDS = "python-native readline zlib gdbm openssl"
8 PR = "ml1"
9
10 PYTHON_MAJMIN = "2.5"
11
12 SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
13            file://bindir-libdir.patch;patch=1 \
14            file://crosscompile.patch;patch=1 \
15            file://build-native-md5-sha.patch;patch=1 \
16            file://fix-tkinter-detection.patch;patch=1 \
17            file://some_configure_fixes.patch;patch=1;pnum=0"
18
19 SRC_URI_append_opendreambox = " file://forced_largefile_support.patch;patch=1;pnum=1"
20
21 S = "${WORKDIR}/Python-${PV}"
22
23 inherit autotools
24
25 EXTRA_OECONF = "--with-threads --with-pymalloc --with-cyclic-gc \
26                 --without-cxx --with-signal-module --with-wctype-functions \
27                 --enable-shared"
28
29 #
30 # copy config.h and an appropriate Makefile for distutils.sysconfig
31 # which laters uses the information out of these to compile extensions
32 #
33 do_compile_prepend() {
34         install -d ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/
35         install -d ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/
36         install -m 0644 pyconfig.h ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/
37         install -m 0644 Makefile Makefile.orig
38         install -m 0644 Makefile Makefile.backup
39         sed -e 's,${includedir},${STAGING_INCDIR},' < Makefile.backup > Makefile
40         install -m 0644 Makefile Makefile.backup
41         sed -e 's,${libdir},${STAGING_LIBDIR},' < Makefile.backup > Makefile
42         install -m 0644 Makefile ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/
43 }
44
45 do_compile() {
46         oe_runmake HOSTPGEN=${STAGING_BINDIR}/pgen \
47                    HOSTPYTHON=${STAGING_BINDIR}/python \
48                    STAGING_LIBDIR=${STAGING_LIBDIR} \
49                    STAGING_INCDIR=${STAGING_INCDIR} \
50                    PYTHON_LIBDIR=${S} \
51                    BUILD_SYS=${BUILD_SYS} \
52                    HOST_SYS=${HOST_SYS}
53 }
54
55 do_stage() {
56         install -m 0644 Include/*.h ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/
57         oe_libinstall -a -so libpython2.5 ${STAGING_LIBDIR}
58 }
59
60 do_install() {
61         install -m 0644 Makefile.orig Makefile
62         oe_runmake HOSTPGEN=${STAGING_BINDIR}/pgen \
63                    HOSTPYTHON=${STAGING_BINDIR}/python \
64                    STAGING_LIBDIR=${STAGING_LIBDIR} \
65                    STAGING_INCDIR=${STAGING_INCDIR} \
66                    PYTHON_LIBDIR=${S} \
67                    BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
68                    DESTDIR=${D} install
69 }
70
71 include python-${PV}-manifest.inc
72
73 PACKAGES =+ "libpython2"
74 FILES_libpython2 = "${libdir}/libpython*"
75