source: trunk/dports/science/ccpnmr/Portfile @ 134561

Last change on this file since 134561 was 134561, checked in by jeremyhu@…, 4 years ago

misc: Revbump dependents of freeglut

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.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 134561 2015-03-30 08:46:40Z jeremyhu@macports.org $
3
4PortSystem          1.0
5
6name                ccpnmr
7version             2.4.2
8revision            1
9set branch          [join [lrange [split $version .] 0 1] .]
10categories          science python
11maintainers         gmail.com:howarth.at.macports
12description         CCPNMR
13long_description    The CcpNmr software suite is a series of programs \
14                    for macromolecular NMR spectroscopy integrated with \
15                    the CCP data model. The CCP Data Model for macro- \
16                    molecular NMR is intended to cover all data needed \
17                    for macromolecular NMR spectroscopy from the initial \
18                    experimental data to the final validation.
19platforms           darwin
20homepage            http://www.ccpn.ac.uk/ccpn/software/ccpnmr-suite
21master_sites        http://www2.ccpn.ac.uk/download/ccpnmr/
22distname            analysis${version}
23checksums           rmd160  d87e6bfee8ab3f64790f925eee8fcf6e1efad257 \
24                    sha256  14941131033cbd4b0b13d6d4fe3f9253360a7c2ace8ece9194be00c1fe4b2903
25worksrcdir          ${name}
26depends_lib         port:py27-scipy port:mesa port:libGLU port:freeglut port:tk port:py27-tkinter
27patchfiles          ccpnmr.patch
28use_configure       no
29
30set python.branch       2.7
31set python.prefix       ${frameworks_dir}/Python.framework/Versions/${python.branch}
32set python.bin  ${python.prefix}/bin/python${python.branch}
33set python.pkgd ${python.prefix}/lib/python${python.branch}/site-packages
34set python.libdir ${python.prefix}/lib/python${python.branch}
35set python.include      ${python.prefix}/include/python${python.branch}
36
37set lib ""
38
39post-patch {
40    reinplace  "s|@PYTHON_BIN@|${python.bin}|g"   ${worksrcpath}/bin/analysis \
41                                                  ${worksrcpath}/bin/formatConverter \
42                                                  ${worksrcpath}/bin/pipe2azara \
43                                                  ${worksrcpath}/ccpnmr${branch}/c/environment-opengl.txt \
44                                                  ${worksrcpath}/bin/dataShifter \
45                                                  ${worksrcpath}/bin/updateAll \
46                                                  ${worksrcpath}/bin/updateCheck
47    reinplace  "s|@PYTHON_PKGD@|${python.pkgd}|g" ${worksrcpath}/bin/analysis \
48                                                  ${worksrcpath}/bin/formatConverter \
49                                                  ${worksrcpath}/bin/pipe2azara \
50                                                  ${worksrcpath}/bin/dataShifter \
51                                                  ${worksrcpath}/bin/updateAll \
52                                                  ${worksrcpath}/bin/updateCheck
53    reinplace  "s|@PREFIX@|${prefix}|g" ${worksrcpath}/ccpnmr${branch}/c/environment-opengl.txt
54    reinplace  "s|/usr/X11R6|${prefix}|g" ${worksrcpath}/ccpnmr${branch}/c/environment-opengl.txt
55    reinplace  "s|@PYTHON_INCL@|${python.include}|g" ${worksrcpath}/ccpnmr${branch}/c/environment-opengl.txt
56    reinplace  "s|@CC@|${configure.cc}|g" ${worksrcpath}/ccpnmr${branch}/c/environment-opengl.txt
57    reinplace  "s|@GCCLIB@|${lib}|g" ${worksrcpath}/ccpnmr${branch}/c/environment-opengl.txt
58}
59pre-build {
60    copy ${worksrcpath}/ccpnmr${branch}/c/environment-opengl.txt ${worksrcpath}/ccpnmr${branch}/c/environment.txt
61}
62
63build.args      CC=${configure.cc} ARCHFLAGS="${configure.cc_archflags}"
64build.dir       ${worksrcpath}/ccpnmr${branch}/c
65build.target    all links
66destroot {
67    foreach f {analysis dataShifter formatConverter pipe2azara updateAll updateCheck} {
68        xinstall -m 755 ${worksrcpath}/bin/${f} ${destroot}${prefix}/bin
69    }
70    file mkdir ${destroot}${python.pkgd}/${name}/${name}${branch}/
71    foreach d {c python data model doc} {
72        copy ${worksrcpath}/ccpnmr${branch}/${d} ${destroot}${python.pkgd}/${name}/${name}${branch}
73    }
74    system "echo '${name}/${name}${branch}/python' > ${destroot}${python.pkgd}/${name}.pth"
75    copy ${worksrcpath}/doc ${destroot}${python.pkgd}/${name}
76}
77post-destroot {
78    system "${python.bin} -O ${python.libdir}/compileall.py -d ${python.pkgd}/${name}/${name}${branch} ${destroot}${python.pkgd}/${name}/${name}${branch}"
79}
80
81variant gcc45 conflicts gcc46 gcc47 gcc48 gcc49  description {Build with GCC 4.5} {
82    configure.compiler  macports-gcc-4.5
83    set lib ${prefix}/lib/gcc45
84}
85variant gcc46 conflicts gcc45 gcc47 gcc48 gcc49 description {Build with GCC 4.6} {
86    configure.compiler  macports-gcc-4.6
87    set lib ${prefix}/lib/gcc46
88}
89variant gcc47 conflicts gcc45 gcc46 gcc48 gcc49 description {Build with GCC 4.7} {
90    configure.compiler  macports-gcc-4.7
91    set lib ${prefix}/lib/gcc47
92}
93variant gcc48 conflicts gcc45 gcc46 gcc47 gcc49 description {Build with GCC 4.8} {
94    configure.compiler  macports-gcc-4.8
95    set lib ${prefix}/lib/gcc48
96}
97variant gcc49 conflicts gcc45 gcc46 gcc47 gcc48 description {Build with GCC 4.9} {
98    configure.compiler  macports-gcc-4.9
99    set lib ${prefix}/lib/gcc49
100}
101
102if {![variant_isset gcc45] && ![variant_isset gcc46] && ![variant_isset gcc47] && ![variant_isset gcc48] && ![variant_isset gcc49]} {
103    default_variants    +gcc48
104}
Note: See TracBrowser for help on using the repository browser.