Ticket #40534: Portfile

File Portfile, 2.5 KB (added by petrrr, 11 years ago)

minor change

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$
3
4PortSystem          1.0
5PortGroup           python 1.0
6
7name                py-BitArray2D
8version             2.1
9categories-append   math
10platforms           darwin
11supported_archs     noarch
12
13maintainers         bo.ingv.it:Peter.Danecek openmaintainer
14
15license             PSF
16
17description         A memory-efficient packed representation for 2D bit arrays
18
19long_description    The BitArray2D class is for a memory-efficient packed \
20                    representation of 2D bit arrays and for logical and other \
21                    operations (such as blob dilations, erosions, etc.) on \
22                    such arrays. The implementation of the class takes \
23                    advantage of the facilities of the BitVector class for \
24                    the memory representation and for the allowed operations.
25
26homepage            https://engineering.purdue.edu/kak/dist2d/BitArray2D-2.1.html
27
28distname            BitArray2D-${version}
29master_sites        https://engineering.purdue.edu/kak/dist2d
30
31checksums           md5     24cac608e52df170a5163988b95d9fa3 \
32                    rmd160  6b25f62b9ea8ea7f4d680e31fa210d03574e1173 \
33                    sha256  d0875cb8384a76925981fec18b88bf66927b2dcddea104e954a7874351eb8877
34
35python.versions     26 27 31 32 33 34
36
37if {${subport} ne ${name}} {
38    depends_build-append  port:py${python.version}-setuptools
39
40    depends_lib-append    port:py${python.version}-BitVector
41
42    test.run            yes
43    test.cmd            ${python.bin} TestBitArray2D/Test.py
44    test.target         {}
45
46    # delete redundant files & avoid testing different version
47    pre-patch {
48        eval delete [ glob ${worksrcpath}/*/*.pyc ]            ;# purge *.pyc files
49        eval delete [ glob ${worksrcpath}/*/BitVector.py ]     ;# .
50        eval delete [ glob ${worksrcpath}/*/BitArray2D.py ]    ;# these copies
51
52        # use version installed by dependency instead
53        delete ${worksrcpath}/BitVector.py           
54
55        # create link for testing
56        ln -s ../BitArray2D.py ${worksrcpath}/TestBitArray2D/BitArray2D.py
57    }
58
59    # Adding documentation & examples
60    post-destroot {
61        copy ${worksrcpath}/${distname}.html ${destroot}${prefix}/share/doc/${subport}
62 
63        # Avoid creation of example directory
64        delete  ${destroot}${prefix}/share/doc/${subport}/examples
65        copy ${worksrcpath}/Examples ${destroot}${prefix}/share/doc/${subport}/examples
66    }
67}