summaryrefslogtreecommitdiffstats
path: root/meta-aarch64/recipes-core/openjdk/openjdk-8-common.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta-aarch64/recipes-core/openjdk/openjdk-8-common.inc')
-rw-r--r--meta-aarch64/recipes-core/openjdk/openjdk-8-common.inc267
1 files changed, 267 insertions, 0 deletions
diff --git a/meta-aarch64/recipes-core/openjdk/openjdk-8-common.inc b/meta-aarch64/recipes-core/openjdk/openjdk-8-common.inc
new file mode 100644
index 0000000..f251e14
--- /dev/null
+++ b/meta-aarch64/recipes-core/openjdk/openjdk-8-common.inc
@@ -0,0 +1,267 @@
1DESCRIPTION = "Java runtime based upon the OpenJDK8"
2HOMEPAGE = "http://openjdk.java.net/projects/jdk8"
3LICENSE = "GPL-2.0-with-classpath-exception"
4PRIORITY = "optional"
5SECTION = "libs"
6INHIBIT_PACKAGE_STRIP = "1"
7#INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
8
9INC_PR = "r16"
10
11SRC_URI = " \
12 ${OPENJDK_URI} \
13 "
14
15libdir_jvm ?= "${libdir}/jvm"
16
17JDKPN = "openjdk-8"
18JDK_DIR = "java-8-openjdk"
19JDK_HOME = "${libdir_jvm}/${JDK_DIR}"
20
21PN = "${JDKPN}-jre"
22PROVIDES += "${JDKPN}"
23
24DEPENDS = " \
25 zip-native \
26 zlib \
27 jpeg libpng giflib \
28 gtk+ glib-2.0 \
29 cups fontconfig \
30 libxt libxinerama libxrender libxtst libxi \
31 freetype alsa-lib libffi libxt \
32 "
33
34# No package should directly depend on this (it should require
35# java2-runtime instead).
36PRIVATE_LIBS = "\
37 libunpack.so libverify.so libjava.so libzip.so libnpt.so \
38 libjava_crw_demo.so libhprof.so libnet.so libnio.so \
39 libmanagement.so libinstrument.so libjsound.so libjsoundalsa.so \
40 libj2pcsc.so libj2pkcs11.so libj2gss.so libmlib_image.so \
41 libawt.so libsplashscreen.so libfreetype.so.6 libfontmanager.so \
42 libjpeg.so liblcms.so librmi.so libjawt.so libjaas_unix.so \
43 libattach.so libjdwp.so libdt_socket.so libhpi.so libjli.so \
44 libmawt.so libjvm.so \
45 libversionCheck.so libcompiledMethodLoad.so libgctest.so \
46 libheapViewer.so libheapTracker.so libminst.so libmtrace.so \
47 libwaiters.so libhprof.so \
48 "
49
50COMPATIBLE_HOST = "(aarch64).*-linux"
51JAVA_HOME[unexport] = "1"
52S="${WORKDIR}/openjdk8-aarch64-port-snapshot"
53
54# The compiler tests in do_configure seem to drop TARGET_CC_ARCH from $CC, so add it into CFLAGS.
55CFLAGS =+ "${TARGET_CC_ARCH} ${TOOLCHAIN_OPTIONS}"
56CXXFLAGS =+ "${TARGET_CC_ARCH} ${TOOLCHAIN_OPTIONS}"
57export EXTRA_CFLAGS = "${TOOLCHAIN_OPTIONS}"
58ASNEEDED = ""
59
60do_configure() {
61 unset MAKE
62 bash ./configure --with-debug-level=release --with-jvm-variants=client,server --with-sys-root=${STAGING_DIR_TARGET} --openjdk-target=${TARGET_SYS} --with-zlib=system --with-stdc++lib=dynamic --disable-ccache --disable-zip-debug-info
63}
64
65do_compile() {
66 make \
67 LOG=debug \
68 ALT_SDT_H=/openjdk/path/to/a/nonexistent/directory \
69 EXTRA_CFLAGS='${EXTRA_CFLAGS}' \
70 CC='${CC}' \
71 CXX='${CXX}' \
72 LD='${CC} ${LDFLAGS}' \
73 LDCXX='${CXX} ${LDFLAGS}' \
74 LDEXE='${CC} ${LDFLAGS}' \
75 LDEXECXX='${CXX} ${LDFLAGS}' \
76 images
77
78}
79
80do_install() {
81 install -d ${D}${libdir_jvm}
82 install -d ${D}${JDK_HOME}/jtreg
83 install -d ${D}${JDK_HOME}/jtreg/hotspot
84 install -d ${D}${JDK_HOME}/jtreg/jdk
85 cp -R ${S}/build/${BUILD_DIR}/j2sdk-image/* ${D}${JDK_HOME}
86 cp -R ${S}/hotspot/test ${D}${JDK_HOME}/jtreg/hotspot
87 cp -R ${S}/jdk/test ${D}${JDK_HOME}/jtreg/jdk
88# The OpenJDK build does its own thing with debuginfo files; as we
89# default to a 'release' build we remove these files.
90 find ${D}${JDK_HOME} -name \*.debuginfo -print | xargs rm
91# The upstream Mercurial repo has various incompatible binaries checked in.
92# Remove these otherwise bitbake complains about mismatched architecture, et al.
93 find ${D}${JDK_HOME}/jtreg -name \*.so -print | xargs rm
94 rm ${D}${JDK_HOME}/jtreg/jdk/test/sun/management/jmxremote/bootstrap/linux-i586/launcher
95 rm ${D}${JDK_HOME}/jtreg/jdk/test/sun/management/jmxremote/bootstrap/linux-amd64/launcher
96 rm ${D}${JDK_HOME}/jtreg/jdk/test/sun/management/jmxremote/bootstrap/solaris-sparcv9/launcher
97 rm ${D}${JDK_HOME}/jtreg/jdk/test/sun/management/jmxremote/bootstrap/solaris-amd64/launcher
98 chmod -R u+rw,go+r ${D}${JDK_HOME}
99}
100
101PACKAGES = " \
102 ${JDKPN}-jdk \
103 ${JDKPN}-doc \
104 ${JDKPN}-source \
105 ${JDKPN}-demo \
106 ${JDKPN}-jtreg \
107 ${JDKPN}-jre \
108 "
109
110FILES_${JDKPN}-jdk = " \
111 ${JDK_HOME}/bin \
112 ${JDK_HOME}/lib \
113 ${JDK_HOME}/include \
114 ${JDK_HOME}/ASSEMBLY_EXCEPTION \
115 ${JDK_HOME}/release \
116 ${JDK_HOME}/THIRD_PARTY_README \
117 ${JDK_HOME}/LICENSE \
118 "
119
120FILES_${JDKPN}-doc = " \
121 ${JDK_HOME}/man \
122 "
123
124FILES_${JDKPN}-source = " \
125 ${JDK_HOME}/src.zip \
126 "
127
128FILES_${JDKPN}-demo = " \
129 ${JDK_HOME}/demo \
130 ${JDK_HOME}/sample \
131 "
132
133FILES_${JDKPN}-jtreg = " \
134 ${JDK_HOME}/jtreg \
135 "
136
137FILES_${PN} = " \
138 ${JDK_HOME}/jre \
139 "
140
141INSANE_SKIP_${JDKPN}-jdk = "dev-so"
142INSANE_SKIP_${JDKPN}-jre = "dev-so"
143
144RPROVIDES_${JDKPN}-jre = "java2-runtime java2-vm"
145RPROVIDES_${JDKPN}-jdk = "java2-runtime java2-vm"
146RDEPENDS_${JDKPN}-demo = "java2-runtime"
147
148RRECOMMENDS_${JDKPN}-jre = "liberation-fonts"
149RRECOMMENDS_${JDKPN}-jdk = "liberation-fonts"
150
151inherit update-alternatives
152
153pkg_postinst_${JDKPN}-jre () {
154 update-alternatives --install ${bindir}/java java ${JDK_HOME}/jre/bin/java 75
155 update-alternatives --install ${bindir}/jjs jjs ${JDK_HOME}/jre/bin/jjs 75
156 update-alternatives --install ${bindir}/keytool keytool ${JDK_HOME}/jre/bin/keytool 75
157 update-alternatives --install ${bindir}/orbd orbd ${JDK_HOME}/jre/bin/orbd 75
158 update-alternatives --install ${bindir}/pack200 pack200 ${JDK_HOME}/jre/bin/pack200 75
159 update-alternatives --install ${bindir}/policytool policytool ${JDK_HOME}/jre/bin/policytool 75
160 update-alternatives --install ${bindir}/rmid rmid ${JDK_HOME}/jre/bin/rmid 75
161 update-alternatives --install ${bindir}/rmiregistry rmiregistry ${JDK_HOME}/jre/bin/rmiregistry 75
162 update-alternatives --install ${bindir}/servertool servertool ${JDK_HOME}/jre/bin/servertool 75
163 update-alternatives --install ${bindir}/tnameserv tnameserv ${JDK_HOME}/jre/bin/tnameserv 75
164 update-alternatives --install ${bindir}/unpack200 unpack200 ${JDK_HOME}/jre/bin/unpack200 75
165}
166
167pkg_prerm_${JDKPN}-jre () {
168 update-alternatives --remove java ${JDK_HOME}/jre/bin/java
169 update-alternatives --remove jjs ${JDK_HOME}/jre/bin/jjs
170 update-alternatives --remove keytool ${JDK_HOME}/jre/bin/keytool
171 update-alternatives --remove orbd ${JDK_HOME}/jre/bin/orbd
172 update-alternatives --remove pack200 ${JDK_HOME}/jre/bin/pack200
173 update-alternatives --remove policytool ${JDK_HOME}/jre/bin/policytool
174 update-alternatives --remove rmid ${JDK_HOME}/jre/bin/rmid
175 update-alternatives --remove rmiregistry ${JDK_HOME}/jre/bin/rmiregistry
176 update-alternatives --remove servertool ${JDK_HOME}/jre/bin/servertool
177 update-alternatives --remove tnameserv ${JDK_HOME}/jre/bin/tnameserv
178 update-alternatives --remove unpack200 ${JDK_HOME}/jre/bin/unpack200
179}
180
181pkg_postinst_${JDKPN}-jdk () {
182 update-alternatives --install ${bindir}/appletviewer appletviewer ${JDK_HOME}/bin/appletviewer 100
183 update-alternatives --install ${bindir}/extcheck extcheck ${JDK_HOME}/bin/extcheck 100
184 update-alternatives --install ${bindir}/idlj idlj ${JDK_HOME}/bin/idlj 100
185 update-alternatives --install ${bindir}/jar jar ${JDK_HOME}/bin/jar 100
186 update-alternatives --install ${bindir}/jarsigner jarsigner ${JDK_HOME}/bin/jarsigner 100
187 update-alternatives --install ${bindir}/java java ${JDK_HOME}/bin/java 100
188 update-alternatives --install ${bindir}/javac javac ${JDK_HOME}/bin/javac 100
189 update-alternatives --install ${bindir}/javadoc javadoc ${JDK_HOME}/bin/javadoc 100
190 update-alternatives --install ${bindir}/javah javah ${JDK_HOME}/bin/javah 100
191 update-alternatives --install ${bindir}/javap javap ${JDK_HOME}/bin/javap 100
192 update-alternatives --install ${bindir}/java-rmi.cgi java-rmi.cgi ${JDK_HOME}/bin/java-rmi.cgi 100
193 update-alternatives --install ${bindir}/jcmd jcmd ${JDK_HOME}/bin/jcmd 100
194 update-alternatives --install ${bindir}/jconsole jconsole ${JDK_HOME}/bin/jconsole 100
195 update-alternatives --install ${bindir}/jdb jdb ${JDK_HOME}/bin/jdb 100
196 update-alternatives --install ${bindir}/jdeps jdeps ${JDK_HOME}/bin/jdeps 100
197 update-alternatives --install ${bindir}/jhat jhat ${JDK_HOME}/bin/jhat 100
198 update-alternatives --install ${bindir}/jinfo jinfo ${JDK_HOME}/bin/jinfo 100
199 update-alternatives --install ${bindir}/jjs jjs ${JDK_HOME}/bin/jjs 100
200 update-alternatives --install ${bindir}/jmap jmap ${JDK_HOME}/bin/jmap 100
201 update-alternatives --install ${bindir}/jps jps ${JDK_HOME}/bin/jps 100
202 update-alternatives --install ${bindir}/jrunscript jrunscript ${JDK_HOME}/bin/jrunscript 100
203 update-alternatives --install ${bindir}/jsadebugd jsadebugd ${JDK_HOME}/bin/jsadebugd 100
204 update-alternatives --install ${bindir}/jstack jstack ${JDK_HOME}/bin/jstack 100
205 update-alternatives --install ${bindir}/jstat jstat ${JDK_HOME}/bin/jstat 100
206 update-alternatives --install ${bindir}/jstatd jstatd ${JDK_HOME}/bin/jstatd 100
207 update-alternatives --install ${bindir}/keytool keytool ${JDK_HOME}/bin/keytool 100
208 update-alternatives --install ${bindir}/native2ascii native2ascii ${JDK_HOME}/bin/native2ascii 100
209 update-alternatives --install ${bindir}/orbd orbd ${JDK_HOME}/bin/orbd 100
210 update-alternatives --install ${bindir}/pack200 pack200 ${JDK_HOME}/bin/pack200 100
211 update-alternatives --install ${bindir}/policytool policytool ${JDK_HOME}/bin/policytool 100
212 update-alternatives --install ${bindir}/rmic rmic ${JDK_HOME}/bin/rmic 100
213 update-alternatives --install ${bindir}/rmid rmid ${JDK_HOME}/bin/rmid 100
214 update-alternatives --install ${bindir}/rmiregistry rmiregistry ${JDK_HOME}/bin/rmiregistry 100
215 update-alternatives --install ${bindir}/schemagen schemagen ${JDK_HOME}/bin/schemagen 100
216 update-alternatives --install ${bindir}/serialver serialver ${JDK_HOME}/bin/serialver 100
217 update-alternatives --install ${bindir}/servertool servertool ${JDK_HOME}/bin/servertool 100
218 update-alternatives --install ${bindir}/tnameserv tnameserv ${JDK_HOME}/bin/tnameserv 100
219 update-alternatives --install ${bindir}/unpack200 unpack200 ${JDK_HOME}/bin/unpack200 100
220 update-alternatives --install ${bindir}/wsgen wsgen ${JDK_HOME}/bin/wsgen 100
221 update-alternatives --install ${bindir}/wsimport wsimport ${JDK_HOME}/bin/wsimport 100
222 update-alternatives --install ${bindir}/xjc xjc ${JDK_HOME}/bin/xjc 100
223}
224
225pkg_prerm_${JDKPN}-jdk () {
226 update-alternatives --remove appletviewer ${JDK_HOME}/bin/appletviewer
227 update-alternatives --remove extcheck ${JDK_HOME}/bin/extcheck
228 update-alternatives --remove idlj ${JDK_HOME}/bin/idlj
229 update-alternatives --remove jar ${JDK_HOME}/bin/jar
230 update-alternatives --remove jarsigner ${JDK_HOME}/bin/jarsigner
231 update-alternatives --remove java ${JDK_HOME}/bin/java
232 update-alternatives --remove javac ${JDK_HOME}/bin/javac
233 update-alternatives --remove javadoc ${JDK_HOME}/bin/javadoc
234 update-alternatives --remove javah ${JDK_HOME}/bin/javah
235 update-alternatives --remove javap ${JDK_HOME}/bin/javap
236 update-alternatives --remove java-rmi.cgi ${JDK_HOME}/bin/java-rmi.cgi
237 update-alternatives --remove jcmd ${JDK_HOME}/bin/jcmd
238 update-alternatives --remove jconsole ${JDK_HOME}/bin/jconsole
239 update-alternatives --remove jdb ${JDK_HOME}/bin/jdb
240 update-alternatives --remove jdeps ${JDK_HOME}/bin/jdeps
241 update-alternatives --remove jhat ${JDK_HOME}/bin/jhat
242 update-alternatives --remove jinfo ${JDK_HOME}/bin/jinfo
243 update-alternatives --remove jjs ${JDK_HOME}/bin/jjs
244 update-alternatives --remove jmap ${JDK_HOME}/bin/jmap
245 update-alternatives --remove jps ${JDK_HOME}/bin/jps
246 update-alternatives --remove jrunscript ${JDK_HOME}/bin/jrunscript
247 update-alternatives --remove jsadebugd ${JDK_HOME}/bin/jsadebugd
248 update-alternatives --remove jstack ${JDK_HOME}/bin/jstack
249 update-alternatives --remove jstat ${JDK_HOME}/bin/jstat
250 update-alternatives --remove jstatd ${JDK_HOME}/bin/jstatd
251 update-alternatives --remove keytool ${JDK_HOME}/bin/keytool
252 update-alternatives --remove native2ascii ${JDK_HOME}/bin/native2ascii
253 update-alternatives --remove orbd ${JDK_HOME}/bin/orbd
254 update-alternatives --remove pack200 ${JDK_HOME}/bin/pack200
255 update-alternatives --remove policytool ${JDK_HOME}/bin/policytool
256 update-alternatives --remove rmic ${JDK_HOME}/bin/rmic
257 update-alternatives --remove rmid ${JDK_HOME}/bin/rmid
258 update-alternatives --remove rmiregistry ${JDK_HOME}/bin/rmiregistry
259 update-alternatives --remove schemagen ${JDK_HOME}/bin/schemagen
260 update-alternatives --remove serialver ${JDK_HOME}/bin/serialver
261 update-alternatives --remove servertool ${JDK_HOME}/bin/servertool
262 update-alternatives --remove tnameserv ${JDK_HOME}/bin/tnameserv
263 update-alternatives --remove unpack200 ${JDK_HOME}/bin/unpack200
264 update-alternatives --remove wsgen ${JDK_HOME}/bin/wsgen
265 update-alternatives --remove wsimport ${JDK_HOME}/bin/wsimport
266 update-alternatives --remove xjc ${JDK_HOME}/bin/xjc
267}