Make /etc/profile.d/java-config-2.sh POSIX compliant. Fixes bug #169925. Thanks to...
authorPetteri Räty <betelgeuse@gentoo.org>
Fri, 16 Mar 2007 11:13:16 +0000 (11:13 +0000)
committerPetteri Räty <betelgeuse@gentoo.org>
Fri, 16 Mar 2007 11:13:16 +0000 (11:13 +0000)
Package-Manager: portage-2.1.2.2

dev-java/java-config/ChangeLog
dev-java/java-config/Manifest
dev-java/java-config/files/digest-java-config-2.0.31-r5 [new file with mode: 0644]
dev-java/java-config/files/java-config-2.profiled.sh-r1 [new file with mode: 0644]
dev-java/java-config/java-config-2.0.31-r5.ebuild [new file with mode: 0644]

index e68024e4e4993f71a368c3d2a9989744d718544b..cc3ed0413b5fc4ee071c7679855e4e4553f49561 100644 (file)
@@ -1,6 +1,13 @@
 # ChangeLog for dev-java/java-config
 # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/java-config/ChangeLog,v 1.146 2007/03/09 14:01:43 betelgeuse Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/java-config/ChangeLog,v 1.147 2007/03/16 11:13:16 betelgeuse Exp $
+
+*java-config-2.0.31-r5 (16 Mar 2007)
+
+  16 Mar 2007; Petteri Räty <betelgeuse@gentoo.org>
+  +files/java-config-2.profiled.sh-r1, +java-config-2.0.31-r5.ebuild:
+  Make /etc/profile.d/java-config-2.sh POSIX compliant. Fixes bug #169925.
+  Thanks to Karl Schulz <g59y7jb02@sneakemail.com>.
 
   09 Mar 2007; Petteri Räty <betelgeuse@gentoo.org>
   java-config-1.3.7.ebuild, java-config-2.0.31.ebuild,
index c39ca65b1c3d164d4477cbac5b9d213218d3b5fc..71beff180e75b131744fdbfbd55e5985bcfe1d2c 100644 (file)
@@ -29,6 +29,10 @@ AUX java-config-2.profiled.sh 769 RMD160 c99c573ff61a4a0ba10cfdee97e51ac6f090d09
 MD5 ce571e951b8d2d1f9f3be5c179f4e9b8 files/java-config-2.profiled.sh 769
 RMD160 c99c573ff61a4a0ba10cfdee97e51ac6f090d091 files/java-config-2.profiled.sh 769
 SHA256 53f17d1a2ed09ff5aacbdc182ca83d7811fded39126cd4526dfde41fce520db3 files/java-config-2.profiled.sh 769
+AUX java-config-2.profiled.sh-r1 1139 RMD160 83dbba34e93400fd94d901fdf024a44736e079c5 SHA1 ef28a1d699d198f84b6c31e9246d516bdf62fac7 SHA256 10405838ef2a271c9721ead35cc044f1fd68007e631f7dbb7e507fc7bec33463
+MD5 f7056f9411853e9c305f6529b709b45f files/java-config-2.profiled.sh-r1 1139
+RMD160 83dbba34e93400fd94d901fdf024a44736e079c5 files/java-config-2.profiled.sh-r1 1139
+SHA256 10405838ef2a271c9721ead35cc044f1fd68007e631f7dbb7e507fc7bec33463 files/java-config-2.profiled.sh-r1 1139
 AUX jdk-defaults-x86-fbsd.conf 61 RMD160 8bb737a332b445c375aa955f8961eaf587f3903a SHA1 73428cb74571048a86bd9d60fdf64c555a659c7d SHA256 e92e1111a26364f915a6588701f94527f7b3f25bb381edcd490a495393a9b598
 MD5 f4a4c2656a71a460f2515085cd37f55a files/jdk-defaults-x86-fbsd.conf 61
 RMD160 8bb737a332b445c375aa955f8961eaf587f3903a files/jdk-defaults-x86-fbsd.conf 61
@@ -52,14 +56,18 @@ EBUILD java-config-2.0.31-r4.ebuild 1966 RMD160 53011121baac83625a7f9ecc8e2d4d0d
 MD5 2c8fa587f36e76ccca2c6061ee1ae115 java-config-2.0.31-r4.ebuild 1966
 RMD160 53011121baac83625a7f9ecc8e2d4d0d00120173 java-config-2.0.31-r4.ebuild 1966
 SHA256 bab4994f48199ea7b921307eab258780bc120935bcfe15b9e8fe9e940951d1ea java-config-2.0.31-r4.ebuild 1966
+EBUILD java-config-2.0.31-r5.ebuild 1969 RMD160 ea6fb36fef997a1ce3ec008e6e4a11557824b8a8 SHA1 23045c86291c8179637057d14cedf23aacf6ec4c SHA256 45a000cf7151ae5ed238477a680f218ff4dd5d48992125477ee33ae4d818939e
+MD5 0f0061b316d454e3825e2a2c678596b5 java-config-2.0.31-r5.ebuild 1969
+RMD160 ea6fb36fef997a1ce3ec008e6e4a11557824b8a8 java-config-2.0.31-r5.ebuild 1969
+SHA256 45a000cf7151ae5ed238477a680f218ff4dd5d48992125477ee33ae4d818939e java-config-2.0.31-r5.ebuild 1969
 EBUILD java-config-2.0.31.ebuild 1768 RMD160 90a7dddfe4a02798f9bbf184ec9da7035f3c04b7 SHA1 ab42bab866354e4ede0ffa47c3beefad46e7a35d SHA256 542b7c046c86437bdc294c40b5812be5a03e0fa1fa677a4828a919bc8e83c8e7
 MD5 3e7277b17ad060097322ffc056ddacc4 java-config-2.0.31.ebuild 1768
 RMD160 90a7dddfe4a02798f9bbf184ec9da7035f3c04b7 java-config-2.0.31.ebuild 1768
 SHA256 542b7c046c86437bdc294c40b5812be5a03e0fa1fa677a4828a919bc8e83c8e7 java-config-2.0.31.ebuild 1768
-MISC ChangeLog 27742 RMD160 4e0613100994df85bbab488b80b5c8a18fc4910b SHA1 28114c3184a79d0ab8c7989b48867bde031f3ea2 SHA256 8a87c179edf8ddcaf2d6bb608fe0f8b45d85ec5cd40a6f02f925b62021d4033f
-MD5 ba6da137f487d5403454e9e92e67fa94 ChangeLog 27742
-RMD160 4e0613100994df85bbab488b80b5c8a18fc4910b ChangeLog 27742
-SHA256 8a87c179edf8ddcaf2d6bb608fe0f8b45d85ec5cd40a6f02f925b62021d4033f ChangeLog 27742
+MISC ChangeLog 28031 RMD160 a54fb6772d0f86a52dddc4d22069a77f2a6a0e4b SHA1 8165e6fa2699bbee271343bf933afabff844566f SHA256 e119dd0e4cf07249e6d7c5d1dcd2510c894fb3e5f623af4189d10d6bb473d8f0
+MD5 4a6f5fc46b48f04756986ed89a786dc7 ChangeLog 28031
+RMD160 a54fb6772d0f86a52dddc4d22069a77f2a6a0e4b ChangeLog 28031
+SHA256 e119dd0e4cf07249e6d7c5d1dcd2510c894fb3e5f623af4189d10d6bb473d8f0 ChangeLog 28031
 MISC metadata.xml 482 RMD160 b060f8a2492170d8513e1b2d03512d8b565b5045 SHA1 b154d3e425be12942f183a7ad1a37fecc215e4b4 SHA256 f80d3cd5afabd0dc4d177925c3715c464288e5ec3ed1ca809a7f7a66ee3907a5
 MD5 b4d3814b9ce4be88a25d99b3cfe2c076 metadata.xml 482
 RMD160 b060f8a2492170d8513e1b2d03512d8b565b5045 metadata.xml 482
@@ -79,10 +87,13 @@ SHA256 fb9fdda52fe83303015b76545968d59324e286959171bb5dc01dd094e11cd8e0 files/di
 MD5 c38ff0fcf6539f0bf10d2750b97c1dae files/digest-java-config-2.0.31-r4 256
 RMD160 dcdc28e10c1f81f64e372c24f7fd50330fcf4b15 files/digest-java-config-2.0.31-r4 256
 SHA256 fb9fdda52fe83303015b76545968d59324e286959171bb5dc01dd094e11cd8e0 files/digest-java-config-2.0.31-r4 256
+MD5 c38ff0fcf6539f0bf10d2750b97c1dae files/digest-java-config-2.0.31-r5 256
+RMD160 dcdc28e10c1f81f64e372c24f7fd50330fcf4b15 files/digest-java-config-2.0.31-r5 256
+SHA256 fb9fdda52fe83303015b76545968d59324e286959171bb5dc01dd094e11cd8e0 files/digest-java-config-2.0.31-r5 256
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.2 (GNU/Linux)
+Version: GnuPG v2.0.3 (GNU/Linux)
 
-iD8DBQFF8WjPcxLzpIGCsLQRAtUvAJ0YrdQ2pa856n0gnnlhj1p7jQhMWACfb6Bk
-xeCiuAL52g/U/2X2ltdsSE4=
-=8Rk5
+iD8DBQFF+nvScxLzpIGCsLQRAjdXAJsFVqqN5EgNkJVqsyKPY4E8WS6MmQCfZt7+
+y9skp1/tkBiJm4fKuon7IoE=
+=2Ug5
 -----END PGP SIGNATURE-----
diff --git a/dev-java/java-config/files/digest-java-config-2.0.31-r5 b/dev-java/java-config/files/digest-java-config-2.0.31-r5
new file mode 100644 (file)
index 0000000..393d9db
--- /dev/null
@@ -0,0 +1,3 @@
+MD5 36b7893b20b9f4b6f0af6dd632703745 java-config-2.0.31.tar.bz2 17001
+RMD160 4b3d8362538b435a642312ee7289824d6662e309 java-config-2.0.31.tar.bz2 17001
+SHA256 314ec1783da8190d60e757aaef2af8eae7281c3c9754024e3e59643ce7a30752 java-config-2.0.31.tar.bz2 17001
diff --git a/dev-java/java-config/files/java-config-2.profiled.sh-r1 b/dev-java/java-config/files/java-config-2.profiled.sh-r1
new file mode 100644 (file)
index 0000000..df82327
--- /dev/null
@@ -0,0 +1,32 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/dev-java/java-config/files/java-config-2.profiled.sh-r1,v 1.1 2007/03/16 11:13:16 betelgeuse Exp $
+
+# If we have a current-user-vm (and aren't root)... set it to JAVA_HOME
+gentoo_user_vm="${HOME}/.gentoo/java-config-2/current-user-vm"
+gentoo_system_vm="/etc/java-config-2/current-system-vm"
+
+# Please make sure that this script is POSIX compliant
+# See https://bugs.gentoo.org/show_bug.cgi?id=169925
+# for more details"
+
+if [ -z "${UID}" ] ; then
+       # id lives in /usr/bin which might not be mounted
+       if type id >/dev/null 2>/dev/null ; then
+               user_id=$(id -u)
+       else
+               [ "${USER}" = "root" ] && user_id=0
+       fi
+fi
+
+# The root user uses the system vm
+if [ "${user_id}" != 0 -a -L "${gentoo_user_vm}" ]; then
+       export JAVA_HOME=${gentoo_user_vm}
+# Otherwise set to the current system vm
+elif [ -L /etc/java-config-2/current-system-vm ]; then
+       export JAVA_HOME=${gentoo_system_vm}
+fi
+
+export JDK_HOME=${JAVA_HOME}
+export JAVAC=${JDK_HOME}/bin/javac
+unset gentoo_user_vm gentoo_system_vm user_id
diff --git a/dev-java/java-config/java-config-2.0.31-r5.ebuild b/dev-java/java-config/java-config-2.0.31-r5.ebuild
new file mode 100644 (file)
index 0000000..a129fe1
--- /dev/null
@@ -0,0 +1,61 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/java-config/java-config-2.0.31-r5.ebuild,v 1.1 2007/03/16 11:13:16 betelgeuse Exp $
+
+inherit base distutils eutils
+
+DESCRIPTION="Java environment configuration tool"
+HOMEPAGE="http://www.gentoo.org/proj/en/java/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="2"
+KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
+IUSE=""
+
+DEPEND="dev-lang/python"
+RDEPEND="${DEPEND}
+       dev-java/java-config-wrapper"
+
+src_install() {
+       distutils_src_install
+
+       insinto /usr/share/java-config-2/config/
+       for i in alpha amd64 hppa ia64 ppc ppc64 sparc x86 x86-fbsd; do
+               if use ${i}; then
+                       newins config/jdk-defaults-${i}.conf jdk-defaults.conf || die "arch     config not found"
+               fi
+       done
+
+       for tool in $(< config/symlink-tools); do
+               dosym /usr/bin/run-java-tool /usr/bin/${tool}
+       done
+
+       # Install profile.d for setting JAVA_HOME
+       dodir /etc/profile.d
+       exeinto /etc/profile.d
+       newexe ${FILESDIR}/${PN}-${SLOT}.profiled.sh-r1 ${PN}-${SLOT}.sh || die "newexe failed"
+       newexe ${FILESDIR}/${PN}-${SLOT}.profiled.csh ${PN}-${SLOT}.csh || die "newexe failed"
+
+       insinto /etc/revdep-rebuild/
+       doins "${FILESDIR}/60-java" || die
+}
+
+pkg_postrm() {
+       python_mod_cleanup /usr/share/java-config-2/pym/java_config
+}
+
+pkg_postinst() {
+       python_mod_optimize /usr/share/java-config-2/pym/java_config
+
+       elog "The way Java is handled on Gentoo has been recently updated."
+       elog "If you have not done so already, you should follow the"
+       elog "instructions available at:"
+       elog "\thttp://www.gentoo.org/proj/en/java/java-upgrade.xml"
+       elog
+       elog "While we are moving towards the new Java system, we only allow"
+       elog "1.3 or 1.4 JDKs to be used with java-config-1 to ensure"
+       elog "backwards compatibility with the old system."
+       elog "For more details about this, please see:"
+       elog "\thttp://www.gentoo.org/proj/en/java/why-we-need-java-14.xml"
+}