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