diff options
| author | Henning Heinold <heinold@inf.fu-berlin.de> | 2011-11-12 20:58:34 +0100 |
|---|---|---|
| committer | Henning Heinold <heinold@inf.fu-berlin.de> | 2011-11-26 23:41:44 +0100 |
| commit | 57e069cde6617f00ca8834a82c6f360af43d5067 (patch) | |
| tree | 48cbe15e96d217c45acfa64b0c13aad8c6424980 /recipes-core/openjdk/openjdk-6-common.inc | |
| download | meta-java-57e069cde6617f00ca8834a82c6f360af43d5067.tar.gz | |
meta-java: initial commit
* taken over mostly stuff from oe classic
* cleaned up recipes
* added license checksums
* bump icedtea6-native to 1.8.11
* use jamvm from git as native
Diffstat (limited to 'recipes-core/openjdk/openjdk-6-common.inc')
| -rw-r--r-- | recipes-core/openjdk/openjdk-6-common.inc | 518 |
1 files changed, 518 insertions, 0 deletions
diff --git a/recipes-core/openjdk/openjdk-6-common.inc b/recipes-core/openjdk/openjdk-6-common.inc new file mode 100644 index 0000000..ef1c41d --- /dev/null +++ b/recipes-core/openjdk/openjdk-6-common.inc | |||
| @@ -0,0 +1,518 @@ | |||
| 1 | DESCRIPTION = "Java runtime based upon the OpenJDK- and Icedtea Project" | ||
| 2 | HOMEPAGE = "http://icedtea.classpath.org" | ||
| 3 | LICENSE = "GPL with Classpath Exception" | ||
| 4 | PRIORITY = "optional" | ||
| 5 | SECTION = "libs" | ||
| 6 | |||
| 7 | # Name of the icedtea tarball and top-level directory. | ||
| 8 | ICEDTEA = "NEEDS TO BE SET" | ||
| 9 | |||
| 10 | S = "${WORKDIR}/${ICEDTEA}" | ||
| 11 | B = "${S}/build" | ||
| 12 | |||
| 13 | INC_PR = "r11" | ||
| 14 | |||
| 15 | SRC_URI = "\ | ||
| 16 | ${ICEDTEA_URI} \ | ||
| 17 | ${OPENJDK_URI} \ | ||
| 18 | ${JAXWS_URI} \ | ||
| 19 | ${JAF_URI} \ | ||
| 20 | ${JAXP_URI} \ | ||
| 21 | ${CACAO_URI} \ | ||
| 22 | ${OEPATCHES} \ | ||
| 23 | ${ICEDTEAPATCHES} \ | ||
| 24 | file://jvm.cfg \ | ||
| 25 | " | ||
| 26 | |||
| 27 | JDKPN = "openjdk-6" | ||
| 28 | JDK_DIR = "java-6-openjdk" | ||
| 29 | |||
| 30 | PN = "${JDKPN}-jre" | ||
| 31 | PROVIDES += "${JDKPN} ${PACKAGES}" | ||
| 32 | |||
| 33 | DEPENDS = "giflib libpng jpeg cups \ | ||
| 34 | xalan-j xerces-j rhino \ | ||
| 35 | freetype libxinerama libxt libxp libxrender libxtst libxi \ | ||
| 36 | alsa-lib libffi llvm2.9\ | ||
| 37 | ant-native \ | ||
| 38 | fastjar-native \ | ||
| 39 | icedtea6-native \ | ||
| 40 | cacaoh-openjdk-native \ | ||
| 41 | zip-native \ | ||
| 42 | " | ||
| 43 | |||
| 44 | DEPENDS_append_libc-uclibc = " libiconv " | ||
| 45 | |||
| 46 | # The OpenJDK build with interpreter optimizations for ARM depends on a binary | ||
| 47 | # that generates constants for an assembler source file. There is no other | ||
| 48 | # way than to generate this on a pseudo machine. Cross-compiling would not help | ||
| 49 | # because structure sizes and/or alignment may differ. | ||
| 50 | DEPENDS_append_arm = " qemu-native " | ||
| 51 | |||
| 52 | |||
| 53 | # No package should directly depend on this (it should require | ||
| 54 | # java2-runtime instead). | ||
| 55 | PRIVATE_LIBS = "\ | ||
| 56 | libunpack.so libverify.so libjava.so libzip.so libnpt.so \ | ||
| 57 | libjava_crw_demo.so libhprof.so libnet.so libnio.so \ | ||
| 58 | libmanagement.so libinstrument.so libjsound.so libjsoundalsa.so \ | ||
| 59 | libj2pcsc.so libj2pkcs11.so libj2gss.so libmlib_image.so \ | ||
| 60 | libawt.so libsplashscreen.so libfreetype.so.6 libfontmanager.so \ | ||
| 61 | libjpeg.so liblcms.so librmi.so libjawt.so libjaas_unix.so \ | ||
| 62 | libattach.so libjdwp.so libdt_socket.so libhpi.so libjli.so \ | ||
| 63 | libmawt.so libjvm.so \ | ||
| 64 | libversionCheck.so libcompiledMethodLoad.so libgctest.so \ | ||
| 65 | libheapViewer.so libheapTracker.so libminst.so libmtrace.so \ | ||
| 66 | libwaiters.so libhprof.so \ | ||
| 67 | " | ||
| 68 | |||
| 69 | |||
| 70 | inherit java autotools gettext | ||
| 71 | |||
| 72 | export ALT_CUPS_HEADERS_PATH = "${STAGING_INCDIR}" | ||
| 73 | export ALT_FREETYPE_HEADERS_PATH = "${STAGING_INCDIR}/freetype2" | ||
| 74 | export ALT_FREETYPE_LIB_PATH = "${STAGING_LIBDIR}" | ||
| 75 | export CACAO_CONFIGURE_ARGS = "\ | ||
| 76 | ${@['','--enable-softfloat'][bb.data.getVar('TARGET_FPU',d,1) == 'soft']} \ | ||
| 77 | --with-cacaoh=${STAGING_BINDIR_NATIVE}/cacaoh-openjdk-0.99.4" | ||
| 78 | |||
| 79 | JAVA_HOME[unexport] = "1" | ||
| 80 | |||
| 81 | EXTRA_OECONF = "\ | ||
| 82 | --disable-docs \ | ||
| 83 | --disable-pulse-java \ | ||
| 84 | --disable-plugin \ | ||
| 85 | \ | ||
| 86 | --with-ecj=${STAGING_BINDIR_NATIVE}/foo \ | ||
| 87 | --with-ecj-jar=${STAGING_DATADIR_JAVA_NATIVE}/ecj-bootstrap.jar \ | ||
| 88 | --with-java=${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/bin/java \ | ||
| 89 | --with-javac=${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/bin/javac \ | ||
| 90 | --with-javah=${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/bin/javah \ | ||
| 91 | --with-jar=${STAGING_BINDIR_NATIVE}/fastjar \ | ||
| 92 | --with-rmic=${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/bin/rmic \ | ||
| 93 | --with-xalan2-jar=${STAGING_DATADIR_JAVA}/xalan2.jar \ | ||
| 94 | --with-xalan2-serializer-jar=${STAGING_DATADIR_JAVA}/serializer.jar \ | ||
| 95 | --with-xerces2-jar=${STAGING_DATADIR_JAVA}/xercesImpl.jar \ | ||
| 96 | --with-rhino=${STAGING_DATADIR_JAVA}/rhino.jar \ | ||
| 97 | --with-openjdk-src-dir=${WORKDIR}/openjdk-src-dir \ | ||
| 98 | --with-gcj-home=${WORKDIR}/fake-jdk \ | ||
| 99 | --with-parallel-jobs=${JDK_JOBS} \ | ||
| 100 | \ | ||
| 101 | --with-libgcj-jar=${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/jre/lib/rt.jar \ | ||
| 102 | \ | ||
| 103 | --with-pkgversion=${PV} \ | ||
| 104 | --with-cc-for-build=${BUILD_CC} \ | ||
| 105 | --enable-zero \ | ||
| 106 | --with-additional-vms=shark,cacao \ | ||
| 107 | --enable-openjdk-cross-compilation \ | ||
| 108 | " | ||
| 109 | |||
| 110 | |||
| 111 | # OpenJDK uses slightly different names for certain arches. We need to know | ||
| 112 | # this to create some files which are expected by the build. | ||
| 113 | def get_jdk_arch(d): | ||
| 114 | import bb | ||
| 115 | |||
| 116 | jdk_arch = bb.data.getVar('TARGET_ARCH', d, 1) | ||
| 117 | if jdk_arch == "x86_64": | ||
| 118 | jdk_arch = "amd64" | ||
| 119 | elif (jdk_arch == "i586" or jdk_arch == "i686"): | ||
| 120 | jdk_arch = "i586" | ||
| 121 | |||
| 122 | return jdk_arch | ||
| 123 | |||
| 124 | JDK_ARCH = "${@get_jdk_arch(d)}" | ||
| 125 | JDK_HOME = "${libdir_jvm}/${JDK_DIR}" | ||
| 126 | |||
| 127 | # OpenJDK supports parallel compilation but uses a plain number for this. | ||
| 128 | # In OE we have PARALLEL_MAKE which is the actual option passed to make, | ||
| 129 | # e.g. "-j 4". | ||
| 130 | def get_jdk_jobs(d): | ||
| 131 | import bb | ||
| 132 | |||
| 133 | pm = bb.data.getVar('PARALLEL_MAKE', d, 1); | ||
| 134 | if not pm: | ||
| 135 | return "1" | ||
| 136 | |||
| 137 | pm = pm.split(" "); | ||
| 138 | if (len(pm) == 2): | ||
| 139 | return pm[1] | ||
| 140 | |||
| 141 | # Whatever found in PARALLEL_MAKE was not suitable. | ||
| 142 | return "1" | ||
| 143 | |||
| 144 | JDK_JOBS = "${@get_jdk_jobs(d)}" | ||
| 145 | |||
| 146 | # A function that is needed in the Shark builds. | ||
| 147 | def get_llvm_configure_arch(d): | ||
| 148 | import bb; | ||
| 149 | |||
| 150 | arch = bb.data.getVar('TARGET_ARCH', d, 1) | ||
| 151 | if arch == "x86_64" or arch == "i486" or arch == "i586" or arch == "i686": | ||
| 152 | arch = "x86" | ||
| 153 | elif arch == "arm": | ||
| 154 | arch = "arm" | ||
| 155 | elif arch == "mipsel": | ||
| 156 | arch = "mips" | ||
| 157 | elif arch == "powerpc": | ||
| 158 | arch = "powerpc" | ||
| 159 | else: | ||
| 160 | oefatal("Your target architecture is not supported by this recipe"); | ||
| 161 | |||
| 162 | return arch | ||
| 163 | |||
| 164 | # Custom preparation of the sources which: | ||
| 165 | # - cleans up the sources | ||
| 166 | # - copies the patches into the proper directory | ||
| 167 | # - prepares the FakeJDK directory structure | ||
| 168 | #DISABLED because of incompatibility with oe stable 2009: do_prepareconfigure () { | ||
| 169 | do_configure_prepend() { | ||
| 170 | chmod -R ug+w ${WORKDIR}/openjdk-src-dir | ||
| 171 | (cd ${WORKDIR}/openjdk-src-dir && sh ${S}/fsg.sh) | ||
| 172 | |||
| 173 | # Automatically copy everything that starts with "icedtea" (or "cacao") and ends with | ||
| 174 | # ".patch" into the patches directory. | ||
| 175 | find ${WORKDIR} -maxdepth 1 -name "icedtea*.patch" -exec cp {} ${S}/patches \; | ||
| 176 | find ${WORKDIR} -maxdepth 1 -name "cacao*.patch" -exec cp {} ${S}/patches \; | ||
| 177 | |||
| 178 | # use now the rt.jar from icedtea6-native | ||
| 179 | mkdir -p ${WORKDIR}/fake-jdk/jre/lib | ||
| 180 | ln -sf ${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/jre/lib/rt.jar ${WORKDIR}/fake-jdk/jre/lib/rt.jar | ||
| 181 | |||
| 182 | symlinked=false | ||
| 183 | echo "Creating symlinks for fake-jdk" | ||
| 184 | mkdir -p ${WORKDIR}/fake-jdk/include | ||
| 185 | for i in `find ${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/include` ;do | ||
| 186 | bn=`basename $i` | ||
| 187 | echo "Symlinking: $bn" | ||
| 188 | ln -sf $i ${WORKDIR}/fake-jdk/include/$bn; | ||
| 189 | symlinked=true | ||
| 190 | done | ||
| 191 | |||
| 192 | # If the symlinks have not been created the built cannot continue. This | ||
| 193 | # can happen if icedtea6-native is not ready at this point. The recipe | ||
| 194 | # should make sure this is not the case but a little sanity checking | ||
| 195 | # in such a complicated build can't be wrong. | ||
| 196 | if [ x$symlinked = xfalse ] | ||
| 197 | then | ||
| 198 | echo"Build b0rken! Have not created any symlinks for fake-jdk!" | ||
| 199 | else | ||
| 200 | echo "fake-jdk setup appears sane." | ||
| 201 | fi | ||
| 202 | } | ||
| 203 | |||
| 204 | # Note: The following lines only work for OE.dev branch but cause an exception | ||
| 205 | # in oe stable's 2009 bitbake. As such the function is prepended to do_configure instead. | ||
| 206 | #addtask prepareconfigure after do_patch before do_configure | ||
| 207 | # Makes prepareconfigure depend on icedtea6-native having being staged. | ||
| 208 | #do_prepareconfigure[depends] += "icedtea6-native:do_populate_sysroot" | ||
| 209 | |||
| 210 | |||
| 211 | do_configure_append() { | ||
| 212 | oe_runmake patch-ecj | ||
| 213 | } | ||
| 214 | |||
| 215 | # Work around broken variable quoting in oe-stable 2009 and provide the variable | ||
| 216 | # via the environment which then overrides the erroneous value that was written | ||
| 217 | # into '${ICETDEA}/Makefile'. | ||
| 218 | # Icedtea's makefile is not compatible to parallelization so we cannot allow | ||
| 219 | # passing a valid ${PARALLEL_MAKE} to it. OTOH OpenJDK's makefiles are | ||
| 220 | # parallelizable and we need ${PARALLEL_MAKE} to derive the proper value. | ||
| 221 | # The base for this quirk is that GNU Make only considers the last "-j" option. | ||
| 222 | EXTRA_OEMAKE = '-j 1 CC="${CC}" CCC="${CXX}" CPP="${CPP}" CXX="${CXX}" CC_FOR_BUILD="${BUILD_CC}"' | ||
| 223 | |||
| 224 | EXTRA_OEMAKE += ' \ | ||
| 225 | OE_CFLAGS="${TARGET_CFLAGS}" \ | ||
| 226 | OE_CPPFLAGS="${TARGET_CPPFLAGS}" \ | ||
| 227 | OE_CXXFLAGS="${TARGET_CXXFLAGS}" \ | ||
| 228 | OE_LDFLAGS="${TARGET_LDFLAGS}" \ | ||
| 229 | ZIPEXE="${STAGING_BINDIR_NATIVE}/zip" \ | ||
| 230 | ' | ||
| 231 | |||
| 232 | # Puts an OE specific string into the binary making it possible for the user | ||
| 233 | # to know where it comes from (and blame the right people ...). | ||
| 234 | DIST_ID = "Built for ${DISTRO}" | ||
| 235 | DIST_NAME = "${DISTRO}" | ||
| 236 | EXTRA_OEMAKE += 'DIST_NAME="${DIST_NAME}" DIST_ID="${DIST_ID}"' | ||
| 237 | |||
| 238 | |||
| 239 | # llvm configure and compiles stuff | ||
| 240 | |||
| 241 | export WANT_LLVM_RELEASE = "2.9" | ||
| 242 | |||
| 243 | # Provides the target architecture to the configure script. | ||
| 244 | export LLVM_CONFIGURE_ARCH="${@get_llvm_configure_arch(d)}" | ||
| 245 | |||
| 246 | OE_LAUNCHER_LDFLAGS = "-Wl,-rpath-link,${STAGING_LIBDIR}/llvm2.9" | ||
| 247 | |||
| 248 | EXTRA_OEMAKE += 'OE_LAUNCHER_LDFLAGS="${OE_LAUNCHER_LDFLAGS}"' | ||
| 249 | |||
| 250 | |||
| 251 | # Large stack is required at least on x86_64 host, otherwise random segfaults appear: | ||
| 252 | QEMU = "qemu-${TARGET_ARCH} ${QEMU_OPTIONS} -s 1048576 -L ${STAGING_DIR_TARGET}" | ||
| 253 | |||
| 254 | EXTRA_OEMAKE += 'QEMU="${QEMU}"' | ||
| 255 | |||
| 256 | # Name of the directory containing the compiled output | ||
| 257 | BUILD_DIR = "build/linux-${JDK_ARCH}" | ||
| 258 | |||
| 259 | # The build of OpenJDK is a 3-part process. For better restartability and overrideability they have been split into | ||
| 260 | # three functions. | ||
| 261 | # 1. compile Hotspot or Cacao (this one is supposed to be implemented according to wanted VM) | ||
| 262 | # 2. compile openjdk-ecj (to have libraries as libjvm.so and libjava.so which are needed later) | ||
| 263 | # 3. compile openjdk (the final result) | ||
| 264 | |||
| 265 | do_compilestepone() { | ||
| 266 | oe_runmake bootstrap-directory-ecj | ||
| 267 | |||
| 268 | # now we need to override the tools.jar to point to the normal jdk's tools.jar | ||
| 269 | rm bootstrap/ecj/lib/tools.jar | ||
| 270 | ln -s ${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/lib/tools.jar bootstrap/ecj/lib/tools.jar | ||
| 271 | |||
| 272 | # First build hotspot to get a libjvm.so (to link corba in the icedtea-ecj build) | ||
| 273 | echo "1/3 Building Hotspot" | ||
| 274 | oe_runmake hotspot | ||
| 275 | |||
| 276 | # Remove spurious libarch directory/symlink | ||
| 277 | rm -rf bootstrap/ecj/jre/lib/${JDK_ARCH} || true | ||
| 278 | |||
| 279 | # Provide a symlink to the target arch's libjvm.so (to link against) | ||
| 280 | ln -s `pwd`/openjdk-ecj/${BUILD_DIR}/j2sdk-image/jre/lib/${JDK_ARCH} bootstrap/jdk1.6.0/jre/lib/${JDK_ARCH} | ||
| 281 | |||
| 282 | # fake j2sdk-image | ||
| 283 | rm openjdk-ecj/${BUILD_DIR}/j2sdk-image/include || true | ||
| 284 | cp -ar openjdk-ecj/${BUILD_DIR}/hotspot/import/include openjdk-ecj/${BUILD_DIR}/j2sdk-image/ | ||
| 285 | install -d openjdk-ecj/${BUILD_DIR}/j2sdk-image/bin | ||
| 286 | } | ||
| 287 | addtask compilestepone after do_configure before do_compilesteptwo | ||
| 288 | |||
| 289 | # This part can be shared between cacao and hotspot-zero builds. | ||
| 290 | do_compilesteptwo() { | ||
| 291 | echo "2/3 Building bootstrap JDK" | ||
| 292 | |||
| 293 | # Now cross-compile bootstrap JDK | ||
| 294 | rm stamps/icedtea-against-ecj.stamp stamps/icedtea-ecj.stamp || true | ||
| 295 | oe_runmake icedtea-against-ecj | ||
| 296 | |||
| 297 | ln -sf ../openjdk-ecj/${BUILD_DIR}/j2sdk-image bootstrap/icedtea | ||
| 298 | |||
| 299 | # Replace all executables with symlinks to their native equivalents. | ||
| 300 | for F in `find ${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/bin -type f` | ||
| 301 | do | ||
| 302 | bf=`basename $F` | ||
| 303 | echo "Creating symlink for:" $bf | ||
| 304 | ln -sf $F bootstrap/icedtea/bin/$bf | ||
| 305 | done | ||
| 306 | } | ||
| 307 | addtask compilesteptwo after do_compilestepone before do_compile | ||
| 308 | |||
| 309 | do_compile() { | ||
| 310 | |||
| 311 | echo "3/3 Building final JDK" | ||
| 312 | |||
| 313 | # Build the final Hotspot + OpenJDK | ||
| 314 | oe_runmake icedtea-against-icedtea \ | ||
| 315 | } | ||
| 316 | |||
| 317 | do_install() { | ||
| 318 | install -d ${D}${libdir_jvm} | ||
| 319 | cp -R ${S}/build/openjdk/${BUILD_DIR}/j2sdk-image ${D}${JDK_HOME} | ||
| 320 | |||
| 321 | chmod u+rw -R ${D}${JDK_HOME} | ||
| 322 | |||
| 323 | # Fix symlink which would point into staging in the binary package. | ||
| 324 | ln -sf ${datadir_java}/rhino.jar ${D}${JDK_HOME}/jre/lib/rhino.jar | ||
| 325 | |||
| 326 | # JRE is a subset of JDK. So to save space and resemble what the BIG distros | ||
| 327 | # do we create symlinks from the JDK binaries to their counterparts in the | ||
| 328 | # JRE folder (which have to exist by that time b/c of dependencies). | ||
| 329 | for F in `find ${D}${JDK_HOME}/jre/bin -type f` | ||
| 330 | do | ||
| 331 | bf=`basename $F` | ||
| 332 | echo "replace:" $bf | ||
| 333 | rm ${D}${JDK_HOME}/bin/$bf | ||
| 334 | ln -s ${JDK_HOME}/jre/bin/$bf ${D}${JDK_HOME}/bin/$bf | ||
| 335 | done | ||
| 336 | |||
| 337 | install -m644 ${WORKDIR}/jvm.cfg ${D}${JDK_HOME}/jre/lib/${JDK_ARCH}/ | ||
| 338 | } | ||
| 339 | |||
| 340 | # Notes about the ideas behind packaging: | ||
| 341 | # 1) User should install openjdk-6-jre. This is a provider of 'java2-runtime'. | ||
| 342 | # 2) This lets package mgmt install: openjdk-6-java | ||
| 343 | # -> openjdk-6-vm-shark|openjdk-6-vm-zero|openjdk-6-vm-cacao -> openjdk-6-common | ||
| 344 | # | ||
| 345 | # With opkg the zero VM is chosen which is good b/c that is the best known (= compatible) | ||
| 346 | # runtime. Installing other runtimes side-by-side is possible. Through jvm.cfg the following | ||
| 347 | # order of precedence is enforced: zero, shark, cacao. User can chose a different runtime | ||
| 348 | # by adding '-shark' or '-cacao' to the Java command (or by deinstalling an otherwise preferred | ||
| 349 | # runtime) | ||
| 350 | # 3) All other packages, including -jdk, are optional and not needed for normal Java apps. | ||
| 351 | PACKAGES = " \ | ||
| 352 | ${JDKPN}-jre \ | ||
| 353 | ${JDKPN}-dbg \ | ||
| 354 | ${JDKPN}-demo-dbg \ | ||
| 355 | ${JDKPN}-demo \ | ||
| 356 | ${JDKPN}-source \ | ||
| 357 | ${JDKPN}-doc \ | ||
| 358 | ${JDKPN}-jdk \ | ||
| 359 | ${JDKPN}-java \ | ||
| 360 | ${JDKPN}-vm-shark \ | ||
| 361 | ${JDKPN}-vm-zero \ | ||
| 362 | ${JDKPN}-vm-cacao \ | ||
| 363 | ${JDKPN}-common \ | ||
| 364 | " | ||
| 365 | |||
| 366 | FILES_${JDKPN}-dbg = "\ | ||
| 367 | ${JDK_HOME}/bin/.debug \ | ||
| 368 | ${JDK_HOME}/lib/.debug \ | ||
| 369 | ${JDK_HOME}/jre/bin/.debug \ | ||
| 370 | ${JDK_HOME}/jre/lib/.debug \ | ||
| 371 | ${JDK_HOME}/jre/lib/${JDK_ARCH}/.debug \ | ||
| 372 | ${JDK_HOME}/jre/lib/${JDK_ARCH}/jli/.debug \ | ||
| 373 | ${JDK_HOME}/jre/lib/${JDK_ARCH}/native_threads/.debug \ | ||
| 374 | ${JDK_HOME}/jre/lib/${JDK_ARCH}/server/.debug \ | ||
| 375 | ${JDK_HOME}/jre/lib/${JDK_ARCH}/shark/.debug \ | ||
| 376 | ${JDK_HOME}/jre/lib/${JDK_ARCH}/headless/.debug \ | ||
| 377 | ${JDK_HOME}/jre/lib/${JDK_ARCH}/xawt/.debug \ | ||
| 378 | " | ||
| 379 | |||
| 380 | FILES_${JDKPN}-demo = "${JDK_HOME}/demo ${JDK_HOME}/sample" | ||
| 381 | RDEPENDS_${JDKPN}-demo = "java2-runtime" | ||
| 382 | FILES_${JDKPN}-demo-dbg = "\ | ||
| 383 | ${JDK_HOME}/demo/jvmti/gctest/lib/.debug \ | ||
| 384 | ${JDK_HOME}/demo/jvmti/heapTracker/lib/.debug \ | ||
| 385 | ${JDK_HOME}/demo/jvmti/heapViewer/lib/.debug \ | ||
| 386 | ${JDK_HOME}/demo/jvmti/hprof/lib/.debug \ | ||
| 387 | ${JDK_HOME}/demo/jvmti/minst/lib/.debug \ | ||
| 388 | ${JDK_HOME}/demo/jvmti/mtrace/lib/.debug \ | ||
| 389 | ${JDK_HOME}/demo/jvmti/versionCheck/lib/.debug \ | ||
| 390 | ${JDK_HOME}/demo/jvmti/waiters/lib/.debug \ | ||
| 391 | ${JDK_HOME}/demo/jvmti/compiledMethodLoad/lib/.debug \ | ||
| 392 | " | ||
| 393 | |||
| 394 | FILES_${JDKPN}-source = "${JDK_HOME}/src.zip" | ||
| 395 | |||
| 396 | FILES_${JDKPN}-java = "${JDK_HOME}/jre/bin/java" | ||
| 397 | |||
| 398 | FILES_${JDKPN}-vm-zero = "${JDK_HOME}/jre/lib/arm/server/" | ||
| 399 | |||
| 400 | FILES_${JDKPN}-vm-shark = "${JDK_HOME}/jre/lib/arm/shark/" | ||
| 401 | |||
| 402 | FILES_${JDKPN}-vm-cacao = "${JDK_HOME}/jre/lib/arm/cacao/" | ||
| 403 | |||
| 404 | FILES_${JDKPN}-common = "${JDK_HOME}/jre/ASSEMBLY_EXCEPTION \ | ||
| 405 | ${JDK_HOME}/jre/THIRD_PARTY_README \ | ||
| 406 | ${JDK_HOME}/jre/LICENSE \ | ||
| 407 | ${JDK_HOME}/jre/lib \ | ||
| 408 | " | ||
| 409 | |||
| 410 | FILES_openjdk-6-jre_append = " \ | ||
| 411 | ${JDK_HOME}/jre/bin/keytool \ | ||
| 412 | ${JDK_HOME}/jre/bin/orbd \ | ||
| 413 | ${JDK_HOME}/jre/bin/pack200 \ | ||
| 414 | ${JDK_HOME}/jre/bin/rmid \ | ||
| 415 | ${JDK_HOME}/jre/bin/rmiregistry \ | ||
| 416 | ${JDK_HOME}/jre/bin/servertool \ | ||
| 417 | ${JDK_HOME}/jre/bin/tnameserv \ | ||
| 418 | ${JDK_HOME}/jre/bin/unpack200 \ | ||
| 419 | ${JDK_HOME}/jre/bin/policytool \ | ||
| 420 | ${JDK_HOME}/jre/bin/javaws \ | ||
| 421 | " | ||
| 422 | |||
| 423 | RDEPENDS_${JDKPN}-common = "librhino-java" | ||
| 424 | |||
| 425 | RPROVIDES_${JDKPN}-vm-shark = "java2-vm" | ||
| 426 | RPROVIDES_${JDKPN}-vm-zero = "java2-vm" | ||
| 427 | RPROVIDES_${JDKPN}-vm-cacao = "java2-vm" | ||
| 428 | |||
| 429 | RDEPENDS_${JDKPN}-java = "java2-vm" | ||
| 430 | |||
| 431 | # For some reason shark and cacao do not automatically depends on -common. | ||
| 432 | # So we add that manually. | ||
| 433 | RDEPENDS_${JDKPN}-vm-shark = "${JDKPN}-common" | ||
| 434 | RDEPENDS_${JDKPN}-vm-cacao = "${JDKPN}-common" | ||
| 435 | |||
| 436 | # There is a symlink to a .so but this one is valid. | ||
| 437 | INSANE_SKIP_${JDKPN}-vm-shark = "dev-so" | ||
| 438 | INSANE_SKIP_${JDKPN}-vm-zero = "dev-so" | ||
| 439 | INSANE_SKIP_${JDKPN}-vm-cacao = "dev-so" | ||
| 440 | INSANE_SKIP_${JDKPN}-common = "dev-so" | ||
| 441 | |||
| 442 | FILES_${JDKPN}-jdk = " \ | ||
| 443 | ${JDK_HOME}/bin \ | ||
| 444 | ${JDK_HOME}/lib \ | ||
| 445 | ${JDK_HOME}/include \ | ||
| 446 | " | ||
| 447 | RDEPENDS_${JDKPN}-jre = "${JDKPN}-java" | ||
| 448 | RPROVIDES_${JDKPN}-jre = "java2-runtime" | ||
| 449 | |||
| 450 | RDEPENDS_${JDKPN}-jdk = "${JDKPN}-jre" | ||
| 451 | |||
| 452 | FILES_${JDKPN}-doc = "${JDK_HOME}/man" | ||
| 453 | |||
| 454 | pkg_postinst_${JDKPN}-vm-shark () { | ||
| 455 | if grep -q "\-cacao KNOWN" ${JDK_HOME}/jre/lib/arm/jvm.cfg && grep -q "\-server ERROR" ${JDK_HOME}/jre/lib/arm/jvm.cfg; then | ||
| 456 | sed -i -e "/\-cacao KNOWN/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 457 | echo "-cacao KNOWN" >> ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 458 | fi | ||
| 459 | |||
| 460 | sed -i -e "/\-shark.*/d" -e "s|\(^\-server*\)|\-shark KNOWN\n\1|" -e "/^$/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 461 | } | ||
| 462 | |||
| 463 | pkg_prerm_${JDKPN}-vm-shark () { | ||
| 464 | sed -i -e "/^\-shark.*/d" -e "/^$/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 465 | if grep -q "\-cacao KNOWN" ${JDK_HOME}/jre/lib/arm/jvm.cfg && grep -q "\-server ERROR" ${JDK_HOME}/jre/lib/arm/jvm.cfg; then | ||
| 466 | sed -i -e "/\-cacao KNOWN/d" -e "s|\(^\-server*\)|\-cacao KNOWN\n\1|" ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 467 | fi | ||
| 468 | } | ||
| 469 | |||
| 470 | pkg_postinst_${JDKPN}-vm-cacao () { | ||
| 471 | if grep -q "\-server ERROR" ${JDK_HOME}/jre/lib/arm/jvm.cfg && ! grep -q "\-shark KNOWN" ${JDK_HOME}/jre/lib/arm/jvm.cfg; then | ||
| 472 | sed -i -e "/\-cacao.*/d" -e "s|\(^\-server*\)|\-cacao KNOWN\n\1|" -e "/^$/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 473 | else | ||
| 474 | sed -i -e "s|^\-cacao.*|\-cacao KNOWN|" -e "/^$/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 475 | fi | ||
| 476 | } | ||
| 477 | |||
| 478 | pkg_prerm_${JDKPN}-vm-cacao () { | ||
| 479 | if grep -q "\-server ERROR" ${JDK_HOME}/jre/lib/arm/jvm.cfg && ! grep -q "\-shark KNOWN" ${JDK_HOME}/jre/lib/arm/jvm.cfg; then | ||
| 480 | sed -i -e "/\-cacao.*/d" -e "/^$/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 481 | echo "-cacao ERROR" >> ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 482 | else | ||
| 483 | sed -i -e "s|^\-cacao.*|\-cacao ERROR|" -e "/^$/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 484 | fi | ||
| 485 | } | ||
| 486 | |||
| 487 | pkg_postinst_${JDKPN}-vm-zero () { | ||
| 488 | if grep -q "\-cacao KNOWN" ${JDK_HOME}/jre/lib/arm/jvm.cfg && ! grep -q "\-shark KNOWN" ${JDK_HOME}/jre/lib/arm/jvm.cfg; then | ||
| 489 | sed -i -e "/\-cacao KNOWN/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 490 | echo "-cacao KNOWN" >> ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 491 | fi | ||
| 492 | |||
| 493 | sed -i -e "s|^\-server.*|\-server KNOWN|" -e "/^$/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 494 | } | ||
| 495 | |||
| 496 | pkg_prerm_${JDKPN}-vm-zero () { | ||
| 497 | if grep -q "\-cacao KNOWN" ${JDK_HOME}/jre/lib/arm/jvm.cfg && ! grep -q "\-shark KNOWN" ${JDK_HOME}/jre/lib/arm/jvm.cfg; then | ||
| 498 | sed -i -e "/\-cacao KNOWN/d" -e "s|\(^\-server*\)|\-cacao KNOWN\n\1|" ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 499 | fi | ||
| 500 | |||
| 501 | sed -i -e "s|^\-server.*|\-server ERROR|" -e "/^$/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 502 | } | ||
| 503 | |||
| 504 | pkg_postinst_${JDKPN}-jre () { | ||
| 505 | update-alternatives --install ${bindir}/java java ${JDK_HOME}/jre/bin/java 15 | ||
| 506 | } | ||
| 507 | |||
| 508 | pkg_prerm_${JDKPN}-jre () { | ||
| 509 | update-alternatives --remove java ${JDK_HOME}/jre/bin/java | ||
| 510 | } | ||
| 511 | |||
| 512 | pkg_postinst_${JDKPN}-jdk () { | ||
| 513 | update-alternatives --install ${bindir}/javac javac ${JDK_HOME}/bin/javac 15 | ||
| 514 | } | ||
| 515 | |||
| 516 | pkg_prerm_${JDKPN}-jdk () { | ||
| 517 | update-alternatives --remove javac ${JDK_HOME}/bin/javac | ||
| 518 | } | ||
