diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..4c6f71e --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +*.jar filter=lfs diff=lfs merge=lfs -text +src/main/resources/native/linux-x86-64/* filter=lfs diff=lfs merge=lfs -text +*.gpkg filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..f988b37 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +build +out +.idea +.gradle \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..ce7fef5 --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +gdal-jni-with-native +====== +This project builds GDAL, extract native libraries and makes it available as Java library. At the moment it only supports GDAL on Ubuntu x64 (Linux) + +### Build +In order to build the project the following should happen: +1. Build GDAL docker image, [build_gdal.sh](scripts.build_gdal.sh) is responsible for that +2. Build [lddtopo-rs](https://github.com/REASY/lddtopo-rs), [build_lddtopo.sh](scripts/build_lddtopo.sh) is responsible for that +3. Analyze the dependencies of /usr/share/java/libgdalalljni.so by building DAG and running topological sort on it +4. Copy all required native modules to src/main/resources/native +5. Generate src/main/resources/native/modules.txt that contains new line separated list of modules to be loaded. The order comes from topological sort! + +All of this is done in a script [generate_native_modules.sh](scripts/generate_native_modules.sh), just run it from root folder of the repo to get the final JAR +```bash +./scripts/generate_native_modules.sh +``` diff --git a/build.gradle b/build.gradle new file mode 100755 index 0000000..3b7fa3c --- /dev/null +++ b/build.gradle @@ -0,0 +1,81 @@ +group = 'gdal-jni-with-native' +version = '3.5.3.0' + +buildscript { + repositories { + jcenter() + mavenLocal() + mavenCentral() + maven { url "https://plugins.gradle.org/m2/" } + } +} + +apply plugin: 'maven' +apply plugin: 'java' +apply plugin: 'idea' + +sourceCompatibility = 1.8 +targetCompatibility = 1.8 + +sourceSets { + main { + resources { + srcDir "src/main/resources" + } + } + test { + resources { + srcDir "src/test/resources" + } + } +} + +repositories { + mavenLocal() + mavenCentral() + jcenter() +} + +dependencies { + implementation group: 'net.java.dev.jna', name: 'jna', version: '5.13.0' + implementation files("libs/gdal-3.5.3.jar", + "libs/gdal-3.5.3-javadoc.jar", + "libs/gdal-3.5.3-sources.jar" + ) +} + +jar { + from { + configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } + configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } + } +} + +task sourcesJar(type: Jar, dependsOn: classes) { + classifier = 'sources' + from sourceSets.main.allSource +} + +task javadocJar(type: Jar, dependsOn: javadoc) { + classifier = 'javadoc' + from javadoc.destinationDir +} + +artifacts { + archives sourcesJar + archives javadocJar +} + +install { + repositories.mavenInstaller { + pom.project { + licenses { + license { + name 'The Apache Software License, Version 2.0' + url 'http://www.apache.org/licenses/LICENSE-2.0.txt' + distribution 'repo' + } + } + } + } +} \ No newline at end of file diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 0000000..b560ba5 --- /dev/null +++ b/docker/README.md @@ -0,0 +1,10 @@ +Docker images +===== + +# GDAL image with native libraries +[gdal-ubuntu-small.dockerfile](gdal-ubuntu-small.dockerfile) is based on the one provided by GDAL team, [Small: osgeo/gdal:ubuntu-small-latest](https://github.com/OSGeo/gdal/tree/release/3.5/docker#small-osgeogdalubuntu-small-latest) with two modifications: +- Added swig and Java to be able to generate JNI +- [Removed the load of native library in gdal](https://github.com/OSGeo/gdal/blob/release/3.5/swig/include/java/gdal_java.i#L18). Proper load of all required native all libraries is the reason why this library exists. + +# lddtopo +[lddtopo.dockerfile](lddtopo.dockerfile) is built on top of gdal-ubuntu-small.dockerfile. It uses https://github.com/REASY/lddtopo-rs to build the dependency graph of a provided library and run topological sort to get the order in which they should be loaded. \ No newline at end of file diff --git a/docker/bh-set-envvars.sh b/docker/bh-set-envvars.sh new file mode 100644 index 0000000..1c9391a --- /dev/null +++ b/docker/bh-set-envvars.sh @@ -0,0 +1,20 @@ +#!/bin/sh +set -eu + +if test "${TARGET_ARCH:-}" != ""; then + if test "${TARGET_ARCH}" = "arm64"; then + export GCC_ARCH=aarch64 + else + echo "Unhandled architecture: ${TARGET_ARCH}" + exit 0 + fi + export APT_ARCH_SUFFIX=":${TARGET_ARCH}" + export CC=${GCC_ARCH}-linux-gnu-gcc-9 + export CXX=${GCC_ARCH}-linux-gnu-g++-9 + export WITH_HOST="--host=${GCC_ARCH}-linux-gnu" +else + export APT_ARCH_SUFFIX="" + export WITH_HOST="" + GCC_ARCH="$(uname -m)" + export GCC_ARCH +fi diff --git a/docker/extract_native.sh b/docker/extract_native.sh new file mode 100755 index 0000000..5588aea --- /dev/null +++ b/docker/extract_native.sh @@ -0,0 +1,55 @@ +#!/usr/bin/env bash + +set -e + +if [[ -z "$1" || -z "$2" ]] + then + echo "Missing mandatory arguments: path_shared_library, path_where_to_copy" + exit 1 +fi + +path_shared_library=$1 +copy_path=$2 +path_to_json="/tmp/topo_sorted.json" + +RUST_LOG=info /opt/lddtopo-rs/target/release/lddtopo-rs --shared-library-path $path_shared_library --output-file $path_to_json + +# Skipping libmfhdfalt due to /tmp/xxxx.7669203887046987097/libmfhdfalt_5076252650710112250.so: undefined symbol: error_top +# Skip libproj.so.15 +modules_to_ignore=("ld-linux-x86-64" "libc.so" "libm.so" "libpthread" "libstdc" "libmfhdfalt" "libproj.so.15") +os_name="linux" +arch_type="x86-64" + +dest_folder="$copy_path/native/${os_name}-${arch_type}" +mkdir -p $dest_folder + +path_native_modules_to_load="${copy_path}/native/${os_name}-${arch_type}.txt" +rm -rf "$path_native_modules_to_load" + +for OUTPUT in $(jq -r '.topo_sorted_libs[] | .name + ":" + .path' $path_to_json) +do + lib=$(echo $OUTPUT | cut -d ":" -f 1) + found=false + for i in "${modules_to_ignore[@]}"; do + if grep -q "$i" <<< "$lib"; then + #echo "Found $i in $lib, ignoring..."; + found=true; + break; + fi + done + + if $found; then + continue; + fi + + path=$(echo $OUTPUT | cut -d ":" -f 2) + dest_path="${dest_folder}/$lib" + #echo $dest_path + + cp $path $dest_path + echo "Copied $lib to $dest_path" + + # Write native module to the list of modules + echo $lib >> $path_native_modules_to_load +done + diff --git a/docker/gdal-ubuntu-small.dockerfile b/docker/gdal-ubuntu-small.dockerfile new file mode 100644 index 0000000..6609147 --- /dev/null +++ b/docker/gdal-ubuntu-small.dockerfile @@ -0,0 +1,257 @@ +# Based on https://github.com/OSGeo/gdal/tree/v3.5.3/docker + +## +# osgeo/gdal:ubuntu-small + +# This file is available at the option of the licensee under: +# Public domain +# or licensed under MIT (LICENSE.TXT) Copyright 2019 Even Rouault + +ARG PROJ_INSTALL_PREFIX=/usr/local +ARG BASE_IMAGE=ubuntu:20.04 +ARG TARGET_BASE_IMAGE=ubuntu:20.04 + +FROM $BASE_IMAGE as builder + +# Derived from osgeo/proj by Howard Butler +LABEL maintainer="Even Rouault " + +ARG TARGET_ARCH= +RUN echo ${TARGET_ARCH} +COPY ./bh-set-envvars.sh /buildscripts/bh-set-envvars.sh + +RUN . /buildscripts/bh-set-envvars.sh \ + && if test "${TARGET_ARCH}" != ""; then \ + rm -f /etc/apt/sources.list \ + && echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse" >> /etc/apt/sources.list \ + && echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse" >> /etc/apt/sources.list \ + && echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse" >> /etc/apt/sources.list \ + && echo "deb [arch=amd64] http://security.ubuntu.com/ubuntu focal-security main restricted universe multiverse" >> /etc/apt/sources.list \ + && echo "deb [arch=${TARGET_ARCH}] http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe multiverse" >> /etc/apt/sources.list \ + && echo "deb [arch=${TARGET_ARCH}] http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe multiverse" >> /etc/apt/sources.list \ + && echo "deb [arch=${TARGET_ARCH}] http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse" >> /etc/apt/sources.list \ + && dpkg --add-architecture ${TARGET_ARCH} \ + && apt-get update -y \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y g++-9-${GCC_ARCH}-linux-gnu \ + && ln -s ${GCC_ARCH}-linux-gnu-gcc-9 /usr/bin/${GCC_ARCH}-linux-gnu-gcc \ + && ln -s ${GCC_ARCH}-linux-gnu-g++-9 /usr/bin/${GCC_ARCH}-linux-gnu-g++; \ + fi + +# Setup build env for PROJ +USER root +RUN . /buildscripts/bh-set-envvars.sh \ + && apt-get update -y \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y --fix-missing --no-install-recommends \ + build-essential ca-certificates \ + git make cmake wget unzip libtool automake \ + zlib1g-dev${APT_ARCH_SUFFIX} libsqlite3-dev${APT_ARCH_SUFFIX} pkg-config sqlite3 libcurl4-gnutls-dev${APT_ARCH_SUFFIX} \ + libtiff5-dev${APT_ARCH_SUFFIX} + +ARG JAVA_VERSION=11 +# Setup build env for GDAL +RUN . /buildscripts/bh-set-envvars.sh \ + && apt-get update -y \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y --fix-missing --no-install-recommends \ + python3-dev${APT_ARCH_SUFFIX} python3-numpy${APT_ARCH_SUFFIX} python3-setuptools${APT_ARCH_SUFFIX} \ + libjpeg-dev${APT_ARCH_SUFFIX} libgeos-dev${APT_ARCH_SUFFIX} \ + libexpat-dev${APT_ARCH_SUFFIX} libxerces-c-dev${APT_ARCH_SUFFIX} \ + libwebp-dev${APT_ARCH_SUFFIX} libpng-dev${APT_ARCH_SUFFIX} \ + libzstd-dev${APT_ARCH_SUFFIX} bash zip curl \ + libpq-dev${APT_ARCH_SUFFIX} libssl-dev${APT_ARCH_SUFFIX} libopenjp2-7-dev${APT_ARCH_SUFFIX} \ + libspatialite-dev${APT_ARCH_SUFFIX} \ + swig ant openjdk-"$JAVA_VERSION"-jdk${APT_ARCH_SUFFIX} \ + autoconf automake sqlite3 bash-completion + +# Build openjpeg +ARG OPENJPEG_VERSION= +RUN . /buildscripts/bh-set-envvars.sh \ + && if test "${OPENJPEG_VERSION}" != ""; then ( \ + wget -q https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG_VERSION}.tar.gz \ + && tar xzf v${OPENJPEG_VERSION}.tar.gz \ + && rm -f v${OPENJPEG_VERSION}.tar.gz \ + && cd openjpeg-${OPENJPEG_VERSION} \ + && cmake . -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + && make -j$(nproc) \ + && make install \ + && mkdir -p /build_thirdparty/usr/lib \ + && cp -P /usr/lib/libopenjp2*.so* /build_thirdparty/usr/lib \ + && for i in /build_thirdparty/usr/lib/*; do strip -s $i 2>/dev/null || /bin/true; done \ + && cd .. \ + && rm -rf openjpeg-${OPENJPEG_VERSION} \ + ); fi + +ARG PROJ_INSTALL_PREFIX +ARG PROJ_DATUMGRID_LATEST_LAST_MODIFIED +RUN \ + mkdir -p /build_projgrids/${PROJ_INSTALL_PREFIX}/share/proj \ + && curl -LOs http://download.osgeo.org/proj/proj-datumgrid-latest.zip \ + && unzip -q -j -u -o proj-datumgrid-latest.zip -d /build_projgrids/${PROJ_INSTALL_PREFIX}/share/proj \ + && rm -f *.zip + +RUN apt-get update -y \ + && apt-get install -y --fix-missing --no-install-recommends rsync ccache +ARG RSYNC_REMOTE + +# Build PROJ +ARG PROJ_VERSION=master +RUN . /buildscripts/bh-set-envvars.sh \ + && mkdir proj \ + && wget -q https://github.com/OSGeo/PROJ/archive/${PROJ_VERSION}.tar.gz -O - \ + | tar xz -C proj --strip-components=1 \ + && cd proj \ + && if test "${RSYNC_REMOTE:-}" != ""; then \ + echo "Downloading cache..."; \ + rsync -ra ${RSYNC_REMOTE}/proj/${GCC_ARCH}/ $HOME/; \ + echo "Finished"; \ + export CC="ccache ${GCC_ARCH}-linux-gnu-gcc"; \ + export CXX="ccache ${GCC_ARCH}-linux-gnu-g++"; \ + export PROJ_DB_CACHE_DIR="$HOME/.ccache"; \ + ccache -M 100M; \ + fi \ + && CFLAGS='-DPROJ_RENAME_SYMBOLS -O2' CXXFLAGS='-DPROJ_RENAME_SYMBOLS -DPROJ_INTERNAL_CPP_NAMESPACE -O2' \ + cmake . \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=${PROJ_INSTALL_PREFIX} \ + -DBUILD_TESTING=OFF \ + && make -j$(nproc) \ + && make install DESTDIR="/build" \ + && if test "${RSYNC_REMOTE:-}" != ""; then \ + ccache -s; \ + echo "Uploading cache..."; \ + rsync -ra --delete $HOME/.ccache ${RSYNC_REMOTE}/proj/${GCC_ARCH}/; \ + echo "Finished"; \ + rm -rf $HOME/.ccache; \ + unset CC; \ + unset CXX; \ + fi \ + && cd .. \ + && rm -rf proj \ + && PROJ_SO=$(readlink -f /build${PROJ_INSTALL_PREFIX}/lib/libproj.so | awk 'BEGIN {FS="libproj.so."} {print $2}') \ + && PROJ_SO_FIRST=$(echo $PROJ_SO | awk 'BEGIN {FS="."} {print $1}') \ + && mv /build${PROJ_INSTALL_PREFIX}/lib/libproj.so.${PROJ_SO} /build${PROJ_INSTALL_PREFIX}/lib/libinternalproj.so.${PROJ_SO} \ + && ln -s libinternalproj.so.${PROJ_SO} /build${PROJ_INSTALL_PREFIX}/lib/libinternalproj.so.${PROJ_SO_FIRST} \ + && ln -s libinternalproj.so.${PROJ_SO} /build${PROJ_INSTALL_PREFIX}/lib/libinternalproj.so \ + && rm /build${PROJ_INSTALL_PREFIX}/lib/libproj.* \ + && ln -s libinternalproj.so.${PROJ_SO} /build${PROJ_INSTALL_PREFIX}/lib/libproj.so.${PROJ_SO_FIRST} \ + && ${GCC_ARCH}-linux-gnu-strip -s /build${PROJ_INSTALL_PREFIX}/lib/libinternalproj.so.${PROJ_SO} \ + && for i in /build${PROJ_INSTALL_PREFIX}/bin/*; do ${GCC_ARCH}-linux-gnu-strip -s $i 2>/dev/null || /bin/true; done + +# Build GDAL +ARG GDAL_VERSION=master +ARG GDAL_RELEASE_DATE +ARG GDAL_BUILD_IS_RELEASE +ARG GDAL_REPOSITORY=OSGeo/gdal + +RUN . /buildscripts/bh-set-envvars.sh \ + && if test "${GDAL_VERSION}" = "master"; then \ + export GDAL_VERSION=$(curl -Ls https://api.github.com/repos/${GDAL_REPOSITORY}/commits/HEAD -H "Accept: application/vnd.github.VERSION.sha"); \ + export GDAL_RELEASE_DATE=$(date "+%Y%m%d"); \ + fi \ + && if test "x${GDAL_BUILD_IS_RELEASE:-}" = "x"; then \ + export GDAL_SHA1SUM=${GDAL_VERSION}; \ + fi \ + && mkdir gdal \ + && wget -q https://github.com/${GDAL_REPOSITORY}/archive/${GDAL_VERSION}.tar.gz -O - \ + | tar xz -C gdal --strip-components=1 \ + && cd gdal \ + && if test "${RSYNC_REMOTE:-}" != ""; then \ + echo "Downloading cache..."; \ + rsync -ra ${RSYNC_REMOTE}/gdal/${GCC_ARCH}/ $HOME/; \ + echo "Finished"; \ + # Little trick to avoid issues with Python bindings + printf "#!/bin/sh\nccache %s-linux-gnu-gcc \$*" "${GCC_ARCH}" > ccache_gcc.sh; \ + chmod +x ccache_gcc.sh; \ + printf "#!/bin/sh\nccache %s-linux-gnu-g++ \$*" "${GCC_ARCH}" > ccache_g++.sh; \ + chmod +x ccache_g++.sh; \ + export CC=$PWD/ccache_gcc.sh; \ + export CXX=$PWD/ccache_g++.sh; \ + ccache -M 1G; \ + fi \ + && mkdir build \ + && cd build \ + # Comment the loading of `gdalalljni` because it will be taken care. Otherwise we will see warning in console + && sed -i 's/System.loadLibrary(\"gdalalljni\");//g' ../swig/include/java/gdal_java.i \ + && CFLAGS='-DPROJ_RENAME_SYMBOLS -O2' CXXFLAGS='-DPROJ_RENAME_SYMBOLS -DPROJ_INTERNAL_CPP_NAMESPACE -O2' \ + cmake .. \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DPROJ_INCLUDE_DIR="/build${PROJ_INSTALL_PREFIX-/usr/local}/include" \ + -DPROJ_LIBRARY="/build${PROJ_INSTALL_PREFIX-/usr/local}/lib/libinternalproj.so" \ + -DGDAL_USE_TIFF_INTERNAL=ON \ + -DGDAL_USE_GEOTIFF_INTERNAL=ON \ + && make -j$(nproc) \ + && make install DESTDIR="/build" \ + && cd .. \ + && if test "${RSYNC_REMOTE:-}" != ""; then \ + ccache -s; \ + echo "Uploading cache..."; \ + rsync -ra --delete $HOME/.ccache ${RSYNC_REMOTE}/gdal/${GCC_ARCH}/; \ + echo "Finished"; \ + rm -rf $HOME/.ccache; \ + unset CC; \ + unset CXX; \ + fi \ + && cd .. \ + && rm -rf gdal \ + && mkdir -p /build_gdal_python/usr/lib \ + && mkdir -p /build_gdal_python/usr/bin \ + && mkdir -p /build_gdal_version_changing/usr/include \ + && mv /build/usr/lib/python* /build_gdal_python/usr/lib \ + && mv /build/usr/lib /build_gdal_version_changing/usr \ + && mv /build/usr/include/gdal_version.h /build_gdal_version_changing/usr/include \ + && mv /build/usr/bin/*.py /build_gdal_python/usr/bin \ + && mv /build/usr/bin /build_gdal_version_changing/usr \ + && for i in /build_gdal_version_changing/usr/lib/${GCC_ARCH}-linux-gnu/*; do ${GCC_ARCH}-linux-gnu-strip -s $i 2>/dev/null || /bin/true; done \ + && for i in /build_gdal_python/usr/lib/python3/dist-packages/osgeo/*.so; do ${GCC_ARCH}-linux-gnu-strip -s $i 2>/dev/null || /bin/true; done \ + && for i in /build_gdal_version_changing/usr/bin/*; do ${GCC_ARCH}-linux-gnu-strip -s $i 2>/dev/null || /bin/true; done + +# Build final image +FROM $TARGET_BASE_IMAGE as runner + +USER root +RUN date + +# Update distro +RUN apt-get update -y && apt-get upgrade -y + +# PROJ dependencies +RUN apt-get update; \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + libsqlite3-0 libtiff5 libcurl4 \ + curl unzip ca-certificates + +# GDAL dependencies +RUN apt-get update -y; \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + python3-numpy libpython3.8 \ + libjpeg-turbo8 libgeos-3.8.0 libgeos-c1v5 \ + libexpat1 \ + libxerces-c3.2 \ + libwebp6 libpng16-16 \ + libzstd1 bash libpq5 libssl1.1 libopenjp2-7 libspatialite7 + +RUN apt-get update; \ + DEBIAN_FRONTEND=noninteractive apt-get install -y python-is-python3 + +# Order layers starting with less frequently varying ones +# Only used for custom libopenjp2 +# COPY --from=builder /build_thirdparty/usr/ /usr/ + +COPY --from=builder /build_projgrids/usr/ /usr/ + +ARG PROJ_INSTALL_PREFIX +COPY --from=builder /build${PROJ_INSTALL_PREFIX}/share/proj/ ${PROJ_INSTALL_PREFIX}/share/proj/ +COPY --from=builder /build${PROJ_INSTALL_PREFIX}/include/ ${PROJ_INSTALL_PREFIX}/include/ +COPY --from=builder /build${PROJ_INSTALL_PREFIX}/bin/ ${PROJ_INSTALL_PREFIX}/bin/ +COPY --from=builder /build${PROJ_INSTALL_PREFIX}/lib/ ${PROJ_INSTALL_PREFIX}/lib/ + +COPY --from=builder /build/usr/share/java /usr/share/java +COPY --from=builder /build/usr/share/gdal/ /usr/share/gdal/ +COPY --from=builder /build/usr/include/ /usr/include/ +COPY --from=builder /build_gdal_python/usr/ /usr/ +COPY --from=builder /build_gdal_version_changing/usr/ /usr/ + +RUN ldconfig + + diff --git a/docker/lddtopo.dockerfile b/docker/lddtopo.dockerfile new file mode 100644 index 0000000..46e1ff5 --- /dev/null +++ b/docker/lddtopo.dockerfile @@ -0,0 +1,23 @@ +ARG IMAGE= + +FROM $IMAGE + +# Dependencies for Rust +RUN apt-get update -y; \ + DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential ca-certificates git make cmake wget unzip libtool automake jq && \ + rm -rf /var/lib/apt/lists/* + +# https://rust-lang.github.io/rustup/installation/index.html#choosing-where-to-install +ENV RUSTUP_HOME=/usr/local/rustup +ENV CARGO_HOME=/usr/local/cargo +ENV PATH=/usr/local/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + +# Install Rust +RUN curl https://sh.rustup.rs -sSf | sh -s -- -y + +# Clone lddtopo-rs and build it +RUN git clone --depth 1 https://github.com/REASY/lddtopo-rs /opt/lddtopo-rs && cd /opt/lddtopo-rs && cargo build --release + +COPY extract_native.sh /opt/ + +ENTRYPOINT ["/opt/extract_native.sh"] \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..220b970 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.jar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:778e7f46bd67eaea2de5bcbdbb40878c6614656014ba59a72ce8648eaf43a925 +size 56172 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..d355f4c --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.3-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..cccdd3d --- /dev/null +++ b/gradlew @@ -0,0 +1,172 @@ +#!/usr/bin/env sh + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100755 index 0000000..f955316 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,84 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 0000000..f36474a --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,3 @@ +install: + - echo "Install jar" + - ./gradlew clean install \ No newline at end of file diff --git a/libs/gdal-3.5.3-javadoc.jar b/libs/gdal-3.5.3-javadoc.jar new file mode 100644 index 0000000..9da612a --- /dev/null +++ b/libs/gdal-3.5.3-javadoc.jar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4ed5ed3c3d361c90a662a59da4bfac0e43c0168a9a8040adfea9ed24147a0639 +size 923453 diff --git a/libs/gdal-3.5.3-sources.jar b/libs/gdal-3.5.3-sources.jar new file mode 100644 index 0000000..f8da098 --- /dev/null +++ b/libs/gdal-3.5.3-sources.jar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d56a33df9e66d908185e123aae8f90f4e0578f1e754defe7925b6a1bb9547877 +size 107664 diff --git a/libs/gdal-3.5.3.jar b/libs/gdal-3.5.3.jar new file mode 100644 index 0000000..5306b57 --- /dev/null +++ b/libs/gdal-3.5.3.jar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91746000411adb6d1d6d50506c5c1b16cbb879d9177bfecf15eb895d260fe563 +size 178287 diff --git a/scripts/build_gdal.sh b/scripts/build_gdal.sh new file mode 100755 index 0000000..417512a --- /dev/null +++ b/scripts/build_gdal.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -eu + +if [[ -z "$1" || -z "$2" ]] + then + echo "Missing mandatory arguments: PROJ_VERSION, GDAL_VERSION" + exit 1 +fi + +PROJ_VERSION=$1 +GDAL_VERSION=$2 + +docker build --build-arg PROJ_VERSION=$PROJ_VERSION --build-arg GDAL_VERSION=v"${GDAL_VERSION}" \ + -f docker/gdal-ubuntu-small.dockerfile -t qartez-engine/gdal:"${GDAL_VERSION}" docker/ + diff --git a/scripts/build_lddtopo.sh b/scripts/build_lddtopo.sh new file mode 100755 index 0000000..84038f0 --- /dev/null +++ b/scripts/build_lddtopo.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +set -eu + +if [[ -z "$1" ]] + then + echo "Missing mandatory arguments: GDAL_VERSION" + exit 1 +fi + +GDAL_VERSION=$1 + +docker build --build-arg IMAGE="qartez-engine/gdal:$GDAL_VERSION" -f docker/lddtopo.dockerfile \ + -t qartez-engine/lddtopo:"${GDAL_VERSION}" docker/ + diff --git a/scripts/generate_native_modules.sh b/scripts/generate_native_modules.sh new file mode 100755 index 0000000..17189fd --- /dev/null +++ b/scripts/generate_native_modules.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash +set -eu + +SCRIPT_DIR=$(dirname "$0") +case $SCRIPT_DIR in + "/"*) + ;; + ".") + SCRIPT_DIR=$(pwd) + ;; + *) + SCRIPT_DIR=$(pwd)/$(dirname "$0") + ;; +esac + +export SCRIPT_DIR + +PROJ_VERSION="9.1.1" +GDAL_VERSION="3.5.3" + +# Build GDAL +"${SCRIPT_DIR}/build_gdal.sh" $PROJ_VERSION $GDAL_VERSION + +docker run -it --entrypoint /bin/bash -u $(id -u):$(id -g) \ + -v $(pwd)/libs:/java_libs \ + qartez-engine/gdal:"$GDAL_VERSION" -c "cp /usr/share/java/gdal-*.jar /java_libs/" + +# Build lddtopo +"${SCRIPT_DIR}/build_lddtopo.sh" $GDAL_VERSION + +# Analyze dependencies, build DAG, run toposort and copy them to /resource folder +docker run -u $(id -u):$(id -g) \ + -v $(pwd)/src/main/resources/:/resources qartez-engine/lddtopo:"$GDAL_VERSION" /usr/share/java/libgdalalljni.so /resources + +# Build and test GDAL native library +./gradlew build && java -cp build/libs/gdal-jni-with-native-3.5.3.0.jar com.github.reasy.gdal.GdalExample + diff --git a/settings.gradle b/settings.gradle new file mode 100755 index 0000000..8d65553 --- /dev/null +++ b/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'gdal-jni-with-native' diff --git a/src/main/java/com/github/reasy/gdal/GdalExample.java b/src/main/java/com/github/reasy/gdal/GdalExample.java new file mode 100644 index 0000000..68388cd --- /dev/null +++ b/src/main/java/com/github/reasy/gdal/GdalExample.java @@ -0,0 +1,94 @@ +package com.github.reasy.gdal; + +import org.gdal.gdal.Dataset; +import org.gdal.gdal.Driver; +import org.gdal.gdal.gdal; +import org.gdal.gdalconst.gdalconstConstants; +import org.gdal.ogr.DataSource; +import org.gdal.ogr.Layer; +import org.gdal.ogr.ogr; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.Random; + +public class GdalExample { + private GdalExample() { + } + + private static void runExamples() throws IOException { + System.out.println("GDAL version: " + gdal.VersionInfo()); + + System.out.println("########## showGpkgLayers ##########"); + showGpkgLayers(); + System.out.println("########## showGpkgLayers ##########"); + System.out.println(); + System.out.println(); + + + System.out.println("########## writeCogGeoTiff #########"); + writeCogGeoTiff(); + System.out.println("########## writeCogGeoTiff #########"); + } + + private static void writeCogGeoTiff() throws IOException { + int xSize = 512; + int ySize = 512; + Random rnd = new Random(); + float[] data = new float[xSize * ySize]; + for (int y = 0; y < ySize; y++) { + for (int x = 0; x < xSize; x++) { + int offset = y * ySize + x; + data[offset] = rnd.nextFloat(); + } + } + + Driver drv = gdal.GetDriverByName("MEM"); + int type = gdalconstConstants.GDT_Float32; + Dataset memDs = drv.Create("", xSize, ySize, 1, type); + System.out.printf("Created %d x %d dataset with 1 band and type %d\n", xSize, ySize, type); + + memDs.GetRasterBand(1).WriteRaster(0, 0, xSize, ySize, data); + memDs.BuildOverviews("NEAREST", new int[]{2, 4, 8, 16, 32}); + + Path tiffTempFile = Files.createTempFile("cog-", ".tiff"); + Driver gtiffDrv = gdal.GetDriverByName("GTiff"); + gtiffDrv.CreateCopy(tiffTempFile.toAbsolutePath().toString(), memDs, new String[]{"COPY_SRC_OVERVIEWS=YES", + "TILED=YES", + "COMPRESS=LZW"}); + gtiffDrv.delete(); + memDs.delete(); + + System.out.println("Wrote COG GeoTIFF to " + tiffTempFile); + } + + private static void showGpkgLayers() { + DataSource open = ogr.Open("src/main/resources/example.gpkg"); + System.out.println("Name: " + open.GetName()); + System.out.println("Layers: " + open.GetLayerCount()); + + for (int layerIndex = 1; layerIndex <= open.GetLayerCount(); layerIndex++) { + Layer layer = open.GetLayer(layerIndex); + if (layer == null) { + System.out.printf("Layer[%d] is null!\n", layerIndex); + } else { + System.out.printf("Layer[%d]: %s\n", layerIndex, layer.GetName()); + } + } + } + + public static void main(String[] args) throws Exception { + System.out.println("OS name: " + System.getProperty("os.name")); + System.out.println("OS arch: " + System.getProperty("os.arch")); + System.out.println("OS version: " + System.getProperty("os.version")); + System.out.println("Java version: " + System.getProperty("java.version")); + + // Force to load GDAL JNI and all dependencies + JNIGdalLoader.load(); + + gdal.AllRegister(); + + runExamples(); + } +} \ No newline at end of file diff --git a/src/main/java/com/github/reasy/gdal/JNIGdalLoader.java b/src/main/java/com/github/reasy/gdal/JNIGdalLoader.java new file mode 100644 index 0000000..ab066a2 --- /dev/null +++ b/src/main/java/com/github/reasy/gdal/JNIGdalLoader.java @@ -0,0 +1,61 @@ +package com.github.reasy.gdal; + +import com.sun.jna.Platform; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +public class JNIGdalLoader { + public static final String[] MODULES_TO_LOAD; + + public static final boolean IS_LOADED; + + public static final String PATH_TO_MODULES = String.format("native/%s.txt", Platform.RESOURCE_PREFIX); + + static { + try { + MODULES_TO_LOAD = GetModules(); + System.out.printf("JNIGdalLoader java: loading %d shared library...\n", MODULES_TO_LOAD.length); + + NativeLibraryLoader loader = new NativeLibraryLoader("/native"); + for (String module : MODULES_TO_LOAD) { + loader.load(module); + } + System.out.println("JNIGdalLoader java: loaded all shared libraries"); + IS_LOADED = true; + } catch (Exception ex) { + System.out.println(ex.getMessage()); + System.out.println("STACKTRACE:"); + ex.printStackTrace(); + throw new RuntimeException(ex); + } + } + + public static void load() { + // Just make sure it that it is loaded. + // If we reach here, it must always be true (because otherwise the RuntimeException should have been thrown before in static ctor) + assert IS_LOADED; + } + + static String[] GetModules() throws IOException { + List modules = new ArrayList<>(); + try (InputStream inputStream = JNIGdalLoader.class.getClassLoader().getResourceAsStream(PATH_TO_MODULES)) { + Objects.requireNonNull(inputStream, String.format("Resource as stream for '%s' is null", PATH_TO_MODULES)); + try (InputStreamReader streamReader = new InputStreamReader(inputStream, StandardCharsets.UTF_8); + BufferedReader reader = new BufferedReader(streamReader)) { + String line; + while ((line = reader.readLine()) != null) { + modules.add(line); + } + } + } + return modules.toArray(new String[0]); + } + +} diff --git a/src/main/java/com/github/reasy/gdal/NativeLibraryLoader.java b/src/main/java/com/github/reasy/gdal/NativeLibraryLoader.java new file mode 100644 index 0000000..e50ee33 --- /dev/null +++ b/src/main/java/com/github/reasy/gdal/NativeLibraryLoader.java @@ -0,0 +1,108 @@ +package com.github.reasy.gdal; + +import com.sun.jna.Platform; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.net.URL; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardCopyOption; +import java.util.HashMap; +import java.util.Map; + +/** + * Loads a native library from the resource directory of the class. + * Uses Platform.RESOURCE_PREFIX from JNA to load native libraries according to the running runtime + * + * Based on RulesJNI + */ +public class NativeLibraryLoader { + + static class NativeLibraryInfo { + public final String path; + public final File tempFile; + + NativeLibraryInfo(String path, File tempFile) { + this.path = path; + this.tempFile = tempFile; + } + } + + private static final Map LOADED_LIBS = new HashMap<>(); + + private final String absolutePathToPackage; + private final static Path tempDir; + + static { + try { + tempDir = Files.createTempDirectory("gdal_jni_with_native."); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + public NativeLibraryLoader(String absolutePathToPackage) { + if (absolutePathToPackage == null) { + throw new NullPointerException("absolutePathToPackage must not be null"); + } + this.absolutePathToPackage = absolutePathToPackage; + } + + public void load(final String name) { + String path = absolutePathToPackage + "/" + libraryRelativePath(name); + URL libraryResource = NativeLibraryLoader.class.getResource(path); + failOnNullResource(libraryResource, name); + load(name, libraryResource); + } + + synchronized private static void load(String name, URL libraryResource) { + String basename = libraryBasename(name); + if (LOADED_LIBS.containsKey(basename)) { + if (!libraryResource.toString().equals(LOADED_LIBS.get(basename).path)) { + throw new UnsatisfiedLinkError(String.format( + "Cannot load two native libraries with same basename ('%s') from different paths\nFirst library: %s\nSecond library: %s\n", + basename, LOADED_LIBS.get(basename).path, libraryResource)); + } + return; + } + Path tempFile; + try { + tempFile = extractLibrary(basename, libraryResource); + } catch (IOException e) { + throw new UnsatisfiedLinkError(e.getMessage()); + } + System.load(tempFile.toAbsolutePath().toString()); + LOADED_LIBS.put(basename, new NativeLibraryInfo(libraryResource.toString(), tempFile.toFile())); + } + + static String libraryRelativePath(final String name) { + if (name == null) { + throw new NullPointerException("name must not be null"); + } + String basename = libraryBasename(name); + return String.format("%s/%s", Platform.RESOURCE_PREFIX, basename); + } + + private static String libraryBasename(final String name) { + return name.substring(name.lastIndexOf('/') + 1); + } + + private static void failOnNullResource(final URL resource, final String name) { + if (resource == null) { + throw new UnsatisfiedLinkError(String.format( + "Failed to find native library '%s' in %s. Platform architecture is %s", name, Platform.RESOURCE_PREFIX, Platform.ARCH)); + } + } + + private static Path extractLibrary(String basename, URL libraryResource) throws IOException { + String mapped = System.mapLibraryName(basename); + int lastDot = mapped.lastIndexOf('.'); + Path tempFile = Files.createTempFile(tempDir, mapped.substring(0, lastDot) + "_", mapped.substring(lastDot)); + try (InputStream in = libraryResource.openStream()) { + Files.copy(in, tempFile, StandardCopyOption.REPLACE_EXISTING); + } + return tempFile; + } +} diff --git a/src/main/resources/example.gpkg b/src/main/resources/example.gpkg new file mode 100644 index 0000000..dce0330 --- /dev/null +++ b/src/main/resources/example.gpkg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0c43987de66eb3a3706161d206cbea47a75f7b9f10b792cd1089307c2d33130c +size 2682880 diff --git a/src/main/resources/native/linux-x86-64.txt b/src/main/resources/native/linux-x86-64.txt new file mode 100644 index 0000000..11a9d7d --- /dev/null +++ b/src/main/resources/native/linux-x86-64.txt @@ -0,0 +1,63 @@ +libicudata.so.66 +liblber-2.4.so.2 +libzstd.so.1 +libz.so.1 +libffi.so.7 +libtasn1.so.6 +libnghttp2.so.14 +libnettle.so.7 +libunistring.so.2 +libresolv.so.2 +libcom_err.so.2 +libexpat.so.1 +libjbig.so.0 +liblzma.so.5 +libpng16.so.16 +libopenjp2.so.7 +libwebp.so.6 +libdl.so.2 +libcrypto.so.1.1 +libssl.so.1.1 +libjpeg.so.8 +libtiff.so.5 +libp11-kit.so.0 +libgmp.so.10 +libidn2.so.0 +libkrb5support.so.0 +libkeyutils.so.1 +libheimbase.so.1 +libsqlite3.so.0 +libgcc_s.so.1 +libk5crypto.so.3 +libkrb5.so.3 +libgssapi_krb5.so.2 +libssh.so.4 +libbrotlicommon.so.1 +libbrotlidec.so.1 +libsasl2.so.2 +libcrypt.so.1 +libroken.so.18 +libwind.so.0 +libasn1.so.8 +libhcrypto.so.4 +libhx509.so.5 +libkrb5.so.26 +libheimntlm.so.0 +libgssapi.so.3 +libpsl.so.5 +libfreexl.so.1 +libhogweed.so.5 +libgnutls.so.30 +libldap_r-2.4.so.2 +libpq.so.5 +librtmp.so.1 +libcurl-gnutls.so.4 +libproj.so.25 +libicuuc.so.66 +libxerces-c-3.2.so +libxml2.so.2 +libgeos-3.8.0.so +libgeos_c.so.1 +libspatialite.so.7 +libgdal.so.31 +libgdalalljni.so diff --git a/src/main/resources/native/linux-x86-64/libasn1.so.8 b/src/main/resources/native/linux-x86-64/libasn1.so.8 new file mode 100644 index 0000000..385822f --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libasn1.so.8 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f6e166d003b6d5371e947d855d45eed01f208bcd3af76c83b859d75e5551cea +size 678240 diff --git a/src/main/resources/native/linux-x86-64/libbrotlicommon.so.1 b/src/main/resources/native/linux-x86-64/libbrotlicommon.so.1 new file mode 100644 index 0000000..65cb91f --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libbrotlicommon.so.1 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d564b04526d7c8271227b75d413997a9d9b904d6513029c73b70c776774b9f13 +size 137784 diff --git a/src/main/resources/native/linux-x86-64/libbrotlidec.so.1 b/src/main/resources/native/linux-x86-64/libbrotlidec.so.1 new file mode 100644 index 0000000..c582e8f --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libbrotlidec.so.1 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d8ec2dde0b174b0ba1892f1085f7b458fc6d5e65dce3ef9d20410694bdd0249 +size 51512 diff --git a/src/main/resources/native/linux-x86-64/libcom_err.so.2 b/src/main/resources/native/linux-x86-64/libcom_err.so.2 new file mode 100644 index 0000000..299d9a5 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libcom_err.so.2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dcfe25691d7ff7a0a533dbb4508917afc2a1053469bf05d42fe644007c82950b +size 22600 diff --git a/src/main/resources/native/linux-x86-64/libcrypt.so.1 b/src/main/resources/native/linux-x86-64/libcrypt.so.1 new file mode 100644 index 0000000..7849dcf --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libcrypt.so.1 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5744b3669e4574920dfac2b33207db4e8cb501df88ef28c3801ba0673a7c7d6f +size 202760 diff --git a/src/main/resources/native/linux-x86-64/libcrypto.so.1.1 b/src/main/resources/native/linux-x86-64/libcrypto.so.1.1 new file mode 100644 index 0000000..cd2d8b4 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libcrypto.so.1.1 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d578cd7f55befe0e0db7321bfdcd39878e03e85240e32ecdece6d3637f990f49 +size 2954080 diff --git a/src/main/resources/native/linux-x86-64/libcurl-gnutls.so.4 b/src/main/resources/native/linux-x86-64/libcurl-gnutls.so.4 new file mode 100644 index 0000000..7a8f382 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libcurl-gnutls.so.4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b79b0ec3bc2edec665be3fc523514b553ba828185a951b5260bbabc652840375 +size 584312 diff --git a/src/main/resources/native/linux-x86-64/libdl.so.2 b/src/main/resources/native/linux-x86-64/libdl.so.2 new file mode 100644 index 0000000..e1c2b71 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libdl.so.2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24f7ae2e7edfdfa481cc7b3685e81345888b12dc80e329bdd537bdb06148d43a +size 18848 diff --git a/src/main/resources/native/linux-x86-64/libexpat.so.1 b/src/main/resources/native/linux-x86-64/libexpat.so.1 new file mode 100644 index 0000000..80c2b7f --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libexpat.so.1 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d006c0ff550d927969436785597f5af3d7265a0746f12b2ecf1fdce981978343 +size 182560 diff --git a/src/main/resources/native/linux-x86-64/libffi.so.7 b/src/main/resources/native/linux-x86-64/libffi.so.7 new file mode 100644 index 0000000..32d0ff1 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libffi.so.7 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e49fdd8e80867abe9f0f6062272b0838570467066f8cf270badf1567ca49fba6 +size 43416 diff --git a/src/main/resources/native/linux-x86-64/libfreexl.so.1 b/src/main/resources/native/linux-x86-64/libfreexl.so.1 new file mode 100644 index 0000000..d035d00 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libfreexl.so.1 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d7375ef67843dbe8ad34b3b3d5d2e39cea5c9287722348fc1c899e92b353696 +size 38760 diff --git a/src/main/resources/native/linux-x86-64/libgcc_s.so.1 b/src/main/resources/native/linux-x86-64/libgcc_s.so.1 new file mode 100644 index 0000000..873cea3 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libgcc_s.so.1 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:63eb91b5d726e401c5affb2a035e175c374cae75cdf25a1f9b007c3e79328100 +size 104984 diff --git a/src/main/resources/native/linux-x86-64/libgdal.so.31 b/src/main/resources/native/linux-x86-64/libgdal.so.31 new file mode 100644 index 0000000..c1ac124 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libgdal.so.31 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d1e3a740831b461a3df39d8a20209447b9a2def611df07e9b8da593c7ab32d39 +size 22177472 diff --git a/src/main/resources/native/linux-x86-64/libgdalalljni.so b/src/main/resources/native/linux-x86-64/libgdalalljni.so new file mode 100644 index 0000000..2ca6c20 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libgdalalljni.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28fcb34ff8eff20ff791f31c9d6a03b29bba4ad0a8fc5e4de9b58d2bf35d608b +size 835360 diff --git a/src/main/resources/native/linux-x86-64/libgeos-3.8.0.so b/src/main/resources/native/linux-x86-64/libgeos-3.8.0.so new file mode 100644 index 0000000..a98431a --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libgeos-3.8.0.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bd8a4145abcaf1d8196174cf5278e90144b0d0ca3935203340ff169b352a5992 +size 1866104 diff --git a/src/main/resources/native/linux-x86-64/libgeos_c.so.1 b/src/main/resources/native/linux-x86-64/libgeos_c.so.1 new file mode 100644 index 0000000..4312080 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libgeos_c.so.1 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49f50c3e961b0e86012591b8c66c5eec0e82438ddb61483c0c81a2b2c98011fc +size 268464 diff --git a/src/main/resources/native/linux-x86-64/libgmp.so.10 b/src/main/resources/native/linux-x86-64/libgmp.so.10 new file mode 100644 index 0000000..f239e65 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libgmp.so.10 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:adce2ea41ec466959525ddc6ac1582bc513641866b72d393f0a85b3c00c001a0 +size 534880 diff --git a/src/main/resources/native/linux-x86-64/libgnutls.so.30 b/src/main/resources/native/linux-x86-64/libgnutls.so.30 new file mode 100644 index 0000000..4e94c41 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libgnutls.so.30 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:08a81f73f855daf6f05a67d81e132cbe5bd70145abf54c68f01023e9f23e6d4f +size 1914336 diff --git a/src/main/resources/native/linux-x86-64/libgssapi.so.3 b/src/main/resources/native/linux-x86-64/libgssapi.so.3 new file mode 100644 index 0000000..752f8cf --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libgssapi.so.3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d9ae9bf8c7daac82c6a71cdd8962ceb01bb203e5ddb22f827da5b414937c1555 +size 278160 diff --git a/src/main/resources/native/linux-x86-64/libgssapi_krb5.so.2 b/src/main/resources/native/linux-x86-64/libgssapi_krb5.so.2 new file mode 100644 index 0000000..2843fb7 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libgssapi_krb5.so.2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3185d7fd0b978eaf709321c49eb75e5b3f2e0f23b2367012698a23fdbb0d6e3f +size 309712 diff --git a/src/main/resources/native/linux-x86-64/libhcrypto.so.4 b/src/main/resources/native/linux-x86-64/libhcrypto.so.4 new file mode 100644 index 0000000..f76ff4a --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libhcrypto.so.4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4d346a0cb6cd9e064f5ed7ec42b42d1e7e6e0b89d18ff94d70a2b1177342a0f +size 221816 diff --git a/src/main/resources/native/linux-x86-64/libheimbase.so.1 b/src/main/resources/native/linux-x86-64/libheimbase.so.1 new file mode 100644 index 0000000..35d9ea5 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libheimbase.so.1 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca98fdee5b60fd22ccd87a7bb031acb49c86cac8de90ea047e23b0274eabef15 +size 68752 diff --git a/src/main/resources/native/linux-x86-64/libheimntlm.so.0 b/src/main/resources/native/linux-x86-64/libheimntlm.so.0 new file mode 100644 index 0000000..312fb8a --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libheimntlm.so.0 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7bf7850320f9738e70b12fe54e3caaac207b4a0c6450e1814b0263df8521cca5 +size 43712 diff --git a/src/main/resources/native/linux-x86-64/libhogweed.so.5 b/src/main/resources/native/linux-x86-64/libhogweed.so.5 new file mode 100644 index 0000000..1bb032b --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libhogweed.so.5 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2148ce14bc11620e36ba773891172c870b9ee2ccfb8fa77cc2862101343c9d86 +size 219976 diff --git a/src/main/resources/native/linux-x86-64/libhx509.so.5 b/src/main/resources/native/linux-x86-64/libhx509.so.5 new file mode 100644 index 0000000..98187ee --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libhx509.so.5 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d9bfc4eb45c80d138cc121ec422d1bcbd087e3180a68879f991635d42f0c334 +size 313336 diff --git a/src/main/resources/native/linux-x86-64/libicudata.so.66 b/src/main/resources/native/linux-x86-64/libicudata.so.66 new file mode 100644 index 0000000..62eceaa --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libicudata.so.66 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50b039da86ab40fed973954892aa52b0b833127b94103ec62b71c1e0891ce5ed +size 28046896 diff --git a/src/main/resources/native/linux-x86-64/libicuuc.so.66 b/src/main/resources/native/linux-x86-64/libicuuc.so.66 new file mode 100644 index 0000000..d48528e --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libicuuc.so.66 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d41e9287614412b6e95f809773a5f0f86ee3763a7d5f0db4856e79f64f7c8dab +size 1976648 diff --git a/src/main/resources/native/linux-x86-64/libidn2.so.0 b/src/main/resources/native/linux-x86-64/libidn2.so.0 new file mode 100644 index 0000000..15f28b9 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libidn2.so.0 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db118382dc3e4d0d936dd91f279ef82d32c9fa94d2c2dd596bfd27a78c1bdc95 +size 129096 diff --git a/src/main/resources/native/linux-x86-64/libjbig.so.0 b/src/main/resources/native/linux-x86-64/libjbig.so.0 new file mode 100644 index 0000000..fae649a --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libjbig.so.0 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0f1087b4b881a5cfdf4d4e544756e1f7de2af3ca220de962d67e69e2f1ca4850 +size 66568 diff --git a/src/main/resources/native/linux-x86-64/libjpeg.so.8 b/src/main/resources/native/linux-x86-64/libjpeg.so.8 new file mode 100644 index 0000000..b52fb16 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libjpeg.so.8 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:55cb507f51d746b6ec808690771122349c4e664ba83cad4daa171f633485149a +size 539352 diff --git a/src/main/resources/native/linux-x86-64/libk5crypto.so.3 b/src/main/resources/native/linux-x86-64/libk5crypto.so.3 new file mode 100644 index 0000000..1b8d95a --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libk5crypto.so.3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4f7ed7886b1e9c843ec0186a680f95ade740339b9580e0f4f8d163ca83822694 +size 191040 diff --git a/src/main/resources/native/linux-x86-64/libkeyutils.so.1 b/src/main/resources/native/linux-x86-64/libkeyutils.so.1 new file mode 100644 index 0000000..20ebc77 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libkeyutils.so.1 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:04ecd5ab88e22bb2c1a9260c28dfdf762b0e2193ee660f7108f45e10aa293c92 +size 22600 diff --git a/src/main/resources/native/linux-x86-64/libkrb5.so.26 b/src/main/resources/native/linux-x86-64/libkrb5.so.26 new file mode 100644 index 0000000..4aa8d3a --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libkrb5.so.26 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0e4704d24e9ee3828c82aee3f87993f4b7fb292f38f8e0012d7ecc42d842e2e +size 594104 diff --git a/src/main/resources/native/linux-x86-64/libkrb5.so.3 b/src/main/resources/native/linux-x86-64/libkrb5.so.3 new file mode 100644 index 0000000..326aa67 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libkrb5.so.3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:efcfdff7cde036e211aad912b5eeadf28558b303a73377177f37e50dfddac4d6 +size 902016 diff --git a/src/main/resources/native/linux-x86-64/libkrb5support.so.0 b/src/main/resources/native/linux-x86-64/libkrb5support.so.0 new file mode 100644 index 0000000..9d65920 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libkrb5support.so.0 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:deb7549ff67e32fa804f28681346660ab3020cc6f44f7c144cbd14f7bf72ac91 +size 56096 diff --git a/src/main/resources/native/linux-x86-64/liblber-2.4.so.2 b/src/main/resources/native/linux-x86-64/liblber-2.4.so.2 new file mode 100644 index 0000000..e63663b --- /dev/null +++ b/src/main/resources/native/linux-x86-64/liblber-2.4.so.2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de1aa1fc6ae95690db2e50c4680a5883eb1260dc016940d18835aba861ba204e +size 63888 diff --git a/src/main/resources/native/linux-x86-64/libldap_r-2.4.so.2 b/src/main/resources/native/linux-x86-64/libldap_r-2.4.so.2 new file mode 100644 index 0000000..4bc71a8 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libldap_r-2.4.so.2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:041e2314ee326b95121d8d868ad05cf8c7a8e2e9cfdad321c01ef3e8e1add11e +size 339472 diff --git a/src/main/resources/native/linux-x86-64/liblzma.so.5 b/src/main/resources/native/linux-x86-64/liblzma.so.5 new file mode 100644 index 0000000..48c003d --- /dev/null +++ b/src/main/resources/native/linux-x86-64/liblzma.so.5 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:79a1dbc7cc49eaa96d0326c7d979fc41d8db1f748e517858a5cc024a6554b073 +size 162264 diff --git a/src/main/resources/native/linux-x86-64/libnettle.so.7 b/src/main/resources/native/linux-x86-64/libnettle.so.7 new file mode 100644 index 0000000..9e227c1 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libnettle.so.7 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df063133112eb3461198e79cb11371641b5b1a118fb857749bc5137234a78ae4 +size 231592 diff --git a/src/main/resources/native/linux-x86-64/libnghttp2.so.14 b/src/main/resources/native/linux-x86-64/libnghttp2.so.14 new file mode 100644 index 0000000..b7f93d8 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libnghttp2.so.14 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:35a897be91d8891336dcd974cb061f11a956c33f8dfc39e4207afc367f170846 +size 162160 diff --git a/src/main/resources/native/linux-x86-64/libopenjp2.so.7 b/src/main/resources/native/linux-x86-64/libopenjp2.so.7 new file mode 100644 index 0000000..560d290 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libopenjp2.so.7 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d73916ccba3140c30ab5ced5af62932eb576b40c38dd055fd5596f54ea91094 +size 346592 diff --git a/src/main/resources/native/linux-x86-64/libp11-kit.so.0 b/src/main/resources/native/linux-x86-64/libp11-kit.so.0 new file mode 100644 index 0000000..b9877b7 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libp11-kit.so.0 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bfb69a489e3ab26bd7deb2d422619dce5aff9f5640e89955c18e8e2e04759ac3 +size 1265624 diff --git a/src/main/resources/native/linux-x86-64/libpng16.so.16 b/src/main/resources/native/linux-x86-64/libpng16.so.16 new file mode 100644 index 0000000..6678e45 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libpng16.so.16 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a697b98b4ff6426cf533e038e798ed3e674e24b1797876fbd1471341f3702cc +size 223304 diff --git a/src/main/resources/native/linux-x86-64/libpq.so.5 b/src/main/resources/native/linux-x86-64/libpq.so.5 new file mode 100644 index 0000000..be4e026 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libpq.so.5 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e926f99dac11dd91fc42dfaec84df03efe5573ef47e3dc911628586db68787c2 +size 321672 diff --git a/src/main/resources/native/linux-x86-64/libproj.so.25 b/src/main/resources/native/linux-x86-64/libproj.so.25 new file mode 100644 index 0000000..35fcf67 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libproj.so.25 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c3cd310e8f6d90abc78606f7b36c9dd3bc16be91ff5b98161687b66087ad67ba +size 4259720 diff --git a/src/main/resources/native/linux-x86-64/libpsl.so.5 b/src/main/resources/native/linux-x86-64/libpsl.so.5 new file mode 100644 index 0000000..012a354 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libpsl.so.5 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:248a69df47f45a7bd97fe358c31bc9e17a74d5573b422e7cc8c5a840ba87a0c1 +size 71672 diff --git a/src/main/resources/native/linux-x86-64/libresolv.so.2 b/src/main/resources/native/linux-x86-64/libresolv.so.2 new file mode 100644 index 0000000..6637ee8 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libresolv.so.2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7d033f9b53b2f8f880bc1a80ee8f53dad98f84f56ee01d183b8ad87abace081 +size 101352 diff --git a/src/main/resources/native/linux-x86-64/libroken.so.18 b/src/main/resources/native/linux-x86-64/libroken.so.18 new file mode 100644 index 0000000..07425dd --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libroken.so.18 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0a825f453c3934f77c22d7ff4cc8b009ae70da472ca03328bf6b8bd041c052d +size 97024 diff --git a/src/main/resources/native/linux-x86-64/librtmp.so.1 b/src/main/resources/native/linux-x86-64/librtmp.so.1 new file mode 100644 index 0000000..22de723 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/librtmp.so.1 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de583d2ccc102aeece38a6ce0d7a8ad0f895dc7687704e2347fb5101f1281b76 +size 125960 diff --git a/src/main/resources/native/linux-x86-64/libsasl2.so.2 b/src/main/resources/native/linux-x86-64/libsasl2.so.2 new file mode 100644 index 0000000..c326c38 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libsasl2.so.2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6fe54f77a1ffa6caa9cea1b95f9e7f52182c9343420bb326ce175fcfc787d22 +size 113552 diff --git a/src/main/resources/native/linux-x86-64/libspatialite.so.7 b/src/main/resources/native/linux-x86-64/libspatialite.so.7 new file mode 100644 index 0000000..2f4f256 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libspatialite.so.7 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc324e79971c66e51be42d42b57e759f70e2ad88800fcbade8fcb9ab7c4638b8 +size 5819416 diff --git a/src/main/resources/native/linux-x86-64/libsqlite3.so.0 b/src/main/resources/native/linux-x86-64/libsqlite3.so.0 new file mode 100644 index 0000000..99a9845 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libsqlite3.so.0 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b20a3ff9dedfb07748446db20c032cec932b343ae4e307e57bf37d58db0a95db +size 1212216 diff --git a/src/main/resources/native/linux-x86-64/libssh.so.4 b/src/main/resources/native/linux-x86-64/libssh.so.4 new file mode 100644 index 0000000..6e2ea92 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libssh.so.4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc72b09a0c210ddd8eae996197fdcf50e5e00f22dd58026c989c9ad7e2bb5bbb +size 445976 diff --git a/src/main/resources/native/linux-x86-64/libssl.so.1.1 b/src/main/resources/native/linux-x86-64/libssl.so.1.1 new file mode 100644 index 0000000..5ae2b7c --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libssl.so.1.1 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:578d2f9a8b4f7fb91d714776b548aad74d26bd7a03f011c0abb47e85f19ce7dd +size 598104 diff --git a/src/main/resources/native/linux-x86-64/libtasn1.so.6 b/src/main/resources/native/linux-x86-64/libtasn1.so.6 new file mode 100644 index 0000000..4dd4500 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libtasn1.so.6 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c3fd100e5e37cd65481ac82c078ca9e8ec099d3d391ab0f62af51014e4934e5 +size 84120 diff --git a/src/main/resources/native/linux-x86-64/libtiff.so.5 b/src/main/resources/native/linux-x86-64/libtiff.so.5 new file mode 100644 index 0000000..a7b30e0 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libtiff.so.5 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3bd190a007be3149f3a349d443c35e6071bf0e58474ea05ed8ec25e50999b4b +size 522936 diff --git a/src/main/resources/native/linux-x86-64/libunistring.so.2 b/src/main/resources/native/linux-x86-64/libunistring.so.2 new file mode 100644 index 0000000..f6bb6ed --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libunistring.so.2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fbf5c238ae84206e774f6f2145b6d3f6b7899fa5e77907b7cc5fa277e5689160 +size 1575112 diff --git a/src/main/resources/native/linux-x86-64/libwebp.so.6 b/src/main/resources/native/linux-x86-64/libwebp.so.6 new file mode 100644 index 0000000..3b77eba --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libwebp.so.6 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60aca2154ee5672091109d9b0797690eab5100ab8ade4238b758aa1e0935b74e +size 420376 diff --git a/src/main/resources/native/linux-x86-64/libwind.so.0 b/src/main/resources/native/linux-x86-64/libwind.so.0 new file mode 100644 index 0000000..10a38fb --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libwind.so.0 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa260d1d5936eea5ad5d9f3cebbd0f333705a4f84a91a24175f226b7dc57246f +size 166040 diff --git a/src/main/resources/native/linux-x86-64/libxerces-c-3.2.so b/src/main/resources/native/linux-x86-64/libxerces-c-3.2.so new file mode 100644 index 0000000..3657c20 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libxerces-c-3.2.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8c5534acce757a22feaa1bc7e90d8c32891779f2a4634e5c70a0105d212f43e +size 3742960 diff --git a/src/main/resources/native/linux-x86-64/libxml2.so.2 b/src/main/resources/native/linux-x86-64/libxml2.so.2 new file mode 100644 index 0000000..8bb03fc --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libxml2.so.2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b16068dbc16fe07401afd3f45cdc42431440d30fd01a42dc45642f39ffb7261 +size 1799408 diff --git a/src/main/resources/native/linux-x86-64/libz.so.1 b/src/main/resources/native/linux-x86-64/libz.so.1 new file mode 100644 index 0000000..edd690e --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libz.so.1 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ccfda8d7e0d2f77c8a4feb2febbae057edab668d7d7ee6410e2c517724c056c8 +size 108936 diff --git a/src/main/resources/native/linux-x86-64/libzstd.so.1 b/src/main/resources/native/linux-x86-64/libzstd.so.1 new file mode 100644 index 0000000..6b05d23 --- /dev/null +++ b/src/main/resources/native/linux-x86-64/libzstd.so.1 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9edef536cef4c60106f858649d2c2fb6bba708a83fab2e0ead2ebdb671a43c19 +size 686160