summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2020-12-29 21:43:49 (GMT)
committerGitHub <noreply@github.com>2020-12-29 21:43:49 (GMT)
commitf50fd0cc07111e7cf6821fc655512147a3795c37 (patch)
tree2fa81c98d6ef4894ba12a0725ffe185eb4e3f5a5
parenta6386824c75e804ae5f1782fbbeab79152389d2a (diff)
downloadhdf5-f50fd0cc07111e7cf6821fc655512147a3795c37.zip
hdf5-f50fd0cc07111e7cf6821fc655512147a3795c37.tar.gz
hdf5-f50fd0cc07111e7cf6821fc655512147a3795c37.tar.bz2
Modify temporary rpath for testing in java example scripts. (#230)
-rw-r--r--java/examples/datasets/JavaDatasetExample.sh.in10
-rw-r--r--java/examples/datatypes/JavaDatatypeExample.sh.in10
-rw-r--r--java/examples/groups/JavaGroupExample.sh.in12
-rw-r--r--java/examples/intro/JavaIntroExample.sh.in10
4 files changed, 37 insertions, 5 deletions
diff --git a/java/examples/datasets/JavaDatasetExample.sh.in b/java/examples/datasets/JavaDatasetExample.sh.in
index ae79416..7c47002 100644
--- a/java/examples/datasets/JavaDatasetExample.sh.in
+++ b/java/examples/datasets/JavaDatasetExample.sh.in
@@ -15,6 +15,7 @@
top_builddir=@top_builddir@
top_srcdir=@top_srcdir@
srcdir=@srcdir@
+IS_DARWIN="@H5_IS_DARWIN@"
USE_FILTER_SZIP="@USE_FILTER_SZIP@"
USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@"
@@ -36,8 +37,8 @@ nerrors=0
# where the libs exist
HDFLIB_HOME="$top_srcdir/java/lib"
-BLDLIBDIR="$top_builddir/hdf5/lib"
BLDDIR="."
+BLDLIBDIR="$BLDDIR/testlibs"
HDFTEST_HOME="$top_srcdir/java/examples/datasets"
JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar
TESTJARFILE=jar@PACKAGE_TARNAME@datasets.jar
@@ -113,6 +114,13 @@ COPY_LIBFILES_TO_BLDLIBDIR()
fi
fi
done
+ if [ "$IS_DARWIN" = "yes" ]; then
+ (cd $BLDLIBDIR; \
+ install_name_tool -add_rpath @loader_path libhdf5_java.dylib; \
+ exist_path=` otool -l libhdf5_java.dylib | grep libhdf5 | grep -v java | awk '{print $2}'`; \
+ echo $exist_path; \
+ install_name_tool -change $exist_path @rpath/libhdf5.dylib libhdf5_java.dylib)
+ fi
# copy jar files. Used -f to make sure get a new copy
for tstfile in $COPY_JARTESTFILES
do
diff --git a/java/examples/datatypes/JavaDatatypeExample.sh.in b/java/examples/datatypes/JavaDatatypeExample.sh.in
index 447512a..6a4581a 100644
--- a/java/examples/datatypes/JavaDatatypeExample.sh.in
+++ b/java/examples/datatypes/JavaDatatypeExample.sh.in
@@ -15,6 +15,7 @@
top_builddir=@top_builddir@
top_srcdir=@top_srcdir@
srcdir=@srcdir@
+IS_DARWIN="@H5_IS_DARWIN@"
TESTNAME=EX_Datatypes
EXIT_SUCCESS=0
@@ -33,8 +34,8 @@ nerrors=0
# where the libs exist
HDFLIB_HOME="$top_srcdir/java/lib"
-BLDLIBDIR="$top_builddir/hdf5/lib"
BLDDIR="."
+BLDLIBDIR="$BLDDIR/testlibs"
HDFTEST_HOME="$top_srcdir/java/examples/datatypes"
JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar
TESTJARFILE=jar@PACKAGE_TARNAME@datatypes.jar
@@ -110,6 +111,13 @@ COPY_LIBFILES_TO_BLDLIBDIR()
fi
fi
done
+ if [ "$IS_DARWIN" = "yes" ]; then
+ (cd $BLDLIBDIR; \
+ install_name_tool -add_rpath @loader_path libhdf5_java.dylib; \
+ exist_path=` otool -l libhdf5_java.dylib | grep libhdf5 | grep -v java | awk '{print $2}'`; \
+ echo $exist_path; \
+ install_name_tool -change $exist_path @rpath/libhdf5.dylib libhdf5_java.dylib)
+ fi
# copy jar files. Used -f to make sure get a new copy
for tstfile in $COPY_JARTESTFILES
do
diff --git a/java/examples/groups/JavaGroupExample.sh.in b/java/examples/groups/JavaGroupExample.sh.in
index acc606f..f32947a 100644
--- a/java/examples/groups/JavaGroupExample.sh.in
+++ b/java/examples/groups/JavaGroupExample.sh.in
@@ -15,6 +15,7 @@
top_builddir=@top_builddir@
top_srcdir=@top_srcdir@
srcdir=@srcdir@
+IS_DARWIN="@H5_IS_DARWIN@"
TESTNAME=EX_Groups
EXIT_SUCCESS=0
@@ -33,9 +34,9 @@ nerrors=0
# where the libs exist
HDFLIB_HOME="$top_srcdir/java/lib"
-BLDLIBDIR="$top_builddir/hdf5/lib"
-BLDITERDIR="./groups"
BLDDIR="."
+BLDLIBDIR="$BLDDIR/testlibs"
+BLDITERDIR="./groups"
HDFTEST_HOME="$top_srcdir/java/examples/groups"
JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar
TESTJARFILE=jar@PACKAGE_TARNAME@groups.jar
@@ -105,6 +106,13 @@ COPY_LIBFILES_TO_BLDLIBDIR()
fi
fi
done
+ if [ "$IS_DARWIN" = "yes" ]; then
+ (cd $BLDLIBDIR; \
+ install_name_tool -add_rpath @loader_path libhdf5_java.dylib; \
+ exist_path=` otool -l libhdf5_java.dylib | grep libhdf5 | grep -v java | awk '{print $2}'`; \
+ echo $exist_path; \
+ install_name_tool -change $exist_path @rpath/libhdf5.dylib libhdf5_java.dylib)
+ fi
# copy jar files. Used -f to make sure get a new copy
for tstfile in $COPY_JARTESTFILES
do
diff --git a/java/examples/intro/JavaIntroExample.sh.in b/java/examples/intro/JavaIntroExample.sh.in
index 1886485..7f7dabf 100644
--- a/java/examples/intro/JavaIntroExample.sh.in
+++ b/java/examples/intro/JavaIntroExample.sh.in
@@ -15,6 +15,7 @@
top_builddir=@top_builddir@
top_srcdir=@top_srcdir@
srcdir=@srcdir@
+IS_DARWIN="@H5_IS_DARWIN@"
TESTNAME=EX_Intro
EXIT_SUCCESS=0
@@ -33,8 +34,8 @@ nerrors=0
# where the libs exist
HDFLIB_HOME="$top_srcdir/java/lib"
-BLDLIBDIR="$top_builddir/hdf5/lib"
BLDDIR="."
+BLDLIBDIR="$BLDDIR/testlibs"
HDFTEST_HOME="$top_srcdir/java/examples/intro"
JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar
TESTJARFILE=jar@PACKAGE_TARNAME@intro.jar
@@ -99,6 +100,13 @@ COPY_LIBFILES_TO_BLDLIBDIR()
fi
fi
done
+ if [ "$IS_DARWIN" = "yes" ]; then
+ (cd $BLDLIBDIR; \
+ install_name_tool -add_rpath @loader_path libhdf5_java.dylib; \
+ exist_path=` otool -l libhdf5_java.dylib | grep libhdf5 | grep -v java | awk '{print $2}'`; \
+ echo $exist_path; \
+ install_name_tool -change $exist_path @rpath/libhdf5.dylib libhdf5_java.dylib)
+ fi
# copy jar files. Used -f to make sure get a new copy
for tstfile in $COPY_JARTESTFILES
do