diff options
author | Karl Trygve Kalleberg <karltk@gentoo.org> | 2004-05-05 21:33:29 +0000 |
---|---|---|
committer | Karl Trygve Kalleberg <karltk@gentoo.org> | 2004-05-05 21:33:29 +0000 |
commit | 6739753111ed52babc5c768d536152cb779cc762 (patch) | |
tree | 7db9af72a669e2dbfae416f6853c391b756bd3e7 /dev-java/groovy | |
parent | Fix for bug #50100. Thanks to Antonio <netbix@netbix.net> (Manifest recommit) (diff) | |
download | gentoo-2-6739753111ed52babc5c768d536152cb779cc762.tar.gz gentoo-2-6739753111ed52babc5c768d536152cb779cc762.tar.bz2 gentoo-2-6739753111ed52babc5c768d536152cb779cc762.zip |
Added cli scripts. Fixes #45157.
Diffstat (limited to 'dev-java/groovy')
-rw-r--r-- | dev-java/groovy/ChangeLog | 10 | ||||
-rw-r--r-- | dev-java/groovy/files/basescript-1.0_beta4-r1 | 109 | ||||
-rw-r--r-- | dev-java/groovy/files/build.xml-1.0_beta4 | 6 | ||||
-rw-r--r-- | dev-java/groovy/files/build.xml-1.0_beta4-r1 | 165 | ||||
-rw-r--r-- | dev-java/groovy/files/digest-groovy-1.0_beta4-r1 | 1 | ||||
-rw-r--r-- | dev-java/groovy/groovy-1.0_beta4-r1.ebuild | 126 |
6 files changed, 413 insertions, 4 deletions
diff --git a/dev-java/groovy/ChangeLog b/dev-java/groovy/ChangeLog index 14d65cc21554..1183da9b18f2 100644 --- a/dev-java/groovy/ChangeLog +++ b/dev-java/groovy/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for dev-java/xmojo-bin # Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed unde the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/groovy/ChangeLog,v 1.1 2004/05/03 18:16:35 karltk Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-java/groovy/ChangeLog,v 1.2 2004/05/05 21:33:29 karltk Exp $ + +*groovy-1.0_beta4-r1 (05 May 2004) + + 05 May 2004; Karl Trygve Kalleberg <karltk@gentoo.org> + groovy-1.0_beta4-r1.ebuild files/basescript-1.0_beta4-r1 + files/build.xml-1.0_beta4-r1 files/digest-groovy-1.0_beta4-r1: + A slew of fixes. Added CLI scripts. groovyConsole does not work + yet, dunno exactly why. *groovy-1.0_beta4 (03 May 2004) diff --git a/dev-java/groovy/files/basescript-1.0_beta4-r1 b/dev-java/groovy/files/basescript-1.0_beta4-r1 new file mode 100644 index 000000000000..ce3fb89be469 --- /dev/null +++ b/dev-java/groovy/files/basescript-1.0_beta4-r1 @@ -0,0 +1,109 @@ +#!/bin/sh +############################################################################## +## ## +## Groovy JVM Bootstrap for UN*X ## +## ## +############################################################################## + +## +## $Header: /var/cvsroot/gentoo-x86/dev-java/groovy/files/basescript-1.0_beta4-r1,v 1.1 2004/05/05 21:33:29 karltk Exp $ +## +## Modified for Gentoo by Karl Trygve Kalleberg <karltk@gentoo.org> +## + +PROGNAME=`basename "$0"` +DIRNAME=`dirname "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that +MAX_FD="maximum" + +# External dependencies +asm_classpath="@asm_classpath@" +bsf_classpath="@bsf_classpath@" +classworlds_classpath="@classworlds_classpath@" +commons_cli_classpath="@commons_cli_classpath@" +mockobjects_classpath="@mockobjects_classpath@" +xerces_classpath="@xerces_classpath@" +xmojo_classpath="@xmojo_classpath@" + +final_classpath="${asm_classpath}:${bsf_classpath}:${classworlds_classpath}:${commons_cli_classpath}:${mockobjects_classpath}:${xerces_classpath}:${xmojo_classpath}" + +GROOVY_HOME="@groovy-home@" + +warn() { + echo "${PROGNAME}: $*" +} + +die() { + warn "$*" + exit 1 +} + +# Use default grok-classworlds config +if [ -z "$CLASSWORLDS_CONF" ]; then + CLASSWORLDS_CONF="$GROOVY_HOME/conf/@scriptname@-classworlds.conf" +fi + +# Determine the Java command to use to start the JVM +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 + die "JAVA_HOME is not defined correctly; can not execute: $JAVACMD" +fi +if [ -z "$JAVA_HOME" ] ; then + warn "JAVA_HOME environment variable is not set" +fi + +# Increase the maximum file descriptors if we can +if [ "$cygwin" = "false" ]; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ]; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then + # use the system max + MAX_FD="$MAX_FD_LIMIT" + fi + + ulimit -n $MAX_FD + if [ $? -ne 0 ]; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query system maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# Setup Profiler +useprofiler=false +if [ "x$PROFILER" != "x" ]; then + if [ -r "$PROFILER" ]; then + . $PROFILER + useprofiler=true + else + die "Profiler file not found: $PROFILER" + fi +fi + +TOOLS_JAR="$JAVA_HOME/lib/tools.jar" + +# Start the Profiler or the JVM +if $useprofiler; then + runProfiler +else + exec $JAVACMD $JAVA_OPTS \ + -classpath "${final_classpath}" \ + -Dprogram.name="$PROGNAME" \ + -Dclassworlds.conf="$CLASSWORLDS_CONF" \ + -Dgroovy.home="$GROOVY_HOME" \ + -Dtools.jar="$TOOLS_JAR" \ + org.codehaus.classworlds.Launcher "$@" +fi diff --git a/dev-java/groovy/files/build.xml-1.0_beta4 b/dev-java/groovy/files/build.xml-1.0_beta4 index b6e740d6f385..be7639ede75c 100644 --- a/dev-java/groovy/files/build.xml-1.0_beta4 +++ b/dev-java/groovy/files/build.xml-1.0_beta4 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<!--build.xml generated by maven from project.xml version 1.0-beta-2 +<!--build.xml generated by maven from project.xml version 1.0-beta-4 on date December 23 2003, time 1605--> <project default="jar" name="groovy" basedir="."> @@ -18,7 +18,7 @@ </property> <property name="javadocdir" value="dist/docs/api"> </property> - <property name="final.name" value="groovy-1.0-beta-2"> + <property name="final.name" value="groovy-1.0-beta-4"> </property> <target name="init" description="o Initializes some properties"> <mkdir dir="${libdir}"> @@ -143,7 +143,7 @@ </tstamp> <property name="copyright" value="Copyright &copy; 2003 The Codehaus. All Rights Reserved."> </property> - <property name="title" value="groovy 1.0-beta-2 API"> + <property name="title" value="groovy 1.0-beta-4 API"> </property> <javadoc bottom="Copyright &copy; 2003 The Codehaus. All Rights Reserved." use="true" private="true" destdir="${javadocdir}" author="true" version="true" sourcepath="src/main" packagenames="groovy,org.codehaus.groovy.*"> <classpath> diff --git a/dev-java/groovy/files/build.xml-1.0_beta4-r1 b/dev-java/groovy/files/build.xml-1.0_beta4-r1 new file mode 100644 index 000000000000..be7639ede75c --- /dev/null +++ b/dev-java/groovy/files/build.xml-1.0_beta4-r1 @@ -0,0 +1,165 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!--build.xml generated by maven from project.xml version 1.0-beta-4 + on date December 23 2003, time 1605--> + +<project default="jar" name="groovy" basedir="."> + <property name="defaulttargetdir" value="target"> + </property> + <property name="libdir" value="target/lib"> + </property> + <property name="classesdir" value="target/classes"> + </property> + <property name="testclassesdir" value="target/test-classes"> + </property> + <property name="testreportdir" value="target/test-reports"> + </property> + <property name="distdir" value="dist"> + </property> + <property name="javadocdir" value="dist/docs/api"> + </property> + <property name="final.name" value="groovy-1.0-beta-4"> + </property> + <target name="init" description="o Initializes some properties"> + <mkdir dir="${libdir}"> + </mkdir> + <condition property="noget"> + <equals arg2="only" arg1="${build.sysclasspath}"> + </equals> + </condition> + </target> + <target name="compile" description="o Compile the code" depends=""> + <mkdir dir="${classesdir}"> + </mkdir> + <javac destdir="${classesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html"> + <src> + <pathelement location="src/main"> + </pathelement> + </src> + <classpath> + <fileset dir="${libdir}"> + <include name="*.jar"> + </include> + </fileset> + </classpath> + </javac> + <copy todir="${classesdir}"> + <fileset dir="src/main"> + <include name="**/*.properties"> + </include> + <include name="**/*.xml"> + </include> + </fileset> + </copy> + <copy todir="${testclassesdir}"> + <fileset dir="src/test"> + <include name="**/*.properties"> + </include> + <include name="**/*.xml"> + </include> + <include name="**/*.xsd"> + </include> + </fileset> + </copy> + </target> + <target name="jar" description="o Create the jar" depends="compile"> + <jar jarfile="target/${final.name}.jar" excludes="**/package.html" basedir="${classesdir}"> + </jar> + </target> + <target name="clean" description="o Clean up the generated directories"> + <delete dir="${defaulttargetdir}"> + </delete> + <delete dir="${distdir}"> + </delete> + </target> + <target name="dist" description="o Create a distribution" depends="jar, javadoc"> + <mkdir dir="dist"> + </mkdir> + <copy todir="dist"> + <fileset dir="${defaulttargetdir}" includes="*.jar"> + </fileset> + <fileset dir="${basedir}" includes="LICENSE*, README*"> + </fileset> + </copy> + </target> + <target name="test" description="o Run the test cases" if="test.failure" depends="internal-test"> + <fail message="There were test failures."> + </fail> + </target> + <target name="internal-test" depends="compile-tests"> + <mkdir dir="${testreportdir}"> + </mkdir> + <junit dir="./" failureproperty="test.failure" printSummary="yes" fork="true" haltonerror="true"> + <sysproperty key="basedir" value="."> + </sysproperty> + <formatter type="xml"> + </formatter> + <formatter usefile="false" type="plain"> + </formatter> + <classpath> + <fileset dir="${libdir}"> + <include name="*.jar"> + </include> + </fileset> + <pathelement path="${testclassesdir}"> + </pathelement> + <pathelement path="${classesdir}"> + </pathelement> + </classpath> + <batchtest todir="${testreportdir}"> + <fileset dir="src/test"> + <include name="**/*Test.*"> + </include> + <include name="**/*Bug.*"> + </include> + </fileset> + </batchtest> + </junit> + </target> + <target name="compile-tests" depends="compile"> + <mkdir dir="${testclassesdir}"> + </mkdir> + <javac destdir="${testclassesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html"> + <src> + <pathelement location="src/test"> + </pathelement> + </src> + <classpath> + <fileset dir="${libdir}"> + <include name="*.jar"> + </include> + </fileset> + <pathelement path="${classesdir}"> + </pathelement> + </classpath> + </javac> + </target> + <target name="javadoc" description="o Generate javadoc" depends="jar"> + <mkdir dir="${javadocdir}"> + </mkdir> + <tstamp> + <format pattern="2003-yyyy" property="year"> + </format> + </tstamp> + <property name="copyright" value="Copyright &copy; 2003 The Codehaus. All Rights Reserved."> + </property> + <property name="title" value="groovy 1.0-beta-4 API"> + </property> + <javadoc bottom="Copyright &copy; 2003 The Codehaus. All Rights Reserved." use="true" private="true" destdir="${javadocdir}" author="true" version="true" sourcepath="src/main" packagenames="groovy,org.codehaus.groovy.*"> + <classpath> + <fileset dir="${libdir}"> + <include name="*.jar"> + </include> + </fileset> + <pathelement location="target/${final.name}.jar"> + </pathelement> + </classpath> + </javadoc> + </target> + <target name="install-maven"> + <get dest="${user.home}/maven-install-latest.jar" usetimestamp="true" src="${repo}/maven/maven-install-latest.jar"> + </get> + <unjar dest="${maven.home}" src="${user.home}/maven-install-latest.jar"> + </unjar> + </target> +</project> diff --git a/dev-java/groovy/files/digest-groovy-1.0_beta4-r1 b/dev-java/groovy/files/digest-groovy-1.0_beta4-r1 new file mode 100644 index 000000000000..ae973ed4b46c --- /dev/null +++ b/dev-java/groovy/files/digest-groovy-1.0_beta4-r1 @@ -0,0 +1 @@ +MD5 9aac05cd0bfca996e34f079a90f4147c groovy-1.0-beta-4-src.tar.gz 349710 diff --git a/dev-java/groovy/groovy-1.0_beta4-r1.ebuild b/dev-java/groovy/groovy-1.0_beta4-r1.ebuild new file mode 100644 index 000000000000..5cd81d0c7d62 --- /dev/null +++ b/dev-java/groovy/groovy-1.0_beta4-r1.ebuild @@ -0,0 +1,126 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/groovy/groovy-1.0_beta4-r1.ebuild,v 1.1 2004/05/05 21:33:29 karltk Exp $ + +inherit java-pkg + +DESCRIPTION="Groovy is a high-level dynamic language for the JVM" +HOMEPAGE="http://groovy.codehaus.org/" +SRC_URI="http://dist.codehaus.org/groovy/distributions/${PN}-1.0-beta-4-src.tar.gz" +LICENSE="codehaus-groovy" +SLOT="1" +KEYWORDS="~x86" +IUSE="doc jikes" +DEPEND="=dev-java/xerces-2.6* \ + >=dev-java/commons-cli-1.0-r3 + =dev-java/ant-1.5* + =dev-java/junit-3.8* + =dev-java/asm-1.4* + >=dev-java/classworlds-1.0-r2 + =dev-java/mockobjects-0.0* + =dev-java/bsf-2.3* + =net-www/tomcat-5* + =dev-java/xmojo-bin-5.0*" +# karltk: +# xmojo-bin is a JMX provider, we should add a list of alternatives + + +S=${WORKDIR}/${PN}-1.0-beta-4 + +src_unpack() { + unpack ${A} + + mkdir -p ${S}/target/lib + + cd ${S}/target/lib + java-pkg_jar-from xerces-2 || die "Missing xerces" + java-pkg_jar-from junit || die "Missing junit" + java-pkg_jar-from asm-1 || die "Missing asm" + java-pkg_jar-from commons-cli-1 || die "Missing commons-cli" + java-pkg_jar-from classworlds-1 || die "Missing classworlds" + java-pkg_jar-from bsf-2.3 || die "Missing bsf" + java-pkg_jar-from mockobjects || die "Missing mockobjects" + java-pkg_jar-from xmojo-bin-5.0 || die "Missing xmojo-bin" + ln -s /opt/tomcat/common/lib/servlet-api.jar . + + cd ${S} + + # The original build.xml will only build on a MacOSX machine when you're + # logged in as jstrachan. I don't reckon many Gentoo users are... + cp ${FILESDIR}/build.xml-${PV} ${S}/build.xml || die "Failed to update build.xml" + + # This won't compile without an incestuous relationship with radeox. + rm -rf ${S}/src/main/org/codehaus/groovy/wiki +} + +src_compile() { + local myconf + use jikes && myconf="${myconf} -Dbuild.compiler=jikes" + + ant ${myconf} jar || die "Failed to compile jar" + if use doc ; then + ant javadoc || die "Failed to generate docs" + fi + + # Generate command-line scripts + for x in grok groovy groovyc groovysh groovyConsole ; do + generate_script $x + done + + cd src/main + sh groovyc \ + --classpath ../../target/classes/ \ + groovy/ui/Console.groovy || die "Failed to invoke groovyc" + + jar uf ../../target/groovy-1.0-beta-4.jar groovy/ui/Console.class || die "Failed to backpatch Console.class" +} + +generate_script() { + scriptname=$1 + classworlds_classpath="$(java-config -p classworlds-1)" + asm_classpath="$(java-config -p asm-1)" + bsf_classpath="$(java-config -p bsf-2.3)" + classworlds_classpath="$(java-config -p classworlds-1)" + commons_cli_classpath="$(java-config -p commons-cli-1)" + mockobjects_classpath="$(java-config -p mockobjects)" + xerces_classpath="$(java-config -p xerces-2)" + xmojo_classpath="$(java-config -p xmojo-bin-5.0)" + + sed -e "s;@scriptname@;${scriptname};" \ + -e "s;@groovy-home@;/usr/share/groovy-${SLOT};" \ + -e "s;@classworlds_classpath@;${classworlds_classpath};" \ + -e "s;@asm_classpath@;${asm_classpath};" \ + -e "s;@bsf_classpath@;${bsf_classpath};" \ + -e "s;@commons_cli_classpath@;${commons_cli_classpath};" \ + -e "s;@mockobjects_classpath@;${mockobjects_classpath};" \ + -e "s;@xerces_classpath@;${xerces_classpath};" \ + -e "s;@xmojo_classpath@;${xmojo_classpath};" \ + < ${FILESDIR}/basescript-${PV} \ + > ${scriptname} || die "Failed to generate ${scriptname}" +} + +src_install() { + + # Install misc. documentation + dodoc LICENSE.txt + + # Install jar files + java-pkg_dojar target/groovy-1.0-beta-4.jar + + # Install API documentation + if use doc ; then + dohtml -r dist/docs/api + fi + + # Install configuration files + confdir=/usr/share/groovy-${SLOT}/conf + dodir ${confdir} + insinto ${confdir} + doins src/conf/{groovy,groovyc,groovysh,groovyConsole,grok}-classworlds.conf + + # Install command-line scripts + exeinto /usr/bin + for x in grok groovy groovyc groovysh groovyConsole ; do + doexe $x || die "Failed to install ${x}" + done +} |