From ea3cd416e53ae42bc79a99963024e891d2f272ba Mon Sep 17 00:00:00 2001 From: Matteo Di Giovinazzo Date: Sat, 19 Sep 2020 18:06:09 -0600 Subject: [PATCH] Update to libecl 2.9.1 --- libecl/README.md | 32 ++++- libecl/cppbuild.sh | 3 +- libecl/pom.xml | 110 +++++++++--------- libecl/samples/KeywordsList.java | 5 +- .../org/bytedeco/libecl/presets/libecl.java | 4 +- 5 files changed, 88 insertions(+), 66 deletions(-) diff --git a/libecl/README.md b/libecl/README.md index 8d8ecd735f..17d30c95d1 100644 --- a/libecl/README.md +++ b/libecl/README.md @@ -1,11 +1,16 @@ JavaCPP Presets for libecl ========================== +License Agreements +------------------ +By downloading these archives, you agree to the [terms and conditions for accessing or otherwise using libecl](https://github.com/equinor/libecl/blob/master/LICENSE). + + Introduction ------------ This directory contains the JavaCPP Presets module for: - * libecl 2018.10 https://github.com/equinor/libecl + * libecl 2.9.1 https://github.com/equinor/libecl Please refer to the parent README.md file for more detailed information about the JavaCPP Presets. @@ -21,17 +26,34 @@ Sample Usage ------------ Here is a simple example of libecl ported to Java from this C source file: - * https://github.com/equinor/libecl/blob/2018.10/applications/ecl/kw_list.c + * https://github.com/equinor/libecl/blob/2.9.1/applications/ecl/kw_list.c -We can use [Maven 3](http://maven.apache.org/) to download and install automatically all the class -files as well as the native binaries. To run this sample code, after creating the `pom.xml` and -`KeywordsList.java` source files below, simply execute on the command line: +We can use [Maven 3](http://maven.apache.org/) to download and install automatically all the class files as well as the native binaries. To run this sample code, after creating the `pom.xml` and `KeywordsList.java` source files below, simply execute on the command line: ```bash $ mvn compile exec:java ``` ### The `pom.xml` build file ```xml + + 4.0.0 + org.bytedeco.libecl + simple + 1.5.4 + + KeywordsList + + + + org.bytedeco + libecl-platform + 2.9.1-1.5.4 + + + + . + + ``` ### The `KeywordsList.java` source file diff --git a/libecl/cppbuild.sh b/libecl/cppbuild.sh index e0f15f9df8..5155eec41a 100644 --- a/libecl/cppbuild.sh +++ b/libecl/cppbuild.sh @@ -7,7 +7,7 @@ if [[ -z "$PLATFORM" ]]; then exit fi -LIBECL_VERSION=2.4.0 +LIBECL_VERSION=2.9.1 download https://github.com/equinor/libecl/archive/$LIBECL_VERSION.zip libecl-$LIBECL_VERSION.zip mkdir -p $PLATFORM @@ -19,7 +19,6 @@ unzip -o ../libecl-$LIBECL_VERSION.zip cd libecl-$LIBECL_VERSION -sed -i 's/etr/ert/g' lib/include/ert/ecl/ecl_grav_calc.hpp mkdir -p build cd build diff --git a/libecl/pom.xml b/libecl/pom.xml index 48057caca7..1eb268bf7b 100644 --- a/libecl/pom.xml +++ b/libecl/pom.xml @@ -1,63 +1,65 @@ - 4.0.0 - - - org.bytedeco - javacpp-presets - 1.5.1-SNAPSHOT - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + 4.0.0 + org.bytedeco - libecl - ${revision} - JavaCPP Presets for libecl + javacpp-presets + 1.5.5-SNAPSHOT + - - 2018.10-${project.parent.version} - + org.bytedeco + libecl + ${libecl.version}-${project.parent.version} + JavaCPP Presets for libecl - - - org.bytedeco - javacpp - - + + + org.bytedeco + javacpp + + - - - - maven-resources-plugin - - - maven-compiler-plugin - - 1.8 - 1.8 - - - - org.bytedeco - javacpp - - - maven-jar-plugin - - - org.moditect - moditect-maven-plugin - - - maven-dependency-plugin - - - maven-source-plugin - - - maven-javadoc-plugin - - - + + 2.9.1 + + + + + + maven-resources-plugin + + + maven-compiler-plugin + + + org.bytedeco + javacpp + + + ${basedir}/cppbuild/${javacpp.platform}/include/ + ${basedir}/cppbuild/${javacpp.platform}/include/libecl-2.9.1/lib/private-include/ + + + + + maven-jar-plugin + + + org.moditect + moditect-maven-plugin + + + maven-dependency-plugin + + + maven-source-plugin + + + maven-javadoc-plugin + + + diff --git a/libecl/samples/KeywordsList.java b/libecl/samples/KeywordsList.java index 56ed73221c..118f8f1f75 100644 --- a/libecl/samples/KeywordsList.java +++ b/libecl/samples/KeywordsList.java @@ -18,8 +18,7 @@ public class KeywordsList { public static void main(String[] args) { - int i; - for (i = 1; i < args.length; i++) { + for (int i = 0; i < args.length; i++) { kw_list(args[i]); } } @@ -27,7 +26,7 @@ public static void main(String[] args) { private static void kw_list(String filename) { fortio_type fortio; ecl_kw_type ecl_kw = ecl_kw_alloc_empty(); - boolean fmt_file; + BooleanPointer fmt_file = new BooleanPointer(); if (ecl_util_fmt_file(filename, fmt_file)) { System.out.println("-----------------------------------------------------------------"); diff --git a/libecl/src/main/java/org/bytedeco/libecl/presets/libecl.java b/libecl/src/main/java/org/bytedeco/libecl/presets/libecl.java index 98d099814a..1aacae3ef7 100644 --- a/libecl/src/main/java/org/bytedeco/libecl/presets/libecl.java +++ b/libecl/src/main/java/org/bytedeco/libecl/presets/libecl.java @@ -186,7 +186,7 @@ "ert/util/timer.hpp", "ert/util/timer.h", //"type_traits", - "ert/util/atomic.h", + //"ert/util/atomic.h", "ert/util/ecl_version.hpp", "ert/util/ecl_version.h", //"stdexcept", @@ -255,7 +255,7 @@ public void init(ClassProperties properties) { if (!includePaths.isEmpty()) { String include = includePaths.get(0); if (include.endsWith("/" + platform + "/include/")) { - String privateInclude = include.replace("/include/", "/libecl-2.4.0/lib/private-include/"); + String privateInclude = include.replace("/include/", "/libecl-2.9.1/lib/private-include/"); if (!includePaths.contains(privateInclude)) { includePaths.add(privateInclude); }