summaryrefslogtreecommitdiffstats
path: root/extra/python/Pkgfile
blob: 99ac74e952bdd7e6804800eb87227eaa83f30e7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Description: Environnement de développement python
# URL: http://www.python.org
# Maintainer: NuTyX core team
# Packager: thierryn1 at hispeed dot ch
# Depends on: expat, bzip2, gdbm, openssl, libffi, zlib, tk, sqlite3

name=python
version=3.1.3
release=4
source=( http://www.python.org/ftp/python/$version/Python-$version.tar.bz2
	python-internal-expat.patch)

build() {
	cd Python-$version

	patch -Np0 -i ../python-internal-expat.patch
	rm -r Modules/expat
	rm -r Modules/zlib
	rm -r Modules/_ctypes/{darwin,libffi}*

#	sed -i "s/ndbm_libs = \[\]/ndbm_libs = ['gdbm', 'gdbm_compat']/"  setup.py

	export OPT="${CFLAGS}"
  	export CPPFLAGS+="`pkg-config --cflags-only-I libffi`"

	./configure --prefix=/usr \
	            --mandir=/usr/share/man \
		    --infodir=/usr/share/info \
        	    --enable-shared \
		    --with-threads \
                    --with-computed-gotos \
                    --enable-ipv6 \
                    --with-wide-unicode \
                    --with-system-ffi
	make
	make DESTDIR=$PKG install

	ln -sf python3 $PKG/usr/bin/python
	ln -sf python3-config $PKG/usr/bin/python-config
	ln -sf idle3 $PKG/usr/bin/idle
	ln -sf pydoc3 $PKG/usr/bin/pydoc

	sed -i "s#$SRC/Python-$version:##" $pkgdir/usr/lib/python3.1/config/Makefile
	
	rm $PKG/usr/bin/2to3

	install -Dm644 LICENSE $PKG/usr/share/licenses/$name/LICENSE
}