ports/121731: science/hdf5: enable Fortran support
TAOKA Fumiyoshi
fmysh at iijmio-mail.jp
Sat Mar 15 12:40:02 UTC 2008
>Number: 121731
>Category: ports
>Synopsis: science/hdf5: enable Fortran support
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Sat Mar 15 12:40:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: TAOKA Fumiyoshi
>Release:
>Organization:
>Environment:
>Description:
Enable Fortran support.
>How-To-Repeat:
>Fix:
diff -uNr --exclude CVS hdf5.orig/Makefile hdf5/Makefile
--- hdf5.orig/Makefile 2008-03-08 18:23:50.000000000 +0900
+++ hdf5/Makefile 2008-03-15 21:18:19.000000000 +0900
@@ -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 @@
.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
diff -uNr --exclude CVS hdf5.orig/files/patch-fortran::H5f90i.h hdf5/files/patch-fortran::H5f90i.h
--- hdf5.orig/files/patch-fortran::H5f90i.h 1970-01-01 09:00:00.000000000 +0900
+++ hdf5/files/patch-fortran::H5f90i.h 2007-07-12 21:39:05.000000000 +0900
@@ -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 -uNr --exclude CVS hdf5.orig/files/patch-fortran::commence.in hdf5/files/patch-fortran::commence.in
--- hdf5.orig/files/patch-fortran::commence.in 1970-01-01 09:00:00.000000000 +0900
+++ hdf5/files/patch-fortran::commence.in 2007-07-12 23:24:34.000000000 +0900
@@ -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 -uNr --exclude CVS hdf5.orig/files/patch-fortran::configure hdf5/files/patch-fortran::configure
--- hdf5.orig/files/patch-fortran::configure 1970-01-01 09:00:00.000000000 +0900
+++ hdf5/files/patch-fortran::configure 2007-07-12 21:38:50.000000000 +0900
@@ -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 -uNr --exclude CVS hdf5.orig/files/patch-fortran::freebsd hdf5/files/patch-fortran::freebsd
--- hdf5.orig/files/patch-fortran::freebsd 1970-01-01 09:00:00.000000000 +0900
+++ hdf5/files/patch-fortran::freebsd 2007-07-12 21:38:42.000000000 +0900
@@ -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 -uNr --exclude CVS hdf5.orig/pkg-plist hdf5/pkg-plist
--- hdf5.orig/pkg-plist 2008-03-01 01:59:01.000000000 +0900
+++ hdf5/pkg-plist 2008-03-14 06:59:44.000000000 +0900
@@ -5,6 +5,7 @@
bin/h5debug
bin/h5diff
bin/h5dump
+%%FORTRAN%%bin/h5fc
bin/h5import
bin/h5jam
bin/h5ls
@@ -78,8 +79,25 @@
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.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 @@
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/c/h5_select.c
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/c/h5_write.c
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/c/ph5example.c
-%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/c
+%%PORTEXAMPLES%%%%FORTRAN%%%%EXAMPLESDIR%%/fortran/attrexample.f90
+%%PORTEXAMPLES%%%%FORTRAN%%%%EXAMPLESDIR%%/fortran/compound.f90
+%%PORTEXAMPLES%%%%FORTRAN%%%%EXAMPLESDIR%%/fortran/dsetexample.f90
+%%PORTEXAMPLES%%%%FORTRAN%%%%EXAMPLESDIR%%/fortran/fileexample.f90
+%%PORTEXAMPLES%%%%FORTRAN%%%%EXAMPLESDIR%%/fortran/groupexample.f90
+%%PORTEXAMPLES%%%%FORTRAN%%%%EXAMPLESDIR%%/fortran/grpdsetexample.f90
+%%PORTEXAMPLES%%%%FORTRAN%%%%EXAMPLESDIR%%/fortran/grpit.f90
+%%PORTEXAMPLES%%%%FORTRAN%%%%EXAMPLESDIR%%/fortran/grpsexample.f90
+%%PORTEXAMPLES%%%%FORTRAN%%%%EXAMPLESDIR%%/fortran/hyperslab.f90
+%%PORTEXAMPLES%%%%FORTRAN%%%%EXAMPLESDIR%%/fortran/mountexample.f90
+%%PORTEXAMPLES%%%%FORTRAN%%%%EXAMPLESDIR%%/fortran/refobjexample.f90
+%%PORTEXAMPLES%%%%FORTRAN%%%%EXAMPLESDIR%%/fortran/refregexample.f90
+%%PORTEXAMPLES%%%%FORTRAN%%%%EXAMPLESDIR%%/fortran/rwdsetexample.f90
+%%PORTEXAMPLES%%%%FORTRAN%%%%EXAMPLESDIR%%/fortran/selectele.f90
+%%PORTEXAMPLES%%%%FORTRAN%%@dirrm %%EXAMPLESDIR%%/fortran
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/c++
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/c
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list