Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/commons-graph/, dev-java/commons-graph/files/
Date: Tue, 06 Oct 2015 09:58:51
Message-Id: 1444125404.dff68e10e37810ee5bb0c806c8912f13f3cbd47f.monsieurp@gentoo
1 commit: dff68e10e37810ee5bb0c806c8912f13f3cbd47f
2 Author: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
3 AuthorDate: Tue Oct 6 09:35:58 2015 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 6 09:56:44 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dff68e10
7
8 dev-java/commons-graph: Version bump.
9
10 Package-Manager: portage-2.2.18
11 Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>
12
13 dev-java/commons-graph/Manifest | 1 +
14 dev-java/commons-graph/commons-graph-0.1.ebuild | 49 ++++
15 .../files/commons-graph-0.1-build.xml | 258 +++++++++++++++++++++
16 3 files changed, 308 insertions(+)
17
18 diff --git a/dev-java/commons-graph/Manifest b/dev-java/commons-graph/Manifest
19 index e8bbd79..d17ed63 100644
20 --- a/dev-java/commons-graph/Manifest
21 +++ b/dev-java/commons-graph/Manifest
22 @@ -1 +1,2 @@
23 +DIST commons-graph-0.1.tar.gz 96009 SHA256 b68f5c7132e9eea4872dfc0d5fd74c138d2489355540dff752a91311cbac040d SHA512 7214fd60eb348a7feee9c194f562e5a7cf1f211ba589d2a85eaae52ed3ced7089842405dfbd99413b1f06f87ea1a19d244989daa1e0f6fb857fa752647d52b16 WHIRLPOOL 90c014761b2a1f8572eba4339f2ea81ec34666a83c21ea27326b366f0089cc5f20a5d6bc53aefa1d09019114b34f424496af95a604c1b55b5bdfec879ab51a0b
24 DIST graph2-0.8.1.cvs20040118.tar.gz 42653 SHA256 916e3ca83376acd9ca64ee87988c8a19dc86c6468d087ede82d1e05c14a5a142 SHA512 110f2365b9568a4059233c6c6e75aec1a52b4fdd9110d55f0a6b79df324f047bde87d49134d8ba73417223919ddce972dd4a3c86841f843dd0109ebb17177083 WHIRLPOOL e3cd70bc98187a4f581bfa60125cfbfd0490264582d8fe4f536f7ecfd12a2f8228b1ff64db5414f8fa95ea976be5db08a054eecbb86e098cba62cc8cedd6f4c1
25
26 diff --git a/dev-java/commons-graph/commons-graph-0.1.ebuild b/dev-java/commons-graph/commons-graph-0.1.ebuild
27 new file mode 100644
28 index 0000000..2d7af9b
29 --- /dev/null
30 +++ b/dev-java/commons-graph/commons-graph-0.1.ebuild
31 @@ -0,0 +1,49 @@
32 +# Copyright 1999-2015 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +# $Id$
35 +
36 +EAPI=5
37 +JAVA_PKG_IUSE="doc source test"
38 +
39 +inherit java-pkg-2 java-ant-2
40 +
41 +DESCRIPTION="A toolkit for managing graphs and graph based data structures"
42 +HOMEPAGE="https://commons.apache.org/sandbox/commons-graph/"
43 +SRC_URI="http://dev.gentoo.org/~monsieurp/packages/${P}.tar.gz"
44 +
45 +DEPEND=">=virtual/jdk-1.6
46 + test? (
47 + dev-java/ant-junit:0
48 + )"
49 +
50 +RDEPEND=">=virtual/jre-1.6
51 + ${CDEPEND}"
52 +
53 +LICENSE="Apache-2.0"
54 +SLOT="0"
55 +KEYWORDS="~amd64 ~x86"
56 +IUSE=""
57 +
58 +JAVA_ANT_REWRITE_CLASSPATH="yes"
59 +EANT_TEST_TARGET="test"
60 +
61 +# Dubious tests.
62 +JAVA_RM_FILES=(
63 + src/test/java/org/apache/commons/graph/coloring/GraphColoringTestCase.java
64 + src/test/java/org/apache/commons/graph/spanning/KruskalTestCase.java
65 + src/test/java/org/apache/commons/graph/scc/TarjanTestCase.java
66 +)
67 +
68 +java_prepare() {
69 + cp "${FILESDIR}"/"${P}-build.xml" build.xml || die
70 +}
71 +
72 +src_test() {
73 + java-pkg-2_src_test
74 +}
75 +
76 +src_install() {
77 + java-pkg_newjar target/${P}.jar
78 + use doc && java-pkg_dojavadoc target/site/apidocs
79 + use source && java-pkg_dosrc src/main/java
80 +}
81
82 diff --git a/dev-java/commons-graph/files/commons-graph-0.1-build.xml b/dev-java/commons-graph/files/commons-graph-0.1-build.xml
83 new file mode 100644
84 index 0000000..5c3a9c1
85 --- /dev/null
86 +++ b/dev-java/commons-graph/files/commons-graph-0.1-build.xml
87 @@ -0,0 +1,258 @@
88 +<?xml version="1.0" encoding="UTF-8"?>
89 +
90 +<!-- ====================================================================== -->
91 +<!-- Ant build file (http://ant.apache.org/) for Ant 1.6.2 or above. -->
92 +<!-- ====================================================================== -->
93 +
94 +<!-- ====================================================================== -->
95 +<!-- ===================== - DO NOT EDIT THIS FILE! - ===================== -->
96 +<!-- ====================================================================== -->
97 +<!-- -->
98 +<!-- Any modifications will be overwritten. -->
99 +<!-- -->
100 +<!-- Generated by Maven Ant Plugin on 10/6/15 9:24 AM -->
101 +<!-- See: http://maven.apache.org/plugins/maven-ant-plugin/ -->
102 +<!-- -->
103 +<!-- ====================================================================== -->
104 +
105 +<project name="commons-graph-from-maven" default="package" basedir=".">
106 +
107 + <!-- ====================================================================== -->
108 + <!-- Build environment properties -->
109 + <!-- ====================================================================== -->
110 +
111 + <property file="${user.home}/.m2/maven.properties"/>
112 + <property file="maven-build.properties"/>
113 +
114 + <property name="maven.build.finalName" value="commons-graph-0.1"/>
115 + <property name="maven.build.dir" value="target"/>
116 + <property name="maven.build.outputDir" value="${maven.build.dir}/classes"/>
117 + <property name="maven.build.srcDir.0" value="src/main/java"/>
118 + <property name="maven.build.resourceDir.0" value="."/>
119 + <property name="maven.build.testOutputDir" value="${maven.build.dir}/test-classes"/>
120 + <property name="maven.build.testDir.0" value="src/test/java"/>
121 + <property name="maven.build.testResourceDir.0" value="src/test/resources"/>
122 + <property name="maven.build.testResourceDir.1" value="."/>
123 + <property name="maven.test.reports" value="${maven.build.dir}/test-reports"/>
124 + <property name="maven.reporting.outputDirectory" value="${maven.build.dir}/site"/>
125 +
126 + <property name="maven.repo.local" value="${user.home}/.m2/repository"/>
127 + <property name="maven.settings.offline" value="false"/>
128 + <property name="maven.settings.interactiveMode" value="true"/>
129 +
130 + <!-- ====================================================================== -->
131 + <!-- Defining classpaths -->
132 + <!-- ====================================================================== -->
133 +
134 + <path id="build.classpath"/>
135 + <path id="build.test.classpath">
136 + <pathelement location="${maven.repo.local}/junit/junit/4.10/junit-4.10.jar"/>
137 + <pathelement location="${maven.repo.local}/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar"/>
138 + <pathelement location="${maven.repo.local}/com/carrotsearch/junit-benchmarks/0.3.0/junit-benchmarks-0.3.0-jdk15.jar"/>
139 + <pathelement location="${maven.repo.local}/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar"/>
140 + <pathelement location="${maven.repo.local}/com/h2database/h2/1.3.158/h2-1.3.158.jar"/>
141 + </path>
142 +
143 + <!-- ====================================================================== -->
144 + <!-- Cleaning up target -->
145 + <!-- ====================================================================== -->
146 +
147 + <target name="clean" description="Clean the output directory">
148 + <delete dir="${maven.build.dir}"/>
149 + </target>
150 +
151 + <!-- ====================================================================== -->
152 + <!-- Compilation target -->
153 + <!-- ====================================================================== -->
154 +
155 + <target name="compile" description="Compile the code">
156 + <mkdir dir="${maven.build.outputDir}"/>
157 + <javac destdir="${maven.build.outputDir}"
158 + encoding="iso-8859-1"
159 + nowarn="false"
160 + debug="true"
161 + optimize="false"
162 + deprecation="true"
163 + target="1.6"
164 + verbose="false"
165 + fork="false"
166 + source="1.6">
167 + <src>
168 + <pathelement location="${maven.build.srcDir.0}"/>
169 + </src>
170 + <classpath refid="build.classpath"/>
171 + </javac>
172 + <mkdir dir="${maven.build.outputDir}/META-INF"/>
173 + <copy todir="${maven.build.outputDir}/META-INF">
174 + <fileset dir="${maven.build.resourceDir.0}">
175 + <include name="NOTICE.txt"/>
176 + <include name="LICENSE.txt"/>
177 + </fileset>
178 + </copy>
179 + </target>
180 +
181 + <!-- ====================================================================== -->
182 + <!-- Test-compilation target -->
183 + <!-- ====================================================================== -->
184 +
185 + <target name="compile-tests"
186 + depends="compile"
187 + description="Compile the test code"
188 + unless="maven.test.skip">
189 + <mkdir dir="${maven.build.testOutputDir}"/>
190 + <javac destdir="${maven.build.testOutputDir}"
191 + encoding="iso-8859-1"
192 + nowarn="false"
193 + debug="true"
194 + optimize="false"
195 + deprecation="true"
196 + target="1.6"
197 + verbose="false"
198 + fork="false"
199 + source="1.6">
200 + <src>
201 + <pathelement location="${maven.build.testDir.0}"/>
202 + </src>
203 + <classpath>
204 + <path refid="build.test.classpath"/>
205 + <pathelement location="${maven.build.outputDir}"/>
206 + </classpath>
207 + </javac>
208 + <mkdir dir="${maven.build.testOutputDir}/META-INF"/>
209 + <copy todir="${maven.build.testOutputDir}/META-INF">
210 + <fileset dir="${maven.build.testResourceDir.1}">
211 + <include name="NOTICE.txt"/>
212 + <include name="LICENSE.txt"/>
213 + </fileset>
214 + </copy>
215 + </target>
216 +
217 + <!-- ====================================================================== -->
218 + <!-- Run all tests -->
219 + <!-- ====================================================================== -->
220 +
221 + <target name="test"
222 + depends="compile-tests, junit-missing"
223 + unless="junit.skipped"
224 + description="Run the test cases">
225 + <mkdir dir="${maven.test.reports}"/>
226 + <junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true" dir=".">
227 + <sysproperty key="basedir" value="."/>
228 + <formatter type="xml"/>
229 + <formatter type="plain" usefile="false"/>
230 + <classpath>
231 + <path refid="build.test.classpath"/>
232 + <pathelement location="${maven.build.outputDir}"/>
233 + <pathelement location="${maven.build.testOutputDir}"/>
234 + </classpath>
235 + <batchtest todir="${maven.test.reports}" unless="test">
236 + <fileset dir="${maven.build.testDir.0}">
237 + <include name="**/Test*.java"/>
238 + <include name="**/*Test.java"/>
239 + <include name="**/*TestCase.java"/>
240 + <exclude name="**/*Abstract*Test.java"/>
241 + <exclude name="**/TestRunner.java"/>
242 + </fileset>
243 + </batchtest>
244 + <batchtest todir="${maven.test.reports}" if="test">
245 + <fileset dir="${maven.build.testDir.0}">
246 + <include name="**/${test}.java"/>
247 + <exclude name="**/*Abstract*Test.java"/>
248 + </fileset>
249 + </batchtest>
250 + </junit>
251 + </target>
252 +
253 + <target name="test-junit-present">
254 + <available classname="junit.framework.Test" property="junit.present" classpathref="build.test.classpath"/>
255 + </target>
256 +
257 + <target name="test-junit-status"
258 + depends="test-junit-present">
259 + <condition property="junit.missing">
260 + <and>
261 + <isfalse value="${junit.present}"/>
262 + <isfalse value="${maven.test.skip}"/>
263 + </and>
264 + </condition>
265 + <condition property="junit.skipped">
266 + <or>
267 + <isfalse value="${junit.present}"/>
268 + <istrue value="${maven.test.skip}"/>
269 + </or>
270 + </condition>
271 + </target>
272 +
273 + <target name="junit-missing"
274 + depends="test-junit-status"
275 + if="junit.missing">
276 + <echo>=================================== WARNING ===================================</echo>
277 + <echo> JUnit is not present in the test classpath or your $ANT_HOME/lib directory. Tests not executed.</echo>
278 + <echo>===============================================================================</echo>
279 + </target>
280 +
281 + <!-- ====================================================================== -->
282 + <!-- Javadoc target -->
283 + <!-- ====================================================================== -->
284 +
285 + <target name="javadoc" description="Generates the Javadoc of the application">
286 + <javadoc sourcepath="${maven.build.srcDir.0}"
287 + packagenames="*"
288 + destdir="${maven.reporting.outputDirectory}/apidocs"
289 + access="protected"
290 + old="false"
291 + verbose="false"
292 + encoding="iso-8859-1"
293 + version="true"
294 + use="true"
295 + author="true"
296 + splitindex="false"
297 + nodeprecated="false"
298 + nodeprecatedlist="false"
299 + notree="false"
300 + noindex="false"
301 + nohelp="false"
302 + nonavbar="false"
303 + serialwarn="false"
304 + charset="ISO-8859-1"
305 + source="1.6"
306 + linksource="true"
307 + breakiterator="false">
308 + <link href="http://download.oracle.com/javase/6/docs/api/"/>
309 + <link href="http://download.oracle.com/javaee/6/api/"/>
310 + </javadoc>
311 + </target>
312 +
313 + <!-- ====================================================================== -->
314 + <!-- Package target -->
315 + <!-- ====================================================================== -->
316 +
317 + <target name="package" depends="compile,test" description="Package the application">
318 + <jar jarfile="${maven.build.dir}/${maven.build.finalName}.jar"
319 + compress="true"
320 + index="false"
321 + basedir="${maven.build.outputDir}"
322 + excludes="**/package.html">
323 + <manifest>
324 + <attribute name="Main-Class" value="Main"/>
325 + </manifest>
326 + </jar>
327 + </target>
328 +
329 + <!-- ====================================================================== -->
330 + <!-- A dummy target for the package named after the type it creates -->
331 + <!-- ====================================================================== -->
332 +
333 + <target name="jar" depends="package" description="Builds the jar for the application"/>
334 +
335 + <!-- ====================================================================== -->
336 + <!-- Download dependencies target -->
337 + <!-- ====================================================================== -->
338 +
339 + <target name="test-offline">
340 + <condition property="maven.mode.offline">
341 + <equals arg1="${maven.settings.offline}" arg2="true"/>
342 + </condition>
343 + </target>
344 +
345 +</project>