forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-java/icedtea-bin: Bump to 3.1.0, adds multilib for amd64
Package-Manager: portage-2.3.0
- Loading branch information
Showing
3 changed files
with
179 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright 1999-2016 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
# $Id$ | ||
|
||
VERSION="IcedTea JDK ${PV}$(multilib_is_native_abi || printf ' ('${ABI}')')" | ||
JAVA_HOME="${EPREFIX}/opt/icedtea-bin-${PV}$(multilib_is_native_abi || printf -- -${ABI})" | ||
JDK_HOME="${EPREFIX}/opt/icedtea-bin-${PV}$(multilib_is_native_abi || printf -- -${ABI})" | ||
JAVAC="\${JAVA_HOME}/bin/javac" | ||
PATH="\${JAVA_HOME}/bin:\${JAVA_HOME}/jre/bin" | ||
ROOTPATH="\${JAVA_HOME}/bin:\${JAVA_HOME}/jre/bin" | ||
LDPATH="\${JAVA_HOME}/jre/lib/$(get_system_arch)/:\${JAVA_HOME}/jre/lib/$(get_system_arch)/server/$([[ ${SLOT} = 7 ]] && printf :\${JAVA_HOME}/jre/lib/$(get_system_arch)/xawt/)" | ||
MANPATH="${EPREFIX}/opt/icedtea-bin-${PV}/man" | ||
PROVIDES_TYPE="JDK JRE" | ||
PROVIDES_VERSION="1.${SLOT}" | ||
# Taken from sun.boot.class.path property | ||
BOOTCLASSPATH="\${JAVA_HOME}/jre/lib/resources.jar:\${JAVA_HOME}/jre/lib/rt.jar:\${JAVA_HOME}/jre/lib/sunrsasign.jar:\${JAVA_HOME}/jre/lib/jsse.jar:\${JAVA_HOME}/jre/lib/jce.jar:\${JAVA_HOME}/jre/lib/charsets.jar:\${JAVA_HOME}/jre/lib/jfr.jar" | ||
GENERATION="2" | ||
ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
# Copyright 1999-2016 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
# $Id$ | ||
|
||
EAPI="5" | ||
|
||
inherit java-vm-2 multilib-build toolchain-funcs | ||
|
||
MULTILIB_COMPAT=( abi_ppc_64 abi_x86_{32,64} ) | ||
KEYWORDS="-* ~amd64 ~arm ~ppc64 ~x86" | ||
|
||
BASE_URI="https://dev.gentoo.org/~chewi/distfiles" | ||
SRC_URI="doc? ( ${BASE_URI}/${PN}-doc-${PV}.tar.xz ) | ||
source? ( ${BASE_URI}/${PN}-src-${PV}.tar.xz ) | ||
multilib? ( amd64? ( abi_x86_32? ( ${BASE_URI}/${PN}-core-${PV}-x86.tar.xz ) ) )" | ||
|
||
for abi in amd64 arm ppc64 x86; do | ||
SRC_URI+=" | ||
${abi}? ( | ||
${BASE_URI}/${PN}-core-${PV}-${abi}.tar.xz | ||
examples? ( ${BASE_URI}/${PN}-examples-${PV}-${abi}.tar.xz ) | ||
)" | ||
done | ||
|
||
DESCRIPTION="A Gentoo-made binary build of the IcedTea JDK" | ||
HOMEPAGE="http://icedtea.classpath.org" | ||
LICENSE="GPL-2-with-linking-exception" | ||
SLOT="8" | ||
|
||
IUSE="+alsa +cups doc examples +gtk headless-awt multilib nsplugin pulseaudio selinux source +webstart" | ||
REQUIRED_USE="gtk? ( !headless-awt ) nsplugin? ( !headless-awt )" | ||
|
||
RESTRICT="preserve-libs strip" | ||
QA_PREBUILT="opt/.*" | ||
|
||
RDEPEND=">=dev-libs/glib-2.42:2% | ||
>=dev-libs/nss-3.16.1-r1% | ||
>=dev-libs/nspr-4.10% | ||
>=media-libs/fontconfig-2.11:1.0% | ||
>=media-libs/freetype-2.5.5:2% | ||
>=media-libs/lcms-2.6:2% | ||
>=sys-libs/zlib-1.2.8-r1% | ||
virtual/jpeg:62% | ||
alsa? ( >=media-libs/alsa-lib-1.0% ) | ||
cups? ( >=net-print/cups-2.0% ) | ||
gtk? ( | ||
>=dev-libs/atk-2.16.0% | ||
>=x11-libs/cairo-1.14.2% | ||
x11-libs/gdk-pixbuf:2% | ||
>=x11-libs/gtk+-2.24:2% | ||
>=x11-libs/pango-1.36% | ||
) | ||
!headless-awt? ( | ||
>=media-libs/giflib-4.1.6-r1% | ||
media-libs/libpng:0/16% | ||
>=x11-libs/libX11-1.6% | ||
>=x11-libs/libXext-1.3% | ||
>=x11-libs/libXi-1.7% | ||
>=x11-libs/libXrender-0.9.8% | ||
>=x11-libs/libXtst-1.2% | ||
)" | ||
|
||
RDEPEND=">=sys-devel/gcc-4.9.3[multilib?] | ||
>=sys-libs/glibc-2.22[multilib?] | ||
virtual/ttf-fonts | ||
selinux? ( sec-policy/selinux-java ) | ||
multilib? ( ${RDEPEND//%/[${MULTILIB_USEDEP}]} ) | ||
!multilib? ( ${RDEPEND//%/} )" | ||
|
||
PDEPEND="webstart? ( >=dev-java/icedtea-web-1.6.1:0 ) | ||
nsplugin? ( >=dev-java/icedtea-web-1.6.1:0 ) | ||
pulseaudio? ( dev-java/icedtea-sound )" | ||
|
||
S="${WORKDIR}" | ||
|
||
pkg_pretend() { | ||
if [[ "$(tc-is-softfloat)" != "no" ]]; then | ||
die "These binaries require a hardfloat system." | ||
fi | ||
} | ||
|
||
src_prepare() { | ||
if ! use alsa; then | ||
rm -v */jre/lib/*/libjsoundalsa.* || die | ||
fi | ||
|
||
if use headless-awt; then | ||
rm -vr */jre/lib/*/lib*{[jx]awt,splashscreen}* \ | ||
*/{,jre/}bin/policytool */bin/appletviewer || die | ||
fi | ||
} | ||
|
||
multilib_src_install() { | ||
local dest="/opt/${P}-${ABI}" | ||
dest="${dest/%-${DEFAULT_ABI}/}" | ||
local ddest="${ED}${dest#/}" | ||
dodir "${dest}" | ||
|
||
if multilib_is_native_abi; then | ||
dodoc ${P}-${ABI}/doc/{ASSEMBLY_EXCEPTION,AUTHORS,NEWS,README,THIRD_PARTY_README} | ||
use doc && dodoc -r ${P}/doc/html | ||
|
||
# doins doesn't preserve executable bits. | ||
cp -pRP ${P}-${ABI}/{bin,include,jre,lib,man} "${ddest}" || die | ||
|
||
if use examples; then | ||
cp -pRP ${P}-${ABI}/{demo,sample} "${ddest}" || die | ||
fi | ||
|
||
if use source; then | ||
cp ${P}/src.zip "${ddest}" || die | ||
fi | ||
|
||
# Use default VMHANDLE. | ||
java-vm_install-env "${FILESDIR}/icedtea-bin.env.sh" | ||
else | ||
local x native=$(get_system_arch ${DEFAULT_ABI}) | ||
|
||
for x in {,/jre}/{bin,lib/$(get_system_arch)} /jre/lib/rt.jar; do | ||
dodir "${dest}"${x%/*} | ||
cp -pRP ${P}-${ABI}${x} "${ddest}"${x} || die | ||
done | ||
|
||
for x in ${P}-${DEFAULT_ABI}{,/jre}/lib/*; do | ||
[[ ${x##*/} = ${native} ]] && continue | ||
[[ -e "${ddest}"/${x#*/} ]] && continue | ||
dosym "${EPREFIX}"/opt/${P}/${x#*/} "${dest}"/${x#*/} | ||
done | ||
|
||
# Use ABI-suffixed VMHANDLE. | ||
VMHANDLE+="-${ABI}" java-vm_install-env "${FILESDIR}/icedtea-bin.env.sh" | ||
fi | ||
|
||
# Both icedtea itself and the icedtea ebuild set PAX markings but we | ||
# disable them for the icedtea-bin build because the line below will | ||
# respect end-user settings when icedtea-bin is actually installed. | ||
java-vm_set-pax-markings "${ddest}" | ||
|
||
# Each invocation appends to the config. | ||
java-vm_revdep-mask "${EPREFIX}${dest}" | ||
} | ||
|
||
src_install() { | ||
if use multilib; then | ||
multilib_foreach_abi multilib_src_install | ||
else | ||
multilib_src_install | ||
fi | ||
|
||
java-vm_sandbox-predict /proc/self/coredump_filter | ||
} |