2014-09-01 22:44:51 +00:00
|
|
|
# TODO: better places for bin and man?
|
|
|
|
# TODO: make -headless versions
|
|
|
|
# TODO: config files?
|
|
|
|
# TODO: find giflib patch for --with-giflib=system
|
|
|
|
|
|
|
|
_java_ver=8
|
2014-11-22 21:04:11 +00:00
|
|
|
_jdk_update=40
|
|
|
|
_jdk_build=15
|
2014-09-04 13:43:55 +00:00
|
|
|
_repo_ver="jdk${_java_ver}u${_jdk_update}-b${_jdk_build}"
|
|
|
|
_openjdk_version="openjdk-1.8.0_${_jdk_update}"
|
|
|
|
|
|
|
|
# Template file for 'openjdk'
|
|
|
|
pkgname=openjdk
|
2014-09-01 22:44:51 +00:00
|
|
|
version=${_java_ver}u${_jdk_update}
|
2015-01-29 20:06:09 +00:00
|
|
|
revision=3
|
2014-09-02 14:27:55 +00:00
|
|
|
nocross=yes
|
2014-09-01 22:44:51 +00:00
|
|
|
wrksrc=jdk8u-jdk8u${_jdk_update}-b${_jdk_build}/
|
|
|
|
build_style=gnu-configure
|
|
|
|
configure_args="
|
|
|
|
--prefix=${XBPS_DESTDIR}/${sourcepkg}-${version}/usr/lib
|
|
|
|
--with-update-version=${_jdk_update}
|
|
|
|
--with-build-number=b${_jdk_build}
|
|
|
|
--with-milestone=fcs
|
|
|
|
--enable-unlimited-crypto
|
|
|
|
--with-zlib=system
|
2014-09-01 23:10:51 +00:00
|
|
|
$(vopt_if oracle_bootstrap --with-boot-jdk=/usr/lib/jvm/oracle-jdk \
|
2014-11-22 21:04:11 +00:00
|
|
|
--with-boot-jdk=/usr/lib/jvm/openjdk)"
|
2014-09-01 22:44:51 +00:00
|
|
|
make_build_args="DEBUG_BINARIES=true docs all"
|
2014-12-17 18:17:15 +00:00
|
|
|
hostmakedepends="pkg-config cpio unzip zip ca-certificates libressl-openssl"
|
2014-09-02 14:27:55 +00:00
|
|
|
case "$XBPS_MACHINE" in
|
|
|
|
arm*) hostmakedepends+=" $(vopt_if oracle_bootstrap oracle-jdk-arm openjdk)";;
|
|
|
|
*) hostmakedepends+=" $(vopt_if oracle_bootstrap oracle-jdk openjdk)";;
|
|
|
|
esac
|
2014-11-22 21:04:11 +00:00
|
|
|
makedepends="libXrender-devel libXtst-devel libXt-devel
|
2014-09-01 22:44:51 +00:00
|
|
|
libjpeg-turbo-devel cups-devel freetype-devel alsa-lib-devel"
|
2014-09-02 14:27:55 +00:00
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
|
|
arm*)
|
2014-11-22 21:04:11 +00:00
|
|
|
makedepends+=" libffi-devel"
|
2014-09-02 14:27:55 +00:00
|
|
|
configure_args+=" --with-jvm-variants=zero"
|
|
|
|
esac
|
2014-09-01 22:44:51 +00:00
|
|
|
depends="openjdk-jre-${version}_${revision}"
|
|
|
|
provides="java-environment-${version}_1"
|
|
|
|
replaces="java-environment>=0"
|
|
|
|
short_desc="OpenJDK Java Development Kit"
|
|
|
|
maintainer="Christian Neukirchen <chneukirchen@gmail.com>"
|
|
|
|
license="GPL-3"
|
|
|
|
homepage="http://openjdk.java.net/"
|
2014-11-09 07:03:11 +00:00
|
|
|
distfiles="
|
|
|
|
http://hg.openjdk.java.net/jdk8u/jdk8u/archive/${_repo_ver}.tar.gz>jdk8u-${_repo_ver}.tar.gz
|
2014-09-01 22:44:51 +00:00
|
|
|
http://hg.openjdk.java.net/jdk8u/jdk8u/corba/archive/${_repo_ver}.tar.gz>corba-${_repo_ver}.tar.gz
|
|
|
|
http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/archive/${_repo_ver}.tar.gz>hotspot-${_repo_ver}.tar.gz
|
|
|
|
http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/archive/${_repo_ver}.tar.gz>jdk-${_repo_ver}.tar.gz
|
|
|
|
http://hg.openjdk.java.net/jdk8u/jdk8u/jaxws/archive/${_repo_ver}.tar.gz>jaxws-${_repo_ver}.tar.gz
|
|
|
|
http://hg.openjdk.java.net/jdk8u/jdk8u/jaxp/archive/${_repo_ver}.tar.gz>jaxp-${_repo_ver}.tar.gz
|
|
|
|
http://hg.openjdk.java.net/jdk8u/jdk8u/langtools/archive/${_repo_ver}.tar.gz>langtools-${_repo_ver}.tar.gz
|
|
|
|
http://hg.openjdk.java.net/jdk8u/jdk8u/nashorn/archive/${_repo_ver}.tar.gz>nashorn-${_repo_ver}.tar.gz"
|
|
|
|
|
2014-11-22 21:04:11 +00:00
|
|
|
checksum="5e97a8f7da9891584874a2167b0da0bed681d043359c9d45a2fb23d4b9d4837b
|
|
|
|
27f80714e74731a5468ff36ac09d505a4853adb6aed2c0d42e5dea2f7369f3d0
|
|
|
|
f37c3bd1da59179bf9b0e16256d6cce075e135efb073e34eb85e939158c41b74
|
|
|
|
b0b0830d0db5dac65934e8f6fe7b95f638cfb5f95a906c8660e34826dfec60d8
|
|
|
|
3a980f14373899bbfb7217b514313562e3e75cca3d538eae41a39f61dcf91bab
|
|
|
|
74f816d59cc9e95c26732a44010185a21939b752da337b075f1b6b1f5a677631
|
|
|
|
f80960114b8148878c36c8210013100e3f2fcad08d245c21a32eacdb468c0dab
|
|
|
|
daed783d035ca241f41c81691c29a0c49948f7c724e81b5c36aa21f38c3e5fe2"
|
2014-09-01 22:44:51 +00:00
|
|
|
|
|
|
|
# Build is still parallel, but don't use -jN.
|
|
|
|
disable_parallel_build=yes
|
|
|
|
|
|
|
|
build_options="oracle_bootstrap"
|
|
|
|
desc_option_oracle_bootstrap="Bootstrap using Oracle JDK"
|
|
|
|
|
|
|
|
post_extract() {
|
|
|
|
chmod +x configure
|
|
|
|
for subrepo in corba hotspot jdk jaxws jaxp langtools nashorn; do
|
|
|
|
ln -s ../${subrepo}-${_repo_ver} ${subrepo}
|
|
|
|
done
|
|
|
|
cd hotspot
|
|
|
|
# https://bugs.openjdk.java.net/browse/JDK-8028407
|
|
|
|
patch -p1 < ${FILESDIR}/001_adjust-mflags-for-gmake-4.patch
|
|
|
|
# https://bugs.openjdk.java.net/browse/JDK-8041658
|
|
|
|
patch -p1 < ${FILESDIR}/002_gcc.make-4.9.patch
|
2015-01-29 20:06:09 +00:00
|
|
|
cd ../jdk
|
|
|
|
patch -p1 < ${FILESDIR}/003_nonreparenting-wm.patch
|
2014-09-01 22:44:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
post_install() {
|
|
|
|
rm -rf ${DESTDIR}/usr/lib/bin
|
2014-12-17 18:17:15 +00:00
|
|
|
vinstall ${FILESDIR}/mkcacerts 755 usr/lib/jvm/$_openjdk_version/jre/bin
|
|
|
|
vmkdir usr/lib/jvm/$_openjdk_version/jre/lib/security
|
|
|
|
sh ${FILESDIR}/mkcacerts \
|
|
|
|
-d "/usr/share/ca-certificates/" \
|
|
|
|
-s "/usr/bin/openssl" \
|
|
|
|
-k "${DESTDIR}/usr/lib/jvm/$_openjdk_version/jre/bin/keytool" \
|
|
|
|
-o "${DESTDIR}/usr/lib/jvm/$_openjdk_version/jre/lib/security/cacerts"
|
2014-09-01 22:44:51 +00:00
|
|
|
vlicense ASSEMBLY_EXCEPTION
|
|
|
|
vlicense LICENSE
|
|
|
|
vlicense THIRD_PARTY_README
|
|
|
|
}
|
|
|
|
|
|
|
|
openjdk-jre_package() {
|
2014-11-22 21:04:11 +00:00
|
|
|
short_desc="OpenJDK Java Runtime Environment"
|
2014-09-01 22:44:51 +00:00
|
|
|
provides="java-runtime-${version}_1"
|
|
|
|
replaces="java-runtime>=0"
|
2014-11-22 21:04:11 +00:00
|
|
|
pkg_install() {
|
2014-09-01 22:44:51 +00:00
|
|
|
vmove "usr/lib/jvm/$_openjdk_version/jre"
|
|
|
|
ln -s $_openjdk_version ${PKGDESTDIR}/usr/lib/jvm/openjdk
|
2014-09-01 23:53:43 +00:00
|
|
|
vmkdir etc/profile.d
|
|
|
|
cat >>${PKGDESTDIR}/etc/profile.d/10_openjdk.sh <<EOF
|
|
|
|
export JAVA_HOME=\${JAVA_HOME=/usr/lib/jvm/$_openjdk_version/jre}
|
|
|
|
export PATH="\$PATH:/usr/lib/jvm/$_openjdk_version/jre/bin:/usr/lib/jvm/$_openjdk_version/bin"
|
|
|
|
EOF
|
2014-11-22 21:04:11 +00:00
|
|
|
}
|
2014-09-01 22:44:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
openjdk-src_package() {
|
2014-11-22 21:04:11 +00:00
|
|
|
short_desc+=" -- sources"
|
|
|
|
pkg_install() {
|
2014-09-01 22:44:51 +00:00
|
|
|
vmove "usr/lib/jvm/$_openjdk_version/src.zip"
|
2014-11-22 21:04:11 +00:00
|
|
|
}
|
2014-09-01 22:44:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
openjdk-doc_package() {
|
2014-11-22 21:04:11 +00:00
|
|
|
short_desc+=" -- documentation"
|
|
|
|
pkg_install() {
|
2014-09-01 22:44:51 +00:00
|
|
|
cd ${wrksrc}
|
|
|
|
vmkdir usr/share/doc
|
|
|
|
cp -a build/linux-*/docs/* ${PKGDESTDIR}/usr/share/doc
|
2014-11-22 21:04:11 +00:00
|
|
|
}
|
2014-09-01 22:44:51 +00:00
|
|
|
}
|