mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-10 15:04:36 +08:00
will commit them separately next time... it's just too much work to do separate commits right now
195 lines
7.9 KiB
Bash
195 lines
7.9 KiB
Bash
# Maintainer: Daniele Cocca <jmc@chakra-project.org>
|
|
|
|
pkgname=('openjdk' 'openjdk-src')
|
|
pkgbase='openjdk'
|
|
_icedtea_release="2.3.9"
|
|
_icedtea_jdkver="7"
|
|
_openjdk_build="b02"
|
|
_pkgver="7u21"
|
|
pkgver="${_pkgver}_${_openjdk_build}_${_icedtea_release}"
|
|
pkgrel=2
|
|
pkgdesc="An open-source implementation of the seventh edition of the Java SE Platform."
|
|
arch=('x86_64')
|
|
url="http://icedtea.classpath.org/"
|
|
license=('GPL2 with Classpath exception')
|
|
makedepends=('java-environment=7' 'apache-ant>=1.6.5' 'zip' 'unzip'
|
|
'fastjar' 'cpio' 'cups' 'orbit2' 'gtk2' 'coreutils'
|
|
'wget' 'gzip' 'alsa-lib' 'libpulse' 'zlib' 'libjpeg-turbo'
|
|
'libpng' 'giflib' 'lcms2' 'freetype2' 'rhino' 'nss' 'libxt'
|
|
'libxtst' 'libxp' 'libxrender' 'ca-certificates-java')
|
|
|
|
_hg_url="http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3"
|
|
_corba_changeset="47a6bf94ce11"
|
|
_jaxp_changeset="d2142901bcb7"
|
|
_jaxws_changeset="b1877762d45c"
|
|
_jdk_changeset="8e91101e36f0"
|
|
_langtools_changeset="fd956199cb82"
|
|
_openjdk_changeset="12b96a57263c"
|
|
_hotspot_changeset="ad5a321edea2"
|
|
_jvmdir="/usr/lib/jvm/java-${_icedtea_jdkver}-openjdk"
|
|
|
|
source=("http://icedtea.classpath.org/download/source/icedtea-${_icedtea_release}.tar.gz"
|
|
"${_hg_url}/corba/archive/${_corba_changeset}.tar.gz"
|
|
"${_hg_url}/jaxp/archive/${_jaxp_changeset}.tar.gz"
|
|
"${_hg_url}/jaxws/archive/${_jaxws_changeset}.tar.gz"
|
|
"${_hg_url}/jdk/archive/${_jdk_changeset}.tar.gz"
|
|
"${_hg_url}/langtools/archive/${_langtools_changeset}.tar.gz"
|
|
"${_hg_url}/archive/${_openjdk_changeset}.tar.gz"
|
|
"${_hg_url}/hotspot/archive/${_hotspot_changeset}.tar.gz"
|
|
'archlinux-fontconfig-paths.diff'
|
|
'archlinux-fix_corba_cmds_path.diff'
|
|
'archlinux-openjdk7_fix_jdk_cmds_path.diff'
|
|
'archlinux-openjdk7_nonreparenting-wm.diff'
|
|
'openjdk.profile.sh'
|
|
'openjdk.profile.csh')
|
|
sha256sums=('7e1fdd4c53c9772337c971b6f6f8058dabd99d7f4c4fcc85c88d836c9005c6da'
|
|
'7346565688c3f01872af2c16a491233325ad5e924475dc89ff01f50582814934'
|
|
'8cad2dfee2d5e58a217193dcc9650debe519f72df7c136a15311195c9a1b48d6'
|
|
'b8e109ac705b95e5605280c8ae13319a128e16eac950a455bfa30364ae4192cc'
|
|
'349009abfc8df1575336648bebd8a5ff0cb0f2ad045f6b661d88691411881d5e'
|
|
'2806de9d41a91acff5bb917ec9dc41cb805e893b43828491b920f9ec14b53b12'
|
|
'651f99364e451d79156c879b8c8e47b8568fb3b4e4d28ebc38d36028acbed8bc'
|
|
'c184f29b13626e7327f58e4c1df506daf2b57d8084b7a2d2106504ab0fd5eaac'
|
|
'9ad943ceb3dbcdf45d72974fc3667886a7ed65c69ab9abc17be5412827551a7f'
|
|
'd57754ff320475023688bd7c7af38a9ea37e27ed8c1edd3b1572e4d8b41b78d3'
|
|
'e75703a350be92c8bcb440f335f5d8cfeeb7728d0551291d26fd2581855caadb'
|
|
'fd615f476ef17853ae55b7aee3c92b6738f9ea584e915749b1caa7fdc5ff9ca4'
|
|
'a6a083d4f3247a922c9d482f43341fa048ee4353d1cc42b54d1d0b5a6255bdd0'
|
|
'2120d72b19df6c46e35b87e0388afdfcb694843b55ef81ecaf104d78236e8c17')
|
|
noextract=("${_openjdk_changeset}.tar.gz"
|
|
"${_corba_changeset}.tar.gz"
|
|
"${_jaxp_changeset}.tar.gz"
|
|
"${_jaxws_changeset}.tar.gz"
|
|
"${_jdk_changeset}.tar.gz"
|
|
"${_langtools_changeset}.tar.gz"
|
|
"${_hotspot_changeset}.tar.gz")
|
|
|
|
build() {
|
|
cd "${srcdir}"
|
|
|
|
# Prepare the patches
|
|
cp *.diff "${srcdir}/icedtea-${_icedtea_release}/patches"
|
|
export DISTRIBUTION_PATCHES="patches/archlinux-fontconfig-paths.diff \
|
|
patches/archlinux-fix_corba_cmds_path.diff \
|
|
patches/archlinux-openjdk7_fix_jdk_cmds_path.diff \
|
|
patches/archlinux-openjdk7_nonreparenting-wm.diff"
|
|
|
|
rm -rf build
|
|
cp -r "icedtea-${_icedtea_release}" \
|
|
"${srcdir}/build"
|
|
|
|
cd "${srcdir}/build"
|
|
|
|
[ -f /etc/profile.d/openjdk.sh ] && source /etc/profile.d/openjdk.sh
|
|
[ -f /etc/profile.d/apache-ant.sh ] && source /etc/profile.d/apache-ant.sh
|
|
|
|
# Preserve the value of JAVA_HOME before unsetting it from the environment
|
|
local _java_home="${JAVA_HOME}"
|
|
|
|
# Setup the needed environmental variables
|
|
export USER="chakra-buildbot"
|
|
export ALT_BOOTDIR="${_java_home}"
|
|
export ALT_PARALLEL_COMPILE_JOBS="${MAKEFLAGS/-j}"
|
|
export HOTSPOT_BUILD_JOBS="${ALT_PARALLEL_COMPILE_JOBS}"
|
|
export COMPILER_WARNINGS_FATAL="false"
|
|
|
|
# Unset harmful variables
|
|
#unset JAVA_HOME JDK_HOME CLASSPATH JAVAC JAVACFLAGS
|
|
|
|
# Start the configuration and build step
|
|
./configure --prefix=/usr \
|
|
--with-parallel-jobs="${MAKEFLAGS/-j}" \
|
|
--host="${CARCH}-unknown-linux-gnu" \
|
|
--with-rhino \
|
|
--with-jdk-home="${_java_home}" \
|
|
--with-abs-install-dir="${_jvmdir}" \
|
|
--with-openjdk-src-zip="${srcdir}/${_openjdk_changeset}.tar.gz" \
|
|
--with-hotspot-src-zip="${srcdir}/${_hotspot_changeset}.tar.gz" \
|
|
--with-corba-src-zip="${srcdir}/${_corba_changeset}.tar.gz" \
|
|
--with-jaxp-src-zip="${srcdir}/${_jaxp_changeset}.tar.gz" \
|
|
--with-jaxws-src-zip="${srcdir}/${_jaxws_changeset}.tar.gz" \
|
|
--with-jdk-src-zip="${srcdir}/${_jdk_changeset}.tar.gz" \
|
|
--with-langtools-src-zip="${srcdir}/${_langtools_changeset}.tar.gz" \
|
|
--with-pkgversion="Chakra Linux build ${pkgver}-${pkgrel}-${CARCH}" \
|
|
--disable-tests \
|
|
--disable-bootstrap \
|
|
--disable-system-gtk \
|
|
--enable-nss \
|
|
--enable-pulse-java \
|
|
|| return 1
|
|
|
|
make
|
|
}
|
|
|
|
package_openjdk() {
|
|
pkgdesc="An open-source implementation of the seventh edition of the Java SE Platform."
|
|
install="openjdk.install"
|
|
conflicts=('java-environment' 'java-runtime' 'openjdk6' 'openjdk7')
|
|
provides=("java-environment=${_icedtea_jdkver}" "java-runtime=${_icedtea_jdkver}")
|
|
replaces=('openjdk6' 'openjdk7')
|
|
depends=('alsa-lib' 'libpulse' 'giflib' 'libjpeg-turbo' 'libpng' 'freetype2'
|
|
'ca-certificates-java')
|
|
optdepends=('icedtea-web: web browser plugin and Java Web Start support'
|
|
'gtk2: for the GTK+ Look And Feel')
|
|
|
|
cd "${srcdir}/build"
|
|
|
|
# Copy the built OpenJDK image to the target directory
|
|
install -d -m755 "${pkgdir}/${_jvmdir%/*}"
|
|
cp -r "openjdk.build/j2sdk-image" \
|
|
"${pkgdir}/${_jvmdir#/}"
|
|
|
|
# Remove the .zip file which is going to be inside openjdk-src
|
|
rm "${pkgdir}/${_jvmdir#/}/src.zip"
|
|
|
|
# Symlink the binaries into /usr/bin
|
|
install -d -m755 "${pkgdir}/usr/bin"
|
|
pushd "${pkgdir}/${_jvmdir#/}/bin" >/dev/null
|
|
for executable in *; do
|
|
ln -s "${_jvmdir}/bin/${executable}" \
|
|
"${pkgdir}/usr/bin"
|
|
done
|
|
popd >/dev/null
|
|
|
|
# Move the manual pages in the right place
|
|
install -d -m755 "${pkgdir}/usr/share"
|
|
mv "${pkgdir}/${_jvmdir#/}/man" \
|
|
"${pkgdir}/usr/share/man"
|
|
rm "${pkgdir}/usr/share/man/ja" # avoid conflicts with man-db
|
|
|
|
# link JKS keystore from ca-certificates-java
|
|
rm -f "${pkgdir}/${_jvmdir#/}/jre/lib/security/cacerts"
|
|
ln -s /etc/ssl/certs/java/cacerts \
|
|
"${pkgdir}/${_jvmdir#/}/jre/lib/security/cacerts"
|
|
|
|
# Setup the shell profile dropin configuration
|
|
install -D -m755 "${srcdir}/openjdk.profile.sh" \
|
|
"${pkgdir}/etc/profile.d/openjdk.sh"
|
|
install -D -m755 "${srcdir}/openjdk.profile.csh" \
|
|
"${pkgdir}/etc/profile.d/openjdk.csh"
|
|
|
|
# Install the license file
|
|
install -D -m644 "openjdk/LICENSE" \
|
|
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
|
}
|
|
|
|
package_openjdk-src() {
|
|
pkgdesc="An open-source implementation of the seventh edition of the Java SE Platform. (Source package)"
|
|
arch=('any')
|
|
depends=("openjdk=${pkgver}")
|
|
|
|
cd "${srcdir}/build"
|
|
|
|
# Install the source package
|
|
install -D -m644 "openjdk.build/j2sdk-image/src.zip" \
|
|
"${pkgdir}/${_jvmdir#/}/src.zip"
|
|
|
|
# Not installing the license file anymore, since we depend on openjdk,
|
|
# which already provides it.
|
|
#
|
|
# install -D -m644 "openjdk/LICENSE" \
|
|
# "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
|
}
|
|
|
|
# vim:set ts=2 sw=2 et:
|