aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2008-05-31 22:42:50 +0000
committerMartin Wilke <miwi@FreeBSD.org>2008-05-31 22:42:50 +0000
commitfb5eba2512bc14feadaa3e4f935b71a194c5e7a3 (patch)
treeac5e59f3e101ff282a6e135961c0198e35e9c680
parentdcb13f7b8e2f0edb5de735625a987d72ba84bfb7 (diff)
downloadports-fb5eba2512bc14feadaa3e4f935b71a194c5e7a3.tar.gz
ports-fb5eba2512bc14feadaa3e4f935b71a194c5e7a3.zip
Notes
-rw-r--r--science/hdf5-18/Makefile13
-rw-r--r--science/hdf5-18/files/patch-fortran_H5f90i.h11
-rw-r--r--science/hdf5-18/files/patch-fortran_commence.in31
-rw-r--r--science/hdf5-18/files/patch-fortran_configure10
-rw-r--r--science/hdf5-18/files/patch-fortran_freebsd23
-rw-r--r--science/hdf5-18/pkg-plist38
-rw-r--r--science/hdf5/Makefile13
-rw-r--r--science/hdf5/files/patch-fortran_H5f90i.h11
-rw-r--r--science/hdf5/files/patch-fortran_commence.in31
-rw-r--r--science/hdf5/files/patch-fortran_configure10
-rw-r--r--science/hdf5/files/patch-fortran_freebsd23
-rw-r--r--science/hdf5/pkg-plist38
12 files changed, 248 insertions, 4 deletions
diff --git a/science/hdf5-18/Makefile b/science/hdf5-18/Makefile
index a7f204b5a215..99f309e77beb 100644
--- a/science/hdf5-18/Makefile
+++ b/science/hdf5-18/Makefile
@@ -8,6 +8,7 @@
PORTNAME= hdf5
PORTVERSION= 1.6.7
+PORTREVISION= 1
CATEGORIES= science archivers graphics
MASTER_SITES= ftp://ftp.hdfgroup.org/HDF5/current16/src/ \
ftp://ftp.hdfgroup.org/HDF5/prev-releases/ \
@@ -34,6 +35,16 @@ ALL_TARGET= lib progs
.include <bsd.port.pre.mk>
+.if defined(WITH_FORTRAN)
+LIBTOOLFILES+= fortran/configure
+USE_FORTRAN= yes
+CONFIGURE_ENV+= F9X=${FC}
+CONFIGURE_ARGS+= --enable-fortran
+PLIST_SUB+= FORTRAN=""
+.else
+PLIST_SUB+= FORTRAN="@comment "
+.endif
+
.if ${ARCH} == "sparc64"
BROKEN= Does not compile on ${ARCH}
.endif
@@ -48,7 +59,7 @@ post-patch:
-e 's|\(version_type=freebsd\)-.*|\1-elf|g' \
${WRKSRC}/aclocal.m4 ${WRKSRC}/configure
.if defined(NOPORTEXAMPLES)
-.for i in . c++ hl
+.for i in . c++ hl fortran
@${REINPLACE_CMD} \
-e 's,\((cd examples && $$(MAKE) $$@) || exit 1;\),#\1,g' \
${WRKSRC}/${i}/Makefile.in
diff --git a/science/hdf5-18/files/patch-fortran_H5f90i.h b/science/hdf5-18/files/patch-fortran_H5f90i.h
new file mode 100644
index 000000000000..83f5855b8993
--- /dev/null
+++ b/science/hdf5-18/files/patch-fortran_H5f90i.h
@@ -0,0 +1,11 @@
+--- fortran/src/H5f90i.h.orig Thu Jul 12 21:26:46 2007
++++ fortran/src/H5f90i.h Thu Jul 12 21:27:18 2007
+@@ -71,7 +71,7 @@
+ #endif /*APPLE*/
+
+ /* LINUX definitions */
+-#if (defined(linux) || defined(__gnu_linux__) || defined(__linux__))
++#if (defined(linux) || defined(__gnu_linux__) || defined(__linux__) || defined(__FreeBSD__))
+
+ /* Common definitions */
+ typedef char *_fcd;
diff --git a/science/hdf5-18/files/patch-fortran_commence.in b/science/hdf5-18/files/patch-fortran_commence.in
new file mode 100644
index 000000000000..3331f07ce406
--- /dev/null
+++ b/science/hdf5-18/files/patch-fortran_commence.in
@@ -0,0 +1,31 @@
+--- fortran/config/commence.in.orig Thu Jul 12 21:28:40 2007
++++ fortran/config/commence.in Thu Jul 12 21:33:56 2007
+@@ -47,7 +47,7 @@
+ RM=rm -f
+ CP=cp
+ INSTALL=@INSTALL@
+-INSTALL_PROGRAM=@INSTALL_PROGRAM@
++INSTALL_PROGRAM=@INSTALL_SCRIPT@
+ INSTALL_DATA=@INSTALL_DATA@
+ PARALLEL=@PARALLEL@
+ RUNSERIAL=@RUNSERIAL@
+@@ -62,7 +62,7 @@
+ bindir=@bindir@
+ libdir=@libdir@
+ includedir=@includedir@
+-docdir=@exec_prefix@/doc
++docdir=@exec_prefix@/share
+ PUB_LIB=$(LIB)
+
+ ## Shared libraries
+@@ -85,8 +85,8 @@
+ ## Optional variables. We must declare them here because Irix pmake
+ ## complains if it sees a reference to a variable which has never been
+ ## defined. The main makefile is free to redefine these to something else.
+-DOCDIR=$(docdir)
+-EXAMPLEDIR=$(docdir)/hdf5/examples/fortran
++DOCDIR=$(docdir)/doc/hdf5
++EXAMPLEDIR=$(docdir)/examples/hdf5/fortran
+ LIB=
+ LIB_SRC=
+ LIB_OBJ=
diff --git a/science/hdf5-18/files/patch-fortran_configure b/science/hdf5-18/files/patch-fortran_configure
new file mode 100644
index 000000000000..7244f4e4f10a
--- /dev/null
+++ b/science/hdf5-18/files/patch-fortran_configure
@@ -0,0 +1,10 @@
+--- fortran/configure.orig Thu Jul 12 21:36:24 2007
++++ fortran/configure Thu Jul 12 21:36:49 2007
+@@ -7602,6 +7602,7 @@
+
+ # This can be used to rebuild libtool when needed
+ LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
++$ac_aux_dir/ltconfig $LIBTOOL_DEPS
+
+ # Always use our own libtool.
+ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
diff --git a/science/hdf5-18/files/patch-fortran_freebsd b/science/hdf5-18/files/patch-fortran_freebsd
new file mode 100644
index 000000000000..329de570663c
--- /dev/null
+++ b/science/hdf5-18/files/patch-fortran_freebsd
@@ -0,0 +1,23 @@
+--- fortran/config/freebsd.orig Thu Jul 12 21:23:06 2007
++++ fortran/config/freebsd Thu Jul 12 21:25:09 2007
+@@ -27,3 +27,20 @@
+
+ # Figure out compiler flags
+ . $srcdir/config/gnu-flags
++
++#
++# HDF5 integers
++#
++# R_LARGE is the number of digits for the bigest integer supported.
++# R_INTEGER is the number of digits in INTEGER
++#
++# (for the Linux architechture)
++#
++R_LARGE=18
++R_INTEGER=9
++HADDR_T='SELECTED_INT_KIND(R_LARGE)'
++HSIZE_T='SELECTED_INT_KIND(R_LARGE)'
++HSSIZE_T='SELECTED_INT_KIND(R_LARGE)'
++HID_T='SELECTED_INT_KIND(R_INTEGER)'
++SIZE_T='SELECTED_INT_KIND(R_INTEGER)'
++OBJECT_NAMELEN_DEFAULT_F=-1
diff --git a/science/hdf5-18/pkg-plist b/science/hdf5-18/pkg-plist
index 6e13bd372267..ac51c104c1bd 100644
--- a/science/hdf5-18/pkg-plist
+++ b/science/hdf5-18/pkg-plist
@@ -5,6 +5,7 @@ bin/h5cc
bin/h5debug
bin/h5diff
bin/h5dump
+%%FORTRAN%%bin/h5fc
bin/h5import
bin/h5jam
bin/h5ls
@@ -78,8 +79,25 @@ include/H5Zpublic.h
include/H5api_adpt.h
include/H5cxx_pubconf.h
include/H5pubconf.h
+%%FORTRAN%%include/H5pubconf_fortran.h
include/H5public.h
include/hdf5.h
+%%FORTRAN%%lib/h5a.mod
+%%FORTRAN%%lib/h5d.mod
+%%FORTRAN%%lib/h5e.mod
+%%FORTRAN%%lib/h5f.mod
+%%FORTRAN%%lib/h5fortran_flags.mod
+%%FORTRAN%%lib/h5fortran_types.mod
+%%FORTRAN%%lib/h5g.mod
+%%FORTRAN%%lib/h5global.mod
+%%FORTRAN%%lib/h5i.mod
+%%FORTRAN%%lib/h5lib.mod
+%%FORTRAN%%lib/h5p.mod
+%%FORTRAN%%lib/h5r.mod
+%%FORTRAN%%lib/h5s.mod
+%%FORTRAN%%lib/h5t.mod
+%%FORTRAN%%lib/h5z.mod
+%%FORTRAN%%lib/hdf5.mod
lib/libhdf5.a
lib/libhdf5.la
lib/libhdf5.settings
@@ -87,6 +105,9 @@ lib/libhdf5.so
lib/libhdf5.so.0
lib/libhdf5_cpp.a
lib/libhdf5_cpp.la
+%%FORTRAN%%lib/libhdf5_fortran.a
+%%FORTRAN%%lib/libhdf5_fortran.la
+%%FORTRAN%%lib/libhdf5_fortran.settings
lib/libhdf5_hl.a
lib/libhdf5_hl.la
lib/libhdf5_hl.so
@@ -128,6 +149,21 @@ lib/libhdf5_hl.so.0
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/c/h5_select.c
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/c/h5_write.c
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/c/ph5example.c
-%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/c
+%%FORTRAN%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fortran/attrexample.f90
+%%FORTRAN%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fortran/compound.f90
+%%FORTRAN%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fortran/dsetexample.f90
+%%FORTRAN%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fortran/fileexample.f90
+%%FORTRAN%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fortran/groupexample.f90
+%%FORTRAN%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fortran/grpdsetexample.f90
+%%FORTRAN%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fortran/grpit.f90
+%%FORTRAN%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fortran/grpsexample.f90
+%%FORTRAN%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fortran/hyperslab.f90
+%%FORTRAN%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fortran/mountexample.f90
+%%FORTRAN%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fortran/refobjexample.f90
+%%FORTRAN%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fortran/refregexample.f90
+%%FORTRAN%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fortran/rwdsetexample.f90
+%%FORTRAN%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fortran/selectele.f90
+%%FORTRAN%%%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/fortran
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/c++
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/c
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
diff --git a/science/hdf5/Makefile b/science/hdf5/Makefile
index a7f204b5a215..99f309e77beb 100644
--- a/science/hdf5/Makefile
+++ b/science/hdf5/Makefile
@@ -8,6 +8,7 @@
PORTNAME= hdf5
PORTVERSION= 1.6.7
+PORTREVISION= 1
CATEGORIES= science archivers graphics
MASTER_SITES= ftp://ftp.hdfgroup.org/HDF5/current16/src/ \
ftp://ftp.hdfgroup.org/HDF5/prev-releases/ \
@@ -34,6 +35,16 @@ ALL_TARGET= lib progs
.include <bsd.port.pre.mk>
+.if defined(WITH_FORTRAN)
+LIBTOOLFILES+= fortran/configure
+USE_FORTRAN= yes
+CONFIGURE_ENV+= F9X=${FC}
+CONFIGURE_ARGS+= --enable-fortran
+PLIST_SUB+= FORTRAN=""
+.else
+PLIST_SUB+= FORTRAN="@comment "
+.endif
+
.if ${ARCH} == "sparc64"
BROKEN= Does not compile on ${ARCH}
.endif
@@ -48,7 +59,7 @@ post-patch:
-e 's|\(version_type=freebsd\)-.*|\1-elf|g' \
${WRKSRC}/aclocal.m4 ${WRKSRC}/configure
.if defined(NOPORTEXAMPLES)
-.for i in . c++ hl
+.for i in . c++ hl fortran
@${REINPLACE_CMD} \
-e 's,\((cd examples && $$(MAKE) $$@) || exit 1;\),#\1,g' \
${WRKSRC}/${i}/Makefile.in
diff --git a/science/hdf5/files/patch-fortran_H5f90i.h b/science/hdf5/files/patch-fortran_H5f90i.h
new file mode 100644
index 000000000000..83f5855b8993
--- /dev/null
+++ b/science/hdf5/files/patch-fortran_H5f90i.h
@@ -0,0 +1,11 @@
+--- fortran/src/H5f90i.h.orig Thu Jul 12 21:26:46 2007
++++ fortran/src/H5f90i.h Thu Jul 12 21:27:18 2007
+@@ -71,7 +71,7 @@
+ #endif /*APPLE*/
+
+ /* LINUX definitions */
+-#if (defined(linux) || defined(__gnu_linux__) || defined(__linux__))
++#if (defined(linux) || defined(__gnu_linux__) || defined(__linux__) || defined(__FreeBSD__))
+
+ /* Common definitions */
+ typedef char *_fcd;
diff --git a/science/hdf5/files/patch-fortran_commence.in b/science/hdf5/files/patch-fortran_commence.in
new file mode 100644
index 000000000000..3331f07ce406
--- /dev/null
+++ b/science/hdf5/files/patch-fortran_commence.in
@@ -0,0 +1,31 @@
+--- fortran/config/commence.in.orig Thu Jul 12 21:28:40 2007
++++ fortran/config/commence.in Thu Jul 12 21:33:56 2007
+@@ -47,7 +47,7 @@
+ RM=rm -f
+ CP=cp
+ INSTALL=@INSTALL@
+-INSTALL_PROGRAM=@INSTALL_PROGRAM@
++INSTALL_PROGRAM=@INSTALL_SCRIPT@
+ INSTALL_DATA=@INSTALL_DATA@
+ PARALLEL=@PARALLEL@
+ RUNSERIAL=@RUNSERIAL@
+@@ -62,7 +62,7 @@
+ bindir=@bindir@
+ libdir=@libdir@
+ includedir=@includedir@
+-docdir=@exec_prefix@/doc
++docdir=@exec_prefix@/share
+ PUB_LIB=$(LIB)
+
+ ## Shared libraries
+@@ -85,8 +85,8 @@
+ ## Optional variables. We must declare them here because Irix pmake
+ ## complains if it sees a reference to a variable which has never been
+ ## defined. The main makefile is free to redefine these to something else.
+-DOCDIR=$(docdir)
+-EXAMPLEDIR=$(docdir)/hdf5/examples/fortran
++DOCDIR=$(docdir)/doc/hdf5
++EXAMPLEDIR=$(docdir)/examples/hdf5/fortran
+ LIB=
+ LIB_SRC=
+ LIB_OBJ=
diff --git a/science/hdf5/files/patch-fortran_configure b/science/hdf5/files/patch-fortran_configure
new file mode 100644
index 000000000000..7244f4e4f10a
--- /dev/null
+++ b/science/hdf5/files/patch-fortran_configure
@@ -0,0 +1,10 @@
+--- fortran/configure.orig Thu Jul 12 21:36:24 2007
++++ fortran/configure Thu Jul 12 21:36:49 2007
+@@ -7602,6 +7602,7 @@
+
+ # This can be used to rebuild libtool when needed
+ LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
++$ac_aux_dir/ltconfig $LIBTOOL_DEPS
+
+ # Always use our own libtool.
+ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
diff --git a/science/hdf5/files/patch-fortran_freebsd b/science/hdf5/files/patch-fortran_freebsd
new file mode 100644
index 000000000000..329de570663c
--- /dev/null
+++ b/science/hdf5/files/patch-fortran_freebsd
@@ -0,0 +1,23 @@
+--- fortran/config/freebsd.orig Thu Jul 12 21:23:06 2007
++++ fortran/config/freebsd Thu Jul 12 21:25:09 2007
+@@ -27,3 +27,20 @@
+
+ # Figure out compiler flags
+ . $srcdir/config/gnu-flags
++
++#
++# HDF5 integers
++#
++# R_LARGE is the number of digits for the bigest integer supported.
++# R_INTEGER is the number of digits in INTEGER
++#
++# (for the Linux architechture)
++#
++R_LARGE=18
++R_INTEGER=9
++HADDR_T='SELECTED_INT_KIND(R_LARGE)'
++HSIZE_T='SELECTED_INT_KIND(R_LARGE)'
++HSSIZE_T='SELECTED_INT_KIND(R_LARGE)'
++HID_T='SELECTED_INT_KIND(R_INTEGER)'
++SIZE_T='SELECTED_INT_KIND(R_INTEGER)'
++OBJECT_NAMELEN_DEFAULT_F=-1
diff --git a/science/hdf5/pkg-plist b/science/hdf5/pkg-plist
index 6e13bd372267..ac51c104c1bd 100644
--- a/science/hdf5/pkg-plist
+++ b/science/hdf5/pkg-plist
@@ -5,6 +5,7 @@ bin/h5cc
bin/h5debug
bin/h5diff
bin/h5dump
+%%FORTRAN%%bin/h5fc
bin/h5import
bin/h5jam
bin/h5ls
@@ -78,8 +79,25 @@ include/H5Zpublic.h
include/H5api_adpt.h
include/H5cxx_pubconf.h
include/H5pubconf.h
+%%FORTRAN%%include/H5pubconf_fortran.h
include/H5public.h
include/hdf5.h
+%%FORTRAN%%lib/h5a.mod
+%%FORTRAN%%lib/h5d.mod
+%%FORTRAN%%lib/h5e.mod
+%%FORTRAN%%lib/h5f.mod
+%%FORTRAN%%lib/h5fortran_flags.mod
+%%FORTRAN%%lib/h5fortran_types.mod
+%%FORTRAN%%lib/h5g.mod
+%%FORTRAN%%lib/h5global.mod
+%%FORTRAN%%lib/h5i.mod
+%%FORTRAN%%lib/h5lib.mod
+%%FORTRAN%%lib/h5p.mod
+%%FORTRAN%%lib/h5r.mod
+%%FORTRAN%%lib/h5s.mod
+%%FORTRAN%%lib/h5t.mod
+%%FORTRAN%%lib/h5z.mod
+%%FORTRAN%%lib/hdf5.mod
lib/libhdf5.a
lib/libhdf5.la
lib/libhdf5.settings
@@ -87,6 +105,9 @@ lib/libhdf5.so
lib/libhdf5.so.0
lib/libhdf5_cpp.a
lib/libhdf5_cpp.la
+%%FORTRAN%%lib/libhdf5_fortran.a
+%%FORTRAN%%lib/libhdf5_fortran.la
+%%FORTRAN%%lib/libhdf5_fortran.settings
lib/libhdf5_hl.a
lib/libhdf5_hl.la
lib/libhdf5_hl.so
@@ -128,6 +149,21 @@ lib/libhdf5_hl.so.0
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/c/h5_select.c
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/c/h5_write.c
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/c/ph5example.c
-%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/c
+%%FORTRAN%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fortran/attrexample.f90
+%%FORTRAN%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fortran/compound.f90
+%%FORTRAN%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fortran/dsetexample.f90
+%%FORTRAN%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fortran/fileexample.f90
+%%FORTRAN%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fortran/groupexample.f90
+%%FORTRAN%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fortran/grpdsetexample.f90
+%%FORTRAN%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fortran/grpit.f90
+%%FORTRAN%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fortran/grpsexample.f90
+%%FORTRAN%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fortran/hyperslab.f90
+%%FORTRAN%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fortran/mountexample.f90
+%%FORTRAN%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fortran/refobjexample.f90
+%%FORTRAN%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fortran/refregexample.f90
+%%FORTRAN%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fortran/rwdsetexample.f90
+%%FORTRAN%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fortran/selectele.f90
+%%FORTRAN%%%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/fortran
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/c++
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/c
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%