[45086] trunk/dports/print/pdflib/Portfile

mcalhoun at macports.org mcalhoun at macports.org
Thu Jan 8 02:52:45 PST 2009


Revision: 45086
          http://trac.macports.org/changeset/45086
Author:   mcalhoun at macports.org
Date:     2009-01-08 02:52:45 -0800 (Thu, 08 Jan 2009)
Log Message:
-----------
pdflib: Fix python24 and pthon25 variants.
Add python26 variant.
Add test.run.

Modified Paths:
--------------
    trunk/dports/print/pdflib/Portfile

Modified: trunk/dports/print/pdflib/Portfile
===================================================================
--- trunk/dports/print/pdflib/Portfile	2009-01-08 10:52:27 UTC (rev 45085)
+++ trunk/dports/print/pdflib/Portfile	2009-01-08 10:52:45 UTC (rev 45086)
@@ -25,6 +25,8 @@
 
 depends_build   port:libtool
 
+test.run        yes
+
 configure.args	--without-java --without-perl --without-py --without-tcl --without-ruby
 configure.ccache        no
 
@@ -49,22 +51,55 @@
 	configure.args-append	--with-perl=${prefix}/bin/perl
 }
 
-variant python24 description {Enable Python language binding using vervion 2.4} conflicts python25 {
+variant python24 description {Enable Python language binding using vervion 2.4} conflicts python25 python26 {
 	set pyversion           2.4
 	depends_lib-append			port:python[strsed ${pyversion} {g/[.]//}]
 	configure.args-delete	--without-py
 	configure.args-append	--with-py=${prefix} --with-pyincl=${prefix}/include/python${pyversion}
 	configure.env-append	PYTHONBIN=${prefix}/bin/python${pyversion}
+
+	post-destroot {
+		# Python requires .so extension
+		ln -s pdflib_py.dylib ${destroot}${frameworks_dir}/Python.framework/Versions/2.4/lib/python2.4/pdflib_py.so
+		# ${frameworks_dir}/Python.framework/Versions/2.4/lib/python2.4/ is a link, which MacPorts can not install into
+		xinstall -d -m 755 ${destroot}${prefix}/lib/python2.4/
+		foreach file [ glob ${destroot}${frameworks_dir}/Python.framework/Versions/2.4/lib/python2.4/* ] {
+			file rename ${file} ${destroot}${prefix}/lib/python2.4/
+		}
+	}
 }
 
-variant python25 description {Enable Python language binding using vervion 2.5} conflicts python24 {
+variant python25 description {Enable Python language binding using vervion 2.5} conflicts python24 python26 {
 	set pyversion           2.5
 	depends_lib-append			port:python[strsed ${pyversion} {g/[.]//}]
 	configure.args-delete	--without-py
 	configure.args-append	--with-py=${prefix} --with-pyincl=${prefix}/include/python${pyversion}
 	configure.env-append	PYTHONBIN=${prefix}/bin/python${pyversion}
+
+	post-destroot {
+		# Python requires .so extension
+		ln -s pdflib_py.dylib ${destroot}${frameworks_dir}/Python.framework/Versions/2.5/lib/python2.5/pdflib_py.so
+		# ${frameworks_dir}/Python.framework/Versions/2.5/lib/python2.5/ is a link, which MacPorts can not install into
+		xinstall -d -m 755 ${destroot}${prefix}/lib/python2.5/
+		foreach file [ glob ${destroot}${frameworks_dir}/Python.framework/Versions/2.5/lib/python2.5/* ] {
+			file rename ${file} ${destroot}${prefix}/lib/python2.5/
+		}
+	}
 }
 
+variant python26 description {Enable Python language binding using vervion 2.6} conflicts python24 python25 {
+	set pyversion           2.6
+	depends_lib-append			port:python[strsed ${pyversion} {g/[.]//}]
+	configure.args-delete	--without-py
+	configure.args-append	--with-py=${frameworks_dir}/Python.framework/Versions/${pyversion}
+	configure.env-append	PYTHONBIN=${prefix}/bin/python${pyversion}
+
+	post-destroot {
+		# Python requires .so extension
+		ln -s pdflib_py.dylib ${destroot}${frameworks_dir}/Python.framework/Versions/2.6/lib/python2.6/pdflib_py.so
+	}
+}
+
 variant tcl description {Enable Tcl language binding} {
 	depends_lib-append			path:bin/tclsh:tcl
 	configure.args-delete	--without-tcl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090108/0323d367/attachment.html>


More information about the macports-changes mailing list