From eaaeab1abac2bc089d1d339a298e71cced078035 Mon Sep 17 00:00:00 2001 From: Nathan Baltzell Date: Fri, 18 Jul 2025 19:46:02 -0400 Subject: [PATCH 1/8] newer coatjava, and might as well require 21 --- pom.xml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 8f02941..c6ce0cd 100755 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ org.jlab.coat coat-libs - 6.3.1-SNAPSHOT + 13.0.3 jar @@ -23,8 +23,7 @@ JRoot - 1.8 - 1.8 + 21 From 4a66a94595ecbad05866a23ca878b114648ef493 Mon Sep 17 00:00:00 2001 From: Nathan Baltzell Date: Fri, 18 Jul 2025 20:59:34 -0400 Subject: [PATCH 2/8] seems to work w/o it --- sconscript | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sconscript b/sconscript index 9458bb7..a168039 100644 --- a/sconscript +++ b/sconscript @@ -1,7 +1,5 @@ Import('env') -#env.JavaH(target = 'native', source = 'src/main/java/org/jlab/jroot/JRootJNI.java') - javah = env.Command('native', 'src/main/java/org/jlab/jroot/JRootJNI.java', ['javac -h $TARGET $SOURCE', Delete('src/main/java/org/jlab/jroot/JRootJNI.class')]) AlwaysBuild(javah) @@ -9,10 +7,13 @@ AlwaysBuild(javah) if 'JAVA_HOME' in env['ENV']: env['JAVA_HOME'] = env['ENV']['JAVA_HOME'] env.Append(CPPPATH = ["$JAVA_HOME/include", "$JAVA_HOME/include/linux"]) -if env['PLATFORM'] == 'darwin': +elif env['PLATFORM'] == 'darwin': env.ParseConfig("echo -I`/usr/libexec/java_home`/include") env.ParseConfig("echo -I`/usr/libexec/java_home`/include/darwin") + +if env['PLATFORM'] == 'darwin': env.ParseConfig("echo -Wl,-rpath,`root-config --libdir`") + env.Append(CPPPATH = ['native']) env.ParseConfig("root-config --libs --cflags") env.SharedLibrary('jrootJNI', Glob('src/cpp/*.cpp')) From 74622e8e1441f9b70a8c05804e567c895d5a55a9 Mon Sep 17 00:00:00 2001 From: Nathan Baltzell Date: Fri, 18 Jul 2025 21:00:33 -0400 Subject: [PATCH 3/8] cleanup --- sconscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sconscript b/sconscript index a168039..28e9888 100644 --- a/sconscript +++ b/sconscript @@ -3,10 +3,10 @@ Import('env') javah = env.Command('native', 'src/main/java/org/jlab/jroot/JRootJNI.java', ['javac -h $TARGET $SOURCE', Delete('src/main/java/org/jlab/jroot/JRootJNI.class')]) AlwaysBuild(javah) - if 'JAVA_HOME' in env['ENV']: env['JAVA_HOME'] = env['ENV']['JAVA_HOME'] env.Append(CPPPATH = ["$JAVA_HOME/include", "$JAVA_HOME/include/linux"]) + elif env['PLATFORM'] == 'darwin': env.ParseConfig("echo -I`/usr/libexec/java_home`/include") env.ParseConfig("echo -I`/usr/libexec/java_home`/include/darwin") From c3f13954449e21258a765824657f6cdcf3bcf186 Mon Sep 17 00:00:00 2001 From: Nathan Baltzell Date: Tue, 7 Oct 2025 12:35:56 -0400 Subject: [PATCH 4/8] append options --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 03d4fce..bf36833 100755 --- a/setup.sh +++ b/setup.sh @@ -2,5 +2,5 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${DIR}/build -export JAVA_OPTS="-Djava.library.path=${DIR}/build" +export JAVA_OPTS="${JAVA_OPTS} -Djava.library.path=${DIR}/build" export JYPATH="${DIR}/target/*" From 359e751997be7e608f86ac0f67cc67ec63959605 Mon Sep 17 00:00:00 2001 From: Nathan Baltzell Date: Tue, 7 Oct 2025 12:36:25 -0400 Subject: [PATCH 5/8] add one-shot build --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1d33dc7 --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ +default: + mvn package + scons build/native + scons + +clean: + rm -rf build + mvn clean From 974e193387789be4405de64775d5cd3f18e49531 Mon Sep 17 00:00:00 2001 From: Nathan Baltzell Date: Tue, 7 Oct 2025 13:41:04 -0400 Subject: [PATCH 6/8] run scons from maven --- pom.xml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/pom.xml b/pom.xml index c6ce0cd..7ca99c8 100755 --- a/pom.xml +++ b/pom.xml @@ -26,4 +26,35 @@ 21 + + + + org.codehaus.mojo + exec-maven-plugin + 3.0.0 + + + scons-1 + package + exec + + build/native + + + + scons-2 + package + exec + + + + + + + scons + + + + + From f2d18e9a7e23f621775370ec3afe1ec4b6099d70 Mon Sep 17 00:00:00 2001 From: Nathan Baltzell Date: Tue, 7 Oct 2025 13:46:29 -0400 Subject: [PATCH 7/8] make maven clean scons --- pom.xml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7ca99c8..0486b2f 100755 --- a/pom.xml +++ b/pom.xml @@ -31,7 +31,7 @@ org.codehaus.mojo exec-maven-plugin - 3.0.0 + 3.6.1 scons-1 @@ -54,6 +54,20 @@ scons + + maven-clean-plugin + 3.5.0 + + + + build + + **/* + + + + + From 7081eacaf54868aaaca802b0cf9018dee6d1d905 Mon Sep 17 00:00:00 2001 From: Nathan Baltzell Date: Tue, 7 Oct 2025 13:46:51 -0400 Subject: [PATCH 8/8] remove Makefile, maven does it --- Makefile | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 Makefile diff --git a/Makefile b/Makefile deleted file mode 100644 index 1d33dc7..0000000 --- a/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -default: - mvn package - scons build/native - scons - -clean: - rm -rf build - mvn clean