public inbox for gentoo-java@lists.gentoo.org
 help / color / mirror / Atom feed
From: Fabian Fingerle <fabian@datensalat.eu>
To: gentoo-java <gentoo-java@lists.gentoo.org>
Subject: [gentoo-java] sun-jdk-1.7.0.0_alpha30 Version Bump
Date: Fri, 4 Jul 2008 07:17:15 +0200	[thread overview]
Message-ID: <20080704071715.213ba0ec@mobile> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 259 bytes --]

new Sun JDK Version 1.7.0.0-alpha30

ebuild attached, also see my overlay:
http://svn.fabian-fingerle.de/overlay/dev-java/sun-jdk/

Fabian

-- 
_GPG_ 3D17 CAC8 1955 1908 65ED  5C51 FDA3 6A09 AB41 AB85
_chaos events near stuttgart_ www.datensalat.eu

[-- Attachment #1.2: sun-jdk-1.7.0.0_alpha30.ebuild --]
[-- Type: application/octet-stream, Size: 4933 bytes --]

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/sun-jdk/sun-jdk-1.5.0.05.ebuild,v 1.2 2005/10/10 16:23:12 betelgeuse Exp $

inherit java-vm-2 eutils pax-utils

MY_PV=${PV/_beta*/}
MY_PVL=${MY_PV%.*}_${MY_PV##*.}
MY_PVA=${MY_PV//./_}
ALPHA=${PV#*_alpha}
DATE="03_jul_2008"
MY_RPV=${MY_PV%.*}

BASE_URL="http://www.java.net/download/jdk7/binaries/"
x86file="jdk-7-ea-bin-b${ALPHA}-linux-i586-${DATE}.bin"
amd64file="jdk-7-ea-bin-b${ALPHA}-linux-x64-${DATE}.bin"

S="${WORKDIR}/jdk${MY_RPV}"
DESCRIPTION="Sun's Java Development Kit"
HOMEPAGE="https://jdk7.dev.java.net/"
SRC_URI="x86? ( ${BASE_URL}/$x86file ) amd64? ( ${BASE_URL}/$amd64file )"
SLOT="1.7"
LICENSE="sun-prerelease-jdk7"
KEYWORDS="~amd64 ~x86"
RESTRICT="nostrip fetch"
IUSE="X alsa doc nsplugin examples"

DEPEND="sys-apps/sed"

RDEPEND="doc? ( =dev-java/java-sdk-docs-1.6.0* )
	alsa? ( media-libs/alsa-lib )
	x86? ( =virtual/libstdc++-3.3 )
	X? (
		x11-libs/libX11
		x11-libs/libXext
		x11-libs/libXi
		x11-libs/libXmu
		x11-libs/libXp
		x11-libs/libXtst
	)
	"

JAVA_PROVIDE="jdbc-stdext jdbc-rowset"

QA_TEXTRELS_x86="opt/${P}/jre/lib/i386/server/libjvm.so
	opt/${P}/jre/lib/i386/client/libjvm.so
	opt/${P}/jre/lib/i386/motif21/libmawt.so
	opt/${P}/jre/lib/i386/libdeploy.so"

pkg_nofetch() {
	einfo "Please download:"
	einfo "${A} from ${BASE_URL}${A}"
	einfo "Then place it in ${DISTDIR}"
	einfo "tip: wget ${BASE_URL}${A} -O ${DISTDIR}/${A}"

	ewarn "By downloading and installing, you are agreeing to the terms"
	ewarn "of Sun's prerelease license."
}

src_unpack() {
	# Do a little voodoo to extract the distfile
	# Find the ELF in the script
	testExp=$(echo -e '\0105\0114\0106')
	startAt=$(grep -aonm 1 ${testExp}  ${DISTDIR}/${A} | cut -d: -f1)
	# Extract and run it
	tail -n +${startAt} ${DISTDIR}/${A} > install.sfx
	chmod +x install.sfx
	./install.sfx >/dev/null || die
	rm install.sfx

	local packed_jars="lib/tools.jar jre/lib/rt.jar jre/lib/jsse.jar \
		jre/lib/charsets.jar jre/lib/ext/localedata.jar jre/lib/plugin.jar \
		jre/lib/javaws.jar jre/lib/deploy.jar"

	if [ -f ${S}/bin/unpack200 ]; then
		UNPACK_CMD=${S}/bin/unpack200
		chmod +x $UNPACK_CMD
		sed -i 's#/tmp/unpack.log#/dev/null\x00\x00\x00\x00\x00\x00#g' $UNPACK_CMD
		for i in $packed_jars; do
			PACK_FILE=${S}/$(dirname $i)/$(basename $i .jar).pack
			if [ -f ${PACK_FILE} ]; then
				echo "	unpacking: $i"
				$UNPACK_CMD ${PACK_FILE} ${S}/$i
				rm -f ${PACK_FILE}
			fi
		done
		rm -f ${UNPACK_CMD}
	else
		die "unpack not found"
	fi
	${S}/bin/java -client -Xshare:dump
}

src_install() {
	local dirs="bin include jre lib man"

	# Set PaX markings on all JDK/JRE executables to allow code-generation on
	# the heap by the JIT compiler.
	pax-mark m $(list-paxables ${S}{,/jre}/bin/*)

	dodir /opt/${P}

	cp -pPR ${dirs} "${D}/opt/${P}/" || die "failed to copy"
	dodoc COPYRIGHT LICENSE README.html || die
	dohtml README.html || die
	dodir /opt/${P}/share/

	if use examples; then
		cp -pPR demo sample ${D}/opt/${P}/share/ || die
	fi
	cp -pPR src.zip ${D}/opt/${P}/ || die

	if use nsplugin; then
		local plugin_dir="ns7-gcc29"
		if has_version '>=sys-devel/gcc-3' ; then
			plugin_dir="ns7"
		fi

		if use x86 ; then
			install_mozilla_plugin /opt/${P}/jre/plugin/i386/$plugin_dir/libjavaplugin_oji.so
		else
			eerror "No plugin available for amd64 arch"
		fi
	fi

	# create dir for system preferences
	dodir /opt/${P}/jre/.systemPrefs
	# Create files used as storage for system preferences.
	touch ${D}/opt/${P}/jre/.systemPrefs/.system.lock
	chmod 644 ${D}/opt/${P}/jre/.systemPrefs/.system.lock
	touch ${D}/opt/${P}/jre/.systemPrefs/.systemRootModFile
	chmod 644 ${D}/opt/${P}/jre/.systemPrefs/.systemRootModFile

	# install control panel for Gnome/KDE
	sed -e "s/INSTALL_DIR\/JRE_NAME_VERSION/\/opt\/${P}\/jre/" \
		-e "s/\(Name=Java\)/\1 Control Panel/" \
		${D}/opt/${P}/jre/plugin/desktop/sun_java.desktop > \
		${T}/sun_java-${SLOT}.desktop

	domenu ${T}/sun_java-${SLOT}.desktop

	set_java_env
}

pkg_postinst() {
	# Set as default VM if none exists
	java-vm-2_pkg_postinst

	if ! use X; then
		local xwarn="virtual/x11 and/or"
	fi

	echo
	ewarn "Some parts of Sun's JDK require ${xwarn} virtual/lpr to be installed."
	ewarn "Be careful which Java libraries you attempt to use."

	echo
	einfo " Be careful: ${P}'s Java compiler uses"
	einfo " '-source 1.7' as default. This means that some keywords "
	einfo " such as 'enum' are not valid identifiers any more in that mode,"
	einfo " which can cause incompatibility with certain sources."
	einfo " Additionally, some API changes may cause some breakages."
	echo
	elog "Beginning with 1.5.0.10 the hotspot vm can use epoll"
	elog "The epoll-based implementation of SelectorProvider is not selected by"
	elog "default."
	elog "Use java -Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.EPollSelectorProvider"
	elog ""
}

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

             reply	other threads:[~2008-07-04  5:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-04  5:17 Fabian Fingerle [this message]
2008-07-04 18:53 ` [gentoo-java] sun-jdk-1.7.0.0_alpha30 Version Bump Serkan Kaba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080704071715.213ba0ec@mobile \
    --to=fabian@datensalat.eu \
    --cc=gentoo-java@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox