mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
334 lines
14 KiB
Bash
334 lines
14 KiB
Bash
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
|
|
# Maintainer: Guillaume ALAUX <guillaume@archlinux.org>
|
|
# Contributor: Jan de Groot <jgc@archlinux.org>
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
# - removed doc package, --disable-docs in configure, this is measured in lifetimes to build on ARM
|
|
# - --enable-zero
|
|
# - added our architectures to set _JARCH
|
|
# - strip -D_FORTIFY_SOURCE=2 from C/CXXFLAGS
|
|
# - patch to fix fPIC usage on AArch64
|
|
|
|
pkgname=('jre7-openjdk-headless' 'jre7-openjdk' 'jdk7-openjdk' 'openjdk7-src')
|
|
pkgbase=java7-openjdk
|
|
_java_ver=7
|
|
_icedtea_ver=2.6.19
|
|
#pkgver() {
|
|
# _updatever=$(grep -E "^JDK_UPDATE_VERSION = (.)+" ${srcdir}/icedtea-${_icedtea_ver}/Makefile.am \
|
|
# | sed -r 's/^JDK_UPDATE_VERSION = (.+)$/\1/')
|
|
# echo ${_java_ver}.u${_updatever}_${_icedtea_ver}
|
|
#}
|
|
_updatever=231
|
|
pkgver=${_java_ver}.u${_updatever}_${_icedtea_ver}
|
|
pkgrel=1.1
|
|
|
|
_bootstrap=0 # 0/1 for quick build or full bootstrap
|
|
|
|
arch=('x86_64')
|
|
url='http://icedtea.classpath.org'
|
|
license=('custom')
|
|
options=('!emptydirs')
|
|
makedepends=('jdk7-openjdk' 'libxp' 'libxslt'
|
|
'alsa-lib' 'giflib' 'libpng>=1.5.7' 'gtk2'
|
|
'java-rhino' 'libpulse>=0.9.11' 'zip' 'unzip' 'cpio' 'fastjar' 'wget' 'procps-ng' 'inetutils'
|
|
'eclipse-ecj' 'pcsclite' 'lksctp-tools')
|
|
_antver=1.9.14
|
|
_icedtea_url=http://icedtea.classpath.org/download
|
|
_drops_url=${_icedtea_url}/drops/icedtea7/${_icedtea_ver}
|
|
source=(${_icedtea_url}/source/icedtea-${_icedtea_ver}.tar.xz{,.sig}
|
|
icedtea_${_icedtea_ver}_openjdk.tar.bz2::${_drops_url}/openjdk.tar.bz2
|
|
icedtea_${_icedtea_ver}_corba.tar.bz2::${_drops_url}/corba.tar.bz2
|
|
icedtea_${_icedtea_ver}_jaxp.tar.bz2::${_drops_url}/jaxp.tar.bz2
|
|
icedtea_${_icedtea_ver}_jaxws.tar.bz2::${_drops_url}/jaxws.tar.bz2
|
|
icedtea_${_icedtea_ver}_jdk.tar.bz2::${_drops_url}/jdk.tar.bz2
|
|
icedtea_${_icedtea_ver}_langtools.tar.bz2::${_drops_url}/langtools.tar.bz2
|
|
icedtea_${_icedtea_ver}_hotspot.tar.bz2::${_drops_url}/hotspot.tar.bz2
|
|
https://archive.apache.org/dist/ant/binaries/apache-ant-${_antver}-bin.tar.bz2
|
|
fontconfig-paths.diff
|
|
openjdk7_nonreparenting-wm.diff
|
|
icedtea-jdk-xattr.diff
|
|
fix-xattr-include.patch
|
|
text-relocations.diff)
|
|
# EdDSA key may require `keyserver sks-keyservers.net` in GPG config
|
|
validpgpkeys=('5132579DD1540ED23E04C5A0CFDA0F9B35964222') # Andrew John Hughes
|
|
|
|
# http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=2357
|
|
|
|
sha256sums=('2ba0d2ec3970a163f27d1996074ac4a8767075fc0b7671ef3974cd667aba277d'
|
|
'SKIP'
|
|
'2531838d9cf08755d88c91498da6fef427000d0fd527c7ddeaa60c993aa679ea'
|
|
'aae916ff4c1f3cbdb14f57716d03adf1f2d9cb221bf0fa0580f607d7a360245b'
|
|
'4545cf0b2bfeca6cd019f1c8bab3ed7317963776b859f80ffc4d8d79d3c82e8f'
|
|
'9b2b76598996962c5128e586edded4022e162421d9898a57c3d6dce2fbe7ee6b'
|
|
'1653315e15f30f4f250d6ec9085043b534a28c293ba445467e274c56fef84b88'
|
|
'd9d02a7f135350d66d2dde28dad7f2257843d11cc663b641740b1cf21ec3d710'
|
|
'fbbfa17c95891491311758d2ef595ec322c46452e0bf7b51eb42a9ca1ccc419b'
|
|
'efad74bd98d9eb72b080a3e08f5b17118e05372d22e3aa3bc0bd1686aa71361c'
|
|
'9ad943ceb3dbcdf45d72974fc3667886a7ed65c69ab9abc17be5412827551a7f'
|
|
'56b919ababb13bd6afdcdaceb112b529b6e82539255f2dae9a7e5eb91645164b'
|
|
'8da7248a72c60f4cb82c33712bdd8ce8f25b0cd147816efb7112f18a752fcabd'
|
|
'9a48d91af72d28d7f0fca8ea6f5e42085d7c877c7141a7d895331ab1f5882086'
|
|
'6dd92db9ba302141c94a2031082e3e130bcb370a5adcb8185467dd22cbff6b51')
|
|
|
|
noextract=(icedtea_${_icedtea_ver}_openjdk.tar.bz2
|
|
icedtea_${_icedtea_ver}_corba.tar.bz2
|
|
icedtea_${_icedtea_ver}_jaxp.tar.bz2
|
|
icedtea_${_icedtea_ver}_jaxws.tar.bz2
|
|
icedtea_${_icedtea_ver}_jdk.tar.bz2
|
|
icedtea_${_icedtea_ver}_langtools.tar.bz2
|
|
icedtea_${_icedtea_ver}_hotspot.tar.bz2)
|
|
|
|
[ "$CARCH" = "x86_64" ] && _JARCH=amd64
|
|
[ "$CARCH" = "i686" ] && _JARCH=i386
|
|
[ "$CARCH" = "arm" -o "$CARCH" = "armv6h" -o "$CARCH" = "armv7h" ] && _JARCH=arm
|
|
[ "$CARCH" = "aarch64" ] && _JARCH=aarch64
|
|
|
|
_jvmdir=/usr/lib/jvm/java-7-openjdk
|
|
_imgdir="icedtea-${_icedtea_ver}/openjdk.build/j2sdk-image"
|
|
_nonheadless=(bin/policytool
|
|
lib/${_JARCH}/libjsoundalsa.so
|
|
lib/${_JARCH}/libsplashscreen.so
|
|
lib/${_JARCH}/xawt/libmawt.so)
|
|
|
|
prepare() {
|
|
cp "${srcdir}"/*.diff "${srcdir}"/icedtea-${_icedtea_ver}/patches
|
|
|
|
cd "${srcdir}/icedtea-${_icedtea_ver}"
|
|
patch -Np1 -i ../fix-xattr-include.patch
|
|
./autogen.sh
|
|
}
|
|
|
|
build() {
|
|
cd "${srcdir}/icedtea-${_icedtea_ver}"
|
|
|
|
CFLAGS=`echo $CFLAGS | sed -e 's/-D_FORTIFY_SOURCE=2//'` && CXXFLAGS="$CFLAGS"
|
|
|
|
export ALT_PARALLEL_COMPILE_JOBS="${MAKEFLAGS/-j}"
|
|
export HOTSPOT_BUILD_JOBS="${ALT_PARALLEL_COMPILE_JOBS}"
|
|
|
|
export DISTRIBUTION_PATCHES="patches/fontconfig-paths.diff \
|
|
patches/openjdk7_nonreparenting-wm.diff \
|
|
patches/icedtea-jdk-xattr.diff \
|
|
patches/text-relocations.diff"
|
|
|
|
if [ "$_bootstrap" = "1" ]; then
|
|
BOOTSTRAPOPT="--enable-bootstrap --with-ecj-jar=/usr/share/java/ecj.jar"
|
|
else
|
|
BOOTSTRAPOPT="--disable-bootstrap"
|
|
fi
|
|
|
|
export EXTRA_CFLAGS="$CFLAGS $CPPFLAGS -std=gnu++98 -Wno-error -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-strict-overflow"
|
|
export EXTRA_LDFLAGS="$LDFLAGS"
|
|
|
|
export PATH="${srcdir}/apache-ant-${_antver}/bin:$PATH"
|
|
./configure \
|
|
${BOOTSTRAPOPT} \
|
|
--with-parallel-jobs="${MAKEFLAGS/-j}" \
|
|
--disable-tests \
|
|
--disable-downloading --disable-Werror \
|
|
--with-pkgversion="Arch Linux ARM build ${pkgver}-${pkgrel}-${CARCH}" \
|
|
--with-jdk-home=${JAVA_HOME} \
|
|
--with-openjdk-src-zip="${srcdir}/icedtea_${_icedtea_ver}_openjdk.tar.bz2" \
|
|
--with-hotspot-src-zip="${srcdir}/icedtea_${_icedtea_ver}_hotspot.tar.bz2" \
|
|
--with-corba-src-zip="${srcdir}/icedtea_${_icedtea_ver}_corba.tar.bz2" \
|
|
--with-jaxp-src-zip="${srcdir}/icedtea_${_icedtea_ver}_jaxp.tar.bz2" \
|
|
--with-jaxws-src-zip="${srcdir}/icedtea_${_icedtea_ver}_jaxws.tar.bz2" \
|
|
--with-jdk-src-zip="${srcdir}/icedtea_${_icedtea_ver}_jdk.tar.bz2" \
|
|
--with-langtools-src-zip="${srcdir}/icedtea_${_icedtea_ver}_langtools.tar.bz2" \
|
|
--enable-nss \
|
|
--with-rhino \
|
|
--disable-docs \
|
|
--enable-zero
|
|
make
|
|
}
|
|
|
|
check() {
|
|
cd "${srcdir}/icedtea-${_icedtea_ver}"
|
|
# make -k check
|
|
}
|
|
|
|
package_jre7-openjdk-headless() {
|
|
pkgdesc='OpenJDK Java 7 headless runtime environment'
|
|
depends=('java-runtime-common' 'libjpeg-turbo' 'lcms2' 'nss' 'ca-certificates-utils' 'libcups')
|
|
optdepends=('fontconfig: needed for Java Mauve support - libmawt.so'
|
|
'java-rhino: for some JavaScript support')
|
|
provides=('java-runtime-headless=7' 'java-runtime-headless-openjdk=7')
|
|
conflicts=('openjdk6')
|
|
# TODO remove after some time
|
|
replaces=('jre7-openjdk-headless-wm')
|
|
# Upstream config files that should go to etc and get backup
|
|
_backup_etc=(etc/java-7-openjdk/${_JARCH}/jvm.cfg
|
|
etc/java-7-openjdk/calendars.properties
|
|
etc/java-7-openjdk/content-types.properties
|
|
etc/java-7-openjdk/flavormap.properties
|
|
etc/java-7-openjdk/fontconfig.bfc
|
|
etc/java-7-openjdk/fontconfig.properties
|
|
etc/java-7-openjdk/images/cursors/cursors.properties
|
|
etc/java-7-openjdk/logging.properties
|
|
etc/java-7-openjdk/management/jmxremote.access
|
|
etc/java-7-openjdk/management/jmxremote.password
|
|
etc/java-7-openjdk/management/management.properties
|
|
etc/java-7-openjdk/management/snmp.acl
|
|
etc/java-7-openjdk/net.properties
|
|
etc/java-7-openjdk/psfont.properties.ja
|
|
etc/java-7-openjdk/psfontj2d.properties
|
|
etc/java-7-openjdk/security/java.policy
|
|
etc/java-7-openjdk/security/java.security
|
|
etc/java-7-openjdk/security/nss.cfg
|
|
etc/java-7-openjdk/sound.properties
|
|
etc/java-7-openjdk/tz.properties)
|
|
backup=(${_backup_etc[@]})
|
|
install=jre7-openjdk-headless.install
|
|
|
|
cd "${srcdir}/${_imgdir}/jre"
|
|
|
|
install -d -m755 "${pkgdir}${_jvmdir}/jre"
|
|
cp -a bin lib "${pkgdir}${_jvmdir}/jre"
|
|
|
|
# Set config files
|
|
mv "${pkgdir}${_jvmdir}"/jre/lib/fontconfig.{Ubuntu.properties.src,properties}
|
|
mv "${pkgdir}${_jvmdir}"/jre/lib/fontconfig.{Ubuntu.bfc,bfc}
|
|
mv "${pkgdir}${_jvmdir}"/jre/lib/management/jmxremote.password{.template,}
|
|
mv "${pkgdir}${_jvmdir}"/jre/lib/management/snmp.acl{.template,}
|
|
rm -f "${pkgdir}${_jvmdir}"/jre/lib/fontconfig.*.bfc
|
|
rm -f "${pkgdir}${_jvmdir}"/jre/lib/fontconfig.*.properties.src
|
|
rm -f "${pkgdir}${_jvmdir}"/jre/lib/fontconfig.properties.src
|
|
|
|
# Remove 'non-headless' files
|
|
for f in ${_nonheadless[@]}; do
|
|
rm "${pkgdir}${_jvmdir}/jre/${f}"
|
|
done
|
|
|
|
# Man pages
|
|
pushd "${pkgdir}${_jvmdir}/jre/bin"
|
|
install -d -m 755 "${pkgdir}"/usr/share/man/{,ja/}man1/
|
|
for file in *; do
|
|
install -m 644 "${srcdir}/${_imgdir}/man/man1/${file}.1" \
|
|
"${pkgdir}/usr/share/man/man1/${file}.1"
|
|
install -m 644 "${srcdir}/${_imgdir}/man/ja/man1/${file}.1" \
|
|
"${pkgdir}/usr/share/man/ja/man1/${file}.1"
|
|
done
|
|
popd
|
|
|
|
# Link JKS keystore from ca-certificates-utils
|
|
rm -f "${pkgdir}${_jvmdir}/jre/lib/security/cacerts"
|
|
ln -sf /etc/ssl/certs/java/cacerts "${pkgdir}${_jvmdir}/jre/lib/security/cacerts"
|
|
|
|
# Install license
|
|
install -d -m755 "${pkgdir}/usr/share/licenses/${pkgbase}/"
|
|
install -m644 ASSEMBLY_EXCEPTION LICENSE THIRD_PARTY_README \
|
|
"${pkgdir}/usr/share/licenses/${pkgbase}"
|
|
ln -sf /usr/share/licenses/${pkgbase} "${pkgdir}/usr/share/licenses/${pkgname}"
|
|
|
|
# Move config files that were set in _backup_etc from ./lib to /etc
|
|
for file in ${_backup_etc[@]}; do
|
|
_filepkgpath=${_jvmdir}/jre/lib/${file#etc/java-7-openjdk/}
|
|
install -D -m 644 "${pkgdir}${_filepkgpath}" "${pkgdir}/${file}"
|
|
ln -sf /${file} "${pkgdir}${_filepkgpath}"
|
|
done
|
|
}
|
|
|
|
package_jre7-openjdk() {
|
|
pkgdesc='OpenJDK Java 7 full runtime environment'
|
|
depends=("jre7-openjdk-headless=${pkgver}-${pkgrel}" 'xdg-utils' 'hicolor-icon-theme')
|
|
optdepends=('icedtea-web: web browser plugin + Java Web Start'
|
|
'alsa-lib: for basic sound support'
|
|
'giflib: for gif format support'
|
|
'libpulse: for advanced sound support'
|
|
'gtk2: for the Gtk+ look and feel - desktop usage'
|
|
'libxtst: linked in xawt/libmawt.so - desktop usage')
|
|
provides=('java-runtime=7' 'java-runtime-openjdk=7')
|
|
conflicts=('openjdk6')
|
|
# TODO remove after some time
|
|
replaces=('jre7-openjdk-wm')
|
|
install=jre7-openjdk.install
|
|
|
|
cd "${srcdir}/${_imgdir}/jre"
|
|
|
|
for f in ${_nonheadless[@]}; do
|
|
install -D ${f} "${pkgdir}${_jvmdir}/jre/${f}"
|
|
done
|
|
|
|
# Man pages
|
|
pushd "${pkgdir}${_jvmdir}/jre/bin"
|
|
install -d -m 755 "${pkgdir}"/usr/share/man/{,ja/}man1/
|
|
for file in *; do
|
|
install -m 644 "${srcdir}/${_imgdir}/man/man1/${file}.1" \
|
|
"${pkgdir}/usr/share/man/man1/${file}.1"
|
|
install -m 644 "${srcdir}/${_imgdir}/man/ja/man1/${file}.1" \
|
|
"${pkgdir}/usr/share/man/ja/man1/${file}.1"
|
|
done
|
|
popd
|
|
|
|
for s in 16 24 32 48; do
|
|
install -D -m 644 \
|
|
"${srcdir}/icedtea-${_icedtea_ver}/openjdk/jdk/src/solaris/classes/sun/awt/X11/java-icon${s}.png" \
|
|
"${pkgdir}/usr/share/icons/hicolor/${s}x${s}/apps/java.png"
|
|
done
|
|
|
|
# Install desktop files.
|
|
install -d -m755 "${pkgdir}/usr/share/applications"
|
|
sed "s#_BINDIR_#${_jvmdir}/jre/bin#" \
|
|
"${srcdir}/icedtea-${_icedtea_ver}/policytool.desktop" \
|
|
> "${pkgdir}/usr/share/applications/policytool.desktop"
|
|
|
|
# link license
|
|
install -d -m755 "${pkgdir}/usr/share/licenses"
|
|
ln -sf /usr/share/licenses/${pkgbase} "${pkgdir}/usr/share/licenses/${pkgname}"
|
|
}
|
|
|
|
package_jdk7-openjdk() {
|
|
pkgdesc='OpenJDK Java 7 development kit'
|
|
depends=('java-environment-common' "jre7-openjdk=${pkgver}-${pkgrel}")
|
|
provides=('java-environment=7' 'java-environment-openjdk=7')
|
|
replaces=('openjdk6' 'jdk7-openjdk-wm')
|
|
install=jdk7-openjdk.install
|
|
|
|
cd "${srcdir}/${_imgdir}"
|
|
|
|
# Main files
|
|
install -d -m755 "${pkgdir}${_jvmdir}"
|
|
|
|
cp -a include lib "${pkgdir}${_jvmdir}"
|
|
|
|
# 'bin' files
|
|
pushd bin
|
|
install -d -m755 "${pkgdir}${_jvmdir}/bin/" \
|
|
"${pkgdir}"/usr/share/man/{,ja/}man1/
|
|
|
|
# 'java-rmi.cgi' will be handled separately as it should not be in the PATH and has no man page
|
|
for b in $(ls | grep -v java-rmi.cgi); do
|
|
if [ -e ../jre/bin/${b} ]; then
|
|
# Provide a link of the jre binary in the jdk/bin/ directory
|
|
ln -s ../jre/bin/${b} "${pkgdir}${_jvmdir}/bin/${b}"
|
|
else
|
|
# Copy binary to jdk/bin/
|
|
install -m755 ${b} "${pkgdir}${_jvmdir}/bin/${b}"
|
|
# Copy man page
|
|
install -m644 ../man/man1/${b}.1 "${pkgdir}/usr/share/man/man1/${b}.1"
|
|
install -m644 ../man/ja/man1/${b}.1 "${pkgdir}/usr/share/man/ja/man1/${b}.1"
|
|
fi
|
|
done
|
|
popd
|
|
|
|
# Handling 'java-rmi.cgi' separately
|
|
install -D -m755 bin/java-rmi.cgi "${pkgdir}${_jvmdir}/bin/java-rmi.cgi"
|
|
|
|
# Install desktop files.
|
|
install -d -m755 "${pkgdir}/usr/share/applications"
|
|
sed "s#_BINDIR_#${_jvmdir}/bin#" \
|
|
"${srcdir}/icedtea-${_icedtea_ver}/jconsole.desktop" \
|
|
> "${pkgdir}/usr/share/applications/jconsole.desktop"
|
|
|
|
|
|
# link license
|
|
install -d -m755 "${pkgdir}/usr/share/licenses"
|
|
ln -sf /usr/share/licenses/${pkgbase} "${pkgdir}/usr/share/licenses/${pkgname}"
|
|
}
|
|
|
|
package_openjdk7-src() {
|
|
pkgdesc='OpenJDK Java 7 sources'
|
|
replaces=('openjdk6-src')
|
|
|
|
install -D "${srcdir}/${_imgdir}/src.zip" "${pkgdir}${_jvmdir}/src.zip"
|
|
}
|