void-packages/srcpkgs/python-Pillow/template

104 lines
3.0 KiB
Bash
Raw Normal View History

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