2014-08-18 21:58:18 +00:00
|
|
|
# Template file for 'python-Pillow'
|
|
|
|
pkgname=python-Pillow
|
2014-11-04 16:01:31 +00:00
|
|
|
version=2.6.1
|
2014-08-18 21:58:18 +00:00
|
|
|
revision=1
|
2014-11-04 16:01:31 +00:00
|
|
|
wrksrc="Pillow-${version}"
|
2014-08-18 21:58:18 +00:00
|
|
|
python_versions="2.7 3.4"
|
2014-08-27 05:44:21 +00:00
|
|
|
hostmakedepends="unzip 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
|
2014-08-27 05:44:21 +00:00
|
|
|
freetype-devel lcms2-devel libwebp-devel tk-devel sane-devel"
|
2014-08-18 21:58:18 +00:00
|
|
|
replaces="python-imaging>=0"
|
|
|
|
pycompile_module="PIL"
|
|
|
|
short_desc="Python Imaging Library (PIL) fork (Python2)"
|
|
|
|
maintainer="Alessio Sergi <al3hex@gmail.com>"
|
|
|
|
homepage="https://python-pillow.github.io/"
|
|
|
|
license="PIL"
|
2014-11-04 16:01:31 +00:00
|
|
|
distfiles="${PYPI_SITE}/P/Pillow/Pillow-${version}.zip"
|
|
|
|
checksum=96bdd40714daf326d01c6286591b5dfe60336c23b7a6bf8e048bcc339513a414
|
2014-08-18 21:58:18 +00:00
|
|
|
|
|
|
|
post_extract() {
|
2014-11-04 16:01:31 +00:00
|
|
|
sed -i '/^#!\//,1d' PIL/OleFileIO.py
|
2014-08-18 21:58:18 +00:00
|
|
|
cp -a ${wrksrc} /tmp/python2.7-build
|
|
|
|
cp -a ${wrksrc} /tmp/python3.4-build
|
|
|
|
mv /tmp/python{2.7,3.4}-build ${wrksrc}
|
|
|
|
}
|
|
|
|
|
|
|
|
do_build() {
|
|
|
|
cd ${wrksrc}/python2.7-build
|
|
|
|
python setup.py build
|
|
|
|
cd Sane
|
|
|
|
python setup.py build
|
|
|
|
|
|
|
|
cd ${wrksrc}/python3.4-build
|
|
|
|
python3.4 setup.py build
|
|
|
|
cd Sane
|
|
|
|
python3.4 setup.py build
|
|
|
|
}
|
|
|
|
|
|
|
|
pre_install() {
|
|
|
|
for file in convert driver file font print; do
|
|
|
|
mv python2.7-build/build/scripts-2.7/pil${file}{.py,}
|
|
|
|
mv python3.4-build/build/scripts-3.4/pil${file}{.py,3}
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
|
|
|
cd ${wrksrc}/python2.7-build
|
|
|
|
python setup.py install --root=${DESTDIR}
|
|
|
|
cd Sane
|
|
|
|
python setup.py install --root=${DESTDIR}
|
|
|
|
|
|
|
|
cd ${wrksrc}/python3.4-build
|
|
|
|
python3.4 setup.py install --root=${DESTDIR}
|
|
|
|
cd Sane
|
|
|
|
python3.4 setup.py install --root=${DESTDIR}
|
|
|
|
}
|
|
|
|
|
|
|
|
post_install() {
|
|
|
|
rm ${DESTDIR}/usr/bin/*.py
|
|
|
|
vlicense docs/LICENSE
|
|
|
|
}
|
|
|
|
|
|
|
|
python3.4-Pillow_package() {
|
|
|
|
pycompile_version="3.4"
|
|
|
|
pycompile_module="PIL"
|
|
|
|
short_desc="${short_desc/Python2/Python3.4}"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/bin/*3
|
|
|
|
vmove usr/lib/python3.4
|
|
|
|
vlicense ${wrksrc}/docs/LICENSE
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
python-Pillow-devel_package() {
|
|
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
|
|
short_desc+=" - development files"
|
|
|
|
pkg_install() {
|
|
|
|
cd ${wrksrc}/python2.7-build
|
|
|
|
vmkdir usr/include/python2.7/Imaging
|
|
|
|
vcopy libImaging/*.h usr/include/python2.7/Imaging
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
python3.4-Pillow-devel_package() {
|
|
|
|
depends="python3.4-Pillow>=${version}_${revision}"
|
|
|
|
short_desc+=" - development files"
|
|
|
|
pkg_install() {
|
|
|
|
cd ${wrksrc}/python3.4-build
|
|
|
|
vmkdir usr/include/python3.4/Imaging
|
|
|
|
vcopy libImaging/*.h usr/include/python3.4/Imaging
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
python-Pillow-qt_package() {
|
|
|
|
depends="${sourcepkg}>=${version}_${revision} python-PyQt4"
|
|
|
|
short_desc+=" - Qt interface"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/lib/python2.7/site-packages/PIL/ImageQt.py
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
python3.4-Pillow-qt_package() {
|
|
|
|
depends="python3.4-Pillow>=${version}_${revision} python3.4-PyQt4"
|
|
|
|
short_desc+=" - Qt interface"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/lib/python3.4/site-packages/PIL/ImageQt.py
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
python-Pillow-sane_package() {
|
|
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
|
|
short_desc+=" - Sane interface"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/lib/python2.7/site-packages/sane.py
|
|
|
|
vmove usr/lib/python2.7/site-packages/pysane-2.0-py2.7.egg-info
|
|
|
|
vmove usr/lib/python2.7/site-packages/_sane.so
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
python3.4-Pillow-sane_package() {
|
|
|
|
depends="python3.4-Pillow>=${version}_${revision}"
|
|
|
|
short_desc+=" - Sane interface"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/lib/python3.4/site-packages/sane.py
|
|
|
|
vmove usr/lib/python3.4/site-packages/pysane-2.0-py3.4.egg-info
|
|
|
|
vmove usr/lib/python3.4/site-packages/_sane.cpython-34m.so
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
python-Pillow-tk_package() {
|
|
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
|
|
short_desc+=" - Tk interface"
|
|
|
|
pkg_install() {
|
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
python3.4-Pillow-tk_package() {
|
|
|
|
depends="python3.4-Pillow>=${version}_${revision}"
|
|
|
|
short_desc+=" - Tk interface"
|
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|