[136505] trunk/dports/graphics/vips/Portfile
bgilbert at macports.org
bgilbert at macports.org
Tue May 19 16:49:18 PDT 2015
Revision: 136505
https://trac.macports.org/changeset/136505
Author: bgilbert at macports.org
Date: 2015-05-19 16:49:18 -0700 (Tue, 19 May 2015)
Log Message:
-----------
vips: Support multiple Python versions via variants
- Install vips8 GI overrides for each requested Python version
- Fix install path for Python 2.7 modules
Modified Paths:
--------------
trunk/dports/graphics/vips/Portfile
Modified: trunk/dports/graphics/vips/Portfile
===================================================================
--- trunk/dports/graphics/vips/Portfile 2015-05-19 19:30:11 UTC (rev 136504)
+++ trunk/dports/graphics/vips/Portfile 2015-05-19 23:49:18 UTC (rev 136505)
@@ -6,7 +6,7 @@
name vips
version 8.0.2
-revision 1
+revision 2
set branch [join [lrange [split ${version} .] 0 1] .]
description VIPS is an image processing library.
long_description VIPS is an image processing library. It is good for \
@@ -40,7 +40,6 @@
port:openexr \
port:openslide \
port:orc \
- port:py27-gobject3 \
port:tiff \
port:zlib
@@ -48,9 +47,35 @@
gobject_introspection yes
-configure.env PKG_CONFIG_PATH='${frameworks_dir}/Python.framework/Versions/2.7/lib/pkgconfig'
-configure.args --enable-gtk-doc
+configure.args --enable-gtk-doc \
+ --disable-pyvips8 \
+ --without-python
+proc install_pygi {pyver} {
+ global destroot frameworks_dir prefix worksrcpath
+ set destdir ${destroot}${frameworks_dir}/Python.framework/Versions/${pyver}/lib/python${pyver}/site-packages/gi/overrides
+ xinstall -d ${destdir}
+ xinstall ${worksrcpath}/python/Vips.py ${destdir}
+ system "${prefix}/bin/python${pyver} -m compileall ${destdir}"
+}
+variant python27 description {Install Python 2.7 interface} {
+ depends_lib-append port:py27-gobject3
+ post-destroot {
+ install_pygi 2.7
+ }
+ # Include vips7 legacy API
+ configure.args-delete --without-python
+ configure.args-append am_cv_python_pyexecdir='${frameworks_dir}/Python.framework/Versions/2.7/lib/python2.7/site-packages'
+ configure.env-append PYTHON='${prefix}/bin/python2.7'
+}
+variant python34 description {Install Python 3.4 interface} {
+ depends_lib-append port:py34-gobject3
+ post-destroot {
+ install_pygi 3.4
+ }
+}
+default_variants +python27 +python34
+
livecheck.type regex
livecheck.url ${homepage}/supported/current/
livecheck.regex >${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}<
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150519/4bb0243a/attachment.html>
More information about the macports-changes
mailing list