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 145074 2016-01-25 16:02:22Z dstrubbe@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup python 1.0 |
---|
6 | PortGroup active_variants 1.1 |
---|
7 | PortGroup compilers 1.0 |
---|
8 | |
---|
9 | name py-pymol |
---|
10 | version 1.8.1.0 |
---|
11 | revision 1 |
---|
12 | categories science chemistry |
---|
13 | license PSF |
---|
14 | maintainers gmail.com:howarth.at.macports openmaintainer |
---|
15 | description Molecular graphics system |
---|
16 | long_description PyMOL is a molecular graphics system with an embedded Python interpreter \ |
---|
17 | designed for real-time visualization and rapid generation of high-quality \ |
---|
18 | molecular graphics images and animations. |
---|
19 | |
---|
20 | platforms darwin |
---|
21 | |
---|
22 | homepage http://www.pymol.org/ |
---|
23 | |
---|
24 | master_sites sourceforge |
---|
25 | fetch.type svn |
---|
26 | svn.url https://svn.code.sf.net/p/pymol/code/trunk/pymol |
---|
27 | svn.revision 4150 |
---|
28 | worksrcdir pymol |
---|
29 | |
---|
30 | compilers.choose cc cxx |
---|
31 | compilers.setup |
---|
32 | |
---|
33 | python.default_version 27 |
---|
34 | python.versions 27 33 34 35 |
---|
35 | python.link_binaries no |
---|
36 | |
---|
37 | if {${name} ne ${subport}} { |
---|
38 | depends_lib-append port:freeglut \ |
---|
39 | port:freetype \ |
---|
40 | port:glew \ |
---|
41 | port:libpng \ |
---|
42 | port:libGLU \ |
---|
43 | port:mesa \ |
---|
44 | port:py${python.version}-numpy \ |
---|
45 | port:py${python.version}-scipy \ |
---|
46 | port:py${python.version}-tkinter \ |
---|
47 | port:tcl \ |
---|
48 | port:tk |
---|
49 | if {${python.version} == 27} { |
---|
50 | depends_lib-append port:py${python.version}-pmw |
---|
51 | } else { |
---|
52 | depends_lib-append port:py${python.version}-pmw2 |
---|
53 | } |
---|
54 | |
---|
55 | depends_run port:xdpyinfo |
---|
56 | |
---|
57 | # py-scipy is not universal |
---|
58 | universal_variant no |
---|
59 | |
---|
60 | patchfiles pymol_shell.diff \ |
---|
61 | pmg_tk_platform.patch \ |
---|
62 | apbs-psize.patch |
---|
63 | |
---|
64 | if {${os.platform} eq "darwin" && ${os.major} >= 12} { |
---|
65 | patchfiles-append pymol-use-glkit.diff |
---|
66 | } |
---|
67 | |
---|
68 | require_active_variants tcl "" corefoundation |
---|
69 | require_active_variants tk "" quartz |
---|
70 | |
---|
71 | post-patch { |
---|
72 | reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/setup.py |
---|
73 | reinplace "s|@@PYTHON_PKGDIR@@|${python.pkgd}|g" ${worksrcpath}/setup/pymol_macports |
---|
74 | reinplace "s|@@PYTHON_BINARY@@|${python.bin}|g" ${worksrcpath}/setup/pymol_macports |
---|
75 | reinplace "s|\"-O3\",|\"-O3\", \"-g\",|g" ${worksrcpath}/setup.py |
---|
76 | reinplace "s|cxx + \' \' + cxxflags|\'${configure.cxx} \' + cxxflags|g" ${worksrcpath}/monkeypatch_distutils.py |
---|
77 | } |
---|
78 | |
---|
79 | use_parallel_build yes |
---|
80 | |
---|
81 | build {} |
---|
82 | |
---|
83 | pre-destroot { |
---|
84 | destroot.env CC="${configure.cc}" CXX="${configure.cxx}" PREFIX_PATH="${prefix}" |
---|
85 | } |
---|
86 | |
---|
87 | post-destroot { |
---|
88 | file copy ${worksrcpath}/setup/pymol_macports ${destroot}${prefix}/bin/pymol |
---|
89 | file attributes ${destroot}${prefix}/bin/pymol -permissions a+x |
---|
90 | foreach d {data modules examples test scripts} { |
---|
91 | copy ${worksrcpath}/${d} ${destroot}${python.pkgd}/pymol |
---|
92 | } |
---|
93 | } |
---|
94 | } |
---|