Compare commits

...
This repository has been archived on 2026-01-16. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.

5 commits

Author SHA1 Message Date
Fedora Release Engineering
a6d1f42ed4 dist-git conversion 2010-07-28 15:02:32 +00:00
Lubomir Rintel
cc281c908d Upload gant source 2009-12-09 18:38:57 +00:00
Lubomir Rintel
e11ef28f60 Upload gant source 2009-12-09 18:33:59 +00:00
Lubomir Rintel
acc165761d Import gant 2009-12-09 18:20:04 +00:00
Kevin Fenzi
43322abdad Initialize branch F-11 for gant 2009-12-09 17:54:10 +00:00
7 changed files with 210 additions and 21 deletions

View file

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
gant_src-1.8.1.tgz

48
0001-Fix-tests.patch Normal file
View file

@ -0,0 +1,48 @@
From 256fc691f79ac3086d72b95504c39993fe10b87c Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Tue, 24 Nov 2009 00:46:35 +0100
Subject: [PATCH] Fix tests
Disable a test that needs internet connection, make other test not need
a home directory.
---
.../codehaus/gant/tests/bugs/Assorted_Test.groovy | 2 ++
.../codehaus/gant/tests/bugs/GANT_33_Test.groovy | 2 +-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/test/groovy/org/codehaus/gant/tests/bugs/Assorted_Test.groovy b/src/test/groovy/org/codehaus/gant/tests/bugs/Assorted_Test.groovy
index 0e9ab9b..f79b831 100644
--- a/src/test/groovy/org/codehaus/gant/tests/bugs/Assorted_Test.groovy
+++ b/src/test/groovy/org/codehaus/gant/tests/bugs/Assorted_Test.groovy
@@ -74,6 +74,7 @@ def foo { badvariable }
''' ) )
}
+/*
void test_GANT_34_originalIvycachePathProblemFixed ( ) {
script = '''
includeTool << gant.tools.Ivy
@@ -90,6 +91,7 @@ target ( 'default' : '' ) {
// same on all platforms: it contains the Ivy jar version number and some timings.
assertEquals ( '' , error )
}
+*/
void test_GANT_49_builderBug ( ) {
//
diff --git a/src/test/groovy/org/codehaus/gant/tests/bugs/GANT_33_Test.groovy b/src/test/groovy/org/codehaus/gant/tests/bugs/GANT_33_Test.groovy
index 9cc4e69..4a3d317 100644
--- a/src/test/groovy/org/codehaus/gant/tests/bugs/GANT_33_Test.groovy
+++ b/src/test/groovy/org/codehaus/gant/tests/bugs/GANT_33_Test.groovy
@@ -77,7 +77,7 @@ private fileNameSuffix = '_GANT_33_Test'
buildScriptFile.delete ( )
// Need to ensure that this cache directory actually is the real cache directory as listed in gant.Gant.
( new AntBuilder ( ) ).delete {
- fileset ( dir : [ System.properties.'user.home' , '.gant' , 'cache' ].join ( System.properties.'file.separator' ) , includes : fileNamePrefix + '*' + fileNameSuffix + '*' )
+ fileset ( dir : [ System.properties.'user.dir' , '.gant' , 'cache' ].join ( System.properties.'file.separator' ) , includes : fileNamePrefix + '*' + fileNameSuffix + '*' )
}
}
//////////////////////////////////////////////////////////////////////////////////////////////
--
1.6.5.2

View file

@ -0,0 +1,61 @@
From 3e388bc9d05e19029b673e5b9f8a91034cc830c9 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Mon, 23 Nov 2009 06:11:11 +0100
Subject: [PATCH] Make it build against our jars
---
build.xml | 26 +++++++++++++++++++++++---
1 files changed, 23 insertions(+), 3 deletions(-)
diff -up gant-1.8.1/build.xml.build gant-1.8.1/build.xml
--- gant-1.8.1/build.xml.build 2009-10-02 13:19:13.000000000 +0200
+++ gant-1.8.1/build.xml 2009-11-23 23:41:25.896457653 +0100
@@ -105,6 +105,27 @@ Author : Russel Winder <russel.winder@co
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant" classpathref="mavenAntTaskJarPathId"/>
</target>
+ <target name="-initializeFedora">
+ <echo message="Building with Fedora Groovy installation."/>
+ <path id="compileJarSetPathId">
+ <pathelement location="${groovyJar}"/>
+ <pathelement location="${commons-cliJar}"/>
+ <pathelement location="${asm2Jar}"/>
+ <pathelement location="${antlrJar}"/>
+ <pathelement location="${antJar}"/>
+ </path>
+ <path id="testJarSetPathId">
+ <path refid="compileJarSetPathId"/>
+ <pathelement location="${junitJar}"/>
+ <pathelement location="${ant-junitJar}"/>
+ <pathelement location="${ant-launcherJar}"/>
+ </path>
+ <path id="ivyJarPathId">
+ <pathelement location="${ivyJar}"/>
+ </path>
+ <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="compileJarSetPathId" />
+ </target>
+
<target name="-initializeWithGroovyHome" if="groovyHomeIsSet">
<echo message="Building with the Groovy installation at $GROOVY_HOME (${environment.GROOVY_HOME})."/>
<path id="groovyJarPathId">
@@ -190,9 +211,9 @@ Author : Russel Winder <russel.winder@co
<mkdir dir="${buildTestReportsDirectory}"/>
<!-- Only need this file if GROOVY_HOME is not set but write it anyway to save the hassle of decision making. -->
<echo file="groovyAntTaskTestVersion.properties" message="groovyAntTaskTestVersion = ${groovyVersion}"/>
- <artifact:dependencies pathId="ivyJarPathId">
+ <!--artifact:dependencies pathId="ivyJarPathId">
<dependency groupId="org.apache.ivy" artifactId="ivy" version="${ivyVersion}"/>
- </artifact:dependencies>
+ </artifact:dependencies-->
<path id="testClasspathPathId">
<pathelement location="${buildTestClassesDirectory}"/>
<path refid="mavenAntTaskJarPathId"/>
@@ -275,7 +296,7 @@ Author : Russel Winder <russel.winder@co
<echo message="Property installDirectory is not set, so cannot uninstall. Set installDirectory in file local.build.properties."/>
</target>
- <target name="-commandLineDependencies" depends="-checkGroovyHome,-initializeWithGroovyHome,-initializeNoGroovyHome"/>
+ <target name="-commandLineDependencies" depends="-initializeFedora"/>
<!--
The targets usable from the command line.

View file

@ -1,21 +0,0 @@
# Makefile for source rpm: gant
# $Id$
NAME := gant
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

99
gant.spec Normal file
View file

@ -0,0 +1,99 @@
%global build_jars \\\
-DgroovyJar=%( build-classpath groovy ) \\\
-Dcommons-cliJar=%( build-classpath commons-cli ) \\\
-Dasm2Jar=%( build-classpath asm2/asm2 ) \\\
-DantlrJar=%( build-classpath antlr ) \\\
-DantJar=%( build-classpath ant ) \\\
-DjunitJar=%( build-classpath junit ) \\\
-Dant-junitJar=%( build-classpath ant/ant-junit ) \\\
-Dant-launcherJar=%( build-classpath ant-launcher ) \\\
-DivyJar=%( build-classpath ivy )
Name: gant
Version: 1.8.1
Release: 1%{?dist}
Summary: Groovy-based build system that uses Ant tasks
Group: Development/Tools
License: ASL 2.0
URL: http://gant.codehaus.org/
Source0: http://dist.codehaus.org/gant/distributions/gant_src-%{version}.tgz
Patch0: 0001-Make-it-build-against-our-jars.patch
Patch1: 0001-Fix-tests.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: groovy
BuildRequires: jakarta-commons-cli
BuildRequires: asm2
BuildRequires: antlr
BuildRequires: ant
BuildRequires: junit
BuildRequires: ant-junit
BuildRequires: ivy
BuildRequires: jpackage-utils
Requires: jpackage-utils
BuildArch: noarch
%description
Gant is a tool for scripting Ant tasks using Groovy instead of XML to
specify the logic. A Gant specification is a Groovy script and so can bring
all the power of Groovy to bear directly, something not possible with Ant
scripts. Whilst it might be seen as a competitor to Ant, Gant uses Ant tasks
for many of the actions, so Gant is really an alternative way of doing
things using Ant, but using a programming language rather than XML to
specify the rules.
%prep
%setup -q
%patch0 -p1 -b .build
%patch1 -p1 -b .tests
%build
find . -name '*.jar' -delete
ant %{build_jars} package
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_javadir}
install -p -m0644 target_gant/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}
ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
%check
# Gant_Test "failed to create task or type urn:maven-artifact-ant:dependencies"
rm -f src/test/groovy/org/codehaus/gant/ant/tests/Gant_Test.java
rm -f target_gant/test-classes/org/codehaus/gant/ant/tests/Gant_Test.class
# For GANT_33_Test
mkdir -p .gant/cache
# Run the test suite
ant %{build_jars} test
# Ant always returns success, let us look at the test reports ourselves
if FAILED=$(egrep -l 'errors="[^0]"|failures="[^0]"' \
target_gant/test-reports/*.xml)
then
echo $FAILED |sed 's/\.xml/.txt/' |xargs cat
exit 1
fi
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%{_javadir}/*.jar
%doc README_Install.txt LICENCE.txt releaseNotes.txt
%changelog
* Mon Nov 23 2009 Lubomir Rintel <lkundrak@v3.sk> - 1.8.1-1
- Initial packaging

View file

@ -0,0 +1 @@
1067d000816883c072819a802fb00d81 gant_src-1.8.1.tgz