You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
129 lines
3.3 KiB
129 lines
3.3 KiB
12 years ago
|
# Copyright 1999-2012 Gentoo Foundation
|
||
|
# Distributed under the terms of the GNU General Public License v2
|
||
12 years ago
|
# $Header: /var/cvsroot/gentoo-x86/dev-java/icedtea-web/icedtea-web-1.3.1.ebuild,v 1.1 2012/11/14 21:59:24 caster Exp $
|
||
12 years ago
|
# Build written by Andrew John Hughes (ahughes@redhat.com)
|
||
|
|
||
|
EAPI="4"
|
||
|
|
||
|
inherit autotools eutils java-pkg-2 java-vm-2
|
||
|
|
||
|
DESCRIPTION="FOSS Java browser plugin and Web Start implementation"
|
||
|
HOMEPAGE="http://icedtea.classpath.org"
|
||
|
SRC_URI="http://icedtea.classpath.org/download/source/${P}.tar.gz"
|
||
|
|
||
|
LICENSE="GPL-2 GPL-2-with-linking-exception LGPL-2"
|
||
|
SLOT="6"
|
||
|
KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~x86"
|
||
|
|
||
12 years ago
|
IUSE="build doc gtk2 gtk3 javascript +nsplugin test"
|
||
|
|
||
|
COMMON_DEP="
|
||
|
dev-java/icedtea:${SLOT}
|
||
|
nsplugin? (
|
||
|
>=dev-libs/glib-2.16
|
||
|
gtk2? (
|
||
|
!gtk3? ( >=x11-libs/gtk+-2.6:2 )
|
||
|
gtk3? ( x11-libs/gtk+:3 )
|
||
|
)
|
||
|
!gtk2? ( x11-libs/gtk+:3 )
|
||
|
)"
|
||
|
RDEPEND="${COMMON_DEP}"
|
||
12 years ago
|
# Need system junit 4.8+. Bug #389795
|
||
12 years ago
|
DEPEND="${COMMON_DEP}
|
||
|
virtual/pkgconfig
|
||
12 years ago
|
javascript? ( dev-java/rhino:1.6 )
|
||
|
nsplugin? ( net-misc/npapi-sdk )
|
||
|
test? ( >=dev-java/junit-4.8:4 )"
|
||
|
|
||
|
pkg_setup() {
|
||
12 years ago
|
JAVA_PKG_WANT_BUILD_VM="icedtea-${SLOT} icedtea${SLOT}"
|
||
12 years ago
|
JAVA_PKG_WANT_SOURCE="1.6"
|
||
|
JAVA_PKG_WANT_TARGET="1.6"
|
||
|
|
||
|
java-vm-2_pkg_setup
|
||
|
java-pkg-2_pkg_setup
|
||
|
|
||
12 years ago
|
VMHANDLE="icedtea-${SLOT}"
|
||
12 years ago
|
}
|
||
|
|
||
|
src_prepare() {
|
||
|
# bug #356645
|
||
|
epatch "${FILESDIR}"/0002-Respect-LDFLAGS.patch
|
||
|
eautoreconf
|
||
|
}
|
||
|
|
||
|
src_configure() {
|
||
|
local vmhome=$(java-config -O)
|
||
|
|
||
|
if use build; then
|
||
|
icedteadir="${ICEDTEA_BIN_DIR}"
|
||
|
[[ -z ${icedteadir} ]] && die "USE=build is an internal flag and should not be enabled"
|
||
|
installdir="/opt/icedtea-web-bin-${SLOT}"
|
||
|
else
|
||
|
icedteadir="/usr/$(get_libdir)/icedtea${SLOT}"
|
||
|
installdir="/usr/$(get_libdir)/icedtea${SLOT}-web"
|
||
12 years ago
|
[[ "${vmhome}" == "${icedteadir}" ]] \
|
||
|
|| die "Unexpected install location of IcedTea ${SLOT} '${vmhome}'"
|
||
12 years ago
|
fi
|
||
|
|
||
12 years ago
|
einfo "Installing IcedTea-Web in '${installdir}'"
|
||
|
einfo "Installing IcedTea-Web for IcedTea${SLOT} in '${icedteadir}'"
|
||
|
|
||
|
local gtk_ver=3
|
||
|
use gtk2 && gtk_ver=2
|
||
|
use gtk3 && gtk_ver=3
|
||
|
|
||
|
local myconf=(
|
||
|
# we need to override all *dir variables that econf sets.
|
||
|
# man page (javaws) is installed directly to icedteadir because it's
|
||
|
# easier than symlinking, as we don't know the suffix the man page will
|
||
|
# end up compressed with, anyway
|
||
|
--prefix="${installdir}"
|
||
|
--mandir="${icedteadir}"/man
|
||
|
--infodir="${installdir}"/share/info
|
||
|
--datadir="${installdir}"/share
|
||
|
--with-jdk-home="${icedteadir}"
|
||
|
--with-gtk=${gtk_ver}
|
||
|
$(use_enable doc docs)
|
||
|
$(use_enable nsplugin plugin)
|
||
12 years ago
|
$(use_with javascript rhino)
|
||
12 years ago
|
)
|
||
|
|
||
|
unset JAVA_HOME JDK_HOME CLASSPATH JAVAC JAVACFLAGS
|
||
|
econf "${myconf[@]}"
|
||
12 years ago
|
}
|
||
|
|
||
|
src_compile() {
|
||
|
# we need this to override the src_compile from java-pkg-2
|
||
|
default
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
12 years ago
|
# bug #440906
|
||
|
MAKEOPTS+=" -j1" default
|
||
12 years ago
|
|
||
|
if use nsplugin; then
|
||
|
install_mozilla_plugin "${installdir}/$(get_libdir)/IcedTeaPlugin.so";
|
||
|
fi
|
||
|
|
||
|
for binary in javaws itweb-settings; do
|
||
|
dosym ${installdir}/bin/${binary} ${icedteadir}/bin/${binary}
|
||
|
dosym ${installdir}/bin/${binary} ${icedteadir}/jre/bin/${binary}
|
||
|
done
|
||
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
|
java-vm_check-nsplugin
|
||
|
java_mozilla_clean_
|
||
|
|
||
|
if use nsplugin; then
|
||
|
elog "The icedtea browser plugin (NPPlugin) can be enabled using eselect java-nsplugin"
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
pkg_prerm() {
|
||
12 years ago
|
# override the java-vm-2 eclass check for removing a system VM, as it
|
||
|
# doesn't make sense here.
|
||
12 years ago
|
:;
|
||
|
}
|