2014-08-18 21:58:18 +00:00
|
|
|
# Template file for 'python-Pillow'
|
|
|
|
pkgname=python-Pillow
|
2015-04-04 21:28:01 +00:00
|
|
|
version=2.8.1
|
2014-08-18 21:58:18 +00:00
|
|
|
revision=1
|
2014-11-04 16:01:31 +00:00
|
|
|
wrksrc="Pillow-${version}"
|
2015-01-26 11:00:00 +00:00
|
|
|
build_style=python-module
|
2014-08-18 21:58:18 +00:00
|
|
|
python_versions="2.7 3.4"
|
2015-01-26 11:00:00 +00:00
|
|
|
hostmakedepends="python-setuptools python3.4-setuptools"
|
2014-08-18 21:58:18 +00:00
|
|
|
makedepends="
|
|
|
|
python-devel python3.4-devel python-tkinter python3.4-tkinter
|
|
|
|
libjpeg-turbo-devel libopenjpeg2-devel zlib-devel tiff-devel
|
2015-01-26 11:00:00 +00:00
|
|
|
freetype-devel lcms2-devel libwebp-devel tk-devel"
|
2014-08-18 21:58:18 +00:00
|
|
|
replaces="python-imaging>=0"
|
|
|
|
pycompile_module="PIL"
|
|
|
|
short_desc="Python Imaging Library (PIL) fork (Python2)"
|
2015-01-09 00:42:15 +00:00
|
|
|
_short_desc="${short_desc/Python2/Python3.4}"
|
2014-08-18 21:58:18 +00:00
|
|
|
maintainer="Alessio Sergi <al3hex@gmail.com>"
|
2015-01-26 11:00:00 +00:00
|
|
|
homepage="https://github.com/python-pillow/Pillow"
|
2014-08-18 21:58:18 +00:00
|
|
|
license="PIL"
|
2015-01-26 11:00:00 +00:00
|
|
|
distfiles="${PYPI_SITE}/P/Pillow/Pillow-${version}.tar.gz"
|
2015-04-04 21:28:01 +00:00
|
|
|
checksum=8760c118a0215eba163f7782110e7efcdbb15f8a7321f3f61c5ac0dbbb12c996
|
2015-01-09 00:42:15 +00:00
|
|
|
nocross=yes
|
2014-08-18 21:58:18 +00:00
|
|
|
|
2015-01-26 11:00:00 +00:00
|
|
|
pre_build() {
|
2014-11-04 16:01:31 +00:00
|
|
|
sed -i '/^#!\//,1d' PIL/OleFileIO.py
|
2014-08-18 21:58:18 +00:00
|
|
|
}
|
2015-04-04 21:28:01 +00:00
|
|
|
post_install() {
|
|
|
|
rm -f ${DESTDIR}/usr/bin/*.py
|
2015-01-26 11:00:00 +00:00
|
|
|
# rename bins and remove .py suffix
|
|
|
|
for f in convert driver file font print; do
|
2015-04-04 21:28:01 +00:00
|
|
|
vbin build-2.7/scripts-2.7/pil${f}{.py,}
|
|
|
|
vbin build-3.4/scripts-3.4/pil${f}{.py,3}
|
2014-08-18 21:58:18 +00:00
|
|
|
done
|
2015-04-04 21:28:01 +00:00
|
|
|
vlicense LICENSE
|
2014-08-18 21:58:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
python-Pillow-devel_package() {
|
2015-04-04 21:28:01 +00:00
|
|
|
depends="${sourcepkg}-${version}_${revision}"
|
2014-08-18 21:58:18 +00:00
|
|
|
short_desc+=" - development files"
|
|
|
|
pkg_install() {
|
|
|
|
vmkdir usr/include/python2.7/Imaging
|
|
|
|
vcopy libImaging/*.h usr/include/python2.7/Imaging
|
|
|
|
}
|
|
|
|
}
|
|
|
|
python-Pillow-qt_package() {
|
2015-04-04 21:28:01 +00:00
|
|
|
depends="${sourcepkg}-${version}_${revision} python-PyQt4"
|
2014-08-18 21:58:18 +00:00
|
|
|
short_desc+=" - Qt interface"
|
2015-01-09 00:42:15 +00:00
|
|
|
pycompile_module="PIL"
|
2014-08-18 21:58:18 +00:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/lib/python2.7/site-packages/PIL/ImageQt.py
|
|
|
|
}
|
|
|
|
}
|
2015-01-09 00:42:15 +00:00
|
|
|
python-Pillow-tk_package() {
|
2015-04-04 21:28:01 +00:00
|
|
|
depends="${sourcepkg}-${version}_${revision}"
|
2015-01-09 00:42:15 +00:00
|
|
|
short_desc+=" - Tk interface"
|
|
|
|
pycompile_module="PIL"
|
2014-08-18 21:58:18 +00:00
|
|
|
pkg_install() {
|
2015-01-09 00:42:15 +00:00
|
|
|
vmove usr/lib/python2.7/site-packages/PIL/ImageTk.py
|
|
|
|
vmove usr/lib/python2.7/site-packages/PIL/SpiderImagePlugin.py
|
|
|
|
vmove usr/lib/python2.7/site-packages/PIL/_imagingtk.so
|
2014-08-18 21:58:18 +00:00
|
|
|
}
|
|
|
|
}
|
2015-01-09 00:42:15 +00:00
|
|
|
python3.4-Pillow_package() {
|
|
|
|
short_desc="${_short_desc}"
|
|
|
|
pycompile_version="3.4"
|
|
|
|
pycompile_module="PIL"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/bin/*3
|
|
|
|
vmove usr/lib/python3.4
|
2015-04-04 21:28:01 +00:00
|
|
|
vlicense LICENSE
|
2015-01-09 00:42:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
python3.4-Pillow-devel_package() {
|
2015-04-04 21:28:01 +00:00
|
|
|
depends="python3.4-Pillow-${version}_${revision}"
|
2015-01-09 00:42:15 +00:00
|
|
|
short_desc="${_short_desc} - development files"
|
2014-08-18 21:58:18 +00:00
|
|
|
pkg_install() {
|
2015-01-26 11:00:00 +00:00
|
|
|
vmkdir usr/include/python3.4m/Imaging
|
|
|
|
vcopy libImaging/*.h usr/include/python3.4m/Imaging
|
2014-08-18 21:58:18 +00:00
|
|
|
}
|
|
|
|
}
|
2015-01-09 00:42:15 +00:00
|
|
|
python3.4-Pillow-qt_package() {
|
2015-04-04 21:28:01 +00:00
|
|
|
depends="python3.4-Pillow-${version}_${revision} python3.4-PyQt4"
|
2015-01-09 00:42:15 +00:00
|
|
|
short_desc="${_short_desc} - Qt interface"
|
|
|
|
pycompile_version="3.4"
|
|
|
|
pycompile_module="PIL"
|
2014-08-18 21:58:18 +00:00
|
|
|
pkg_install() {
|
2015-01-09 00:42:15 +00:00
|
|
|
vmove usr/lib/python3.4/site-packages/PIL/ImageQt.py
|
2014-08-18 21:58:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
python3.4-Pillow-tk_package() {
|
2015-04-04 21:28:01 +00:00
|
|
|
depends="python3.4-Pillow-${version}_${revision}"
|
2015-01-09 00:42:15 +00:00
|
|
|
short_desc="${_short_desc} - Tk interface"
|
|
|
|
pycompile_version="3.4"
|
|
|
|
pycompile_module="PIL"
|
2014-08-18 21:58:18 +00:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/lib/python3.4/site-packages/PIL/ImageTk.py
|
|
|
|
vmove usr/lib/python3.4/site-packages/PIL/SpiderImagePlugin.py
|
|
|
|
vmove usr/lib/python3.4/site-packages/PIL/_imagingtk.cpython-34m.so
|
|
|
|
}
|
|
|
|
}
|