Ticket #22151: Portfile

File Portfile, 3.6 KB (added by howarth@…, 15 years ago)

update Portfile to latest 2.1.2_1 release tarball

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$
3PortSystem          1.0
4name                ccpnmr
5version             2.1.2_1
6maintainers         bromo.med.uc.edu:howarth
7description         CCPNMR
8long_description    The CcpNmr software suite is a series of programs \
9                    for macromolecular NMR spectroscopy integrated with \
10                    the CCP data model. The CCP Data Model for macro- \
11                    molecular NMR is intended to cover all data needed \
12                    for macromolecular NMR spectroscopy from the initial \
13                    experimental data to the final validation.
14platforms           darwin
15homepage            http://www.ccpn.ac.uk/ccpn_suite/ccpn_suite.html
16master_sites        http://www.bio.cam.ac.uk/ccpn/download/ccpnmr/
17distfiles           analysis${version}.tar.gz
18checksums           md5     a07435141127bf0311e2c792492c1c99 \
19                    sha1    f711a424da22c84295610483a6cc481d2d2161e9 \
20                    rmd160  f633a8338e3fbb9d8ad77c9482d63191419b0885
21worksrcdir          ccpnmr
22PortGroup           python26 1.0
23depends_lib         port:mesa port:glut port:tcl port:tk port:py26-scipy
24patchfiles          ccpnmr.patch
25use_configure       no
26post-patch {
27    reinplace  "s|@PYTHON_BIN@|${python.bin}|g"   ${worksrcpath}/bin/analysis \
28                                                  ${worksrcpath}/bin/formatConverter \
29                                                  ${worksrcpath}/bin/pipe2azara \
30                                                  ${worksrcpath}/ccpnmr2.1/c/environment-opengl.txt \
31                                                  ${worksrcpath}/bin/dataShifter \
32                                                  ${worksrcpath}/bin/updateAll \
33                                                  ${worksrcpath}/bin/updateCheck
34    reinplace  "s|@PYTHON_PKGD@|${python.pkgd}|g" ${worksrcpath}/bin/analysis \
35                                                  ${worksrcpath}/bin/formatConverter \
36                                                  ${worksrcpath}/bin/pipe2azara \
37                                                  ${worksrcpath}/bin/dataShifter \
38                                                  ${worksrcpath}/bin/updateAll \
39                                                  ${worksrcpath}/bin/updateCheck
40    reinplace  "s|@PREFIX@|${prefix}|g" ${worksrcpath}/ccpnmr2.1/c/environment-opengl.txt
41    reinplace  "s|@PYTHON_INCL@|${python.include}|g" ${worksrcpath}/ccpnmr2.1/c/environment-opengl.txt
42    reinplace  "s|@PYTHON_LIB@|${python.libdir}|g" ${worksrcpath}/ccpnmr2.1/c/environment-opengl.txt
43    reinplace  "s|malloc.h|sys/malloc.h|g" ${worksrcpath}/ccpnmr2.1/c/memops/global/macros.h
44}
45build {
46    copy ${worksrcpath}/ccpnmr2.1/c/environment-opengl.txt ${worksrcpath}/ccpnmr2.1/c/environment.txt
47    system "cd ${worksrcpath}/ccpnmr2.1/c; make; make links"
48}
49destroot {
50    foreach f {analysis dataShifter formatConverter pipe2azara updateAll updateCheck} {
51        xinstall -m 755 ${worksrcpath}/bin/${f} ${destroot}${prefix}/bin
52    }
53    file mkdir ${destroot}${python.pkgd}/ccpnmr/ccpnmr2.1/
54    foreach d {c python data model doc} {
55        copy ${worksrcpath}/ccpnmr2.1/${d} ${destroot}${python.pkgd}/ccpnmr/ccpnmr2.1
56    }
57    system "echo 'ccpnmr/ccpnmr2.1/python' > ${destroot}${python.pkgd}/ccpnmr.pth"
58    copy ${worksrcpath}/doc ${destroot}${python.pkgd}/ccpnmr
59}
60post-destroot {
61    system "${python.bin} -O ${python.libdir}/compileall.py -d ${python.pkgd}/ccpnmr/ccpnmr2.1 ${destroot}${python.pkgd}/ccpnmr/ccpnmr2.1"
62}