[42938] trunk/dports/python

mcalhoun at macports.org mcalhoun at macports.org
Tue Dec 2 12:09:57 PST 2008


Revision: 42938
          http://trac.macports.org/changeset/42938
Author:   mcalhoun at macports.org
Date:     2008-12-02 12:09:57 -0800 (Tue, 02 Dec 2008)
Log Message:
-----------
py26-openssl: new port

Added Paths:
-----------
    trunk/dports/python/py26-openssl/
    trunk/dports/python/py26-openssl/Portfile

Added: trunk/dports/python/py26-openssl/Portfile
===================================================================
--- trunk/dports/python/py26-openssl/Portfile	                        (rev 0)
+++ trunk/dports/python/py26-openssl/Portfile	2008-12-02 20:09:57 UTC (rev 42938)
@@ -0,0 +1,100 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
+# $Id: Portfile 493 2008-12-02 05:50:20Z macports $
+
+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-openssl
+version                 0.8
+categories              python devel security
+maintainers             mcalhoun openmaintainer
+platforms               darwin freebsd
+description             python wrapper around the OpenSSL library
+long_description        This python module is a rather thin wrapper around (a \
+                                subset of) the OpenSSL library. With thin wrapper a lot of the \
+                                object methods do nothing more than calling a corresponding \
+                                function in the OpenSSL library.
+
+homepage                http://pyopenssl.sourceforge.net/
+master_sites            sourceforge:pyopenssl
+distname                pyOpenSSL-${version}
+
+checksums \
+    md5     00377690f224d9e59c833fb0459603f4 \
+    sha1    50f4214dc18d8b90b9c6a7f50d6c004edad997eb \
+    rmd160  daacaab96c45aadca25f8aa39238a12d1907ddaa
+
+depends_lib-append port:openssl
+
+post-patch {
+    reinplace "s|/sw/|${prefix}/|g" ${worksrcpath}/setup.py
+    reinplace "s|#!/usr/bin/env python|#!${prefix}/bin/python2.6|g" ${worksrcpath}/examples/proxy.py
+}
+
+post-destroot {
+    xinstall -m 644 -W ${worksrcpath} \
+        COPYING ChangeLog INSTALL README TODO \
+        ${destroot}${prefix}/share/doc/${name}
+    
+    file delete ${destroot}${prefix}/share/doc/${name}/examples
+    file copy ${worksrcpath}/examples ${destroot}${prefix}/share/doc/${name}
+}
+
+variant doc {
+    depends_build-append port:latex2hml
+    
+    post-patch {
+        # Ensure that the correct binaries are used.
+        # Some are not actually invoked because only the html documentation is created.
+        foreach bin {bibtex dvips latex latex2html lynx makeindex pdflatex perl python} {
+            reinplace "s| = \"${bin}\"| = \"${prefix}/bin/${bin}\"|g" ${worksrcpath}/doc/tools/mkhowto
+        }
+        
+        # Ensure that the correct python is used.
+        reinplace "s|${prefix}/bin/python|${prefix}/bin/python2.6|g" ${worksrcpath}/doc/tools/mkhowto
+        reinplace "s| python | ${prefix}/bin/python2.6 |g" ${worksrcpath}/doc/Makefile
+    }
+    
+    post-build {
+        system "cd ${worksrcpath}/doc && /usr/bin/make html"
+    }
+    
+    post-destroot {
+        file copy ${worksrcpath}/doc/html ${destroot}${prefix}/share/doc/${name}
+    }
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081202/b2e81038/attachment.html>


More information about the macports-changes mailing list