contrib/python-pillow/Pkgfile

39 lines
1.1 KiB
Plaintext
Raw Normal View History

2015-01-26 07:03:06 +01:00
# Description: Python Imaging Library (PIL) fork.
# URL: http://python-pillow.github.io/
# Maintainer: Danny Rawlins, crux at romster dot me
2017-11-04 09:13:19 +01:00
# Depends on: lcms2 libwebp python-setuptools
# Optional: sane
2015-01-26 07:03:06 +01:00
2017-11-04 09:13:19 +01:00
name=python-pillow
version=4.3.0
_saneversion=2.8.3
2015-01-26 07:03:06 +01:00
release=1
2017-11-04 09:13:19 +01:00
source=(https://github.com/python-pillow/Pillow/archive/$version/Pillow-$version.tar.gz
https://github.com/python-pillow/Sane/archive/v$_saneversion/Sane-v$_saneversion.tar.gz)
2015-01-26 07:03:06 +01:00
build() {
2017-11-04 09:13:19 +01:00
# allow sane to build
sed -i -e "s|os.path.join|'../libImaging', &|" "$SRC/Sane-$_saneversion/setup.py"
cp -r "$SRC/Sane-$_saneversion" "$SRC/Pillow-$version/Sane"
2015-01-26 07:03:06 +01:00
cd Pillow-$version
2015-04-08 15:12:38 +02:00
/usr/bin/python setup.py build
/usr/bin/python setup.py install --root=$PKG --optimize=0
2017-11-04 09:13:19 +01:00
if pkg-config --exists sane-backends; then
cd Sane
/usr/bin/python setup.py build
/usr/bin/python setup.py install --root=$PKG --optimize=0
cd -
install -d -m 0755 "$PKG/usr/include/python2.7/"
install -m 0644 -t "$PKG/usr/include/python2.7/" libImaging/*.h
fi
# clean up bins
cd $PKG/usr/bin
for f in *.py; do
mv "$f" "${f%.py}"
done
2015-01-26 07:03:06 +01:00
}