source: trunk/dports/science/cdf/Portfile @ 39720

Last change on this file since 39720 was 39720, checked in by ryandesign@…, 9 years ago

cdf: add MacPorts distfiles mirror to fix fetch failure; closes #15251 (maintainer timeout)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1# $Id: Portfile 39720 2008-09-01 09:47:14Z ryandesign@macports.org $
2
3PortSystem 1.0
4
5name            cdf
6version         32
7maintainers     gwright@macports.org
8platforms       darwin
9categories      science
10
11description     CDF: Common Data Format
12long_description        \
13                The Common Data Format (CDF) is a self-describing data  \
14                format for the storage and manipulation of scalar and   \
15                multidimensional data in a platform and discipline      \
16                independent fashion.
17
18homepage        http://cdf.gsfc.nasa.gov/
19master_sites    http://distfiles.macports.org/${dist_subdir} \
20                                ftp://cdaweb.gsfc.nasa.gov/pub/cdf/dist/${name}${version}/unix
21
22distfiles       ${name}${version}-dist-all${extract.suffix}
23
24checksums       sha1 c24a88dee108ab3ae7787697350f77ca3e9bd776
25
26depends_build   port:gcc42
27
28fetch.use_epsv  no
29configure       { }
30worksrcdir      ${name}${version}-dist-readonly
31
32platform darwin i386 {
33                  global cdf_arch
34                  set cdf_arch i386
35}
36
37platform darwin powerpc {
38                  global cdf_arch
39                  set cdf_arch ppc
40                }
41
42patchfiles      patch-Makefile
43
44post-patch      {
45                  reinplace "s|-L/usr/lib/gcc/powerpc-apple-darwin8/4.0.1|`gcc-mp-4.2 -print-libgcc-file-name`|g" Makefile
46                  reinplace "s|-L/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/ppc64|`gcc-mp-4.2 -print-libgcc-file-name`|g" Makefile
47                  reinplace "s|-L/usr/lib/gcc/i686-apple-darwin8/4.0.1|`gcc-mp-4.2 -print-libgcc-file-name`|g" Makefile
48
49                  reinplace "s|/Developer/SDKs/MacOSX10.4u.sdk/usr/lib|${prefix}/lib|g" Makefile
50                }
51
52build           {
53                  system "make OS=macosx ENV=${cdf_arch} FORTRAN=yes FC=gfortran-mp-4.2 all"
54                }
55
56destroot        {
57                  reinplace "s|(INSTALLDIR)/bin/definitions.B|/${prefix}/bin/definitions.B|" ${worksrcpath}/Makefile
58                  reinplace "s|(INSTALLDIR)/bin/definitions.C|/${prefix}/bin/definitions.C|" ${worksrcpath}/Makefile
59                  reinplace "s|(INSTALLDIR)/bin/definitions.K|/${prefix}/bin/definitions.K|" ${worksrcpath}/Makefile
60                  system "make INSTALLDIR=${destroot}${prefix} install"
61                }
62
63post-destroot   {
64                  reinplace "s|${destroot}${prefix}|${prefix}|" ${destroot}${prefix}/bin/definitions.B
65                  reinplace "s|${destroot}${prefix}|${prefix}|" ${destroot}${prefix}/bin/definitions.C
66                  reinplace "s|${destroot}${prefix}|${prefix}|" ${destroot}${prefix}/bin/definitions.K
67
68                  system "install_name_tool -id ${prefix}/lib/libcdf.dylib ${destroot}${prefix}/lib/libcdf.dylib"
69                }
70
Note: See TracBrowser for help on using the repository browser.