Ticket #46274: py-libdnet.diff

File py-libdnet.diff, 2.2 KB (added by jmroot (Joshua Root), 9 years ago)
  • Portfile

     
    22
    33PortSystem              1.0
    44
    5 set python.bin  ${prefix}/bin/python2.4
    6 
    75name                    py-libdnet
    86version                 1.12
    97categories              python net
    10 maintainers             consault.com:chris.owen
     8license                 BSD
     9maintainers             nzbox.com:msavory consault.com:chris.owen
    1110platforms               darwin
    1211
    1312description             A python module for the libdnet low-level networking library.
     
    2827                        sha1    71302be302e84fc19b559e811951b5d600d976f8 \
    2928                        rmd160  4b849f07c3513522fda65af067928b7e6d504aab
    3029
    31 depends_lib             port:python24 port:libdnet
     30subport py27-libdnet {
     31    set python.bin      ${prefix}/bin/python2.7
     32    set python.prefix  ${frameworks_dir}/Python.framework/Versions/2.7
     33    depends_lib-append  port:python27
     34}
     35subport py26-libdnet {
     36    set python.bin      ${prefix}/bin/python2.6
     37    set python.prefix  ${frameworks_dir}/Python.framework/Versions/2.6
     38    depends_lib-append  port:python26
     39}
    3240
    33 # libdnet is not universal
    34 universal_variant       no
     41if {$subport ne $name} {
     42    depends_lib-append          port:libdnet
    3543
    36 pre-destroot {
    37         worksrcdir      ${worksrcdir}/python
     44    # libdnet is not universal
     45    universal_variant       no
     46
     47    pre-destroot {
     48        worksrcdir      ${worksrcdir}/python
     49    }
     50    destroot.cmd                ${python.bin} setup.py --no-user-cfg install
     51    destroot.destdir    --prefix=${python.prefix} --root=${destroot}
     52    livecheck.type  none
     53} else {
     54    livecheck.regex "libdnet-(\\d+(?:\\.\\d+)*)${extract.suffix}"
     55
     56    # py-libdnet was previously for python 2.4
     57    revision            1
     58    replaced_by         py27-libdnet
     59    depends_lib         port:py27-libdnet
     60    supported_archs     noarch
     61    use_configure       no
     62    build               {}
     63    destroot {
     64        xinstall -d ${destroot}${prefix}/share/doc/${name}
     65        system "echo This port is a stub. > ${destroot}${prefix}/share/doc/${name}/README"
     66    }
    3867}
    39 destroot.cmd            ${python.bin} setup.py
    40 destroot.destdir        --prefix=${prefix} --root=${destroot}