dev-java/icedtea/icedtea-7.2.4.3-r1.ebuild
author Da Risk <da_risk@geekorum.com>
Mon, 30 Mar 2015 09:39:30 +0200
changeset 151 1abc0aae9e43
parent 115 27c2a6303f2f
permissions -rw-r--r--
dev-python/pyjwt: Remove old version as it is now in gentoo Remove keywords for live 9999 version
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
115
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     1
# Copyright 1999-2013 Gentoo Foundation
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     2
# Distributed under the terms of the GNU General Public License v2
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     3
# $Header: /var/cvsroot/gentoo-x86/dev-java/icedtea/icedtea-7.2.4.3.ebuild,v 1.3 2013/10/30 11:48:31 caster Exp $
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     4
# Build written by Andrew John Hughes (gnu_andrew@member.fsf.org)
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     5
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     6
# *********************************************************
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     7
# * IF YOU CHANGE THIS EBUILD, CHANGE ICEDTEA-6.* AS WELL *
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     8
# *********************************************************
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     9
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    10
EAPI="5"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    11
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    12
CHECKREQS_DISK_BUILD="9G"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    13
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    14
inherit check-reqs java-pkg-2 java-vm-2 pax-utils prefix versionator virtualx flag-o-matic
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    15
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    16
ICEDTEA_VER=$(get_version_component_range 2-)
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    17
ICEDTEA_BRANCH=$(get_version_component_range 2-3)
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    18
ICEDTEA_PKG=icedtea-${ICEDTEA_VER}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    19
CORBA_TARBALL="8ed5df839fbc.tar.gz"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    20
JAXP_TARBALL="8f220f7b51c7.tar.gz"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    21
JAXWS_TARBALL="652eb396f959.tar.gz"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    22
JDK_TARBALL="7958751eb9ef.tar.gz"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    23
LANGTOOLS_TARBALL="3c8eb52a32ea.tar.gz"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    24
OPENJDK_TARBALL="e2f5917da3c1.tar.gz"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    25
HOTSPOT_TARBALL="b59e02d9e72b.tar.gz"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    26
CACAO_TARBALL="e215e36be9fc.tar.gz"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    27
JAMVM_TARBALL="jamvm-ac22c9948434e528ece451642b4ebde40953ee7e.tar.gz"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    28
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    29
CORBA_GENTOO_TARBALL="icedtea-${ICEDTEA_BRANCH}-corba-${CORBA_TARBALL}"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    30
JAXP_GENTOO_TARBALL="icedtea-${ICEDTEA_BRANCH}-jaxp-${JAXP_TARBALL}"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    31
JAXWS_GENTOO_TARBALL="icedtea-${ICEDTEA_BRANCH}-jaxws-${JAXWS_TARBALL}"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    32
JDK_GENTOO_TARBALL="icedtea-${ICEDTEA_BRANCH}-jdk-${JDK_TARBALL}"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    33
LANGTOOLS_GENTOO_TARBALL="icedtea-${ICEDTEA_BRANCH}-langtools-${LANGTOOLS_TARBALL}"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    34
OPENJDK_GENTOO_TARBALL="icedtea-${ICEDTEA_BRANCH}-openjdk-${OPENJDK_TARBALL}"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    35
HOTSPOT_GENTOO_TARBALL="icedtea-${ICEDTEA_BRANCH}-hotspot-${HOTSPOT_TARBALL}"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    36
CACAO_GENTOO_TARBALL="icedtea-${ICEDTEA_BRANCH}-cacao-${CACAO_TARBALL}"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    37
JAMVM_GENTOO_TARBALL="icedtea-${ICEDTEA_BRANCH}-${JAMVM_TARBALL}"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    38
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    39
DESCRIPTION="A harness to build OpenJDK using Free Software build tools and dependencies"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    40
HOMEPAGE="http://icedtea.classpath.org"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    41
SRC_PKG="${ICEDTEA_PKG}.tar.xz"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    42
SRC_URI="
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    43
	http://icedtea.classpath.org/download/source/${SRC_PKG}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    44
	http://icedtea.classpath.org/hg/release/icedtea7-forest-${ICEDTEA_BRANCH}/archive/${OPENJDK_TARBALL}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    45
	 -> ${OPENJDK_GENTOO_TARBALL}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    46
	http://icedtea.classpath.org/hg/release/icedtea7-forest-${ICEDTEA_BRANCH}/corba/archive/${CORBA_TARBALL}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    47
	 -> ${CORBA_GENTOO_TARBALL}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    48
	http://icedtea.classpath.org/hg/release/icedtea7-forest-${ICEDTEA_BRANCH}/jaxp/archive/${JAXP_TARBALL}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    49
	 -> ${JAXP_GENTOO_TARBALL}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    50
	http://icedtea.classpath.org/hg/release/icedtea7-forest-${ICEDTEA_BRANCH}/jaxws/archive/${JAXWS_TARBALL}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    51
	 -> ${JAXWS_GENTOO_TARBALL}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    52
	http://icedtea.classpath.org/hg/release/icedtea7-forest-${ICEDTEA_BRANCH}/jdk/archive/${JDK_TARBALL}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    53
	 -> ${JDK_GENTOO_TARBALL}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    54
	http://icedtea.classpath.org/hg/release/icedtea7-forest-${ICEDTEA_BRANCH}/hotspot/archive/${HOTSPOT_TARBALL}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    55
	 -> ${HOTSPOT_GENTOO_TARBALL}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    56
	http://icedtea.classpath.org/hg/release/icedtea7-forest-${ICEDTEA_BRANCH}/langtools/archive/${LANGTOOLS_TARBALL}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    57
	 -> ${LANGTOOLS_GENTOO_TARBALL}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    58
	http://icedtea.classpath.org/download/drops/cacao/${CACAO_TARBALL} -> ${CACAO_GENTOO_TARBALL}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    59
	http://icedtea.classpath.org/download/drops/jamvm/${JAMVM_TARBALL} -> ${JAMVM_GENTOO_TARBALL}"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    60
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    61
LICENSE="Apache-1.1 Apache-2.0 GPL-1 GPL-2 GPL-2-with-linking-exception LGPL-2 MPL-1.0 MPL-1.1 public-domain W3C"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    62
SLOT="7"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    63
KEYWORDS="~amd64 ~ia64 ~x86"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    64
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    65
IUSE="+X +alsa cjk +cups debug doc examples javascript jbootstrap kerberos +nsplugin
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    66
	+nss pax_kernel pulseaudio +source systemtap test +webstart"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    67
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    68
# Ideally the following were optional at build time.
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    69
ALSA_COMMON_DEP="
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    70
	>=media-libs/alsa-lib-1.0"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    71
CUPS_COMMON_DEP="
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    72
	>=net-print/cups-1.2.12"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    73
X_COMMON_DEP="
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    74
	>=dev-libs/atk-1.30.0
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    75
	>=dev-libs/glib-2.26
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    76
	media-libs/fontconfig
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    77
	>=media-libs/freetype-2.3.5
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    78
	>=x11-libs/cairo-1.8.8
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    79
	x11-libs/gdk-pixbuf:2
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    80
	>=x11-libs/gtk+-2.8:2
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    81
	>=x11-libs/libX11-1.1.3
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    82
	>=x11-libs/libXext-1.1.1
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    83
	>=x11-libs/libXi-1.1.3
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    84
	>=x11-libs/libXrender-0.9.4
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    85
	>=x11-libs/libXtst-1.0.3
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    86
	>=x11-libs/pango-1.24.5"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    87
X_DEPEND="
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    88
	>=x11-libs/libXau-1.0.3
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    89
	>=x11-libs/libXdmcp-1.0.2
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    90
	>=x11-libs/libXinerama-1.0.2
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    91
	x11-proto/inputproto
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    92
	>=x11-proto/xextproto-7.1.1
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    93
	x11-proto/xineramaproto
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    94
	x11-proto/xproto"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    95
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    96
COMMON_DEP="
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    97
	>=media-libs/giflib-4.1.6
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    98
	>=media-libs/lcms-2.5:2
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    99
	>=media-libs/libpng-1.2:=
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   100
	>=sys-libs/zlib-1.2.3
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   101
	virtual/jpeg:=
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   102
	javascript? ( dev-java/rhino:1.6 )
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   103
	nss? ( >=dev-libs/nss-3.12.5-r1 )
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   104
	pulseaudio?  ( >=media-sound/pulseaudio-0.9.11 )
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   105
	kerberos? ( virtual/krb5 )
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   106
	systemtap? ( >=dev-util/systemtap-1 )"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   107
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   108
# cups is needed for X. #390945 #390975
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   109
RDEPEND="${COMMON_DEP}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   110
	!dev-java/icedtea:0
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   111
	X? (
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   112
		${CUPS_COMMON_DEP}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   113
		${X_COMMON_DEP}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   114
		media-fonts/dejavu
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   115
		cjk? (
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   116
			media-fonts/arphicfonts
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   117
			media-fonts/baekmuk-fonts
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   118
			media-fonts/lklug
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   119
			media-fonts/lohit-fonts
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   120
			media-fonts/sazanami
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   121
		)
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   122
	)
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   123
	alsa? ( ${ALSA_COMMON_DEP} )
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   124
	cups? ( ${CUPS_COMMON_DEP} )"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   125
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   126
# Require >=ant-core-1.8.2 so no additional ant tasks are needed. #466558
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   127
# ca-certificates, perl and openssl are used for the cacerts keystore generation
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   128
# xext headers have two variants depending on version - bug #288855
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   129
# autoconf - as long as we use eautoreconf, version restrictions for bug #294918
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   130
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   131
# FIXME: this version can't be built with icedtea-6 
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   132
DEPEND="${COMMON_DEP} ${ALSA_COMMON_DEP} ${CUPS_COMMON_DEP} ${X_COMMON_DEP}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   133
	|| (
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   134
		>=dev-java/gcj-jdk-4.3
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   135
		dev-java/icedtea-bin:7
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   136
		dev-java/icedtea-bin:6
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   137
		dev-java/icedtea:7
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   138
		dev-java/icedtea:6
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   139
	)
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   140
	app-arch/cpio
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   141
	app-arch/unzip
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   142
	app-arch/zip
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   143
	app-misc/ca-certificates
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   144
	>=dev-java/ant-core-1.8.2
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   145
	dev-lang/perl
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   146
	>=dev-libs/libxslt-1.1.26
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   147
	dev-libs/openssl
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   148
	virtual/pkgconfig
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   149
	sys-apps/attr
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   150
	sys-apps/lsb-release
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   151
	${X_DEPEND}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   152
	pax_kernel? ( sys-apps/elfix )"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   153
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   154
PDEPEND="webstart? ( || (
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   155
			dev-java/icedtea-web:0
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   156
			>=dev-java/icedtea-web-1.3.2:7
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   157
		) )
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   158
		nsplugin? ( || (
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   159
			dev-java/icedtea-web:0[nsplugin]
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   160
			>=dev-java/icedtea-web-1.3.2:7[nsplugin]
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   161
		) )"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   162
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   163
S="${WORKDIR}"/${ICEDTEA_PKG}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   164
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   165
pkg_pretend() {
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   166
	check-reqs_pkg_pretend
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   167
}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   168
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   169
pkg_setup() {
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   170
	check-reqs_pkg_setup
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   171
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   172
	JAVA_PKG_WANT_BUILD_VM="
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   173
		icedtea-7 icedtea-bin-7 icedtea7
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   174
		icedtea-6 icedtea-bin-6 icedtea6 icedtea6-bin
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   175
		gcj-jdk"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   176
	JAVA_PKG_WANT_SOURCE="1.5"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   177
	JAVA_PKG_WANT_TARGET="1.5"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   178
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   179
	java-vm-2_pkg_setup
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   180
	java-pkg-2_pkg_setup
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   181
}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   182
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   183
src_unpack() {
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   184
	unpack ${SRC_PKG}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   185
}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   186
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   187
java_prepare() {
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   188
	# For bootstrap builds as the sandbox control file might not yet exist.
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   189
	addpredict /proc/self/coredump_filter
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   190
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   191
	# icedtea doesn't like some locales. #330433 #389717
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   192
	export LANG="C" LC_ALL="C"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   193
	epatch "${FILESDIR}/${PN}-use-paxctl-ng.patch"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   194
}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   195
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   196
bootstrap_impossible() {
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   197
	# Fill this according to testing what works and what not
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   198
	# icedtea-6 is often the case
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   199
	#has "${1}" icedtea6 icedtea-6 icedtea6-bin icedtea-bin-6
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   200
	false
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   201
}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   202
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   203
src_configure() {
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   204
	local config bootstrap
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   205
	local vm=$(java-pkg_get-current-vm)
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   206
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   207
	# Whether to bootstrap
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   208
	bootstrap="disable"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   209
	if use jbootstrap; then
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   210
		if bootstrap_impossible "${vm}"; then
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   211
			einfo "Bootstrap with ${vm} is currently not possible and thus disabled, ignoring USE=jbootstrap"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   212
		else
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   213
			bootstrap="enable"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   214
		fi
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   215
	fi
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   216
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   217
	if has "${vm}" gcj-jdk; then
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   218
		# gcj-jdk ensures ecj is present.
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   219
		use jbootstrap || einfo "bootstrap is necessary when building with ${vm}, ignoring USE=\"-jbootstrap\""
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   220
		bootstrap="enable"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   221
		local ecj_jar="$(readlink "${EPREFIX}"/usr/share/eclipse-ecj/ecj.jar)"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   222
		config="${config} --with-ecj-jar=${ecj_jar}"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   223
	fi
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   224
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   225
	config="${config} --${bootstrap}-bootstrap"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   226
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   227
	# HotSpot > CACAO > JamVM > Zero, though CACAO is somewhat memory hungry
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   228
	# CACAO is not yet available for icedtea-7
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   229
	case "${ARCH}" in
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   230
		amd64|sparc|x86)
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   231
			;;
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   232
		arm)
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   233
			config+=" --enable-jamvm" #IT1266
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   234
			replace-flags -Os -O2 #BGO453612 #IT1267
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   235
			;;
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   236
		ppc|ppc64)
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   237
			config+=" --enable-jamvm"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   238
			;;
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   239
		*)
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   240
			config+=" --enable-zero"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   241
			HOTSPOT_GENTOO_TARBALL=${ZERO_GENTOO_TARBALL}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   242
			;;
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   243
	esac
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   244
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   245
	# OpenJDK-specific parallelism support. Bug #389791, #337827
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   246
	# Implementation modified from waf-utils.eclass
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   247
	# Note that "-j" is converted to "-j1" as the system doesn't support --load-average
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   248
	local procs=$(echo -j1 ${MAKEOPTS} | sed -r "s/.*(-j\s*|--jobs=)([0-9]+).*/\2/" )
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   249
	config="${config} --with-parallel-jobs=${procs}";
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   250
	einfo "Configuring using --with-parallel-jobs=${procs}"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   251
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   252
	if use javascript ; then
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   253
		config="${config} --with-rhino=$(java-pkg_getjar rhino-1.6 js.jar)"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   254
	else
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   255
		config="${config} --without-rhino"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   256
	fi
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   257
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   258
	unset JAVA_HOME JDK_HOME CLASSPATH JAVAC JAVACFLAGS
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   259
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   260
	econf ${config} \
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   261
		--with-openjdk-src-zip="${DISTDIR}/${OPENJDK_GENTOO_TARBALL}" \
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   262
		--with-corba-src-zip="${DISTDIR}/${CORBA_GENTOO_TARBALL}" \
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   263
		--with-jaxp-src-zip="${DISTDIR}/${JAXP_GENTOO_TARBALL}" \
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   264
		--with-jaxws-src-zip="${DISTDIR}/${JAXWS_GENTOO_TARBALL}" \
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   265
		--with-jdk-src-zip="${DISTDIR}/${JDK_GENTOO_TARBALL}" \
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   266
		--with-hotspot-src-zip="${DISTDIR}/${HOTSPOT_GENTOO_TARBALL}" \
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   267
		--with-langtools-src-zip="${DISTDIR}/${LANGTOOLS_GENTOO_TARBALL}" \
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   268
		--with-cacao-src-zip="${DISTDIR}/${CACAO_GENTOO_TARBALL}" \
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   269
		--with-jamvm-src-zip="${DISTDIR}/${JAMVM_GENTOO_TARBALL}" \
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   270
		--with-jdk-home="$(java-config -O)" \
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   271
		--with-abs-install-dir=/usr/$(get_libdir)/icedtea${SLOT} \
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   272
		--disable-downloading --disable-Werror \
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   273
		--enable-system-lcms \
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   274
		$(use_enable !debug optimizations) \
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   275
		$(use_enable doc docs) \
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   276
		$(use_enable nss) \
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   277
		$(use_enable pulseaudio pulse-java) \
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   278
		$(use_enable kerberos system-kerberos) \
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   279
		$(use_with pax_kernel pax paxctl-ng)
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   280
}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   281
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   282
src_compile() {
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   283
	# Would use GENTOO_VM otherwise.
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   284
	export ANT_RESPECT_JAVA_HOME=TRUE
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   285
	# disable all optional ant tasks
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   286
	export ANT_TASKS="none"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   287
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   288
	emake
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   289
}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   290
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   291
src_test() {
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   292
	# Use Xvfb for tests
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   293
	unset DISPLAY
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   294
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   295
	Xemake check
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   296
}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   297
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   298
src_install() {
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   299
	local dest="/usr/$(get_libdir)/icedtea${SLOT}"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   300
	local ddest="${ED}/${dest}"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   301
	dodir "${dest}"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   302
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   303
	dodoc README NEWS AUTHORS
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   304
	dosym /usr/share/doc/${PF} /usr/share/doc/${PN}${SLOT}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   305
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   306
	cd openjdk.build/j2sdk-image || die
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   307
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   308
	# Ensures HeadlessGraphicsEnvironment is used.
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   309
	if ! use X; then
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   310
		rm -r jre/lib/$(get_system_arch)/xawt || die
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   311
	fi
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   312
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   313
	# Don't hide classes
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   314
	rm lib/ct.sym || die
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   315
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   316
	#402507
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   317
	mkdir jre/.systemPrefs || die
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   318
	touch jre/.systemPrefs/.system.lock || die
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   319
	touch jre/.systemPrefs/.systemRootModFile || die
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   320
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   321
	# doins can't handle symlinks.
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   322
	cp -vRP bin include jre lib man "${ddest}" || die
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   323
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   324
	dodoc ASSEMBLY_EXCEPTION THIRD_PARTY_README
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   325
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   326
	if use doc; then
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   327
		# java-pkg_dohtml needed for package-list #302654
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   328
		java-pkg_dohtml -r ../docs/* || die
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   329
	fi
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   330
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   331
	if use examples; then
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   332
		dodir "${dest}/share";
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   333
		cp -vRP demo sample "${ddest}/share/" || die
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   334
	fi
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   335
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   336
	if use source; then
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   337
		cp src.zip "${ddest}" || die
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   338
	fi
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   339
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   340
	# Fix the permissions.
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   341
	find "${ddest}" \! -type l \( -perm /111 -exec chmod 755 {} \; -o -exec chmod 644 {} \; \) || die
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   342
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   343
	# Needs to be done before generating cacerts
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   344
	java-vm_set-pax-markings "${ddest}"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   345
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   346
	# We need to generate keystore - bug #273306
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   347
	einfo "Generating cacerts file from certificates in ${EPREFIX}/usr/share/ca-certificates/"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   348
	mkdir "${T}/certgen" && cd "${T}/certgen" || die
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   349
	cp "${FILESDIR}/generate-cacerts.pl" . && chmod +x generate-cacerts.pl || die
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   350
	for c in "${EPREFIX}"/usr/share/ca-certificates/*/*.crt; do
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   351
		openssl x509 -text -in "${c}" >> all.crt || die
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   352
	done
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   353
	./generate-cacerts.pl "${ddest}/bin/keytool" all.crt || die
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   354
	cp -vRP cacerts "${ddest}/jre/lib/security/" || die
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   355
	chmod 644 "${ddest}/jre/lib/security/cacerts" || die
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   356
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   357
	# OpenJDK7 should be able to use fontconfig instead, but wont hurt to
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   358
	# install it anyway. Bug 390663
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   359
	cp "${FILESDIR}"/fontconfig.Gentoo.properties.src "${T}"/fontconfig.Gentoo.properties || die
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   360
	eprefixify "${T}"/fontconfig.Gentoo.properties
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   361
	insinto "${dest}"/jre/lib
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   362
	doins "${T}"/fontconfig.Gentoo.properties
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   363
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   364
	set_java_env "${FILESDIR}/icedtea.env"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   365
	if ! use X || ! use alsa || ! use cups; then
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   366
		java-vm_revdep-mask "${dest}"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   367
	fi
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   368
	java-vm_sandbox-predict /proc/self/coredump_filter
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   369
}
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   370
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   371
pkg_preinst() {
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   372
	if has_version "<=dev-java/icedtea-7.2.0:7"; then
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   373
		# portage would preserve the symlink otherwise, related to bug #384397
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   374
		rm -f "${EROOT}/usr/lib/jvm/icedtea7"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   375
		elog "To unify the layout and simplify scripts, the identifier of Icedtea-7*"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   376
		elog "has changed from 'icedtea7' to 'icedtea-7' starting from version 7.2.0-r1"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   377
		elog "If you had icedtea7 as system VM, the change should be automatic, however"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   378
		elog "build VM settings in /etc/java-config-2/build/jdk.conf are not changed"
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   379
		elog "and the same holds for any user VM settings. Sorry for the inconvenience."
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   380
	fi
27c2a6303f2f Add ebuild for icedtea which can build on hardened system with XATTRS_PAX
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
   381
}