source: trunk/dports/python/py-openssl/Portfile @ 125566

Last change on this file since 125566 was 125566, checked in by petr@…, 5 years ago

py-openssl @0.13: update to @0.14, add py34 subport, remove py24 and py25 subport, closes #44646;

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.9 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 125566 2014-09-21 12:26:53Z petr@macports.org $
3
4PortSystem          1.0
5PortGroup python    1.0
6
7name                py-openssl
8version             0.14
9categories-append   devel security
10license             Apache-2
11maintainers         mcalhoun openmaintainer
12platforms           darwin freebsd
13
14description         python wrapper around the OpenSSL library
15long_description    \
16    This python module is a rather thin wrapper around (a subset of) the \
17    OpenSSL library. With thin wrapper a lot of the object methods do \
18    nothing more than calling a corresponding function in the OpenSSL library.
19
20homepage            https://github.com/pyca/pyopenssl
21master_sites        http://pypi.python.org/packages/source/p/pyOpenSSL/
22distname            pyOpenSSL-${version}
23
24checksums           md5     8579ff3a1d858858acfba5f046a4ddf7 \
25                    sha1    eb51f23f29703b647b0f194beaa9b2412c05e0f6 \
26                    rmd160  19169cb1d5969a130173174e1fdd90311bd35fc7
27
28python.versions     26 27 33 34
29
30if {${name} ne ${subport}} {
31    depends_build-append    port:py${python.version}-setuptools
32
33    depends_lib-append      port:openssl \
34                            port:py${python.version}-cryptography \
35                            port:py${python.version}-six
36
37    post-patch {
38        reinplace "s|#!/usr/bin/env python|#!${python.bin}|" ${worksrcpath}/examples/proxy.py
39    }
40
41    post-destroot {
42        xinstall -m 644 -W ${worksrcpath} \
43            ChangeLog \
44            INSTALL \
45            LICENSE \
46            README \
47            TODO \
48                ${destroot}${prefix}/share/doc/${subport}
49
50        file delete ${destroot}${prefix}/share/doc/${subport}/examples
51        file copy ${worksrcpath}/examples ${destroot}${prefix}/share/doc/${subport}
52    }
53
54    variant doc description {build html documentation} {
55        depends_build-append port:latex2html
56
57        post-patch {
58            # Ensure that the correct binaries are used.
59            # Some are not actually invoked because only the html documentation is created.
60            foreach bin {bibtex dvips latex latex2html lynx makeindex pdflatex perl python} {
61                reinplace "s| = \"${bin}\"| = \"${prefix}/bin/${bin}\"|" ${worksrcpath}/doc/tools/mkhowto
62            }
63
64            # Ensure that the correct python is used.
65            reinplace "s|${prefix}/bin/python|${python.bin}|" ${worksrcpath}/doc/tools/mkhowto
66            reinplace "s| python | ${python.bin} |" ${worksrcpath}/doc/Makefile
67        }
68
69        post-build {
70            system "cd ${worksrcpath}/doc && /usr/bin/make html"
71        }
72
73        post-destroot {
74            file copy ${worksrcpath}/doc/html ${destroot}${prefix}/share/doc/${subport}
75        }
76    }
77
78    livecheck.type      none
79} else {
80    livecheck.type      regex
81    livecheck.url       ${master_sites}
82    livecheck.regex     "pyOpenSSL-(\\d+(?:\\.\\d+)*)${extract.suffix}"
83}
Note: See TracBrowser for help on using the repository browser.