science/hdf: update 4.2.15 → 4.3.0; add JAVA option

The JAVA option is to support the upcoming HDFView port.
This commit is contained in:
Yuri Victorovich 2024-09-23 07:31:10 -07:00
parent e429a4fe57
commit db270b2554
6 changed files with 50 additions and 193 deletions

View File

@ -1,35 +1,47 @@
PORTNAME= hdf
PORTVERSION= 4.2.15
PORTREVISION= 4
DISTVERSION= 4.3.0
PORTEPOCH= 1
CATEGORIES= science archivers graphics
MASTER_SITES= http://www.hdfgroup.org/ftp/HDF/releases/HDF${PORTVERSION}/src/ \
ftp://ftp.hdfgroup.org/HDF/releases/HDF${PORTVERSION}/src/
MASTER_SITES= https://github.com/HDFGroup/hdf4/releases/download/hdf${DISTVERSION}/
DISTNAME= hdf${DISTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= Hierarchical Data Format library (from NCSA)
WWW= https://www.hdfgroup.org/products/hdf4/
WWW= https://www.hdfgroup.org/solutions/hdf4/
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/COPYING
NOT_FOR_ARCHS= aarch64 armv6 armv7
NOT_FOR_ARCHS_REASON= fails to compile: no machine type has been defined
LIB_DEPENDS= libsz.so:science/libaec
CONFLICTS_INSTALL= netcdf-4.[0-9]*
USES= fortran jpeg libtool
USE_LDCONFIG= yes
WRKSRC= ${WRKDIR}/hdfsrc
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --enable-shared --with-jpeg=${LOCALBASE} \
CONFIGURE_ARGS= --enable-shared \
--with-jpeg=${LOCALBASE} \
--with-szlib=${LOCALBASE}
GNU_CONFIGURE_MANPREFIX=${PREFIX}/share/
USE_LDCONFIG= yes
INSTALL_TARGET= install-strip
TEST_TARGET= check
PORTDATA= *
PORTEXAMPLES= *
OPTIONS_DEFINE= JAVA
OPTIONS_DEFAULT= JAVA
OPTIONS_SUB= yes
OPTIONS_DEFINE= EXAMPLES
JAVA_CONFIGURE_ENABLE= java
JAVA_USE= JAVA=yes
JAVA_VARS= JAVA_VERSION=17 \
JAVA_BUILD=yes
JAVA_CONFIGURE_ENV= JAVA_HOME=${JAVA_HOME} \
PATH=${JAVA_HOME}/bin:${PATH}
JAVA_MAKE_ENV= PATH=${JAVA_HOME}/bin:${PATH}
.include <bsd.port.pre.mk>
@ -39,18 +51,6 @@ OPTIONS_DEFINE= EXAMPLES
FFLAGS+= -fallow-argument-mismatch
.endif
post-patch:
@${REINPLACE_CMD} -e '/PROD_/ s|=.*|=""|' ${WRKSRC}/config/freebsd
@${REINPLACE_CMD} -e 's/ || (__APPLE__.*//' \
${WRKSRC}/hdf/test/fortest.c
post-install:
${INSTALL_MAN} ${WRKSRC}/man/hdfunpac.1 \
${STAGEDIR}${PREFIX}/share/man/man1
# Allow to build on PowerPC
@${REINPLACE_CMD} -e '/if defined (__APPLE__)/ \
s,),) || defined(__powerpc__),' ${WRKSRC}/hdf/src/hdfi.h
${INSTALL_MAN} ${WRKSRC}/man/gr_chunk.3 \
${STAGEDIR}${PREFIX}/share/man/man3
CONFLICTS_INSTALL= netcdf-4.[0-9]*
.include <bsd.port.post.mk>

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1598126512
SHA256 (hdf-4.2.15.tar.gz) = dbeeef525af7c2d01539906c28953f0fdab7dba603d1bc1ec4a5af60d002c459
SIZE (hdf-4.2.15.tar.gz) = 4461869
TIMESTAMP = 1727142524
SHA256 (hdf4.3.0.tar.gz) = 282b244a819790590950f772095abcaeef405b0f17d2ee1eb5039da698cf938b
SIZE (hdf4.3.0.tar.gz) = 18408537

View File

@ -1,6 +1,6 @@
--- configure.orig 2012-08-07 13:11:45.000000000 +0900
+++ configure 2012-08-14 21:08:48.000000000 +0900
@@ -5837,11 +5837,11 @@
--- configure.orig 2024-02-29 16:34:09 UTC
+++ configure
@@ -6537,11 +6537,11 @@ fi
enable_shared="no"
fi
@ -15,5 +15,5 @@
+# fi
+#fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
## ----------------------------------------------------------------------
## Check if they would like the Java native interface (JNI) compiled

View File

@ -1,20 +1,11 @@
--- hdf/src/Makefile.in.orig 2015-02-10 00:43:49.000000000 +0800
+++ hdf/src/Makefile.in 2015-03-16 23:48:46.316696873 +0800
@@ -296,7 +296,7 @@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
--- hdf/src/Makefile.in.orig 2024-02-29 16:34:09 UTC
+++ hdf/src/Makefile.in
@@ -415,7 +415,7 @@ LD = @LD@
JNIFLAGS = @JNIFLAGS@
JUNIT = @JUNIT@
LD = @LD@
-LDFLAGS = @LDFLAGS@
+LDFLAGS = @LDFLAGS@ -version-number 2
LEX = @LEX@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -408,8 +408,6 @@
LIBMFHDF = $(top_builddir)/mfhdf/libsrc/libmfhdf.la
H4CC = ${DESTDIR}$(bindir)/h4cc
H4FC = ${DESTDIR}$(bindir)/h4fc
-@HDF_BUILD_XDR_TRUE@XDR_ADD = -R$(abs_top_builddir)/mfhdf/xdr/.libs
-@HDF_BUILD_SHARED_TRUE@AM_LDFLAGS = -R$(abs_top_builddir)/mfhdf/libsrc/.libs -R$(abs_top_builddir)/hdf/src/.libs $(XDR_ADD)
ACLOCAL_AMFLAGS = "-I m4"
# .chkexe files are used to mark tests that have run successfully.
LIBTOOL = @LIBTOOL@

View File

@ -1,20 +1,11 @@
--- mfhdf/libsrc/Makefile.in.orig 2015-02-10 00:43:51.000000000 +0800
+++ mfhdf/libsrc/Makefile.in 2015-03-16 23:48:46.325704247 +0800
@@ -272,7 +272,7 @@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
--- mfhdf/libsrc/Makefile.in.orig 2024-02-29 16:34:10 UTC
+++ mfhdf/libsrc/Makefile.in
@@ -371,7 +371,7 @@ LD = @LD@
JNIFLAGS = @JNIFLAGS@
JUNIT = @JUNIT@
LD = @LD@
-LDFLAGS = @LDFLAGS@
+LDFLAGS = @LDFLAGS@ -version-number 3
LEX = @LEX@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -384,8 +384,6 @@
LIBMFHDF = $(top_builddir)/mfhdf/libsrc/libmfhdf.la
H4CC = ${DESTDIR}$(bindir)/h4cc
H4FC = ${DESTDIR}$(bindir)/h4fc
-@HDF_BUILD_XDR_TRUE@XDR_ADD = -R$(abs_top_builddir)/mfhdf/xdr/.libs
-@HDF_BUILD_SHARED_TRUE@AM_LDFLAGS = -R$(abs_top_builddir)/mfhdf/libsrc/.libs -R$(abs_top_builddir)/hdf/src/.libs $(XDR_ADD)
ACLOCAL_AMFLAGS = "-I m4"
# .chkexe files are used to mark tests that have run successfully.
LIBTOOL = @LIBTOOL@

View File

@ -1,6 +1,5 @@
bin/gif2hdf
bin/h4cc
bin/h4fc
bin/h4redeploy
bin/hdf24to8
bin/hdf2gif
@ -26,162 +25,38 @@ bin/ristosds
bin/vmake
bin/vshow
include/H4api_adpt.h
include/atom.h
include/bitvect.h
include/cdeflate.h
include/cnbit.h
include/cnone.h
include/crle.h
include/cskphuff.h
include/cszip.h
include/df.h
include/dfan.h
include/dffunc.f90
include/dffunc.inc
include/dfgr.h
include/dfi.h
include/dfrig.h
include/dfsd.h
include/dfstubs.h
include/dfufp2i.h
include/dynarray.h
include/h4config.h
include/hbitio.h
include/hchunks.h
include/hcomp.h
include/hcompi.h
include/hconv.h
include/hdatainfo.h
include/hdf.f90
include/hdf.h
include/hdf.inc
include/hdf2netcdf.h
include/hdfi.h
include/herr.h
include/hfile.h
include/hkit.h
include/hlimits.h
include/hntdefs.h
include/hproto.h
include/hproto_fortran.h
include/htags.h
include/linklist.h
include/local_nc.h
include/mfan.h
include/mfdatainfo.h
include/mffunc.f90
include/mffunc.inc
include/mfgr.h
include/mfhdf.h
include/mfhdfi.h
include/mstdio.h
include/netcdf.f90
include/netcdf.h
include/netcdf.inc
include/tbbt.h
include/vattr.h
include/vg.h
%%JAVA%%lib/jarhdf-4.2.17-1.jar
lib/libdf.a
lib/libdf.so
lib/libdf.so.2
lib/libdf.so.2.0.0
lib/libhdf4.settings
%%JAVA%%lib/libhdf_java.a
%%JAVA%%lib/libhdf_java.so
%%JAVA%%lib/libhdf_java.so.0
%%JAVA%%lib/libhdf_java.so.0.0.0
lib/libmfhdf.a
lib/libmfhdf.so
lib/libmfhdf.so.3
lib/libmfhdf.so.3.0.0
share/man/man1/hdf.1.gz
share/man/man1/hdfunpac.1.gz
share/man/man1/ncdump.1.gz
share/man/man1/ncgen.1.gz
share/man/man3/gr_chunk.3.gz
%%DATADIR%%4_examples/README
%%DATADIR%%4_examples/c/AN_create_annotation.c
%%DATADIR%%4_examples/c/AN_get_annotation_info.c
%%DATADIR%%4_examples/c/AN_read_annotation.c
%%DATADIR%%4_examples/c/GR_create_and_write_image.c
%%DATADIR%%4_examples/c/GR_get_attribute.c
%%DATADIR%%4_examples/c/GR_image_info.c
%%DATADIR%%4_examples/c/GR_modify_image.c
%%DATADIR%%4_examples/c/GR_read_chunks.c
%%DATADIR%%4_examples/c/GR_read_image.c
%%DATADIR%%4_examples/c/GR_read_palette.c
%%DATADIR%%4_examples/c/GR_set_attribute.c
%%DATADIR%%4_examples/c/GR_write_chunks.c
%%DATADIR%%4_examples/c/GR_write_palette.c
%%DATADIR%%4_examples/c/SD_alter_sds_values.c
%%DATADIR%%4_examples/c/SD_chunking_example.c
%%DATADIR%%4_examples/c/SD_compress_sds.c
%%DATADIR%%4_examples/c/SD_create_sds.c
%%DATADIR%%4_examples/c/SD_dimscale_vs_sds.c
%%DATADIR%%4_examples/c/SD_find_sds_by_name.c
%%DATADIR%%4_examples/c/SD_get_attr.c
%%DATADIR%%4_examples/c/SD_get_info.c
%%DATADIR%%4_examples/c/SD_mv_sds_to_external.c
%%DATADIR%%4_examples/c/SD_read_from_sds.c
%%DATADIR%%4_examples/c/SD_read_subsets.c
%%DATADIR%%4_examples/c/SD_set_attr.c
%%DATADIR%%4_examples/c/SD_set_get_dim_info.c
%%DATADIR%%4_examples/c/SD_unlimited_sds.c
%%DATADIR%%4_examples/c/SD_write_slab.c
%%DATADIR%%4_examples/c/SD_write_to_sds.c
%%DATADIR%%4_examples/c/VD_create_onefield_vdatas.c
%%DATADIR%%4_examples/c/VD_create_vdatas.c
%%DATADIR%%4_examples/c/VD_get_vdata_info.c
%%DATADIR%%4_examples/c/VD_locate_vdata.c
%%DATADIR%%4_examples/c/VD_read_from_vdata.c
%%DATADIR%%4_examples/c/VD_read_mixed_vdata.c
%%DATADIR%%4_examples/c/VD_set_get_vdata_attr.c
%%DATADIR%%4_examples/c/VD_write_mixed_vdata.c
%%DATADIR%%4_examples/c/VD_write_mixed_vdata_struct.c
%%DATADIR%%4_examples/c/VD_write_to_vdata.c
%%DATADIR%%4_examples/c/VG_add_sds_to_vgroup.c
%%DATADIR%%4_examples/c/VG_create_vgroup.c
%%DATADIR%%4_examples/c/VG_get_vgroup_info.c
%%DATADIR%%4_examples/c/VG_insert_vdatas_to_vgroup.c
%%DATADIR%%4_examples/c/VG_set_get_vgroup_attr.c
%%DATADIR%%4_examples/c/VG_vgroup_contents.c
%%DATADIR%%4_examples/c/run-c-ex.sh
%%DATADIR%%4_examples/fortran/AN_create_annotation.f
%%DATADIR%%4_examples/fortran/AN_get_annotation_info.f
%%DATADIR%%4_examples/fortran/AN_read_annotation.f
%%DATADIR%%4_examples/fortran/GR_create_and_write_image.f
%%DATADIR%%4_examples/fortran/GR_get_attribute.f
%%DATADIR%%4_examples/fortran/GR_image_info.f
%%DATADIR%%4_examples/fortran/GR_modify_image.f
%%DATADIR%%4_examples/fortran/GR_read_image.f
%%DATADIR%%4_examples/fortran/GR_read_palette.f
%%DATADIR%%4_examples/fortran/GR_set_attribute.f
%%DATADIR%%4_examples/fortran/GR_write_palette.f
%%DATADIR%%4_examples/fortran/SD_alter_sds_values.f
%%DATADIR%%4_examples/fortran/SD_chunking_example.f
%%DATADIR%%4_examples/fortran/SD_compress_sds.f
%%DATADIR%%4_examples/fortran/SD_create_sds.f
%%DATADIR%%4_examples/fortran/SD_dimscale_vs_sds.f
%%DATADIR%%4_examples/fortran/SD_find_sds_by_name.f
%%DATADIR%%4_examples/fortran/SD_get_attr.f
%%DATADIR%%4_examples/fortran/SD_get_info.f
%%DATADIR%%4_examples/fortran/SD_mv_sds_to_external.f
%%DATADIR%%4_examples/fortran/SD_read_from_sds.f
%%DATADIR%%4_examples/fortran/SD_read_subsets.f
%%DATADIR%%4_examples/fortran/SD_set_attr.f
%%DATADIR%%4_examples/fortran/SD_set_get_dim_info.f
%%DATADIR%%4_examples/fortran/SD_unlimited_sds.f
%%DATADIR%%4_examples/fortran/SD_write_slab.f
%%DATADIR%%4_examples/fortran/SD_write_to_sds.f
%%DATADIR%%4_examples/fortran/VD_create_onefield_vdatas.f
%%DATADIR%%4_examples/fortran/VD_create_vdatas.f
%%DATADIR%%4_examples/fortran/VD_get_vdata_info.f
%%DATADIR%%4_examples/fortran/VD_locate_vdata.f
%%DATADIR%%4_examples/fortran/VD_read_from_vdata.f
%%DATADIR%%4_examples/fortran/VD_read_mixed_vdata.f
%%DATADIR%%4_examples/fortran/VD_write_mixed_vdata.f
%%DATADIR%%4_examples/fortran/VD_write_to_vdata.f
%%DATADIR%%4_examples/fortran/VG_add_sds_to_vgroup.f
%%DATADIR%%4_examples/fortran/VG_create_vgroup.f
%%DATADIR%%4_examples/fortran/VG_get_vgroup_info.f
%%DATADIR%%4_examples/fortran/VG_insert_vdatas_to_vgroup.f
%%DATADIR%%4_examples/fortran/VG_set_get_vgroup_attr.f
%%DATADIR%%4_examples/fortran/VG_vgroup_contents.f
%%DATADIR%%4_examples/fortran/run-fortran-ex.sh
%%DATADIR%%4_examples/run-all-ex.sh