summaryrefslogtreecommitdiffstats
path: root/recipes-core/cacao/cacao/0001-java.in-Do-not-use-hardcode-paths.patch
diff options
context:
space:
mode:
authorRichard Leitner <richard.leitner@skidata.com>2020-08-20 13:55:04 +0200
committerRichard Leitner <richard.leitner@skidata.com>2020-08-24 08:07:04 +0200
commit00cb61feb07098d55b78237af6eb55fc4b906a0e (patch)
tree18497615b9f1e2a970ab50ce9f9546ffe7d6153e /recipes-core/cacao/cacao/0001-java.in-Do-not-use-hardcode-paths.patch
parent75ba758d6bae8613bd1a21f63a82d177135491b9 (diff)
downloadmeta-java-00cb61feb07098d55b78237af6eb55fc4b906a0e.tar.gz
cacao: update to latest git version
As the cacao-staging mercurial repository was removed update the recipe to use the git repository instead. Furthermore update to the latest revision. Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
Diffstat (limited to 'recipes-core/cacao/cacao/0001-java.in-Do-not-use-hardcode-paths.patch')
-rw-r--r--recipes-core/cacao/cacao/0001-java.in-Do-not-use-hardcode-paths.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/recipes-core/cacao/cacao/0001-java.in-Do-not-use-hardcode-paths.patch b/recipes-core/cacao/cacao/0001-java.in-Do-not-use-hardcode-paths.patch
new file mode 100644
index 0000000..521814e
--- /dev/null
+++ b/recipes-core/cacao/cacao/0001-java.in-Do-not-use-hardcode-paths.patch
@@ -0,0 +1,46 @@
1From 51a63cdac93caf69d1b6ace40f73f6147ba37de5 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Erkka=20K=C3=A4=C3=A4ri=C3=A4?= <erkka.kaaria@intel.com>
3Date: Thu, 20 Aug 2020 13:48:38 +0200
4Subject: [PATCH 1/2] java.in: Do not use hardcode paths
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Cacao uses hardcoded paths to various files, if these paths are not
10provided. This causes issues when sharing sstate with otherwise
11identical workers, if build time paths are not identical.
12
13Upstream-Status: Inappropriate [Yocto-specific fixes]
14
15Signed-off-by: Erkka Kääriä <erkka.kaaria@intel.com>
16Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
17---
18 src/scripts/java.in | 15 +++++++++++++--
19 1 file changed, 13 insertions(+), 2 deletions(-)
20
21diff --git a/src/scripts/java.in b/src/scripts/java.in
22index 0790f0255..a4f16ecdc 100644
23--- a/src/scripts/java.in
24+++ b/src/scripts/java.in
25@@ -22,5 +22,16 @@
26 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
27 ## 02110-1301, USA.
28
29-IFS=""
30-exec $(dirname ${0})/cacao ${1+"$@"}
31+SH_DIR=`dirname "$0"`
32+CURRENT_DIR=`cd "${SH_DIR}" && pwd`
33+
34+# if this shell script is invoked through symlink, we get invalid paths. As getting the real path to this file is
35+# very painful using only /bin/sh, python is used instead.
36+PYTHON_STR="import os; print(os.path.dirname(os.path.realpath(os.readlink(\"${CURRENT_DIR}/java\"))) if os.path.islink(\"${CURRENT_DIR}/java\") else \"${CURRENT_DIR}\")"
37+REAL_DIR=`python3 -c "${PYTHON_STR}"`
38+
39+PARENT_DIR=`dirname ${REAL_DIR}`
40+
41+export BOOTCLASSPATH="${PARENT_DIR}/share/cacao/vm.zip:${PARENT_DIR}/share/classpath/glibj.zip"
42+LIBRARY_PATH="-Djava.library.path=${PARENT_DIR}/lib/classpath"
43+exec ${REAL_DIR}/cacao ${LIBRARY_PATH} ${1+"$@"}
44--
452.28.0
46