Mercurial > hg > portage
changeset 385:4885ef1fda56
Automated merge with https://localhost/hg/portage
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Wed, 18 Mar 2015 08:08:19 +0100 |
parents | 82fc17734d23 (current diff) d790e87dc863 (diff) |
children | 9d2a913e5010 |
files | |
diffstat | 3 files changed, 229 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dev-java/maven/Manifest Wed Mar 18 08:08:19 2015 +0100 @@ -0,0 +1,3 @@ +AUX maven 5108 SHA256 ddce53375271fd6e9515350083fd4c97ae86213e5bdb9984faf770ccdac1ff10 SHA512 91901a50153e148b2799b8a1298b4ef26ac07af4b7bbb3ae5c76edccdc8efe41b5613ffd78bd1dd917a78fae8086cdbe737096ff2d4912d0333fff206026dd0b WHIRLPOOL 6f281693bcf3201e9aa245494dd4dec6b623adf19bf89a44461eadb27e6747c590cebe7c73b5f16b77f5eaa04991236ce6820cd0e5980d7e109f110338c6045c +DIST apache-maven-3.2.5-bin.tar.gz 7956528 SHA256 8c190264bdf591ff9f1268dc0ad940a2726f9e958e367716a09b8aaa7e74a755 SHA512 0cdbf4c1e045ac7f96c176058f19ebb838bd46caadc4fb479e11eda67efbb66218fe67c370ddec6d2e4d91091ac9e81ff9eea8d64174cbe1e6d5f7e15962cfc5 WHIRLPOOL 79feb96c42dfd2235b0513ce50cf3d684224dcbccb290d2d80565648a6b30af8961b2e3d02d38818ca5c89386c5a25f2a8025e696279a339844535c2d2733f96 +EBUILD maven-3.2.5.ebuild 1198 SHA256 56ea6f674eda20ec75de1d50258353091edeff10addde343305ee8fabdd5f816 SHA512 027c5a7e10da7d39d308afa1f65fb55aff03fd2a4a24f4cff951f7c568c641edbbb45af56d9088ed01e1f74c5f2f4357801a7235543554818facad52dd30102e WHIRLPOOL f01297d6df6e2d566ebf90f28fd93d9a016e9f29ea94019601e581d6979a7a700e5e499e7274dc6bedb0db829c1814259d89183cc2b7ff47aadb4a4d4e83a6d2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dev-java/maven/files/maven Wed Mar 18 08:08:19 2015 +0100 @@ -0,0 +1,168 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Copyright 2001-2004 The Apache Software Foundation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------- + +# Copyright (c) 2001-2002 The Apache Software Foundation. All rights +# reserved. + +FOREHEAD_VERSION=1.0-beta-5 + +if [ -z "$MAVEN_OPTS" ] ; then + MAVEN_OPTS="-Xmx256m" +fi + +if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +case "`uname`" in + CYGWIN*) cygwin=true ;; + Darwin*) darwin=true + if [ -z "$JAVA_VERSION" ] ; then + JAVA_VERSION="CurrentJDK" + else + echo "Using Java version: $JAVA_VERSION" + fi + if [ -z "$JAVA_HOME" ] ; then + JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home + fi + ;; +esac + + # try a couple ways to find MAVEN_HOME + + if [ -z ${MAVEN_HOME} ] && [ -d /opt/maven ] ; then + MAVEN_HOME=/opt/maven + fi + + if [ -z ${MAVEN_HOME} ] && [ -d "$HOME/maven" ] ; then + MAVEN_HOME="$HOME/maven" + fi + + # try to load from env.d file + if [ -z ${MAVEN_HOME} ] && [ -f /etc/env.d/25maven ]; then + MAVEN_HOME=$(source /etc/env.d/25maven; echo ${MAVEN_HOME}) + fi + + # try to figure it out from how this script was invoked + if [ -z ${MAVEN_HOME} ]; then + ## resolve links - $0 may be a link to maven's home + PRG=$0 + progname=`basename $0` + saveddir=`pwd` + + # need this for relative symlinks + cd `dirname $PRG` + + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '.*/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname $PRG`/$link" + fi + done + + MAVEN_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + MAVEN_HOME=`cd "$MAVEN_HOME" && pwd` + + cd $saveddir + fi + +[ -z "${MAVEN_HOME}" ] && exit "Was unable to determine MAVEN_HOME" + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$MAVEN_HOME" ] && + MAVEN_HOME=`cygpath --unix "$MAVEN_HOME"` + [ -n "$MAVEN_HOME_LOCAL" ] && + MAVEN_HOME_LOCAL=`cygpath --unix "$MAVEN_HOME_LOCAL"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD=java + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." + echo " We cannot execute $JAVACMD" + exit +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." + echo " If build fails because sun.* classes could not be found" + echo " you will need to set the JAVA_HOME environment variable" + echo " to the installation directory of java." +fi + +MAVEN_ENDORSED="${JAVA_HOME}/lib/endorsed:${MAVEN_HOME}/lib/endorsed" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$MAVEN_HOME" ] && + MAVEN_HOME=`cygpath --path --windows "$MAVEN_HOME"` + [ -n "$MAVEN_HOME_LOCAL" ] && + MAVEN_HOME_LOCAL=`cygpath --path --windows "$MAVEN_HOME_LOCAL"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$HOME" ] && + HOME=`cygpath --path --windows "$HOME"` + [ -n "$MAVEN_ENDORSED" ] && + MAVEN_ENDORSED=`cygpath --path --windows "$MAVEN_ENDORSED"` +fi + +# For Darwin, use classes.jar for TOOLS_JAR +TOOLS_JAR="${JAVA_HOME}/lib/tools.jar" +if $darwin; then + TOOLS_JAR="/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Classes/classes.jar" +fi + +MAIN_CLASS=com.werken.forehead.Forehead +if [ -n "$MAVEN_HOME_LOCAL" ]; then + MAVEN_OPTS="$MAVEN_OPTS -Dmaven.home.local=${MAVEN_HOME_LOCAL}" +fi + +"$JAVACMD" \ + $MAVEN_OPTS \ + -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl \ + -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl \ + "-Djava.endorsed.dirs=${MAVEN_ENDORSED}" \ + -classpath "${MAVEN_HOME}/lib/forehead-${FOREHEAD_VERSION}.jar" \ + "-Dforehead.conf.file=${MAVEN_HOME}/bin/forehead.conf" \ + "-Dtools.jar=$TOOLS_JAR" \ + "-Dmaven.home=${MAVEN_HOME}" \ + $MAIN_CLASS "$@" +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dev-java/maven/maven-3.2.5.ebuild Wed Mar 18 08:08:19 2015 +0100 @@ -0,0 +1,58 @@ + +EAPI="5" + +inherit java-pkg-2 + +MY_PN=apache-${PN%%-bin} +MY_PV=${PV/_alpha/-alpha-} +MY_P="${MY_PN}-${MY_PV}" +MY_MV="${PV%%.*}" + +DESCRIPTION="Project Management and Comprehension Tool for Java" +SRC_URI="mirror://apache/maven/maven-${MY_MV}/${PV}/binaries/${MY_P}-bin.tar.gz" +HOMEPAGE="http://maven.apache.org/" + +LICENSE="Apache-2.0" +SLOT="3.2" +KEYWORDS="amd64 x86" + +DEPEND="|| ( app-admin/eselect-java app-admin/eselect-maven )" + +RDEPEND=">=virtual/jdk-1.5 + ${DEPEND}" + +S="${WORKDIR}/${MY_P}" + +MAVEN=${PN}-${SLOT} +MAVEN_SHARE="/usr/share/${MAVEN}" + +java_prepare() { + rm -v "${S}"/bin/*.bat || die + chmod 644 "${S}"/boot/*.jar "${S}"/lib/*.jar "${S}"/conf/settings.xml || die +} + +src_install() { + dodir "${MAVEN_SHARE}" + + cp -Rp bin boot conf lib "${ED}/${MAVEN_SHARE}" || die "failed to copy" + + java-pkg_regjar "${ED}/${MAVEN_SHARE}"/boot/*.jar + java-pkg_regjar "${ED}/${MAVEN_SHARE}"/lib/*.jar + + dodoc README.txt + + dodir /usr/bin + dosym "${MAVEN_SHARE}/bin/mvn" /usr/bin/mvn-${SLOT} + + # See bug #342901. + echo "CONFIG_PROTECT=\"${MAVEN_SHARE}/conf\"" > "${T}/25${MAVEN}" || die + doenvd "${T}/25${MAVEN}" +} + +pkg_postinst() { + eselect maven update mvn-${SLOT} +} + +pkg_postrm() { + eselect maven update +}