From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SeNEM-0007pV-Me for garchives@archives.gentoo.org; Tue, 12 Jun 2012 09:17:42 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E7146E056C; Tue, 12 Jun 2012 09:17:35 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id A8888E056C for ; Tue, 12 Jun 2012 09:17:35 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DF9051B4022 for ; Tue, 12 Jun 2012 09:17:34 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 2309) id 962B12004B; Tue, 12 Jun 2012 09:17:33 +0000 (UTC) From: "Ralph Sennhauser (sera)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, sera@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog java-vm-2.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: ChangeLog java-vm-2.eclass X-VCS-Directories: eclass X-VCS-Committer: sera X-VCS-Committer-Name: Ralph Sennhauser Content-Type: text/plain; charset=utf8 Message-Id: <20120612091733.962B12004B@flycatcher.gentoo.org> Date: Tue, 12 Jun 2012 09:17:33 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 1e5c8ec4-2346-4a92-991d-481831795227 X-Archives-Hash: 421eeb5b7652e7b848074b08480cad34 sera 12/06/12 09:17:33 Modified: ChangeLog java-vm-2.eclass Log: Convert docs to eclass-manpages. Revision Changes Path 1.311 eclass/ChangeLog file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r= ev=3D1.311&view=3Dmarkup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r= ev=3D1.311&content-type=3Dtext/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r= 1=3D1.310&r2=3D1.311 Index: ChangeLog =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v retrieving revision 1.310 retrieving revision 1.311 diff -u -r1.310 -r1.311 --- ChangeLog 11 Jun 2012 19:46:32 -0000 1.310 +++ ChangeLog 12 Jun 2012 09:17:33 -0000 1.311 @@ -1,6 +1,9 @@ # ChangeLog for eclass directory # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.310 2012/06/11 1= 9:46:32 sera Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.311 2012/06/12 0= 9:17:33 sera Exp $ + + 12 Jun 2012; Ralph Sennhauser java-vm-2.eclass: + Convert docs to eclass-manpages. =20 11 Jun 2012; Ralph Sennhauser java-vm-2.eclass: Add app-admin/eselect-java as preferred provider of eselect java-vm. 1.44 eclass/java-vm-2.eclass file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-vm-2.e= class?rev=3D1.44&view=3Dmarkup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-vm-2.e= class?rev=3D1.44&content-type=3Dtext/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-vm-2.e= class?r1=3D1.43&r2=3D1.44 Index: java-vm-2.eclass =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- java-vm-2.eclass 11 Jun 2012 19:46:32 -0000 1.43 +++ java-vm-2.eclass 12 Jun 2012 09:17:33 -0000 1.44 @@ -1,19 +1,19 @@ # Copyright 1999-2012 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.43 2012/0= 6/11 19:46:32 sera Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.44 2012/0= 6/12 09:17:33 sera Exp $ =20 -# ----------------------------------------------------------------------= ------- -# @eclass-begin -# @eclass-shortdesc Java Virtual Machine eclass -# @eclass-maintainer java@gentoo.org -# +# @ECLASS: java-vm-2.eclass +# @MAINTAINER: +# java@gentoo.org +# @BLURB: Java Virtual Machine eclass +# @DESCRIPTION: # This eclass provides functionality which assists with installing # virtual machines, and ensures that they are recognized by java-config. -# -# ----------------------------------------------------------------------= ------- =20 inherit eutils fdo-mime multilib pax-utils prefix =20 +EXPORT_FUNCTIONS pkg_setup pkg_postinst pkg_prerm pkg_postrm + RDEPEND=3D" =3Ddev-java/java-config-2* || ( app-admin/eselect-java /dev/null)" =3D=3D "${VMHANDLE= }" && -z "${REPLACED_BY_VERSION}" ]]; then @@ -103,16 +153,34 @@ fi } =20 + +# @FUNCTION: java-vm-2_pkg_postrm +# @DESCRIPTION: +# default pkg_postrm +# +# Update mime database. + java-vm-2_pkg_postrm() { fdo-mime_desktop_database_update } =20 + +# @FUNCTION: java_set_default_vm_ +# @INTERNAL +# @DESCRIPTION: +# Set system-vm. + java_set_default_vm_() { java-config-2 --set-system-vm=3D"${VMHANDLE}" =20 einfo " ${P} set as the default system-vm." } =20 + +# @FUNCTION: get_system_arch +# @DESCRIPTION: +# Get Java specific arch name. + get_system_arch() { local sarch sarch=3D$(echo ${ARCH} | sed -e s/[i]*.86/i386/ -e s/x86_64/amd64/ -e s= /sun4u/sparc/ -e s/sparc64/sparc/ -e s/arm.*/arm/ -e s/sa110/arm/) @@ -122,6 +190,11 @@ echo ${sarch} } =20 + +# @FUNCTION: set_java_env +# @DESCRIPTION: +# Installs a vm env file. + # TODO rename to something more evident, like install_env_file set_java_env() { debug-print-function ${FUNCNAME} $* @@ -175,9 +248,9 @@ || die "Failed to make VM symlink at ${JAVA_VM_DIR}/${VMHANDLE}" } =20 -# ----------------------------------------------------------------------= ------- -# @ebuild-function java-vm_set-pax-markings -# + +# @FUNCTION: java-vm_set-pax-markings +# @DESCRIPTION: # Set PaX markings on all JDK/JRE executables to allow code-generation o= n # the heap by the JIT compiler. #=20 @@ -186,12 +259,15 @@ # generating cacerts. Otherwise a PaX enabled kernel will kill the VM. # Bug #215225 #389751 # -# @example -# java-vm_set-pax-markings "${S}" -# java-vm_set-pax-markings "${ED}"/opt/${P} +# @CODE +# Parameters: +# $1 - JDK/JRE base directory. # -# @param $1 - JDK/JRE base directory. -# ----------------------------------------------------------------------= ------- +# Examples: +# java-vm_set-pax-markings "${S}" +# java-vm_set-pax-markings "${ED}"/opt/${P} +# @CODE + java-vm_set-pax-markings() { debug-print-function ${FUNCNAME} "$*" [[ $# -ne 1 ]] && die "${FUNCNAME}: takes exactly one argument" @@ -209,19 +285,23 @@ pax-mark ${pax_markings} $(list-paxables "${executables[@]}") } =20 -# ----------------------------------------------------------------------= ------- -# @ebuild-function java-vm_revdep-mask -# + +# @FUNCTION: java-vm_revdep-mask +# @DESCRIPTION: # Installs a revdep-rebuild control file which SEARCH_DIR_MASK set to th= e path # where the VM is installed. Prevents pointless rebuilds - see bug #1779= 25. # Also gives a notice to the user. # -# @example -# java-vm_revdep-mask -# java-vm_revdep-mask /path/to/jdk/ +# @CODE +# Parameters: +# $1 - Path of the VM (defaults to /opt/${P} if not set) +# +# Examples: +# java-vm_revdep-mask +# java-vm_revdep-mask /path/to/jdk/ # -# @param $1 - Path of the VM (defaults to /opt/${P} if not set) -# ----------------------------------------------------------------------= -------- +# @CODE + java-vm_revdep-mask() { if has ${EAPI:-0} 0 1 2 && ! use prefix; then ED=3D"${D}" @@ -234,15 +314,17 @@ echo "SEARCH_DIRS_MASK=3D\"${VMROOT}\""> "${ED}/etc/revdep-rebuild/61-$= {VMHANDLE}" } =20 -# ----------------------------------------------------------------------= ------- -# @ebuild-function java-vm_sandbox-predict -# + +# @FUNCTION: java-vm_sandbox-predict +# @DESCRIPTION: # Install a sandbox control file. Specified paths won't cause a sandbox # violation if opened read write but no write takes place. See bug 38893= 7#c1 # -# @example -# java-vm_sandbox-predict /dev/random /proc/self/coredump_filter -# ----------------------------------------------------------------------= ------- +# @CODE +# Examples: +# java-vm_sandbox-predict /dev/random /proc/self/coredump_filter +# @CODE + java-vm_sandbox-predict() { debug-print-function ${FUNCNAME} "$*" [[ -z "${1}" ]] && die "${FUNCNAME} takes at least one argument" @@ -258,11 +340,22 @@ || die "Failed to write sandbox control file" } =20 + +# @FUNCTION: java_get_plugin_dir_ +# @INTERNAL +# @DESCRIPTION: +# Get the java plugin dir. + java_get_plugin_dir_() { has ${EAPI:-0} 0 1 2 && ! use prefix && EPREFIX=3D echo "${EPREFIX}"/usr/$(get_libdir)/nsbrowser/plugins } =20 + +# @FUNCTION: install_mozilla_plugin +# @DESCRIPTION: +# Register a netscape java-plugin. + install_mozilla_plugin() { local plugin=3D"${1}" local variant=3D"${2}" @@ -281,10 +374,15 @@ dosym "${plugin}" "${plugin_dir}/${VMHANDLE}${variant}-javaplugin.so" } =20 + +# @FUNCTION: java_mozilla_clean_ +# @INTERNAL +# @DESCRIPTION: +# Because previously some ebuilds installed symlinks outside of pkg_inst= all +# and are left behind, which forces you to manualy remove them to select= the +# jdk/jre you want to use for java + java_mozilla_clean_() { - # Because previously some ebuilds installed symlinks outside of pkg_ins= tall - # and are left behind, which forces you to manualy remove them to selec= t the - # jdk/jre you want to use for java local plugin_dir=3D$(java_get_plugin_dir_) for file in ${plugin_dir}/javaplugin_*; do rm -f ${file} @@ -293,7 +391,3 @@ rm -f ${file} done } - -# ----------------------------------------------------------------------= -------- -# @eclass-end -# ----------------------------------------------------------------------= --------