Ticket #45401: Portfile

File Portfile, 3.9 KB (added by josh.baraban@…, 9 years ago)

Modified Portfile

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 123654 2014-08-12 05:49:50Z jmr@macports.org $
3
4PortSystem          1.0
5PortGroup           python 1.0
6PortGroup           active_variants 1.1
7
8name                pymol
9version             1.7.1.1
10revision            1
11categories          science chemistry
12license             GPL
13maintainers         bromo.med.uc.edu:howarth
14description         Molecular graphics system
15long_description    PyMOL is a molecular graphics system with an embedded Python interpreter \
16                    designed for real-time visualization and rapid generation of high-quality \
17                    molecular graphics images and animations.
18
19platforms           darwin
20
21homepage            http://www.pymol.org/
22
23master_sites        sourceforge
24fetch.type          svn
25svn.url             https://svn.code.sf.net/p/pymol/code/trunk/pymol
26svn.revision        4074
27worksrcdir          pymol
28
29python.default_version 27
30
31depends_lib-append  port:freeglut \
32                    port:freetype \
33                    port:glew \
34                    port:libpng \
35                    port:mesa \
36                    port:py${python.version}-numpy \
37                    port:py${python.version}-pmw \
38                    port:py${python.version}-scipy \
39                    port:py${python.version}-tkinter
40depends_run         port:xdpyinfo
41
42# py-scipy is not universal
43universal_variant   no
44
45patchfiles          setup_py.diff \
46                    pymol_shell.diff \
47                    pmg_tk_platform.patch \
48                    apbs-psize.patch \
49                    apbs_tkinter.patch \
50                    pymol-clang.diff 
51
52require_active_variants tcl "" corefoundation
53require_active_variants tk "" quartz
54
55post-patch {
56    reinplace  "s|@PREFIX@|${prefix}|g" ${worksrcpath}/setup.py
57    reinplace  "s|@@PYTHON_PKGDIR@@|${python.pkgd}|g" ${worksrcpath}/setup/pymol_macports
58    reinplace  "s|@@PYTHON_BINARY@@|${python.bin}|g" ${worksrcpath}/setup/pymol_macports
59    reinplace  "s|\"-O3\",|\"-O3\", \"-g\",|g" ${worksrcpath}/setup.py
60}
61
62use_parallel_build yes
63
64variant gcc43 description conflicts gcc44 gcc45 gcc46 gcc47 gcc48 gcc49 description {build using macports-gcc-4.3} {
65    python.add_archflags    no
66    configure.compiler      macports-gcc-4.3
67}
68
69variant gcc44 description conflicts gcc43 gcc45 gcc46 gcc47 gcc48 gcc49 description {build using macports-gcc-4.4} {
70    python.add_archflags    no
71    configure.compiler      macports-gcc-4.4
72}
73
74variant gcc45 description conflicts gcc43 gcc44 gcc46 gcc47 gcc48 gcc49 description {build using macports-gcc-4.5} {
75    python.add_archflags    no
76    configure.compiler      macports-gcc-4.5
77}
78
79variant gcc46 description conflicts gcc43 gcc44 gcc45 gcc47 gcc48 gcc49 description {build using macports-gcc-4.6} {
80    python.add_archflags    no
81    configure.compiler      macports-gcc-4.6
82}
83
84variant gcc47 description conflicts gcc43 gcc44 gcc45 gcc46 gcc48 gcc49 description {build using macports-gcc-4.7} {
85    python.add_archflags    no
86    configure.compiler      macports-gcc-4.7
87}
88
89variant gcc48 description conflicts gcc43 gcc44 gcc45 gcc46 gcc47 gcc49 description {build using macports-gcc-4.8} {
90    python.add_archflags    no
91    configure.compiler      macports-gcc-4.8
92}
93
94variant gcc49 description conflicts gcc43 gcc44 gcc45 gcc46 gcc47 gcc48 description {build using macports-gcc-4.9} {
95    python.add_archflags    no
96    configure.compiler      macports-gcc-4.9
97}
98
99build {}
100
101pre-destroot {
102    destroot.env CC="${configure.cc}" CXX="${configure.cxx}"
103}
104
105post-destroot {
106#     file copy ${worksrcpath}/setup/pymol_macports ${destroot}${prefix}/bin/pymol
107#     file attributes ${destroot}${prefix}/bin/pymol -permissions a+x
108     foreach d {data modules examples test scripts} {
109        copy ${worksrcpath}/${d} ${destroot}${python.pkgd}/pymol
110    }
111}