testing/py-tkinter: build only shared modules and check python version

we dont need to build everything
This commit is contained in:
Natanael Copa 2014-09-09 06:45:44 +00:00
parent bd1de6ce91
commit aeddbf1ff3

View File

@ -13,7 +13,7 @@ license="custom"
subpackages=""
depends=""
makedepends="expat-dev openssl-dev zlib-dev ncurses-dev bzip2-dev
libffi-dev paxctl tk-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
@ -27,6 +27,13 @@ prepare() {
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
@ -55,12 +62,12 @@ build() {
--with-tcltk-libs="`pkg-config --libs tk`" \
--with-tcltk-includes="`pkg-config --cflags tk`" \
|| return 1
make || return 1
make sharedmods || return 1
}
package() {
cd "$srcdir/Python-$pkgver"
make -j1 DESTDIR="$pkgdir" install || return 1
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