blob: be81d81aaef9096ce366686904332a73e84bccb0 (
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
# Maintainer: Isaac Dunham <ibid.ag@gmail.com>
# This depends on the current packaging of Python,
# which includes idle, the tkinter and idle *.py* files, but not _tkinter.so
pkgname=py-tkinter
_pkgname=python
pkgver=2.7.8
_verbase=${pkgver%.*}
pkgrel=0
pkgdesc="Tk interface for Python"
url="http://www.python.org"
arch="all"
license="custom"
subpackages=""
depends=""
makedepends="expat-dev openssl-dev zlib-dev ncurses-dev bzip2-dev
libffi-dev paxctl tk-dev python-dev"
source="http://www.$pkgname.org/ftp/$_pkgname/$pkgver/Python-$pkgver.tar.xz
find_library.patch
unchecked-ioctl.patch
"
prepare() {
cd "$srcdir/Python-$pkgver"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1
esac
done
# verify that python version corresponds with system python version
_pyver=$(python -c 'import platform; print platform.python_version()')
if [ "$_pyver" != "$pkgver" ]; then
error "$pkgver does not correspond with python $_pyver"
return 1
fi
# Make sure we use system libs
rm -r Modules/expat Modules/_ctypes/libffi* Modules/zlib || return 1
# make sure our /dev/shm is world writeable
if ! touch /dev/shm/"$pkgname-$pkgver"; then
error "/dev/shm is not world writeable. this will cause a broken python build"
return 1
fi
rm /dev/shm/"$pkgname-$pkgver"
}
build() {
cd "$srcdir/Python-$pkgver"
export OPT="$CFLAGS"
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--enable-shared \
--with-threads \
--enable-ipv6 \
--with-system-ffi \
--with-system-expat \
--with-system-zlib \
--enable-unicode=ucs4 \
--with-tcltk-libs="`pkg-config --libs tk`" \
--with-tcltk-includes="`pkg-config --cflags tk`" \
|| return 1
make sharedmods || return 1
}
package() {
cd "$srcdir/Python-$pkgver"
make -j1 DESTDIR="$pkgdir" sharedinstall || return 1
find "$pkgdir/" -type f ! -name _tkinter.so -exec rm -f '{}' + \
|| return 1
find "$pkgdir/" -type l -exec rm -f '{}' + || return 1
find "$pkgdir/" -type d -exec rmdir -p '{}' \; || true
ls "$pkgdir/usr/lib/$_pkgname$_verbase/lib-dynload/_tkinter.so" \
|| return 1
}
md5sums="d235bdfa75b8396942e360a70487ee00 Python-2.7.8.tar.xz
5d8ca92fa6f187573104593470a9d3d5 find_library.patch
dada786a50fa332686a9b9260d84c110 unchecked-ioctl.patch"
sha256sums="edde10a0cb7d14e2735e682882d5b287028d1485c456758154c19573db68075a Python-2.7.8.tar.xz
63b2b1489c2b97b450bb2d19b64f2ae6cca5c43d549c131c7807fbe52b7bbf21 find_library.patch
f9d37609bab83d9ffff96ec9a33e16568cfb14980d389f7fe34a1c837397e359 unchecked-ioctl.patch"
sha512sums="0a992e34b6b704f028f5178c0404f8ca5fd9a7ab9da1879a20f0c72ffa712dc4925e45eb78e9368d6a17ee618259fc3f078d71766b314a732a1a28e526511a5e Python-2.7.8.tar.xz
cbb18c23b1b55025ba8a08debd545b68317eef2732f9f631d2629ed71b603b9a90843bca5df9db7072e83e29c928b0e9c557d0710955692052607db36a241c08 find_library.patch
5a8e013a4132d71c4360771f130d27b37275ae59330cf9a75378dc8a11236017f540eb224f2a148984e82ca3fb6b29129375b1080ba05b81044faa717520ab82 unchecked-ioctl.patch"
|