source: trunk/dports/science/pymol/Portfile

Last change on this file was 152330, checked in by ryandesign@…, 13 months ago

pymol: update to 1.8.3.2 (#52168; maintainer)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.2 KB
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 152330 2016-09-04 01:50:40Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           python 1.0
6PortGroup           active_variants 1.1
7PortGroup           compilers 1.0
8
9name                pymol
10version             1.8.3.2
11categories          science chemistry
12license             PSF
13maintainers         gmail.com:howarth.at.macports openmaintainer
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        4160
27worksrcdir          pymol
28
29compilers.choose    cc cxx
30compilers.setup
31
32variant python27 conflicts python34 python35 description {Use Python 2.7} {}
33variant python34 conflicts python27 python35 description {Use Python 3.4} {}
34variant python35 conflicts python27 python34 description {Use Python 3.5} {}
35if {[variant_isset python34]} {
36    python.default_version 34
37} elseif {[variant_isset python35]} {
38    python.default_version 35
39} else {
40    default_variants +python27
41    python.default_version 27
42}
43python.link_binaries no
44
45depends_lib-append  port:freeglut \
46                    port:freetype \
47                    port:glew \
48                    port:libpng \
49                    port:libGLU \
50                    port:mesa \
51                    port:py${python.version}-numpy \
52                    port:py${python.version}-pmw \
53                    port:py${python.version}-scipy \
54                    port:py${python.version}-tkinter \
55                    port:tcl \
56                    port:tk
57depends_run         port:xdpyinfo
58
59# py-scipy is not universal
60universal_variant   no
61
62patchfiles          pymol_shell.diff \
63                    pmg_tk_platform.patch \
64                    apbs-psize.patch 
65
66if {${os.platform} eq "darwin" && ${os.major} >= 12} {
67    patchfiles-append pymol-use-glkit.diff
68}
69
70require_active_variants tcl "" corefoundation
71require_active_variants tk "" quartz
72
73post-patch {
74    reinplace  "s|@PREFIX@|${prefix}|g" ${worksrcpath}/setup.py
75    reinplace  "s|@@PYTHON_PKGDIR@@|${python.pkgd}|g" ${worksrcpath}/setup/pymol_macports
76    reinplace  "s|@@PYTHON_BINARY@@|${python.bin}|g" ${worksrcpath}/setup/pymol_macports
77    reinplace  "s|\"-O3\",|\"-O3\", \"-g\",|g" ${worksrcpath}/setup.py
78    reinplace  "s|cxx + \' \' + cxxflags|\'${configure.cxx} \' + cxxflags|g" ${worksrcpath}/monkeypatch_distutils.py
79}
80
81use_parallel_build yes
82
83build {}
84
85pre-destroot {
86    destroot.env CC="${configure.cc}" CXX="${configure.cxx}" PREFIX_PATH="${prefix}"
87}
88
89post-destroot {
90     file copy ${worksrcpath}/setup/pymol_macports ${destroot}${prefix}/bin/pymol
91     file attributes ${destroot}${prefix}/bin/pymol -permissions a+x
92     foreach d {data modules examples test scripts} {
93        copy ${worksrcpath}/${d} ${destroot}${python.pkgd}/pymol
94    }
95}
Note: See TracBrowser for help on using the repository browser.