public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in eclass: java-vm-2.eclass
@ 2007-10-09 10:18 Alistair Bush (ali_bush)
  0 siblings, 0 replies; 14+ messages in thread
From: Alistair Bush (ali_bush) @ 2007-10-09 10:18 UTC (permalink / raw
  To: gentoo-commits

ali_bush    07/10/09 10:18:14

  Modified:             java-vm-2.eclass
  Log:
  Updating java-vm-2 to depend on more more broad java-config-2 versions.

Revision  Changes    Path
1.18                 eclass/java-vm-2.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?rev=1.18&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?rev=1.18&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?r1=1.17&r2=1.18

Index: java-vm-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- java-vm-2.eclass	7 May 2007 15:51:29 -0000	1.17
+++ java-vm-2.eclass	9 Oct 2007 10:18:14 -0000	1.18
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.17 2007/05/07 15:51:29 betelgeuse Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.18 2007/10/09 10:18:14 ali_bush Exp $
 
 # -----------------------------------------------------------------------------
 # @eclass-begin
@@ -15,10 +15,10 @@
 inherit eutils fdo-mime
 
 DEPEND="
-	=dev-java/java-config-2.0*
+	=dev-java/java-config-2*
 	>=sys-apps/portage-2.1"
 RDEPEND="
-	=dev-java/java-config-2.0*
+	=dev-java/java-config-2*
 	=dev-java/java-config-1.3*"
 
 export WANT_JAVA_CONFIG=2



-- 
gentoo-commits@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: java-vm-2.eclass
@ 2007-12-16 17:11 Vlastimil Babka (caster)
  0 siblings, 0 replies; 14+ messages in thread
From: Vlastimil Babka (caster) @ 2007-12-16 17:11 UTC (permalink / raw
  To: gentoo-commits

caster      07/12/16 17:11:02

  Modified:             java-vm-2.eclass
  Log:
  Add a java-vm_revdep-mask() function for bug #177925.

Revision  Changes    Path
1.19                 eclass/java-vm-2.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?rev=1.19&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?rev=1.19&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?r1=1.18&r2=1.19

Index: java-vm-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- java-vm-2.eclass	9 Oct 2007 10:18:14 -0000	1.18
+++ java-vm-2.eclass	16 Dec 2007 17:11:01 -0000	1.19
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.18 2007/10/09 10:18:14 ali_bush Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.19 2007/12/16 17:11:01 caster Exp $
 
 # -----------------------------------------------------------------------------
 # @eclass-begin
@@ -195,6 +195,30 @@
 		|| die "Failed to make VM symlink at ${JAVA_VM_DIR}/${VMHANDLE}"
 }
 
+# -----------------------------------------------------------------------------
+# @ebuild-function java-vm_revdep-mask
+#
+# Installs a revdep-rebuild control file which SEARCH_DIR_MASK set to the path
+# where the VM is installed. Prevents pointless rebuilds - see bug #177925.
+# Also gives a notice to the user.
+#
+# @example
+#	java-vm_revdep-mask
+#	java-vm_revdep-mask /path/to/jdk/
+#
+# @param $1 - Path of the VM (defaults to /opt/${P} if not set)
+# ------------------------------------------------------------------------------
+java-vm_revdep-mask() {
+	local VMROOT="${1-/opt/${P}}"
+
+	dodir /etc/revdep-rebuild/
+	echo "SEARCH_DIRS_MASK=\"${VMROOT}\""> "${D}/etc/revdep-rebuild/61-${VMHANDLE}"
+	
+	elog "A revdep-rebuild control file was installed to prevent reinstalls due to"
+	elog "missing dependencies (see bug #177925 for more info). Note that some parts"
+	elog "of the JVM may require dependencies that are pulled only through respective"
+	elog "USE flags (typically X, alsa, odbc) and some Java code may fail without them."
+}
 
 java_get_plugin_dir_() {
 	echo /usr/$(get_libdir)/nsbrowser/plugins



-- 
gentoo-commits@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: java-vm-2.eclass
@ 2008-03-03 17:20 Petteri Raty (betelgeuse)
  0 siblings, 0 replies; 14+ messages in thread
From: Petteri Raty (betelgeuse) @ 2008-03-03 17:20 UTC (permalink / raw
  To: gentoo-commits

betelgeuse    08/03/03 17:20:41

  Modified:             java-vm-2.eclass
  Log:
  Add the ability to tell where the env file is located to set_java_env.

Revision  Changes    Path
1.20                 eclass/java-vm-2.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?rev=1.20&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?rev=1.20&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?r1=1.19&r2=1.20

Index: java-vm-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- java-vm-2.eclass	16 Dec 2007 17:11:01 -0000	1.19
+++ java-vm-2.eclass	3 Mar 2008 17:20:41 -0000	1.20
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.19 2007/12/16 17:11:01 caster Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.20 2008/03/03 17:20:41 betelgeuse Exp $
 
 # -----------------------------------------------------------------------------
 # @eclass-begin
@@ -148,10 +148,15 @@
 
 # TODO rename to something more evident, like install_env_file
 set_java_env() {
+	debug-print-function ${FUNCNAME} $*
 	local platform="$(get_system_arch)"
 	local env_file="${D}${JAVA_VM_CONFIG_DIR}/${VMHANDLE}"
 	local old_env_file="${D}/etc/env.d/java/20${P}"
-	local source_env_file="${FILESDIR}/${VMHANDLE}.env"
+	if [[ ${1} ]]; then
+		local source_env_file="${1}"
+	else
+		local source_env_file="${FILESDIR}/${VMHANDLE}.env"
+	fi
 
 	if [[ ! -f ${source_env_file} ]]; then
 		die "Unable to find the env file: ${source_env_file}"



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: java-vm-2.eclass
@ 2008-08-29 19:10 Vlastimil Babka (caster)
  0 siblings, 0 replies; 14+ messages in thread
From: Vlastimil Babka (caster) @ 2008-08-29 19:10 UTC (permalink / raw
  To: gentoo-commits

caster      08/08/29 19:10:20

  Modified:             java-vm-2.eclass
  Log:
  Add a 'variant' parameter to install_mozilla_plugin() to allow installing multiple nsplugin variants of one JRE, bug #235869.

Revision  Changes    Path
1.23                 eclass/java-vm-2.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?rev=1.23&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?rev=1.23&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?r1=1.22&r2=1.23

Index: java-vm-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- java-vm-2.eclass	7 Jul 2008 16:54:56 -0000	1.22
+++ java-vm-2.eclass	29 Aug 2008 19:10:19 -0000	1.23
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.22 2008/07/07 16:54:56 betelgeuse Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.23 2008/08/29 19:10:19 caster Exp $
 
 # -----------------------------------------------------------------------------
 # @eclass-begin
@@ -230,15 +230,20 @@
 }
 
 install_mozilla_plugin() {
-	local plugin=${1}
+	local plugin="${1}"
+	local variant="${2}"
 
-	if [ ! -f "${D}/${plugin}" ] ; then
+	if [[ ! -f "${D}/${plugin}" ]]; then
 		die "Cannot find mozilla plugin at ${D}/${plugin}"
 	fi
 
-	local plugin_dir=/usr/share/java-config-2/nsplugin
-	dodir ${plugin_dir}
-	dosym ${plugin} ${plugin_dir}/${VMHANDLE}-javaplugin.so
+	if [[ -n "${variant}" ]]; then
+		variant="-${variant}"
+	fi
+
+	local plugin_dir="/usr/share/java-config-2/nsplugin"
+	dodir "${plugin_dir}"
+	dosym "${plugin}" "${plugin_dir}/${VMHANDLE}${variant}-javaplugin.so"
 }
 
 java_mozilla_clean_() {






^ permalink raw reply	[flat|nested] 14+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: java-vm-2.eclass
@ 2009-02-08 21:42 Markus Meier (maekke)
  0 siblings, 0 replies; 14+ messages in thread
From: Markus Meier (maekke) @ 2009-02-08 21:42 UTC (permalink / raw
  To: gentoo-commits

maekke      09/02/08 21:42:27

  Modified:             java-vm-2.eclass
  Log:
  whitespace

Revision  Changes    Path
1.24                 eclass/java-vm-2.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?rev=1.24&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?rev=1.24&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?r1=1.23&r2=1.24

Index: java-vm-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- java-vm-2.eclass	29 Aug 2008 19:10:19 -0000	1.23
+++ java-vm-2.eclass	8 Feb 2009 21:42:27 -0000	1.24
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.23 2008/08/29 19:10:19 caster Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.24 2009/02/08 21:42:27 maekke Exp $
 
 # -----------------------------------------------------------------------------
 # @eclass-begin
@@ -218,7 +218,7 @@
 
 	dodir /etc/revdep-rebuild/
 	echo "SEARCH_DIRS_MASK=\"${VMROOT}\""> "${D}/etc/revdep-rebuild/61-${VMHANDLE}"
-	
+
 	elog "A revdep-rebuild control file was installed to prevent reinstalls due to"
 	elog "missing dependencies (see bug #177925 for more info). Note that some parts"
 	elog "of the JVM may require dependencies that are pulled only through respective"






^ permalink raw reply	[flat|nested] 14+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: java-vm-2.eclass
@ 2009-02-09 23:01 Vlastimil Babka (caster)
  0 siblings, 0 replies; 14+ messages in thread
From: Vlastimil Babka (caster) @ 2009-02-09 23:01 UTC (permalink / raw
  To: gentoo-commits

caster      09/02/09 23:01:51

  Modified:             java-vm-2.eclass
  Log:
  Pull java-config-1.3 only for VM's that support gen1, bug #176784.

Revision  Changes    Path
1.25                 eclass/java-vm-2.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?rev=1.25&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?rev=1.25&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?r1=1.24&r2=1.25

Index: java-vm-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- java-vm-2.eclass	8 Feb 2009 21:42:27 -0000	1.24
+++ java-vm-2.eclass	9 Feb 2009 23:01:51 -0000	1.25
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.24 2009/02/08 21:42:27 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.25 2009/02/09 23:01:51 caster Exp $
 
 # -----------------------------------------------------------------------------
 # @eclass-begin
@@ -18,8 +18,13 @@
 	=dev-java/java-config-2*
 	>=sys-apps/portage-2.1"
 RDEPEND="
-	=dev-java/java-config-2*
-	=dev-java/java-config-1.3*"
+	=dev-java/java-config-2*"
+
+# bug #176784
+if [[ ${JAVA_SUPPORTS_GENERATION_1} == 'true' && ${JAVA_VM_NO_GENERATION1} != 'true' ]]; then
+	DEPEND="${DEPEND} =dev-java/java-config-1.3*"
+	RDEPEND="${RDEPEND} =dev-java/java-config-1.3*"
+fi
 
 export WANT_JAVA_CONFIG=2
 






^ permalink raw reply	[flat|nested] 14+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: java-vm-2.eclass
@ 2009-04-17 22:50 Vlastimil Babka (caster)
  0 siblings, 0 replies; 14+ messages in thread
From: Vlastimil Babka (caster) @ 2009-04-17 22:50 UTC (permalink / raw
  To: gentoo-commits

caster      09/04/17 22:50:41

  Modified:             java-vm-2.eclass
  Log:
  Stop supporting generation 1

Revision  Changes    Path
1.27                 eclass/java-vm-2.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?rev=1.27&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?rev=1.27&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?r1=1.26&r2=1.27

Index: java-vm-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- java-vm-2.eclass	11 Feb 2009 16:13:38 -0000	1.26
+++ java-vm-2.eclass	17 Apr 2009 22:50:41 -0000	1.27
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.26 2009/02/11 16:13:38 betelgeuse Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.27 2009/04/17 22:50:41 caster Exp $
 
 # -----------------------------------------------------------------------------
 # @eclass-begin
@@ -20,12 +20,6 @@
 RDEPEND="
 	=dev-java/java-config-2*"
 
-# bug #176784
-if [[ ${JAVA_SUPPORTS_GENERATION_1} == 'true' && ${JAVA_VM_NO_GENERATION1} != 'true' ]]; then
-	DEPEND="${DEPEND} =dev-java/java-config-1.3*"
-	RDEPEND="${RDEPEND} =dev-java/java-config-1.3*"
-fi
-
 export WANT_JAVA_CONFIG=2
 
 JAVA_VM_CONFIG_DIR="/usr/share/java-config-2/vm"
@@ -47,44 +41,6 @@
 		java_set_default_vm_
 	fi
 
-	# support both variables for now
-	if [[ ${JAVA_SUPPORTS_GENERATION_1} == 'true' && ${JAVA_VM_NO_GENERATION1} != 'true' ]]; then
-		local systemvm1="$(java-config-1 -f 2>/dev/null)"
-		# no generation-1 system-vm was previously set
-		if [[ -z "${systemvm1}" ]]; then
-			# if 20java exists, must be using old VM
-			if [[ -f /etc/env.d/20java ]]; then
-				ewarn "The current generation-1 system-vm is using an out-of-date VM,"
-				ewarn "as in, it hasn't been updated for use with the new Java sytem."
-			# othewise, it must not have been set before
-			else
-				ewarn "No generation-1 system-vm previously set."
-			fi
-			ewarn "Setting generation-1 system-vm to ${VMHANDLE}"
-			java-config-1 --set-system-vm=${P} 2>/dev/null
-		# dirty check to see if we are upgrading current generation-1 system vm
-		elif [[ "${systemvm1}" = ${VMHANDLE}* ]]; then
-			einfo "Emerging the current generation-1 system-vm..."
-			einfo "Updating its config files."
-			java-config-1 --set-system-vm=${P} 2>/dev/null
-		# dirty check to see if current system vm is a jre - replace it with
-		elif [[ "${systemvm1}" = *jre* ]]; then
-			ewarn "Current generation-1 system-vm is a JRE"
-			ewarn "For the new and old Java systems to coexist,"
-			ewarn "the generation-1 system-vm must be a JDK."
-			ewarn "Setting generation-1 system-vm to ${VMHANDLE}"
-			java-config-1 --set-system-vm=${P} 2>/dev/null
-		fi
-		# else... some other VM is being updated, so we don't have to worry
-	else
-		einfo "JREs and 1.5+ JDKs are not supported for use with generation-1."
-		einfo "This is because generation-1 is only for use for building packages."
-		einfo "Only generation-2 should be used by end-users,"
-		einfo "where all JREs and JDKs will be available"
-	fi
-
-	echo
-
 	java-vm_check-nsplugin
 	java_mozilla_clean_
 	fdo-mime_desktop_database_update
@@ -180,21 +136,6 @@
 
 	echo "VMHANDLE=\"${VMHANDLE}\"" >> ${env_file}
 
-	# generation-1 compatibility
-	# respect both variables for now...
-	if [[ ${JAVA_SUPPORTS_GENERATION_1} == 'true' && ${JAVA_VM_NO_GENERATION1} != 'true' ]]; then
-		einfo "Enabling generation-1 compatibility..."
-		dodir /etc/env.d/java # generation-1 compatibility
-		# We need to strip some things out of the new style env,
-		# because these end up going in the env
-		sed -e 's/.*CLASSPATH.*//' \
-			-e 's/.*PROVIDES.*//' \
-			${env_file} \
-			> ${old_env_file} || die "failed to create generation-1 env file"
-	else
-		ewarn "Disabling generation-1 compatibility..."
-	fi
-
 	[[ -n ${JAVA_PROVIDE} ]] && echo "PROVIDES=\"${JAVA_PROVIDE}\"" >> ${env_file}
 
 	local java_home=$(source ${env_file}; echo ${JAVA_HOME})






^ permalink raw reply	[flat|nested] 14+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: java-vm-2.eclass
@ 2009-10-11 11:46 Markus Meier (maekke)
  0 siblings, 0 replies; 14+ messages in thread
From: Markus Meier (maekke) @ 2009-10-11 11:46 UTC (permalink / raw
  To: gentoo-commits

maekke      09/10/11 11:46:59

  Modified:             java-vm-2.eclass
  Log:
  whitespace

Revision  Changes    Path
1.29                 eclass/java-vm-2.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?rev=1.29&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?rev=1.29&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?r1=1.28&r2=1.29

Index: java-vm-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- java-vm-2.eclass	27 Aug 2009 21:49:04 -0000	1.28
+++ java-vm-2.eclass	11 Oct 2009 11:46:59 -0000	1.29
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.28 2009/08/27 21:49:04 ali_bush Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.29 2009/10/11 11:46:59 maekke Exp $
 
 # -----------------------------------------------------------------------------
 # @eclass-begin
@@ -137,7 +137,7 @@
 
 	(
 		echo "VMHANDLE=\"${VMHANDLE}\""
-		echo "BUILD_ONLY=\"${JAVA_VM_BUILD_ONLY}\"" 
+		echo "BUILD_ONLY=\"${JAVA_VM_BUILD_ONLY}\""
 	) >> ${env_file}
 
 	[[ -n ${JAVA_PROVIDE} ]] && echo "PROVIDES=\"${JAVA_PROVIDE}\"" >> ${env_file}






^ permalink raw reply	[flat|nested] 14+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: java-vm-2.eclass
@ 2010-03-27 22:23 Vlastimil Babka (caster)
  0 siblings, 0 replies; 14+ messages in thread
From: Vlastimil Babka (caster) @ 2010-03-27 22:23 UTC (permalink / raw
  To: gentoo-commits

caster      10/03/27 22:23:57

  Modified:             java-vm-2.eclass
  Log:
  Add @LIBDIR@ (rewritted to get_libdir) support in package.env

Revision  Changes    Path
1.30                 eclass/java-vm-2.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?rev=1.30&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?rev=1.30&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?r1=1.29&r2=1.30

Index: java-vm-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- java-vm-2.eclass	11 Oct 2009 11:46:59 -0000	1.29
+++ java-vm-2.eclass	27 Mar 2010 22:23:57 -0000	1.30
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.29 2009/10/11 11:46:59 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.30 2010/03/27 22:23:57 caster Exp $
 
 # -----------------------------------------------------------------------------
 # @eclass-begin
@@ -12,7 +12,7 @@
 #
 # -----------------------------------------------------------------------------
 
-inherit eutils fdo-mime
+inherit eutils fdo-mime multilib
 
 DEPEND="=dev-java/java-config-2*"
 hasq "${EAPI}" 0 1 && DEPEND="${DEPEND} >=sys-apps/portage-2.1"
@@ -131,6 +131,7 @@
 		-e "s/@PV@/${PV}/g" \
 		-e "s/@PF@/${PF}/g" \
 		-e "s/@PLATFORM@/${platform}/g" \
+		-e "s/@LIBDIR@/$(get_libdir)/g" \
 		-e "/^LDPATH=.*lib\\/\\\"/s|\"\\(.*\\)\"|\"\\1${platform}/:\\1${platform}/server/\"|" \
 		< ${source_env_file} \
 		> ${env_file} || die "sed failed"






^ permalink raw reply	[flat|nested] 14+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: java-vm-2.eclass
@ 2010-04-17  8:30 Petteri Raty (betelgeuse)
  0 siblings, 0 replies; 14+ messages in thread
From: Petteri Raty (betelgeuse) @ 2010-04-17  8:30 UTC (permalink / raw
  To: gentoo-commits

betelgeuse    10/04/17 08:30:36

  Modified:             java-vm-2.eclass
  Log:
  Add quotes around variables that could contain spaces in paths. Fixes bug #315961. Thanks to Michał Górny <gentoo@mgorny.alt.pl>.

Revision  Changes    Path
1.31                 eclass/java-vm-2.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?rev=1.31&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?rev=1.31&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/java-vm-2.eclass?r1=1.30&r2=1.31

Index: java-vm-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- java-vm-2.eclass	27 Mar 2010 22:23:57 -0000	1.30
+++ java-vm-2.eclass	17 Apr 2010 08:30:36 -0000	1.31
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.30 2010/03/27 22:23:57 caster Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.31 2010/04/17 08:30:36 betelgeuse Exp $
 
 # -----------------------------------------------------------------------------
 # @eclass-begin
@@ -133,17 +133,17 @@
 		-e "s/@PLATFORM@/${platform}/g" \
 		-e "s/@LIBDIR@/$(get_libdir)/g" \
 		-e "/^LDPATH=.*lib\\/\\\"/s|\"\\(.*\\)\"|\"\\1${platform}/:\\1${platform}/server/\"|" \
-		< ${source_env_file} \
-		> ${env_file} || die "sed failed"
+		< "${source_env_file}" \
+		> "${env_file}" || die "sed failed"
 
 	(
 		echo "VMHANDLE=\"${VMHANDLE}\""
 		echo "BUILD_ONLY=\"${JAVA_VM_BUILD_ONLY}\""
-	) >> ${env_file}
+	) >> "${env_file}"
 
 	[[ -n ${JAVA_PROVIDE} ]] && echo "PROVIDES=\"${JAVA_PROVIDE}\"" >> ${env_file}
 
-	local java_home=$(source ${env_file}; echo ${JAVA_HOME})
+	local java_home=$(source "${env_file}"; echo ${JAVA_HOME})
 	[[ -z ${java_home} ]] && die "No JAVA_HOME defined in ${env_file}"
 
 	# Make the symlink






^ permalink raw reply	[flat|nested] 14+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: java-vm-2.eclass
@ 2011-09-01 14:15 Vlastimil Babka (caster)
  0 siblings, 0 replies; 14+ messages in thread
From: Vlastimil Babka (caster) @ 2011-09-01 14:15 UTC (permalink / raw
  To: gentoo-commits

caster      11/09/01 14:15:57

  Modified:             java-vm-2.eclass
  Log:
  Prefix support, thanks to sera and darkside.

Revision  Changes    Path
1.33                 eclass/java-vm-2.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-vm-2.eclass?rev=1.33&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-vm-2.eclass?rev=1.33&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-vm-2.eclass?r1=1.32&r2=1.33

Index: java-vm-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- java-vm-2.eclass	8 Jul 2011 11:35:01 -0000	1.32
+++ java-vm-2.eclass	1 Sep 2011 14:15:57 -0000	1.33
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.32 2011/07/08 11:35:01 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.33 2011/09/01 14:15:57 caster Exp $
 
 # -----------------------------------------------------------------------------
 # @eclass-begin
@@ -12,7 +12,7 @@
 #
 # -----------------------------------------------------------------------------
 
-inherit eutils fdo-mime multilib
+inherit eutils fdo-mime multilib prefix
 
 DEPEND="=dev-java/java-config-2*"
 has "${EAPI}" 0 1 && DEPEND="${DEPEND} >=sys-apps/portage-2.1"
@@ -54,9 +54,12 @@
 	else
 		libdir=lib
 	fi
+
+	has ${EAPI:-0} 0 1 2 && ! use prefix && EPREFIX=
+
 	# Install a default nsplugin if we don't already have one
 	if has nsplugin ${IUSE} && use nsplugin; then
-		if [[ ! -f /usr/${libdir}/nsbrowser/plugins/javaplugin.so ]]; then
+		if [[ ! -f "${EPREFIX}"/usr/${libdir}/nsbrowser/plugins/javaplugin.so ]]; then
 			einfo "No system nsplugin currently set."
 			java-vm_set-nsplugin
 		else
@@ -111,9 +114,12 @@
 # TODO rename to something more evident, like install_env_file
 set_java_env() {
 	debug-print-function ${FUNCNAME} $*
+
+	has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
+
 	local platform="$(get_system_arch)"
-	local env_file="${D}${JAVA_VM_CONFIG_DIR}/${VMHANDLE}"
-	local old_env_file="${D}/etc/env.d/java/20${P}"
+	local env_file="${ED}${JAVA_VM_CONFIG_DIR}/${VMHANDLE}"
+	local old_env_file="${ED}/etc/env.d/java/20${P}"
 	if [[ ${1} ]]; then
 		local source_env_file="${1}"
 	else
@@ -141,12 +147,15 @@
 		echo "BUILD_ONLY=\"${JAVA_VM_BUILD_ONLY}\""
 	) >> "${env_file}"
 
+	eprefixify ${env_file}
+
 	[[ -n ${JAVA_PROVIDE} ]] && echo "PROVIDES=\"${JAVA_PROVIDE}\"" >> ${env_file}
 
 	local java_home=$(source "${env_file}"; echo ${JAVA_HOME})
 	[[ -z ${java_home} ]] && die "No JAVA_HOME defined in ${env_file}"
 
 	# Make the symlink
+	dodir "${JAVA_VM_DIR}"
 	dosym ${java_home} ${JAVA_VM_DIR}/${VMHANDLE} \
 		|| die "Failed to make VM symlink at ${JAVA_VM_DIR}/${VMHANDLE}"
 }
@@ -165,10 +174,15 @@
 # @param $1 - Path of the VM (defaults to /opt/${P} if not set)
 # ------------------------------------------------------------------------------
 java-vm_revdep-mask() {
-	local VMROOT="${1-/opt/${P}}"
+	if has ${EAPI:-0} 0 1 2 && ! use prefix; then
+		ED="${D}"
+		EPREFIX=
+	fi
+
+	local VMROOT="${1-"${EPREFIX}"/opt/${P}}"
 
 	dodir /etc/revdep-rebuild/
-	echo "SEARCH_DIRS_MASK=\"${VMROOT}\""> "${D}/etc/revdep-rebuild/61-${VMHANDLE}"
+	echo "SEARCH_DIRS_MASK=\"${VMROOT}\""> "${ED}/etc/revdep-rebuild/61-${VMHANDLE}"
 
 	elog "A revdep-rebuild control file was installed to prevent reinstalls due to"
 	elog "missing dependencies (see bug #177925 for more info). Note that some parts"
@@ -177,15 +191,17 @@
 }
 
 java_get_plugin_dir_() {
-	echo /usr/$(get_libdir)/nsbrowser/plugins
+	has ${EAPI:-0} 0 1 2 && ! use prefix && EPREFIX=
+	echo "${EPREFIX}"/usr/$(get_libdir)/nsbrowser/plugins
 }
 
 install_mozilla_plugin() {
 	local plugin="${1}"
 	local variant="${2}"
 
-	if [[ ! -f "${D}/${plugin}" ]]; then
-		die "Cannot find mozilla plugin at ${D}/${plugin}"
+	has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
+	if [[ ! -f "${ED}/${plugin}" ]]; then
+		die "Cannot find mozilla plugin at ${ED}/${plugin}"
 	fi
 
 	if [[ -n "${variant}" ]]; then






^ permalink raw reply	[flat|nested] 14+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: java-vm-2.eclass
@ 2011-10-11 10:55 Fabian Groffen (grobian)
  0 siblings, 0 replies; 14+ messages in thread
From: Fabian Groffen (grobian) @ 2011-10-11 10:55 UTC (permalink / raw
  To: gentoo-commits

grobian     11/10/11 10:55:06

  Modified:             java-vm-2.eclass
  Log:
  set_java_env: fix symlink in JAVA_VM_DIR for Prefix
  
  java_home contains EPREFIX, hence, when used with helpers (dosym in this
  case), the result gets $EPREFIX$EPREFIX/....  Strip EPREFIX from
  java_home before using it with dosym.

Revision  Changes    Path
1.34                 eclass/java-vm-2.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-vm-2.eclass?rev=1.34&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-vm-2.eclass?rev=1.34&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-vm-2.eclass?r1=1.33&r2=1.34

Index: java-vm-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- java-vm-2.eclass	1 Sep 2011 14:15:57 -0000	1.33
+++ java-vm-2.eclass	11 Oct 2011 10:55:06 -0000	1.34
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.33 2011/09/01 14:15:57 caster Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.34 2011/10/11 10:55:06 grobian Exp $
 
 # -----------------------------------------------------------------------------
 # @eclass-begin
@@ -115,7 +115,10 @@
 set_java_env() {
 	debug-print-function ${FUNCNAME} $*
 
-	has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
+	if has ${EAPI:-0} 0 1 2 && ! use prefix ; then
+		ED="${D}"
+		EPREFIX=""
+	fi
 
 	local platform="$(get_system_arch)"
 	local env_file="${ED}${JAVA_VM_CONFIG_DIR}/${VMHANDLE}"
@@ -156,7 +159,7 @@
 
 	# Make the symlink
 	dodir "${JAVA_VM_DIR}"
-	dosym ${java_home} ${JAVA_VM_DIR}/${VMHANDLE} \
+	dosym ${java_home#${EPREFIX}} ${JAVA_VM_DIR}/${VMHANDLE} \
 		|| die "Failed to make VM symlink at ${JAVA_VM_DIR}/${VMHANDLE}"
 }
 






^ permalink raw reply	[flat|nested] 14+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: java-vm-2.eclass
@ 2011-10-29 14:36 Vlastimil Babka (caster)
  0 siblings, 0 replies; 14+ messages in thread
From: Vlastimil Babka (caster) @ 2011-10-29 14:36 UTC (permalink / raw
  To: gentoo-commits

caster      11/10/29 14:36:34

  Modified:             java-vm-2.eclass
  Log:
  Improve the postinst check for valid system VM to allow migrating icedtea6 to icedtea-6. Also use REPLACED_BY_VERSION to stop spamming about system VM removal on upgrades, for VM's migrated to EAPI=4.

Revision  Changes    Path
1.35                 eclass/java-vm-2.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-vm-2.eclass?rev=1.35&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-vm-2.eclass?rev=1.35&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-vm-2.eclass?r1=1.34&r2=1.35

Index: java-vm-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- java-vm-2.eclass	11 Oct 2011 10:55:06 -0000	1.34
+++ java-vm-2.eclass	29 Oct 2011 14:36:34 -0000	1.35
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.34 2011/10/11 10:55:06 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.35 2011/10/29 14:36:34 caster Exp $
 
 # -----------------------------------------------------------------------------
 # @eclass-begin
@@ -24,6 +24,7 @@
 
 JAVA_VM_CONFIG_DIR="/usr/share/java-config-2/vm"
 JAVA_VM_DIR="/usr/lib/jvm"
+JAVA_VM_SYSTEM="/etc/java-config-2/current-system-vm"
 JAVA_VM_BUILD_ONLY="${JAVA_VM_BUILD_ONLY:-FALSE}"
 
 EXPORT_FUNCTIONS pkg_setup pkg_postinst pkg_prerm pkg_postrm
@@ -37,9 +38,18 @@
 }
 
 java-vm-2_pkg_postinst() {
-	# Set the generation-2 system VM, if it isn't set
-	if [[ -z "$(java-config-2 -f)" ]]; then
+	# Set the generation-2 system VM, if it isn't set or the setting is invalid
+	# Note that we cannot rely on java-config here, as it will silently recognize
+	# e.g. icedtea6-bin as valid system VM if icedtea6 is set but invalid (e.g. due
+	# to the migration to icedtea-6)
+	if [[ ! -L "${JAVA_VM_SYSTEM}" ]]; then
 		java_set_default_vm_
+	else
+		local current_vm_path="$(readlink "${JAVA_VM_SYSTEM}")"
+		local current_vm="$(basename "${current_vm_path}")"
+		if [[ ! -L "${JAVA_VM_DIR}/${current_vm}" ]]; then
+			java_set_default_vm_
+		fi
 	fi
 
 	java-vm_check-nsplugin
@@ -85,7 +95,8 @@
 }
 
 java-vm-2_pkg_prerm() {
-	if [[ "$(java-config -f 2>/dev/null)" == "${VMHANDLE}" ]]; then
+	# Although REPLACED_BY_VERSION is EAPI=4, we shouldn't need to check EAPI for this use case
+	if [[ "$(java-config -f 2>/dev/null)" == "${VMHANDLE}" && -z "${REPLACED_BY_VERSION}" ]]; then
 		ewarn "It appears you are removing your system-vm!"
 		ewarn "Please run java-config -L to list available VMs,"
 		ewarn "then use java-config -S to set a new system-vm!"






^ permalink raw reply	[flat|nested] 14+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: java-vm-2.eclass
@ 2011-10-30 11:06 Vlastimil Babka (caster)
  0 siblings, 0 replies; 14+ messages in thread
From: Vlastimil Babka (caster) @ 2011-10-30 11:06 UTC (permalink / raw
  To: gentoo-commits

caster      11/10/30 11:06:38

  Modified:             java-vm-2.eclass
  Log:
  Remove false alarms on system-vm removal due to GENTOO_VM set for icedtea build.

Revision  Changes    Path
1.36                 eclass/java-vm-2.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-vm-2.eclass?rev=1.36&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-vm-2.eclass?rev=1.36&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-vm-2.eclass?r1=1.35&r2=1.36

Index: java-vm-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- java-vm-2.eclass	29 Oct 2011 14:36:34 -0000	1.35
+++ java-vm-2.eclass	30 Oct 2011 11:06:38 -0000	1.36
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.35 2011/10/29 14:36:34 caster Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.36 2011/10/30 11:06:38 caster Exp $
 
 # -----------------------------------------------------------------------------
 # @eclass-begin
@@ -96,7 +96,7 @@
 
 java-vm-2_pkg_prerm() {
 	# Although REPLACED_BY_VERSION is EAPI=4, we shouldn't need to check EAPI for this use case
-	if [[ "$(java-config -f 2>/dev/null)" == "${VMHANDLE}" && -z "${REPLACED_BY_VERSION}" ]]; then
+	if [[ "$(GENTOO_VM="" java-config -f 2>/dev/null)" == "${VMHANDLE}" && -z "${REPLACED_BY_VERSION}" ]]; then
 		ewarn "It appears you are removing your system-vm!"
 		ewarn "Please run java-config -L to list available VMs,"
 		ewarn "then use java-config -S to set a new system-vm!"






^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-10-30 11:06 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-29 14:36 [gentoo-commits] gentoo-x86 commit in eclass: java-vm-2.eclass Vlastimil Babka (caster)
  -- strict thread matches above, loose matches on Subject: below --
2011-10-30 11:06 Vlastimil Babka (caster)
2011-10-11 10:55 Fabian Groffen (grobian)
2011-09-01 14:15 Vlastimil Babka (caster)
2010-04-17  8:30 Petteri Raty (betelgeuse)
2010-03-27 22:23 Vlastimil Babka (caster)
2009-10-11 11:46 Markus Meier (maekke)
2009-04-17 22:50 Vlastimil Babka (caster)
2009-02-09 23:01 Vlastimil Babka (caster)
2009-02-08 21:42 Markus Meier (maekke)
2008-08-29 19:10 Vlastimil Babka (caster)
2008-03-03 17:20 Petteri Raty (betelgeuse)
2007-12-16 17:11 Vlastimil Babka (caster)
2007-10-09 10:18 Alistair Bush (ali_bush)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox