Ticket #56139: Portfile.diff

File Portfile.diff, 3.5 KB (added by jwhowarth, 7 years ago)

Portfile diff for support of PyQt interface in pymol

  • Portfile

    old new  
    66PortGroup           compilers 1.0
    77
    88name                pymol
    9 version             1.8.7.0
     9version             2.1.0
    1010categories          science chemistry
    1111license             PSF
    1212maintainers         {gmail.com:howarth.at.macports @jwhowarth} openmaintainer
     
    2222master_sites        sourceforge
    2323fetch.type          svn
    2424svn.url             http://svn.code.sf.net/p/pymol/code/trunk/pymol
    25 svn.revision        4176
     25svn.revision        4187
    2626worksrcdir          pymol
    2727
    2828compilers.choose    cc cxx
    2929compilers.setup
    3030
    31 variant python27 conflicts python34 python35 description {Use Python 2.7} {}
    32 variant python34 conflicts python27 python35 description {Use Python 3.4} {}
    33 variant python35 conflicts python27 python34 description {Use Python 3.5} {}
     31variant python27 conflicts python34 python35 python36 description {Use Python 2.7} {}
     32variant python34 conflicts python27 python35 python36 description {Use Python 3.4} {}
     33variant python35 conflicts python27 python34 python36 description {Use Python 3.5} {}
     34variant python36 conflicts python27 python34 python35 description {Use Python 3.5} {}
     35
    3436if {[variant_isset python34]} {
    3537    python.default_version 34
    3638} elseif {[variant_isset python35]} {
    3739    python.default_version 35
     40} elseif {[variant_isset python36]} {
     41    python.default_version 36
    3842} else {
    3943    default_variants +python27
    4044    python.default_version 27
     
    5054                    port:msgpack1 \
    5155                    port:py${python.version}-numpy \
    5256                    port:py${python.version}-pmw \
     57                    port:py${python.version}-pyqt5 \
    5358                    port:py${python.version}-scipy \
    5459                    port:py${python.version}-tkinter \
    5560                    port:tcl \
     
    6166
    6267patchfiles          pymol_shell.diff \
    6368                    pmg_tk_platform.patch \
    64                     apbs-psize.patch
    65 
    66 if {${os.platform} eq "darwin" && ${os.major} >= 12} {
    67     patchfiles-append pymol-use-glkit.diff
    68 }
     69                    apbs-psize.patch  \
     70                    pdb2pqr.patch
    6971
    7072require_active_variants tcl "" corefoundation
    7173require_active_variants tk "" quartz
    7274
    7375post-patch {
    74     reinplace  "s|@PREFIX@|${prefix}|g" ${worksrcpath}/setup.py
     76    reinplace  "s|@PREFIX@|${prefix}|g" ${worksrcpath}/setup.py ${worksrcpath}/modules/pmg_tk/startup/apbs_tools.py
    7577    reinplace  "s|@@PYTHON_PKGDIR@@|${python.pkgd}|g" ${worksrcpath}/setup/pymol_macports
    7678    reinplace  "s|@@PYTHON_BINARY@@|${python.bin}|g" ${worksrcpath}/setup/pymol_macports
    7779    reinplace  "s|\"-O3\",|\"-O3\", \"-g\",|g" ${worksrcpath}/setup.py
     
    8284
    8385build {}
    8486
     87destroot.cmd ${python.bin} setup.py --no-user-cfg --osx-frameworks
     88
    8589pre-destroot {
    8690    destroot.env CC="${configure.cc}" CXX="${configure.cxx}" PREFIX_PATH="${prefix}"
    8791}
     
    8993post-destroot {
    9094     file copy ${worksrcpath}/setup/pymol_macports ${destroot}${prefix}/bin/pymol
    9195     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     }
    9596}
     97
     98test.run            yes
     99test.cmd            cd test && ${python.bin}
     100test.target         run
     101
     102notes "Pymol can be started with the classic Tk GUI by appending the '-N pmg_tk' runtime option."
     103
     104livecheck.type  regex
     105livecheck.url   ${svn.url}
     106livecheck.version  ${svn.revision}
     107livecheck.regex {Revision (\d+):}