]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/python/python_2.4.2.bb
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / python / python_2.4.2.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 tcl tk"
8 PR = "ml4"
9
10 PYTHON_MAJMIN = "2.4"
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://fix-tkinter-detection.patch;patch=1"
16 S = "${WORKDIR}/Python-${PV}"
17
18 inherit autotools
19
20 EXTRA_OECONF = "--with-threads --with-pymalloc --with-cyclic-gc \
21                 --without-cxx --with-signal-module --with-wctype-functions \
22                 --enable-shared"
23
24 #
25 # copy config.h and an appropriate Makefile for distutils.sysconfig
26 # which laters uses the information out of these to compile extensions
27 #
28 do_compile_prepend() {
29         install -d ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/
30         install -d ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/
31         install -m 0644 pyconfig.h ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/
32         install -m 0644 Makefile Makefile.orig
33         install -m 0644 Makefile Makefile.backup
34         sed -e 's,${includedir},${STAGING_INCDIR},' < Makefile.backup > Makefile
35         install -m 0644 Makefile Makefile.backup
36         sed -e 's,${libdir},${STAGING_LIBDIR},' < Makefile.backup > Makefile
37         install -m 0644 Makefile ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/
38 }
39
40 do_compile() {
41         oe_runmake HOSTPGEN=${STAGING_BINDIR}/pgen \
42                    HOSTPYTHON=${STAGING_BINDIR}/python \
43                    STAGING_LIBDIR=${STAGING_LIBDIR} \
44                    STAGING_INCDIR=${STAGING_INCDIR} \
45                    BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS}
46 }
47
48 do_stage() {
49         install -m 0644 Include/*.h ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/
50         oe_libinstall -a -so libpython2.4 ${STAGING_LIBDIR}
51 }
52
53 do_install() {
54         install -m 0644 Makefile.orig Makefile
55         oe_runmake HOSTPGEN=${STAGING_BINDIR}/pgen \
56                    HOSTPYTHON=${STAGING_BINDIR}/python \
57                    STAGING_LIBDIR=${STAGING_LIBDIR} \
58                    STAGING_INCDIR=${STAGING_INCDIR} \
59                    BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
60                    DESTDIR=${D} install
61 }
62
63 include python-${PV}-manifest.inc
64
65 PACKAGES =+ "libpython2 ${PN}"
66 FILES_libpython2 = "${libdir}/libpython*"
67 FILES_${PN} = ""
68 ALLOW_EMPTY_${PN} = "1"
69 RDEPENDS_${PN} = "python-core"