source: trunk/dports/science/hdf4/Portfile @ 121952

Last change on this file since 121952 was 121952, checked in by sean@…, 5 years ago

compilers-1.0: move setup call in all ports to after setting of name

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.7 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
2# $Id: Portfile 121952 2014-07-12 05:25:04Z sean@macports.org $
3
4PortSystem          1.0
5PortGroup compilers 1.0
6
7name                hdf4
8version             4.2.10
9platforms           darwin
10categories          science
11license             NCSA
12maintainers         takeshi
13
14description         file format for storing scientific data and utilities
15long_description    ${description}
16homepage            http://www.hdfgroup.org/products/hdf4/index.html
17master_sites        ftp://ftp.hdfgroup.org/HDF/prev-releases/HDF${version}/src/ \
18                    http://www.hdfgroup.org/ftp/HDF/prev-releases/HDF${version}/src/
19distname            hdf-${version}
20use_bzip2           yes
21checksums           md5     bf26b3caaf3c0090965c8995578375bd \
22                    sha1    5163543895728dabb536a0659b3d965d55bccf74 \
23                    rmd160  4345dc9621980a3fe972eaf9aaedaa1ebe127657
24
25compilers.choose    fc f77 f90
26compilers.setup
27
28depends_lib         port:zlib port:jpeg
29
30patchfiles          patch-hdf-examples-Makefile.in.diff \
31                    patch-mfhdf-examples-Makefile.in.diff
32
33configure.args      --disable-netcdf --disable-fortran \
34                    --with-jpeg=${prefix} --enable-shared \
35                    --without-szlib
36configure.cppflags-delete   -I${prefix}/include
37configure.ldflags-delete    -L${prefix}/lib
38
39post-configure {
40# remove -arch from h4cc to fix failure of h4cc -E with +universal
41    reinplace -E {s|-arch [a-z0-9_]+||g} ${worksrcpath}/hdf/util/h4cc
42}
43
44test.run            yes
45test.target         check
46
47post-destroot {
48    file mkdir ${destroot}${prefix}/share/doc/${name}
49    file copy ${worksrcpath}/hdf/util/testfiles ${destroot}${prefix}/share/doc/${name}/samples
50    foreach f {COPYING release_notes/HISTORY.txt release_notes/RELEASE.txt} {
51        file copy ${worksrcpath}/$f ${destroot}${prefix}/share/doc/${name}/
52    }
53    foreach f {bin/ncdump bin/ncgen lib/libudport.a                   \
54             include/netcdf.h include/netcdf.inc include/netcdf.f90 \
55             share/man/man1/ncgen.1 share/man/man1/ncdump.1} {
56        file delete ${destroot}${prefix}/$f
57    }
58}
59
60if {[fortran_variant_isset]} {
61    patchfiles-append   patch-hdf-fortran-examples-Makefile.in.diff \
62                        patch-mfhdf-fortran-examples-Makefile.in.diff
63    configure.args-delete   --disable-fortran --enable-shared
64}
65
66if {[variant_isset g95]} {
67    configure.fflags-append -fno-second-underscore
68}
69
70variant szip description {build with szip} {
71    depends_lib-append      port:szip
72    configure.args-delete   --without-szlib
73    configure.args-append   --with-szlib=${prefix}
74}
75
76livecheck.type   regex
77livecheck.url    ${homepage}
78livecheck.regex  {Release of HDF is ([0-9]+\.[0-9]+\.[0-9]+)}
Note: See TracBrowser for help on using the repository browser.