aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-core/openjdk
diff options
context:
space:
mode:
authorRichard Leitner <richard.leitner@skidata.com>2018-08-20 23:16:15 +0200
committerRichard Leitner <richard.leitner@skidata.com>2018-10-02 07:59:06 +0200
commit817b836aa0ddda2d6d3ddb481c7b2b17c67897a0 (patch)
tree75268ec945674b1faa300f02203dfd5ac1498cd7 /recipes-core/openjdk
parent50d3e814a45363db81e446233c54895eebc5a999 (diff)
downloadmeta-java-817b836aa0ddda2d6d3ddb481c7b2b17c67897a0.tar.gz
meta-java-817b836aa0ddda2d6d3ddb481c7b2b17c67897a0.tar.bz2
meta-java-817b836aa0ddda2d6d3ddb481c7b2b17c67897a0.zip
openjdk-7: merge postinst into openjdk-7-common
As openjdk-7-common was the only consumer of openjdk-postinst.inc move it's content and remove openjdk-postinst.inc. Now all files in recipes-core/openjdk are named correctly according to their versions again. Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
Diffstat (limited to 'recipes-core/openjdk')
-rw-r--r--recipes-core/openjdk/openjdk-7-common.inc100
-rw-r--r--recipes-core/openjdk/openjdk-postinst.inc100
2 files changed, 99 insertions, 101 deletions
diff --git a/recipes-core/openjdk/openjdk-7-common.inc b/recipes-core/openjdk/openjdk-7-common.inc
index 6005394..56180e2 100644
--- a/recipes-core/openjdk/openjdk-7-common.inc
+++ b/recipes-core/openjdk/openjdk-7-common.inc
@@ -356,6 +356,104 @@ JDK_URI = "${ICEDTEA_DROP_URL}/${JDK_FILE};name=jdk;unpack=false"
LANGTOOLS_FILE = "langtools.tar.bz2"
LANGTOOLS_URI = "${ICEDTEA_DROP_URL}/${LANGTOOLS_FILE};name=langtools;unpack=false"
-require openjdk-postinst.inc
+# handles all postinst action for openjdk
+# some of the former results in a build error because "ERR" is in the first line.
+
+pkg_postinst_${JDKPN}-vm-shark () {
+ true
+ if grep -q "\-server ERROR" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg && ! grep -q "KNOWN" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg; then
+ sed -i -e "/\-shark.*/d" -e "s|\(^\-server*\)|\-shark KNOWN\n\1|" -e "/^$/d" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
+ else
+ sed -i -e "s/\-shark.*/\-shark KNOWN/" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
+ fi
+}
+
+pkg_prerm_${JDKPN}-vm-shark () {
+ true
+ sed -i -e "/^\-shark.*/d" -e "/^$/d" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
+ if grep -q "KNOWN" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg && grep -q "\-server ERROR" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg; then
+ FIRST_KNOWN=`grep "KNOWN" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg | head -n 1`
+ sed -i -e "/${FIRST_KNOWN}/d" -e "s|\(^\-server*\)|${FIRST_KNOWN}\n\1|" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
+ fi
+
+ echo "-shark ERROR" >> ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
+}
+
+pkg_postinst_${JDKPN}-vm-cacao () {
+ true
+ if grep -q "\-server ERROR" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg && ! grep -q "KNOWN" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg; then
+ sed -i -e "/\-cacao.*/d" -e "s|\(^\-server*\)|\-cacao KNOWN\n\1|" -e "/^$/d" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
+ else
+ sed -i -e "s/\-cacao.*/\-cacao KNOWN/" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
+ fi
+}
+
+pkg_prerm_${JDKPN}-vm-cacao () {
+ true
+ sed -i -e "/^\-cacao.*/d" -e "/^$/d" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
+ if grep -q "KNOWN" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg && grep -q "\-server ERROR" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg; then
+ FIRST_KNOWN=`grep "KNOWN" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg | head -n 1`
+ sed -i -e "/${FIRST_KNOWN}/d" -e "s|\(^\-server*\)|${FIRST_KNOWN}\n\1|" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
+ fi
+
+ echo "-cacao ERROR" >> ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
+}
+
+pkg_postinst_${JDKPN}-vm-jamvm () {
+ true
+ if grep -q "\-server ERROR" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg && ! grep -q "KNOWN" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg; then
+ sed -i -e "/\-jamvm.*/d" -e "s|\(^\-server*\)|\-jamvm KNOWN\n\1|" -e "/^$/d" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
+ else
+ sed -i -e "s/\-jamvm.*/\-jamvm KNOWN/" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
+ fi
+}
+
+pkg_prerm_${JDKPN}-vm-jamvm () {
+ true
+ sed -i -e "/^\-jamvm.*/d" -e "/^$/d" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
+ if grep -q "KNOWN" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg && grep -q "\-server ERROR" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg; then
+ FIRST_KNOWN=`grep "KNOWN" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg | head -n 1`
+ sed -i -e "/${FIRST_KNOWN}/d" -e "s|\(^\-server*\)|${FIRST_KNOWN}\n\1|" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
+ fi
+
+ echo "-jamvm ERROR" >> ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
+}
+
+pkg_postinst_${JDKPN}-vm-zero () {
+ true
+ if grep -q "KNOWN" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg && grep -q "\-server ERROR" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg; then
+ FIRST_KNOWN=`grep "KNOWN" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg | head -n 1`
+ sed -i -e "/${FIRST_KNOWN}/d" -e "/^$/d" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
+ echo ${FIRST_KNOWN} >> $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
+ fi
+
+ sed -i -e "s|^\-server.*|\-server KNOWN|" -e "/^$/d" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
+}
+
+pkg_prerm_${JDKPN}-vm-zero () {
+ true
+ sed -i -e "/^\-server.*/\-server ERROR" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
+ if grep -q "KNOWN" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg; then
+ FIRST_KNOWN=`grep "KNOWN" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg | head -n 1`
+ sed -i -e "/${FIRST_KNOWN}/d" -e "s|\(^\-server*\)|${FIRST_KNOWN}\n\1|" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
+ fi
+}
+
+pkg_postinst_${JDKPN}-jre () {
+ ln -s ${JDK_HOME}/jre $D/${libdir}/jvm/jre
+}
+
+inherit update-alternatives
+
+ALTERNATIVE_${JDKPN}-jre = "java keytool"
+ALTERNATIVE_${JDKPN}-jdk = "javac"
+
+ALTERNATIVE_TARGET[java] = "${JDK_HOME}/jre/bin/java"
+ALTERNATIVE_TARGET[javac] = "${JDK_HOME}/bin/javac"
+ALTERNATIVE_TARGET[keytool] = "${JDK_HOME}/jre/bin/keytool"
+
+ALTERNATIVE_LINK_NAME[java] = "${bindir}/java"
+ALTERNATIVE_LINK_NAME[javac] = "${bindir}/javac"
+ALTERNATIVE_LINK_NAME[keytool] = "${bindir}/keytool"
ALTERNATIVE_PRIORITY = "50"
diff --git a/recipes-core/openjdk/openjdk-postinst.inc b/recipes-core/openjdk/openjdk-postinst.inc
deleted file mode 100644
index be88714..0000000
--- a/recipes-core/openjdk/openjdk-postinst.inc
+++ /dev/null
@@ -1,100 +0,0 @@
-# handles all postinst action for openjdk
-
-# some of the former results in a build error because "ERR" is in the first line.
-
-pkg_postinst_${JDKPN}-vm-shark () {
- true
- if grep -q "\-server ERROR" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg && ! grep -q "KNOWN" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg; then
- sed -i -e "/\-shark.*/d" -e "s|\(^\-server*\)|\-shark KNOWN\n\1|" -e "/^$/d" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
- else
- sed -i -e "s/\-shark.*/\-shark KNOWN/" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
- fi
-}
-
-pkg_prerm_${JDKPN}-vm-shark () {
- true
- sed -i -e "/^\-shark.*/d" -e "/^$/d" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
- if grep -q "KNOWN" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg && grep -q "\-server ERROR" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg; then
- FIRST_KNOWN=`grep "KNOWN" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg | head -n 1`
- sed -i -e "/${FIRST_KNOWN}/d" -e "s|\(^\-server*\)|${FIRST_KNOWN}\n\1|" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
- fi
-
- echo "-shark ERROR" >> ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
-}
-
-pkg_postinst_${JDKPN}-vm-cacao () {
- true
- if grep -q "\-server ERROR" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg && ! grep -q "KNOWN" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg; then
- sed -i -e "/\-cacao.*/d" -e "s|\(^\-server*\)|\-cacao KNOWN\n\1|" -e "/^$/d" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
- else
- sed -i -e "s/\-cacao.*/\-cacao KNOWN/" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
- fi
-}
-
-pkg_prerm_${JDKPN}-vm-cacao () {
- true
- sed -i -e "/^\-cacao.*/d" -e "/^$/d" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
- if grep -q "KNOWN" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg && grep -q "\-server ERROR" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg; then
- FIRST_KNOWN=`grep "KNOWN" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg | head -n 1`
- sed -i -e "/${FIRST_KNOWN}/d" -e "s|\(^\-server*\)|${FIRST_KNOWN}\n\1|" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
- fi
-
- echo "-cacao ERROR" >> ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
-}
-
-pkg_postinst_${JDKPN}-vm-jamvm () {
- true
- if grep -q "\-server ERROR" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg && ! grep -q "KNOWN" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg; then
- sed -i -e "/\-jamvm.*/d" -e "s|\(^\-server*\)|\-jamvm KNOWN\n\1|" -e "/^$/d" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
- else
- sed -i -e "s/\-jamvm.*/\-jamvm KNOWN/" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
- fi
-}
-
-pkg_prerm_${JDKPN}-vm-jamvm () {
- true
- sed -i -e "/^\-jamvm.*/d" -e "/^$/d" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
- if grep -q "KNOWN" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg && grep -q "\-server ERROR" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg; then
- FIRST_KNOWN=`grep "KNOWN" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg | head -n 1`
- sed -i -e "/${FIRST_KNOWN}/d" -e "s|\(^\-server*\)|${FIRST_KNOWN}\n\1|" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
- fi
-
- echo "-jamvm ERROR" >> ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
-}
-
-pkg_postinst_${JDKPN}-vm-zero () {
- true
- if grep -q "KNOWN" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg && grep -q "\-server ERROR" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg; then
- FIRST_KNOWN=`grep "KNOWN" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg | head -n 1`
- sed -i -e "/${FIRST_KNOWN}/d" -e "/^$/d" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
- echo ${FIRST_KNOWN} >> $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
- fi
-
- sed -i -e "s|^\-server.*|\-server KNOWN|" -e "/^$/d" $D/${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
-}
-
-pkg_prerm_${JDKPN}-vm-zero () {
- true
- sed -i -e "/^\-server.*/\-server ERROR" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
- if grep -q "KNOWN" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg; then
- FIRST_KNOWN=`grep "KNOWN" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg | head -n 1`
- sed -i -e "/${FIRST_KNOWN}/d" -e "s|\(^\-server*\)|${FIRST_KNOWN}\n\1|" ${JDK_HOME}/jre/lib/${JDK_ARCH}/jvm.cfg
- fi
-}
-
-pkg_postinst_${JDKPN}-jre () {
- ln -s ${JDK_HOME}/jre $D/${libdir}/jvm/jre
-}
-
-inherit update-alternatives
-
-ALTERNATIVE_${JDKPN}-jre = "java keytool"
-ALTERNATIVE_${JDKPN}-jdk = "javac"
-
-ALTERNATIVE_TARGET[java] = "${JDK_HOME}/jre/bin/java"
-ALTERNATIVE_TARGET[javac] = "${JDK_HOME}/bin/javac"
-ALTERNATIVE_TARGET[keytool] = "${JDK_HOME}/jre/bin/keytool"
-
-ALTERNATIVE_LINK_NAME[java] = "${bindir}/java"
-ALTERNATIVE_LINK_NAME[javac] = "${bindir}/javac"
-ALTERNATIVE_LINK_NAME[keytool] = "${bindir}/keytool"