diff options
-rw-r--r-- | dev-java/joda-time/ChangeLog | 12 | ||||
-rw-r--r-- | dev-java/joda-time/files/joda-time-2.2-build.xml | 270 | ||||
-rw-r--r-- | dev-java/joda-time/joda-time-2.2.ebuild | 58 |
3 files changed, 337 insertions, 3 deletions
diff --git a/dev-java/joda-time/ChangeLog b/dev-java/joda-time/ChangeLog index c8bb19afd75d..74cd42b94c24 100644 --- a/dev-java/joda-time/ChangeLog +++ b/dev-java/joda-time/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-java/joda-time -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/joda-time/ChangeLog,v 1.44 2010/04/24 17:55:14 grobian Exp $ +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/joda-time/ChangeLog,v 1.45 2013/05/09 20:52:55 tomwij Exp $ + +*joda-time-2.2 (09 May 2013) + + 09 May 2013; Tom Wijsman <TomWij@gentoo.org> +files/joda-time-2.2-build.xml, + +joda-time-2.2.ebuild: + Version bump to 2.2. Fixes bug #469186 reported by Andreas Sturmlechner aka + genstorm. Thanks to genstorm and sera for helping. 24 Apr 2010; Fabian Groffen <grobian@gentoo.org> joda-time-1.6.ebuild: Marked ~sparc-solaris ~x86-solaris, bug #314093 @@ -160,4 +167,3 @@ 28 Feb 2004; Chris Aniszczyk <zx@gentoo.org> metadata.xml: Initial Import. Thanks to Pavel <hlobil@sympatico.ca> for the initial ebuild. Closes #42553 - diff --git a/dev-java/joda-time/files/joda-time-2.2-build.xml b/dev-java/joda-time/files/joda-time-2.2-build.xml new file mode 100644 index 000000000000..c90c2273e3ee --- /dev/null +++ b/dev-java/joda-time/files/joda-time-2.2-build.xml @@ -0,0 +1,270 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- ====================================================================== --> +<!-- Ant build file (http://ant.apache.org/) for Ant 1.6.2 or above. --> +<!-- ====================================================================== --> + +<!-- ====================================================================== --> +<!-- ===================== - DO NOT EDIT THIS FILE! - ===================== --> +<!-- ====================================================================== --> +<!-- --> +<!-- Any modifications will be overwritten. --> +<!-- --> +<!-- Generated by Maven Ant Plugin on 5/9/13 4:05 PM --> +<!-- See: http://maven.apache.org/plugins/maven-ant-plugin/ --> +<!-- --> +<!-- ====================================================================== --> + +<project name="joda-time-from-maven" default="package" basedir="."> + + <!-- ====================================================================== --> + <!-- Build environment properties --> + <!-- ====================================================================== --> + + <property file="${user.home}/.m2/maven.properties"/> + <property file="maven-build.properties"/> + + <property name="maven.build.finalName" value="joda-time-2.2"/> + <property name="maven.build.dir" value="target"/> + <property name="maven.build.outputDir" value="${maven.build.dir}/classes"/> + <property name="maven.build.srcDir.0" value="src/main/java"/> + <property name="maven.build.resourceDir.0" value="src/main/resources"/> + <property name="maven.build.resourceDir.1" value="."/> + <property name="maven.build.resourceDir.2" value="src/main/java"/> + <property name="maven.build.testOutputDir" value="${maven.build.dir}/test-classes"/> + <property name="maven.build.testDir.0" value="src/test/java"/> + <property name="maven.build.testResourceDir.0" value="src/test/resources"/> + <property name="maven.test.reports" value="${maven.build.dir}/test-reports"/> + <property name="maven.reporting.outputDirectory" value="${maven.build.dir}/site"/> + + <property name="maven.repo.local" value="${user.home}/.m2/repository"/> + <property name="maven.settings.offline" value="false"/> + <property name="maven.settings.interactiveMode" value="true"/> + + <!-- ====================================================================== --> + <!-- Defining classpaths --> + <!-- ====================================================================== --> + + <path id="build.classpath"> + <pathelement location="${maven.repo.local}/org/joda/joda-convert/1.2/joda-convert-1.2.jar"/> + </path> + <path id="build.test.classpath"> + <pathelement location="${maven.repo.local}/org/joda/joda-convert/1.2/joda-convert-1.2.jar"/> + <pathelement location="${maven.repo.local}/junit/junit/3.8.2/junit-3.8.2.jar"/> + </path> + + <!-- ====================================================================== --> + <!-- Cleaning up target --> + <!-- ====================================================================== --> + + <target name="clean" description="Clean the output directory"> + <delete dir="${maven.build.dir}"/> + </target> + + <!-- ====================================================================== --> + <!-- Compilation target --> + <!-- ====================================================================== --> + + <target name="compile" depends="get-deps" description="Compile the code"> + <mkdir dir="${maven.build.outputDir}"/> + <javac destdir="${maven.build.outputDir}" + nowarn="false" + debug="true" + optimize="true" + deprecation="false" + target="1.5" + verbose="true" + fork="true" + source="1.5"> + <src> + <pathelement location="${maven.build.srcDir.0}"/> + </src> + <classpath refid="build.classpath"/> + </javac> + <mkdir dir="${maven.build.outputDir}/META-INF"/> + <copy todir="${maven.build.outputDir}/META-INF"> + <fileset dir="${maven.build.resourceDir.1}"> + <include name="LICENSE.txt"/> + <include name="NOTICE.txt"/> + </fileset> + </copy> + <mkdir dir="${maven.build.outputDir}/."/> + <copy todir="${maven.build.outputDir}/."> + <fileset dir="${maven.build.resourceDir.2}"> + <include name="org/joda/time/tz/data/**"/> + <include name="**/*.properties"/> + </fileset> + </copy> + </target> + + <!-- ====================================================================== --> + <!-- Test-compilation target --> + <!-- ====================================================================== --> + + <target name="compile-tests" + depends="compile" + description="Compile the test code" + unless="maven.test.skip"> + <mkdir dir="${maven.build.testOutputDir}"/> + <javac destdir="${maven.build.testOutputDir}" + nowarn="false" + debug="true" + optimize="true" + deprecation="false" + target="1.5" + verbose="true" + fork="true" + source="1.5"> + <src> + <pathelement location="${maven.build.testDir.0}"/> + </src> + <classpath> + <path refid="build.test.classpath"/> + <pathelement location="${maven.build.outputDir}"/> + </classpath> + </javac> + <copy todir="${maven.build.testOutputDir}"> + <fileset dir="${maven.build.testResourceDir.0}"/> + </copy> + </target> + + <!-- ====================================================================== --> + <!-- Run all tests --> + <!-- ====================================================================== --> + + <target name="test" + depends="compile-tests, junit-missing" + unless="junit.skipped" + description="Run the test cases"> + <mkdir dir="${maven.test.reports}"/> + <junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true" dir="."> + <sysproperty key="basedir" value="."/> + <formatter type="xml"/> + <formatter type="plain" usefile="false"/> + <classpath> + <path refid="build.test.classpath"/> + <pathelement location="${maven.build.outputDir}"/> + <pathelement location="${maven.build.testOutputDir}"/> + </classpath> + <batchtest todir="${maven.test.reports}" unless="test"> + <fileset dir="${maven.build.testDir.0}"> + <include name="**/TestAllPackages.java"/> + <exclude name="**/*Abstract*Test.java"/> + </fileset> + </batchtest> + <batchtest todir="${maven.test.reports}" if="test"> + <fileset dir="${maven.build.testDir.0}"> + <include name="**/${test}.java"/> + <exclude name="**/*Abstract*Test.java"/> + </fileset> + </batchtest> + </junit> + </target> + + <target name="test-junit-present"> + <available classname="junit.framework.Test" property="junit.present"/> + </target> + + <target name="test-junit-status" + depends="test-junit-present"> + <condition property="junit.missing"> + <and> + <isfalse value="${junit.present}"/> + <isfalse value="${maven.test.skip}"/> + </and> + </condition> + <condition property="junit.skipped"> + <or> + <isfalse value="${junit.present}"/> + <istrue value="${maven.test.skip}"/> + </or> + </condition> + </target> + + <target name="junit-missing" + depends="test-junit-status" + if="junit.missing"> + <echo>=================================== WARNING ===================================</echo> + <echo> JUnit is not present in your $ANT_HOME/lib directory. Tests not executed.</echo> + <echo>===============================================================================</echo> + </target> + + <!-- ====================================================================== --> + <!-- Javadoc target --> + <!-- ====================================================================== --> + + <target name="javadoc" description="Generates the Javadoc of the application"> + <javadoc sourcepath="${maven.build.srcDir.0}" + packagenames="*" + destdir="${maven.reporting.outputDirectory}/apidocs" + access="protected" + old="false" + verbose="false" + encoding="UTF-8" + version="true" + use="true" + author="true" + splitindex="false" + nodeprecated="false" + nodeprecatedlist="false" + notree="false" + noindex="false" + nohelp="false" + nonavbar="false" + serialwarn="false" + charset="ISO-8859-1" + linksource="true" + breakiterator="false"> + <link href="http://download.oracle.com/javase/1.5.0/docs/api/"/> + <group title="User packages"/> + <group title="Implementation packages"/> + </javadoc> + </target> + + <!-- ====================================================================== --> + <!-- Package target --> + <!-- ====================================================================== --> + + <target name="package" depends="compile,test" description="Package the application"> + <jar jarfile="${maven.build.dir}/${maven.build.finalName}.jar" + compress="true" + index="false" + manifest="src/conf/MANIFEST.MF" + basedir="${maven.build.outputDir}" + excludes="**/package.html"/> + </target> + + <!-- ====================================================================== --> + <!-- A dummy target for the package named after the type it creates --> + <!-- ====================================================================== --> + + <target name="jar" depends="package" description="Builds the jar for the application"/> + + <!-- ====================================================================== --> + <!-- Download dependencies target --> + <!-- ====================================================================== --> + + <target name="test-offline"> + <condition property="maven.mode.offline"> + <equals arg1="${maven.settings.offline}" arg2="true"/> + </condition> + </target> + + <target name="get-deps" + depends="test-offline" + description="Download all dependencies" + unless="maven.mode.offline"> + <mkdir dir="${maven.repo.local}"/> + <mkdir dir="${maven.repo.local}/org/joda/joda-convert/1.2"/> + <get src="http://repo.maven.apache.org/maven2/org/joda/joda-convert/1.2/joda-convert-1.2.jar" + dest="${maven.repo.local}/org/joda/joda-convert/1.2/joda-convert-1.2.jar" + usetimestamp="false" + ignoreerrors="true"/> + <mkdir dir="${maven.repo.local}/junit/junit/3.8.2"/> + <get src="http://repo.maven.apache.org/maven2/junit/junit/3.8.2/junit-3.8.2.jar" + dest="${maven.repo.local}/junit/junit/3.8.2/junit-3.8.2.jar" + usetimestamp="false" + ignoreerrors="true"/> + </target> + +</project> diff --git a/dev-java/joda-time/joda-time-2.2.ebuild b/dev-java/joda-time/joda-time-2.2.ebuild new file mode 100644 index 000000000000..ab10eb8f2ba0 --- /dev/null +++ b/dev-java/joda-time/joda-time-2.2.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/joda-time/joda-time-2.2.ebuild,v 1.1 2013/05/09 20:52:55 tomwij Exp $ + +EAPI="5" + +JAVA_PKG_IUSE="doc examples source test" +JAVA_ANT_REWRITE_CLASSPATH="true" + +inherit java-pkg-2 java-ant-2 + +DESCRIPTION="A quality open-source replacement for the Java Date and Time classes." +HOMEPAGE="http://joda-time.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}-dist.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris" + +DEPEND=">=virtual/jdk-1.5 + dev-java/joda-convert:0 + test? ( + dev-java/junit:0 + dev-java/ant-junit:0 + )" +RDEPEND=">=virtual/jre-1.5" + +S="${WORKDIR}/${P}" + +java_prepare() { + rm -v *.jar || die "Failed to remove bundled jars." + cp "${FILESDIR}"/${P}-build.xml "${S}"/build.xml || die "Failed to copy build file." + + mkdir -p "${S}"/target/classes || die "Failed to create target classes directory." + cp -Rv "${S}"/src/tz-data/* "${S}"/target/classes/ || die "Failed to copy timezone data." +} + +src_compile() { + EANT_EXTRA_ARGS="-Dgentoo.classpath=$(java-pkg_getjar --build-only joda-convert joda-convert.jar)" + + java-pkg-2_src_compile +} + +src_test() { + EANT_EXTRA_ARGS="-Dgentoo.classpath=$(java-pkg_getjar --build-only joda-convert joda-convert.jar):$(java-pkg_getjar --build-only junit junit.jar)" + + java-pkg-2_src_test +} + +src_install() { + java-pkg_newjar target/${P}.jar + + dodoc NOTICE.txt RELEASE-NOTES.txt + + use doc && java-pkg_dojavadoc build/docs + use examples && java-pkg_doexamples src/example + use source && java-pkg_dosrc src/java/org +} |