blob: 3acdf6e2e69d647006e68e71621715c7b5e8bd42 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
This is only another copy. Likely we should use the one at
https://github.com/hiddenalpha/jssc/blob/master/contrib/hiddenalpha-buildEnv-one
.
true `# Configure for debian 9` \
&& CXX="g++" \
&& CFLAGS="-fPIC -Wall -pedantic -Werror \
-Wno-error=long-long \
-Wno-error=sign-compare \
-Wno-error=variadic-macros \
-Wno-long-long" \
&& targets="linux_64" \
&& SUDO= \
&& true
true `# Setup` \
&& $SUDO apt install -y --no-install-recommends \
git openjdk-8-jdk-headless g++ maven \
&& true
true `# Make` \
&& cat contrib/hiddenalpha-buildEnv-one/res/pom.patch | git apply \
&& mvn clean \
&& mvn -PnoCmake compile \
&& printf '%s "%s"\n' "#define JSSC_VERSION" "$(git describe --tags|sed 's,^v,,')" \
> src/main/cpp/version.h \
&& mkdir -p src/main/resources-precompiled/natives/linux_64 \
&& g++ $CFLAGS -shared \
-o src/main/resources-precompiled/natives/linux_64/libjssc.so \
src/main/cpp/_nix_based/jssc.cpp \
-I/usr/lib/jvm/java-1.8.0-openjdk-amd64/include \
-I/usr/lib/jvm/java-1.8.0-openjdk-amd64/include/linux \
-Isrc/main/cpp \
&& for T in ${targets:?}; do
&& mvn -PnoCmake -PnoJavah -PnativeJar -P"${T:?}" package \
;done \
&& mvn -PnoCmake -PnoJavah -PnoNatives -PwithTestClasspath verify \
&& true
|