[43104] trunk/dports/python

mcalhoun at macports.org mcalhoun at macports.org
Fri Dec 5 00:20:24 PST 2008


Revision: 43104
          http://trac.macports.org/changeset/43104
Author:   mcalhoun at macports.org
Date:     2008-12-05 00:20:24 -0800 (Fri, 05 Dec 2008)
Log Message:
-----------
py26-libxml2: New Port

Added Paths:
-----------
    trunk/dports/python/py26-libxml2/
    trunk/dports/python/py26-libxml2/Portfile
    trunk/dports/python/py26-libxml2/files/
    trunk/dports/python/py26-libxml2/files/patch-setup.py.diff

Added: trunk/dports/python/py26-libxml2/Portfile
===================================================================
--- trunk/dports/python/py26-libxml2/Portfile	                        (rev 0)
+++ trunk/dports/python/py26-libxml2/Portfile	2008-12-05 08:20:24 UTC (rev 43104)
@@ -0,0 +1,78 @@
+# -*- Mode: Tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem 1.0
+
+#######################################################################################################
+# PortGroup python26 1.0
+#######################################################################################################
+# Can be removed once MacPorts 1.7.0 is released
+if {![info exists frameworks_dir]} {
+    set frameworks_dir ${prefix}/Library/Frameworks
+}
+
+set python.bin	    ${prefix}/bin/python2.6
+set python.lib	    ${frameworks_dir}/Python.framework/Versions/2.6/Python
+set python.pkgd	    ${frameworks_dir}/Python.framework/Versions/2.6/lib/python2.6/site-packages
+set python.bindir	${frameworks_dir}/Python.framework/Versions/2.6/bin
+set python.include	${frameworks_dir}/Python.framework/Versions/2.6/include/python2.6
+
+categories		python
+
+dist_subdir		python
+
+depends_lib		port:python26
+
+use_configure	no
+
+build.cmd		${python.bin} setup.py --no-user-cfg
+build.target	build
+
+destroot.cmd	           ${python.bin} setup.py --no-user-cfg
+destroot.destdir	       --prefix=${frameworks_dir}/Python.framework/Versions/2.6 --root=${destroot}
+configure.pkg_config_path  ${frameworks_dir}/Python.framework/Versions/2.6/lib/pkgconfig
+
+set env(PATH) "${python.bindir}:$env(PATH)"
+
+pre-destroot	{
+	xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}/examples
+}
+#######################################################################################################
+
+name                    py26-libxml2
+version                 2.6.21
+categories              python textproc
+platforms               darwin
+maintainers             mcalhoun openmaintainer
+description             Python bindings for libxml2
+long_description        ${description}
+
+homepage                http://xmlsoft.org/python.html
+master_sites            ftp://xmlsoft.org/libxml2/python/
+distname                libxml2-python-${version}
+
+checksums               md5 229dd2b3d110a77defeeaa73af83f7f3 \
+                        sha1 2d395e8a5e9accd68f4e78ac2391431ef884e9d5 \
+                        rmd160 d4973576c33e0e65c4fc41b31ee3df5f803abfad
+
+patchfiles              patch-setup.py.diff
+
+depends_lib-append      port:libxml2 \
+                        port:zlib
+
+build.env               LDFLAGS=-L${prefix}/lib
+
+post-patch {
+  reinplace "s|@PREFIX@|$prefix|" ${worksrcpath}/setup.py
+}
+
+post-destroot {
+  set docdir ${prefix}/share/doc/${name}-${version}
+  xinstall -d ${destroot}${docdir}
+  xinstall -m 0644 -W ${worksrcpath} README TODO \
+    ${destroot}${docdir}
+}
+
+livecheck.check         md5
+livecheck.url           ftp://xmlsoft.org/libxml2/python/
+livecheck.md5           a2cc31311f1b3fb52a08cf1056efda11

Added: trunk/dports/python/py26-libxml2/files/patch-setup.py.diff
===================================================================
--- trunk/dports/python/py26-libxml2/files/patch-setup.py.diff	                        (rev 0)
+++ trunk/dports/python/py26-libxml2/files/patch-setup.py.diff	2008-12-05 08:20:24 UTC (rev 43104)
@@ -0,0 +1,57 @@
+--- setup.py.orig	2007-10-11 15:24:20.000000000 +0200
++++ setup.py	2007-10-11 15:24:54.000000000 +0200
+@@ -56,11 +56,7 @@
+ # - iconv.h 
+ # - libxslt/xsltconfig.h
+ includes_dir = [
+-"/usr/include",
+-"/usr/local/include",
+-"/opt/include",
+-os.path.join(ROOT,'include'),
+-HOME
++"@PREFIX@/include",
+ ];
+ 
+ xml_includes=""
+@@ -85,7 +81,7 @@
+ 
+ # those are added in the linker search path for libraries
+ libdirs = [
+-os.path.join(ROOT,'lib'),
++"@PREFIX@/lib"
+ ]
+ 
+ xml_files = ["libxml2-api.xml", "libxml2-python-api.xml",
+@@ -122,32 +118,6 @@
+     result.close()
+ 
+ with_xslt=0
+-if missing("libxslt-py.c") or missing("libxslt.py"):
+-    if missing("xsltgenerator.py") or missing("libxslt-api.xml"):
+-        print "libxslt stub generator not found, libxslt not built"
+-    else:
+-	try:
+-	    import xsltgenerator
+-	except:
+-	    print "failed to generate stubs for libxslt, aborting ..."
+-	    print sys.exc_type, sys.exc_value
+-	else:
+-	    head = open("libxsl.py", "r")
+-	    generated = open("libxsltclass.py", "r")
+-	    result = open("libxslt.py", "w")
+-	    for line in head.readlines():
+-                if WITHDLLS:
+-                    result.write(altImport(line))
+-                else:
+-                    result.write(line)
+-	    for line in generated.readlines():
+-		result.write(line)
+-	    head.close()
+-	    generated.close()
+-	    result.close()
+-	    with_xslt=1
+-else:
+-    with_xslt=1
+ 
+ if with_xslt == 1:
+     xslt_includes=""
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081205/d2afc87e/attachment-0001.html>


More information about the macports-changes mailing list