55fe3efa906900242c497a3c7c4bf00f6728678c
[vuplus_openembedded] / python / python_2.3.3.oe
1 DESCRIPTION = "Python Programming Language"
2 SECTION = "devel/python"
3 PRIORITY = "optional"
4 MAINTAINER = "Michael Lauer <mickey@Vanille.de>"
5 DEPENDS = "virtual/libc python-native"
6
7 SRC_URI = "ftp://www.python.org/pub/python/${PV}/Python-${PV}.tar.bz2 \
8            file://${FILESDIR}/bindir-libdir.patch;patch=1 \
9            file://${FILESDIR}/crosscompile.patch;patch=1 \
10            file://${FILESDIR}/autohell.patch;patch=1"
11 #         file://${FILESDIR}/crosscompile-hotshot.patch;patch=1 \
12 #         file://${FILESDIR}/crosscompile-socket.patch;patch=1
13
14 S = "${WORKDIR}/Python-${PV}"
15
16 inherit autotools
17
18 EXTRA_OECONF = "--with-threads --with-pymalloc --with-cyclic-gc"
19
20 #
21 # copy config.h and an appropriate Makefile for distutils.sysconfig
22 # which laters uses the information out of these to compile extensions
23 #
24 do_compile_prepend() {
25         install -d ${STAGING_INCDIR}/python2.3/
26         install -d ${STAGING_LIBDIR}/python2.3/config/
27         install -m 0644 pyconfig.h ${STAGING_INCDIR}/python2.3/
28         install -m 0644 Makefile Makefile.orig
29         install -m 0644 Makefile Makefile.backup
30         sed -e 's,${includedir},${STAGING_INCDIR},' < Makefile.backup > Makefile
31         install -m 0644 Makefile Makefile.backup
32         sed -e 's,${libdir},${STAGING_LIBDIR},' < Makefile.backup > Makefile
33         install -m 0644 Makefile ${STAGING_LIBDIR}/python2.3/config/
34 }
35
36 do_compile() {
37         oe_runmake HOSTPGEN=${STAGING_BINDIR}/pgen \
38                    HOSTPYTHON=${STAGING_BINDIR}/python \
39                    STAGING_DIR=${STAGING_DIR} \
40                    BUILD_SYS=${BUILD_SYS} \
41                    HOST_SYS=${HOST_SYS}
42 }
43
44 do_stage() {
45         install -m 0644 Include/*.h ${STAGING_INCDIR}/python2.3/
46 }
47
48 do_install() {
49         install -m 0644 Makefile.orig Makefile
50         oe_runmake HOSTPGEN=${STAGING_BINDIR}/pgen \
51                    HOSTPYTHON=${STAGING_BINDIR}/python \
52                    STAGING_DIR=${STAGING_DIR} \
53                    BUILD_SYS=${BUILD_SYS} \
54                    HOST_SYS=${HOST_SYS} \
55                    DESTDIR=${D} install
56 }
57
58 include python-${PV}-manifest.oe