summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim MacArthur <jim.macarthur@codethink.co.uk>2015-05-28 16:34:41 (GMT)
committerSam Thursfield <sam.thursfield@codethink.co.uk>2015-06-12 10:38:34 (GMT)
commitfbe3d1e8d5bc0844070b5cfb74e870eb45920cf7 (patch)
treed088f9a38bc719bff586671bb55ece33ff8239dd
parent6c9cc189cc1470283a146d359bd817061cc5a747 (diff)
downloaddefinitions-fbe3d1e8d5bc0844070b5cfb74e870eb45920cf7.tar.gz
Add java-build stratum, contaniing things necessary to build OpenJDK
The use of the java-binary repo from Github goes against the policy we have defined for the Baserock reference systems, of having everything built from source code that is mirrored on git.baserock.org. However, building a Java compiler from source code super difficult so we can't really avoid this hack at present if we want to build other Java components from source using Baserock tooling. Change-Id: I9bc1892cbdbb3d3234b06d8a650b0c568254c0b5
-rw-r--r--strata/java.morph22
-rw-r--r--strata/java/java-binary.morph16
2 files changed, 38 insertions, 0 deletions
diff --git a/strata/java.morph b/strata/java.morph
new file mode 100644
index 0000000..f10bb8a
--- /dev/null
+++ b/strata/java.morph
@@ -0,0 +1,22 @@
+name: java
+kind: stratum
+description: |
+ This stratum contains everything necessary to compile and run Java applications
+ and build OpenJDK from source.
+build-depends:
+- morph: strata/core.morph
+- morph: strata/x-common.morph
+- morph: strata/graphics-common.morph
+chunks:
+- name: java-binary
+ morph: strata/java/java-binary.morph
+ repo: github:jmacarthur/openjdk-binary
+ ref: 6f53762e2632c4b9f9afdfa6995a2c696bb9fd43
+ unpetrify-ref: master
+- name: java-ant
+ morph: strata/java/java-ant.morph
+ repo: upstream:java/ant
+ ref: b3509fc3250b0f868076c846d29da80cbdc20681
+ unpetrify-ref: ANT_194
+ build-depends:
+ - java-binary
diff --git a/strata/java/java-binary.morph b/strata/java/java-binary.morph
new file mode 100644
index 0000000..c75f39b
--- /dev/null
+++ b/strata/java/java-binary.morph
@@ -0,0 +1,16 @@
+name: java-binary
+description: |
+ This is a temporary solution to the OpenJDK build problem. In the future
+ we expect to be able to build fully from scratch using IcedTea, but for now
+ we need an existing OpenJDK binary to build OpenJDK.
+kind: chunk
+configure-commands: []
+build-commands:
+- cat j2sdk-image-jdk8build.tar.gz_* > jdk-8u20-linux-x64.tar.gz
+install-commands:
+- mkdir -p "$DESTDIR$PREFIX"/bin
+- mkdir -p "$DESTDIR$PREFIX"/lib
+- tar zxf jdk-8u20-linux-x64.tar.gz -C "$DESTDIR$PREFIX"/lib --no-same-owner
+- ln -sfn "$PREFIX"/lib/j2sdk-image "$DESTDIR$PREFIX"/lib/java-8-openjdk
+- ln -sfn "$PREFIX"/lib/j2sdk-image/jre/bin/java "$DESTDIR$PREFIX"/bin/
+- ln -sfn "$PREFIX"/lib/j2sdk-image/jre/bin/javac "$DESTDIR$PREFIX"/bin/