1 | # -*- 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 |
---|
2 | # $Id: Portfile 69761 2010-07-15 20:43:03Z michaelld@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name py26-sip |
---|
7 | version 4.11 |
---|
8 | categories python devel |
---|
9 | maintainers mcalhoun openmaintainer |
---|
10 | platforms macosx |
---|
11 | |
---|
12 | description create Python bindings for C and C++ libraries |
---|
13 | long_description \ |
---|
14 | SIP is a tool that makes it very easy to create \ |
---|
15 | Python bindings for C and C++ libraries. \ |
---|
16 | It was originally developed to create PyQt, \ |
---|
17 | the Python bindings for the Qt toolkit, \ |
---|
18 | but can be used to create bindings for any \ |
---|
19 | C or C++ library. |
---|
20 | |
---|
21 | homepage http://www.riverbankcomputing.co.uk/software/sip/intro |
---|
22 | master_sites \ |
---|
23 | http://www.riverbankcomputing.com/static/Downloads/sip4/ \ |
---|
24 | http://gentoo.mirrors.easynews.com/linux/gentoo/distfiles/ \ |
---|
25 | http://gentoo.osuosl.org/distfiles/ \ |
---|
26 | http://www.gtlib.gatech.edu/pub/gentoo/distfiles/ |
---|
27 | |
---|
28 | distname sip-${version} |
---|
29 | checksums md5 810f0cb0da327e0120fd87b7194ddf7e \ |
---|
30 | sha1 f24e55cf4ebc89986b9e2694e0e516e2c94d6595 \ |
---|
31 | rmd160 7289053c8888df9dba9d0da8a091e89cdb53b680 |
---|
32 | |
---|
33 | dist_subdir python |
---|
34 | |
---|
35 | set pyversion 2.6 |
---|
36 | depends_lib-append port:python[strsed ${pyversion} {g/[.]//}] |
---|
37 | set pybin ${prefix}/bin/python${pyversion} |
---|
38 | |
---|
39 | configure.cmd ${pybin} configure.py |
---|
40 | |
---|
41 | pre-configure { |
---|
42 | # Ensure correct compilers are used |
---|
43 | reinplace "s| cc\$| ${configure.cc}|" \ |
---|
44 | ${worksrcpath}/specs/macx-g++ |
---|
45 | reinplace "s| c++\$| ${configure.cxx}|" \ |
---|
46 | ${worksrcpath}/specs/macx-g++ |
---|
47 | } |
---|
48 | |
---|
49 | # By default, everything gets installed in the Python Frameworks directory |
---|
50 | configure.pre_args-delete --prefix=${prefix} |
---|
51 | |
---|
52 | test.run yes |
---|
53 | test.cmd cd siplib && ${pybin} -c 'import sip' |
---|
54 | |
---|
55 | post-destroot { |
---|
56 | ln -s ${frameworks_dir}/Python.framework/Versions/${pyversion}/bin/sip ${destroot}${prefix}/bin/sip-${pyversion} |
---|
57 | |
---|
58 | # Install documentation |
---|
59 | xinstall -m 755 -d ${destroot}${prefix}/share/doc |
---|
60 | file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name} |
---|
61 | xinstall -m 644 -W ${worksrcpath} LICENSE LICENSE-GPL2 LICENSE-GPL3 NEWS README \ |
---|
62 | ${destroot}${prefix}/share/doc/${name} |
---|
63 | |
---|
64 | system "${prefix}/bin/python${pyversion} ${frameworks_dir}/Python.framework/Versions/${pyversion}/lib/python${pyversion}/compileall.py ${destroot}${prefix}" |
---|
65 | system "${prefix}/bin/python${pyversion} -O ${frameworks_dir}/Python.framework/Versions/${pyversion}/lib/python${pyversion}/compileall.py ${destroot}${prefix}" |
---|
66 | } |
---|
67 | |
---|
68 | livecheck.type regex |
---|
69 | livecheck.url http://www.riverbankcomputing.co.uk/software/sip/download |
---|
70 | livecheck.regex {sip-(\d+(?:\.\d+)*)\.} |
---|