From be90cfc717ca0938f786c72ed655bc77bca29eb9 Mon Sep 17 00:00:00 2001 From: James Antill Date: Mon, 8 Aug 2022 12:33:02 -0400 Subject: [PATCH] Import rpm: 6bc20a514b6237d7f206f3efc01cda3637f4f3b7 --- .gitignore | 1 + 0001-Fix-build-with-OpenJDK-11.patch | 131 ++++++++ gating.yaml | 8 + hamcrest-1.3-build.patch | 39 +++ hamcrest-1.3-fork-javac.patch | 25 ++ hamcrest-1.3-javadoc.patch | 17 ++ hamcrest-1.3-no-jarjar.patch | 23 ++ hamcrest-1.3-qdox-2.0.patch | 105 +++++++ hamcrest-core-MANIFEST.MF | 14 + hamcrest-generator-MANIFEST.MF | 18 ++ hamcrest-integration-MANIFEST.MF | 14 + hamcrest-library-MANIFEST.MF | 15 + hamcrest.spec | 429 +++++++++++++++++++++++++++ sources | 1 + 14 files changed, 840 insertions(+) create mode 100644 .gitignore create mode 100644 0001-Fix-build-with-OpenJDK-11.patch create mode 100644 gating.yaml create mode 100644 hamcrest-1.3-build.patch create mode 100644 hamcrest-1.3-fork-javac.patch create mode 100644 hamcrest-1.3-javadoc.patch create mode 100644 hamcrest-1.3-no-jarjar.patch create mode 100644 hamcrest-1.3-qdox-2.0.patch create mode 100644 hamcrest-core-MANIFEST.MF create mode 100644 hamcrest-generator-MANIFEST.MF create mode 100644 hamcrest-integration-MANIFEST.MF create mode 100644 hamcrest-library-MANIFEST.MF create mode 100644 hamcrest.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f92ba29 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/hamcrest-java-1.3.tar.gz diff --git a/0001-Fix-build-with-OpenJDK-11.patch b/0001-Fix-build-with-OpenJDK-11.patch new file mode 100644 index 0000000..4e882e2 --- /dev/null +++ b/0001-Fix-build-with-OpenJDK-11.patch @@ -0,0 +1,131 @@ +From d33031924faa557bb43ba0471f74d942ddfeae50 Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Tue, 5 Nov 2019 14:50:23 +0100 +Subject: [PATCH] Fix build with OpenJDK 11 + +--- + .../src/main/java/org/hamcrest/collection/ArrayMatching.java | 3 ++- + .../org/hamcrest/collection/IsArrayContainingInAnyOrder.java | 2 +- + .../org/hamcrest/collection/IsArrayContainingInOrder.java | 2 +- + .../hamcrest/collection/IsIterableContainingInAnyOrder.java | 2 +- + .../collection/IsIterableContainingInRelativeOrder.java | 2 +- + hamcrest/src/main/java/org/hamcrest/core/AllOf.java | 2 +- + hamcrest/src/main/java/org/hamcrest/core/AnyOf.java | 2 +- + .../src/main/java/org/hamcrest/core/CombinableMatcher.java | 4 ++-- + 8 files changed, 10 insertions(+), 9 deletions(-) + +diff --git a/hamcrest/src/main/java/org/hamcrest/collection/ArrayMatching.java b/hamcrest/src/main/java/org/hamcrest/collection/ArrayMatching.java +index fc968e0..baab775 100644 +--- a/hamcrest/src/main/java/org/hamcrest/collection/ArrayMatching.java ++++ b/hamcrest/src/main/java/org/hamcrest/collection/ArrayMatching.java +@@ -67,7 +67,8 @@ public class ArrayMatching { + */ + @SafeVarargs + public static Matcher arrayContainingInAnyOrder(Matcher... itemMatchers) { +- return arrayContainingInAnyOrder(asList(itemMatchers)); ++ Collection> itemMatchersList = asList(itemMatchers); ++ return new ArrayAsIterableMatcher<>(new IsIterableContainingInAnyOrder<>(itemMatchersList), itemMatchersList, "in any order"); + } + + /** +diff --git a/hamcrest/src/main/java/org/hamcrest/collection/IsArrayContainingInAnyOrder.java b/hamcrest/src/main/java/org/hamcrest/collection/IsArrayContainingInAnyOrder.java +index 7e72a62..c0c7efc 100644 +--- a/hamcrest/src/main/java/org/hamcrest/collection/IsArrayContainingInAnyOrder.java ++++ b/hamcrest/src/main/java/org/hamcrest/collection/IsArrayContainingInAnyOrder.java +@@ -59,7 +59,7 @@ public class IsArrayContainingInAnyOrder extends TypeSafeMatcher { + * a list of matchers, each of which must be satisfied by an entry in an examined array + */ + public static Matcher arrayContainingInAnyOrder(Matcher... itemMatchers) { +- return arrayContainingInAnyOrder(Arrays.asList(itemMatchers)); ++ return new IsArrayContainingInAnyOrder(Arrays.asList(itemMatchers)); + } + + /** +diff --git a/hamcrest/src/main/java/org/hamcrest/collection/IsArrayContainingInOrder.java b/hamcrest/src/main/java/org/hamcrest/collection/IsArrayContainingInOrder.java +index c046914..2022f1a 100644 +--- a/hamcrest/src/main/java/org/hamcrest/collection/IsArrayContainingInOrder.java ++++ b/hamcrest/src/main/java/org/hamcrest/collection/IsArrayContainingInOrder.java +@@ -73,7 +73,7 @@ public class IsArrayContainingInOrder extends TypeSafeMatcher { + * the matchers that must be satisfied by the items in the examined array + */ + public static Matcher arrayContaining(Matcher... itemMatchers) { +- return arrayContaining(asList(itemMatchers)); ++ return new IsArrayContainingInOrder(asList(itemMatchers)); + } + + /** +diff --git a/hamcrest/src/main/java/org/hamcrest/collection/IsIterableContainingInAnyOrder.java b/hamcrest/src/main/java/org/hamcrest/collection/IsIterableContainingInAnyOrder.java +index d6a9a33..9a7e6c0 100644 +--- a/hamcrest/src/main/java/org/hamcrest/collection/IsIterableContainingInAnyOrder.java ++++ b/hamcrest/src/main/java/org/hamcrest/collection/IsIterableContainingInAnyOrder.java +@@ -98,7 +98,7 @@ public class IsIterableContainingInAnyOrder extends TypeSafeDiagnosingMatcher + */ + @SafeVarargs + public static Matcher> containsInAnyOrder(Matcher... itemMatchers) { +- return containsInAnyOrder(Arrays.asList(itemMatchers)); ++ return new IsIterableContainingInAnyOrder(Arrays.asList(itemMatchers)); + } + + /** +diff --git a/hamcrest/src/main/java/org/hamcrest/collection/IsIterableContainingInRelativeOrder.java b/hamcrest/src/main/java/org/hamcrest/collection/IsIterableContainingInRelativeOrder.java +index 0657768..06d6a57 100644 +--- a/hamcrest/src/main/java/org/hamcrest/collection/IsIterableContainingInRelativeOrder.java ++++ b/hamcrest/src/main/java/org/hamcrest/collection/IsIterableContainingInRelativeOrder.java +@@ -99,7 +99,7 @@ public class IsIterableContainingInRelativeOrder extends TypeSafeDiagnosingMa + */ + @SafeVarargs + public static Matcher> containsInRelativeOrder(Matcher... itemMatchers) { +- return containsInRelativeOrder(asList(itemMatchers)); ++ return new IsIterableContainingInRelativeOrder(asList(itemMatchers)); + } + + /** +diff --git a/hamcrest/src/main/java/org/hamcrest/core/AllOf.java b/hamcrest/src/main/java/org/hamcrest/core/AllOf.java +index b8c3faa..f8951bd 100644 +--- a/hamcrest/src/main/java/org/hamcrest/core/AllOf.java ++++ b/hamcrest/src/main/java/org/hamcrest/core/AllOf.java +@@ -56,6 +56,6 @@ public class AllOf extends DiagnosingMatcher { + */ + @SafeVarargs + public static Matcher allOf(Matcher... matchers) { +- return allOf(Arrays.asList(matchers)); ++ return new AllOf(Arrays.asList(matchers)); + } + } +diff --git a/hamcrest/src/main/java/org/hamcrest/core/AnyOf.java b/hamcrest/src/main/java/org/hamcrest/core/AnyOf.java +index 7a22c22..5a63574 100644 +--- a/hamcrest/src/main/java/org/hamcrest/core/AnyOf.java ++++ b/hamcrest/src/main/java/org/hamcrest/core/AnyOf.java +@@ -46,6 +46,6 @@ public class AnyOf extends ShortcutCombination { + */ + @SafeVarargs + public static AnyOf anyOf(Matcher... matchers) { +- return anyOf(Arrays.asList(matchers)); ++ return new AnyOf(Arrays.asList(matchers)); + } + } +diff --git a/hamcrest/src/main/java/org/hamcrest/core/CombinableMatcher.java b/hamcrest/src/main/java/org/hamcrest/core/CombinableMatcher.java +index e37efce..6b44884 100644 +--- a/hamcrest/src/main/java/org/hamcrest/core/CombinableMatcher.java ++++ b/hamcrest/src/main/java/org/hamcrest/core/CombinableMatcher.java +@@ -57,7 +57,7 @@ public class CombinableMatcher extends TypeSafeDiagnosingMatcher { + this.first = matcher; + } + public CombinableMatcher and(Matcher other) { +- return new CombinableMatcher<>(first).and(other); ++ return new CombinableMatcher<>(first).and((Matcher)other); + } + } + +@@ -76,7 +76,7 @@ public class CombinableMatcher extends TypeSafeDiagnosingMatcher { + this.first = matcher; + } + public CombinableMatcher or(Matcher other) { +- return new CombinableMatcher<>(first).or(other); ++ return new CombinableMatcher<>(first).or((Matcher)other); + } + } + } +-- +2.21.0 + diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..d6b7694 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,8 @@ +--- !Policy +product_versions: + - rhel-9 +decision_contexts: + - osci_compose_gate +rules: + # https://docs.engineering.redhat.com/display/RHELPLAN/Maven+Bootstrap+manual+gating+test + - !PassingTestCaseRule {test_case_name: manual.sst_cs_apps.maven.bootstrap} diff --git a/hamcrest-1.3-build.patch b/hamcrest-1.3-build.patch new file mode 100644 index 0000000..877e51e --- /dev/null +++ b/hamcrest-1.3-build.patch @@ -0,0 +1,39 @@ +diff --git a/build.xml b/build.xml +index 1cfd4fb..5a7c740 100644 +--- a/build.xml ++++ b/build.xml +@@ -14,13 +14,13 @@ + + ++ classpath="lib/generator/qdox.jar"/> + + +- ++ + + +- ++ + + + +@@ -152,7 +152,8 @@ + + ++ windowtitle="Hamcrest" source="1.6" failonerror="yes"> ++ + + + +@@ -313,6 +314,7 @@ + ++ + + + diff --git a/hamcrest-1.3-fork-javac.patch b/hamcrest-1.3-fork-javac.patch new file mode 100644 index 0000000..f5a86fe --- /dev/null +++ b/hamcrest-1.3-fork-javac.patch @@ -0,0 +1,25 @@ +From 54b7ccdd1e16f1d6dd07359eae0fcac8f1883373 Mon Sep 17 00:00:00 2001 +From: Michael Simacek +Date: Mon, 2 Jan 2017 10:31:56 +0100 +Subject: [PATCH] Fork javac + +--- + build.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/build.xml b/build.xml +index 1cfd4fb..69acfe8 100644 +--- a/build.xml ++++ b/build.xml +@@ -284,7 +284,7 @@ + + + +- ++ + + + +-- +2.9.3 + diff --git a/hamcrest-1.3-javadoc.patch b/hamcrest-1.3-javadoc.patch new file mode 100644 index 0000000..adaae0d --- /dev/null +++ b/hamcrest-1.3-javadoc.patch @@ -0,0 +1,17 @@ +diff --git a/build.xml b/build.xml +index ed57763..a4550cb 100644 +--- a/build.xml ++++ b/build.xml +@@ -135,11 +135,10 @@ + + + +- ++ + + + +- + + + +- +- +- +- +- +- +- +- +- + + + diff --git a/hamcrest-1.3-qdox-2.0.patch b/hamcrest-1.3-qdox-2.0.patch new file mode 100644 index 0000000..a65f977 --- /dev/null +++ b/hamcrest-1.3-qdox-2.0.patch @@ -0,0 +1,105 @@ +From 6d7da5456a7458a249bed9c4c1e768cc7cc2fe40 Mon Sep 17 00:00:00 2001 +From: Michael Simacek +Date: Wed, 1 Feb 2017 12:57:14 +0100 +Subject: [PATCH] Port to qdox 2.0 + +--- + .../src/main/java/org/hamcrest/generator/QDox.java | 4 ++-- + .../org/hamcrest/generator/QDoxFactoryReader.java | 26 ++++++++++++---------- + 2 files changed, 16 insertions(+), 14 deletions(-) + +diff --git a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java b/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java +index efaf615..338178d 100644 +--- a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java ++++ b/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java +@@ -1,6 +1,6 @@ + package org.hamcrest.generator; + +-import com.thoughtworks.qdox.JavaDocBuilder; ++import com.thoughtworks.qdox.JavaProjectBuilder; + import com.thoughtworks.qdox.model.JavaClass; + + import java.io.File; +@@ -16,7 +16,7 @@ import java.io.Reader; + */ + public class QDox { + +- private final JavaDocBuilder javaDocBuilder = new JavaDocBuilder(); ++ private final JavaProjectBuilder javaDocBuilder = new JavaProjectBuilder(); + + public void addSourceTree(File sourceDir) { + javaDocBuilder.addSourceTree(sourceDir); +diff --git a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java b/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java +index 5108140..97fce01 100644 +--- a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java ++++ b/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java +@@ -4,8 +4,10 @@ import com.thoughtworks.qdox.model.DocletTag; + import com.thoughtworks.qdox.model.JavaClass; + import com.thoughtworks.qdox.model.JavaMethod; + import com.thoughtworks.qdox.model.JavaParameter; +-import com.thoughtworks.qdox.model.Type; ++import com.thoughtworks.qdox.model.JavaType; ++import com.thoughtworks.qdox.model.impl.DefaultJavaClass; + ++import java.util.ArrayList; + import java.util.Iterator; + import java.util.List; + import java.util.regex.Pattern; +@@ -56,15 +58,15 @@ public class QDoxFactoryReader implements Iterable { + JavaMethod methodSource = findMethodInSource(factoryMethod); + if (methodSource != null) { + factoryMethod.setJavaDoc(createJavaDocComment(methodSource)); +- JavaParameter[] parametersFromSource ++ List parametersFromSource + = methodSource.getParameters(); + List parametersFromReflection + = factoryMethod.getParameters(); + +- if (parametersFromReflection.size() == parametersFromSource.length) { +- for (int i = 0; i < parametersFromSource.length; i++) { ++ if (parametersFromReflection.size() == parametersFromSource.size()) { ++ for (int i = 0; i < parametersFromSource.size(); i++) { + parametersFromReflection.get(i).setName( +- parametersFromSource[i].getName()); ++ parametersFromSource.get(i).getName()); + } + } + } +@@ -79,18 +81,18 @@ public class QDoxFactoryReader implements Iterable { + // Note, this doesn't always work - it struggles with some kinds of generics. + // This seems to cover most cases though. + List params = factoryMethod.getParameters(); +- Type[] types = new Type[params.size()]; ++ List types = new ArrayList(params.size()); + boolean varArgs = false; +- for (int i = 0; i < types.length; i++) { ++ for (int i = 0; i < params.size(); i++) { + String type = params.get(i).getType(); + varArgs = VARARGS_REGEX.matcher(type).find(); + // QDox ignores varargs and generics, so we strip them out to help QDox. + type = GENERIC_REGEX.matcher(type).replaceAll(""); + type = VARARGS_REGEX.matcher(type).replaceAll(""); +- types[i] = new Type(type); ++ types.add(new DefaultJavaClass(type)); + } +- JavaMethod[] methods = classSource.getMethodsBySignature(factoryMethod.getName(), types, false, varArgs); +- return methods.length == 1 ? methods[0] : null; ++ List methods = classSource.getMethodsBySignature(factoryMethod.getName(), types, false, varArgs); ++ return methods.size() == 1 ? methods.get(0) : null; + } + + /** +@@ -98,8 +100,8 @@ public class QDoxFactoryReader implements Iterable { + */ + private static String createJavaDocComment(JavaMethod methodSource) { + String comment = methodSource.getComment(); +- DocletTag[] tags = methodSource.getTags(); +- if ((comment == null || comment.trim().length() == 0) && tags.length == 0) { ++ List tags = methodSource.getTags(); ++ if ((comment == null || comment.trim().length() == 0) && tags.size() == 0) { + return null; + } + StringBuilder result = new StringBuilder(); +-- +2.9.3 + diff --git a/hamcrest-core-MANIFEST.MF b/hamcrest-core-MANIFEST.MF new file mode 100644 index 0000000..754d5d9 --- /dev/null +++ b/hamcrest-core-MANIFEST.MF @@ -0,0 +1,14 @@ +Manifest-Version: 1.0 +Bundle-Vendor: Fedoraproject.org +Bundle-ActivationPolicy: lazy +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Bundle-Name: Hamcrest Core +Bundle-SymbolicName: org.hamcrest.core +Eclipse-SourceReferences: scm:cvs:pserver:dev.eclipse.org:/cvsroot/too + ls:org.eclipse.orbit/org.hamcrest.core;tag=v201303031735 +Export-Package: org.hamcrest;version="1.3.0";core=split;mandatory:=cor + e,org.hamcrest.core;version="1.3.0",org.hamcrest.internal;version="1. + 3.0";x-internal:=true +Bundle-Version: 1.3.0.v201303031735 +Bundle-ManifestVersion: 2 diff --git a/hamcrest-generator-MANIFEST.MF b/hamcrest-generator-MANIFEST.MF new file mode 100644 index 0000000..f99c220 --- /dev/null +++ b/hamcrest-generator-MANIFEST.MF @@ -0,0 +1,18 @@ +Manifest-Version: 1.0 +Bundle-Vendor: %providerName +Bundle-ActivationPolicy: lazy +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.hamcrest.generator +Bundle-Version: 1.3.0.v20090501071000 +Export-Package: org.hamcrest.generator;version="1.3.0",org.hamcrest.ge + nerator.config;version="1.3.0" +Bundle-ManifestVersion: 2 +Import-Package: com.thoughtworks.qdox;version="1.6.3",com.thoughtworks + .qdox.ant;version="1.6.3",com.thoughtworks.qdox.directorywalker;versi + on="1.6.3",com.thoughtworks.qdox.junit;version="1.6.3",com.thoughtwor + ks.qdox.model;version="1.6.3",com.thoughtworks.qdox.model.util;versio + n="1.6.3",com.thoughtworks.qdox.parser;version="1.6.3",com.thoughtwor + ks.qdox.parser.impl;version="1.6.3",com.thoughtworks.qdox.parser.stru + cts;version="1.6.3",com.thoughtworks.qdox.tools;version="1.6.3" diff --git a/hamcrest-integration-MANIFEST.MF b/hamcrest-integration-MANIFEST.MF new file mode 100644 index 0000000..ab68061 --- /dev/null +++ b/hamcrest-integration-MANIFEST.MF @@ -0,0 +1,14 @@ +Manifest-Version: 1.0 +Bundle-Vendor: %providerName +Bundle-ActivationPolicy: lazy +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.hamcrest.integration +Require-Bundle: org.hamcrest.core;bundle-version="1.3.0" +Bundle-Version: 1.3.0.v20090501071000 +Export-Package: org.hamcrest;integration=split;mandatory:=integration; + version="1.3.0",org.hamcrest.integration;version="1.3.0" +Bundle-ManifestVersion: 2 +Import-Package: org.easymock;version="2.4.0";resolution:=optional,org. + jmock.core;version="1.10";resolution:=optional diff --git a/hamcrest-library-MANIFEST.MF b/hamcrest-library-MANIFEST.MF new file mode 100644 index 0000000..5fc8676 --- /dev/null +++ b/hamcrest-library-MANIFEST.MF @@ -0,0 +1,15 @@ +Manifest-Version: 1.0 +Bundle-Vendor: %providerName +Bundle-ActivationPolicy: lazy +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.hamcrest.library +Require-Bundle: org.hamcrest.core;bundle-version="1.3.0" +Bundle-Version: 1.3.0.v20090501071000 +Export-Package: org.hamcrest;version="1.3.0";library=split;mandatory:= + library,org.hamcrest.beans;version="1.3.0",org.hamcrest.collection;ve + rsion="1.3.0",org.hamcrest.number;version="1.3.0",org.hamcrest.object + ;version="1.3.0",org.hamcrest.text;version="1.3.0",org.hamcrest.xml;v + ersion="1.3.0" +Bundle-ManifestVersion: 2 diff --git a/hamcrest.spec b/hamcrest.spec new file mode 100644 index 0000000..a17e633 --- /dev/null +++ b/hamcrest.spec @@ -0,0 +1,429 @@ +# Copyright (c) 2000-2008, JPackage Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the +# distribution. +# 3. Neither the name of the JPackage Project nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +Name: hamcrest +Version: 1.3 +Release: 23%{?dist} +Epoch: 0 +Summary: Library of matchers for building test expressions +License: BSD +URL: https://github.com/hamcrest/JavaHamcrest +Source0: https://github.com/hamcrest/JavaHamcrest/archive/hamcrest-java-%{version}.tar.gz + +Source8: hamcrest-core-MANIFEST.MF +Source9: hamcrest-library-MANIFEST.MF +Source11: hamcrest-integration-MANIFEST.MF +Source12: hamcrest-generator-MANIFEST.MF + +Patch0: %{name}-%{version}-build.patch +Patch1: %{name}-%{version}-no-jarjar.patch +Patch3: %{name}-%{version}-javadoc.patch +Patch4: %{name}-%{version}-qdox-2.0.patch +Patch5: %{name}-%{version}-fork-javac.patch + +Requires: qdox +Requires: easymock >= 3.0 +Requires: %{name}-core = %{epoch}:%{version}-%{release} + +BuildRequires: javapackages-local +BuildRequires: ant +BuildRequires: ant-junit +BuildRequires: easymock +BuildRequires: junit +BuildRequires: qdox +BuildRequires: testng + +BuildArch: noarch + +%description +Provides a library of matcher objects (also known as constraints or predicates) +allowing 'match' rules to be defined declaratively, to be used in other +frameworks. Typical scenarios include testing frameworks, mocking libraries and +UI validation rules. + +%package core +Summary: Core API of hamcrest matcher framework. +Obsoletes: %{name} < 0:1.3-10 + +%description core +The core API of hamcrest matcher framework to be used by third-party framework providers. +This includes the a foundation set of matcher implementations for common operations. + +%package javadoc +Summary: Javadoc for %{name} + +%description javadoc +Javadoc for %{name}. + +%package demo +Summary: Demos for %{name} +Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: junit +Requires: testng + +%description demo +Demonstrations and samples for %{name}. + +%prep +%setup -q -n JavaHamcrest-%{name}-java-%{version} + +find . -type f -name "*.jar" | xargs -t rm +rm -fr hamcrest-integration/src/main/java/org/hamcrest/integration/JMock1Adapter.java +rm -fr hamcrest-integration/src/main/java/org/hamcrest/JMock1Matchers.java +rm -fr hamcrest-unit-test/src/main/java/org/hamcrest/integration/JMock1AdapterTest.java +# BUILD/hamcrest-1.1/lib/generator/qdox-1.6.1.jar.no +ln -sf $(build-classpath qdox) lib/generator/ +# BUILD/hamcrest-1.1/lib/integration/easymock-2.2.jar.no +ln -sf $(build-classpath easymock3) lib/integration/ +# BUILD/hamcrest-1.1/lib/integration/jmock-1.10RC1.jar.no +ln -sf $(build-classpath jmock) lib/integration/ +# BUILD/hamcrest-1.1/lib/integration/testng-4.6-jdk15.jar.no +ln -sf $(build-classpath testng-jdk15) lib/integration/ + +%patch0 -p1 +%patch1 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 + +sed -i 's/\r//' LICENSE.txt + +%build +export CLASSPATH=$(build-classpath qdox) +export OPT_JAR_LIST="junit ant/ant-junit" +# The unit-test goal is switched off as some tests fail with JDK 7 +# see https://github.com/hamcrest/JavaHamcrest/issues/30 +ant -Dant.build.javac.source=1.5 -Dversion=%{version} -Dbuild.sysclasspath=last clean core generator library bigjar javadoc + +# inject OSGi manifests +jar ufm build/%{name}-core-%{version}.jar %{SOURCE8} +jar ufm build/%{name}-library-%{version}.jar %{SOURCE9} +jar ufm build/%{name}-integration-%{version}.jar %{SOURCE11} +jar ufm build/%{name}-generator-%{version}.jar %{SOURCE12} + +%install +sed -i 's/@VERSION@/%{version}/g' pom/*.pom + +%mvn_artifact pom/hamcrest-parent.pom + +for mod in all core generator library integration; do + %mvn_artifact pom/hamcrest-$mod.pom build/%{name}-$mod-%{version}.jar +done + +%mvn_package :hamcrest-parent core +%mvn_package :hamcrest-core core + +%mvn_file ':hamcrest-{*}' %{name}/@1 + +# demo +install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name} +cp -pr %{name}-examples $RPM_BUILD_ROOT%{_datadir}/%{name}/ + +%mvn_install -J build/temp/hamcrest-all-1.3-javadoc.jar.contents/ + +%files -f .mfiles + +%files core -f .mfiles-core +%license LICENSE.txt + +%files javadoc -f .mfiles-javadoc +%license LICENSE.txt + +%files demo +%{_datadir}/%{name} + +%changelog +* Wed Feb 07 2018 Fedora Release Engineering - 0:1.3-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Mon Sep 25 2017 Mikolaj Izdebski - 0:1.3-22 +- Elimitate race condition when injecting JAR manifest +- Resolves: rhbz#1495234 +- Remove bogus hamcrest-text JAR + +* Wed Jul 26 2017 Fedora Release Engineering - 0:1.3-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed Mar 22 2017 Michael Simacek - 0:1.3-20 +- Fix mistake in mvn_artifact invocation + +* Tue Mar 21 2017 Michael Simacek - 0:1.3-19 +- Install with XMvn +- Update upstream URL +- Build from github source +- Specfile cleanup + +* Fri Feb 10 2017 Fedora Release Engineering - 0:1.3-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Feb 01 2017 Michael Simacek - 0:1.3-17 +- Port to current QDox + +* Mon Jan 02 2017 Michael Simacek - 0:1.3-16 +- Try to fix nondeterministic failures by forking javac + +* Mon Oct 3 2016 Mikolaj Izdebski - 0:1.3-15 +- Remove build-requires on perl + +* Wed Feb 03 2016 Fedora Release Engineering - 0:1.3-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 0:1.3-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Thu May 14 2015 Mikolaj Izdebski - 0:1.3-12 +- Disable javadoc doclint + +* Tue Feb 24 2015 Alexander Kurtakov 0:1.3-11 +- Add obsoletes in core to the main package to ease updates. + +* Mon Feb 23 2015 Alexander Kurtakov 0:1.3-10 +- Split hamcrest-core subpackage to allow other frameworks to reduce deps. + +* Wed Feb 4 2015 Mikolaj Izdebski - 0:1.3-9 +- Port to QDox 2.0 +- Resolves: rhbz#1166700 + +* Wed Jul 30 2014 Mat Booth - 0:1.3-8 +- Fix FTBFS +- Always build integration jar (removes some complexity from the spec) +- Drop unused patch + +* Sat Jun 07 2014 Fedora Release Engineering - 0:1.3-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue Mar 04 2014 Stanislav Ochotnicky - 0:1.3-6 +- Use Requires: java-headless rebuild (#1067528) + +* Mon Aug 12 2013 Alexander Kurtakov 0:1.3-5 +- Update osgi manifests. + +* Sat Aug 03 2013 Fedora Release Engineering - 0:1.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Jul 24 2013 Alexander Kurtakov 0:1.3-3 +- Build against easymock3. + +* Wed Jul 03 2013 Michal Srb - 0:1.3-2 +- Add easymock2 to classpath (Resolves: #979501) + +* Thu Mar 21 2013 Tomas Radej - 0:1.3-1 +- Updated to latest upstream version + +* Thu Feb 14 2013 Fedora Release Engineering - 0:1.1-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Mon Nov 26 2012 Stanislav Ochotnicky - 0:1.1-21 +- Fix core manifest typo ";" -> "," + +* Tue Aug 14 2012 Severin Gehwolf 0:1.1-20 +- Remove attributes in Export-Package header of hamcrest-core + manifest. + +* Wed Aug 1 2012 Alexander Kurtakov 0:1.1-19 +- Add OSGi metadata to hamcrest-generator. + +* Tue Jul 31 2012 Alexander Kurtakov 0:1.1-18 +- Actually build integration. + +* Tue Jul 31 2012 Alexander Kurtakov 0:1.1-17 +- Add OSGi metadata to hamcrest-integration. + +* Tue Jul 31 2012 Alexander Kurtakov 0:1.1-16 +- Remove checksums from manifest. + +* Tue Jul 31 2012 Alexander Kurtakov 0:1.1-15 +- Add OSGi metadata to hamcrest-text. + +* Tue Jul 31 2012 Alexander Kurtakov 0:1.1-14 +- Add OSGi metadata for hamcrest-library. + +* Thu Jul 19 2012 Fedora Release Engineering - 0:1.1-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jan 13 2012 Fedora Release Engineering - 0:1.1-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Thu Aug 25 2011 Alexander Kurtakov 0:1.1-11 +- Do not BR/R openjdk6 but java >= 1:1.6.0 +- Adapt to current guidelines. + +* Wed Feb 09 2011 Fedora Release Engineering - 0:1.1-10.4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Sun Dec 12 2010 Mat Booth 0:1.1-9.4 +- Fix FTBFS due to zip BR - RHBZ #661011. + +* Thu Oct 7 2010 Alexander Kurtakov 0:1.1-9.3 +- Drop gcj support. + +* Tue Aug 18 2009 Alexander Kurtakov 0:1.1-9.2 +- Add OSGi manifest for hamcrest-core. +- Make javadoc package noarch. + +* Fri Jul 24 2009 Fedora Release Engineering - 0:1.1-9.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Tue Feb 24 2009 Fedora Release Engineering - 0:1.1-8.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Mon Nov 24 2008 David Walluck 0:1.1-7.1 +- Fedora-specific: enable GCJ support +- Fedora-specific: build with java 1.6.0 +- Fedora-specific: disable integration and tests + +* Mon Nov 24 2008 David Walluck 0:1.1-7 +- update summary and description + +* Tue Oct 28 2008 David Walluck 0:1.1-6 +- make demo dependency on testng conditional + +* Fri Oct 24 2008 David Walluck 0:1.1-5 +- fix GCJ file list +- simplify build by always setting OPT_JAR_LIST + +* Fri Oct 24 2008 David Walluck 0:1.1-4 +- add epoch to demo Requires + +* Fri Oct 24 2008 David Walluck 0:1.1-3 +- set -Dant.build.javac.source=1.5 + +* Fri Oct 24 2008 David Walluck 0:1.1-2 +- add options to build without integration, jarjar, and tests +- allow build with java-devel >= 1.5.0 +- remove javadoc scriptlets +- use more strict file list +- fix maven directory ownership +- add non-versioned symlink for demo +- fix GCJ requires +- fix eol in LICENSE.txt +- remove Vendor and Distribution + +* Tue Feb 19 2008 Ralph Apel - 0:1.1-1jpp +- 1.1 + +* Mon Feb 11 2008 Ralph Apel - 0:4.3.1-4jpp +- Fix versioned jar name, was junit-4.3.1 +- Restore Epoch + +* Fri Jan 25 2008 Ralph Apel - 0:4.3.1-3jpp +- build and upload noarch packages +- Add pom and depmap frag +- BR java-devel = 1.5.0 +- Restore Vendor, Distribution from macros + +* Tue Aug 07 2007 Ben Konrath - 4.3.1-2jpp +- Set gcj_support to 0 to work around problems with GCJ. +- Fix buglet with the gcj post/postun if statement. +- Fix tab / space problems. +- Fix buildroot. +- Update Summary. +- Convert html files to Unix file endings. +- Disable aot-compile-rpm because it's not working ATM. + +* Mon Jul 09 2007 Ben Konrath - 4.3.1-1jpp +- 4.3.1. + +* Mon Feb 12 2007 Thomas Fitzsimmons - 3.8.2-3jpp.1.fc7 +- Add dist tag + +* Mon Feb 12 2007 Thomas Fitzsimmons - 3.8.2-3jpp.1 +- Committed on behalf of Tania Bento +- Update per Fedora review process +- Resolves rhbz#225954 + +* Thu Aug 10 2006 Deepak Bhole - 0:3.8.2-3jpp.1 +- Added missing requirements. + +* Thu Aug 10 2006 Karsten Hopp 0:3.8.2-2jpp_3fc +- Require(post/postun): coreutils + +* Fri Jun 23 2006 Deepak Bhole - 0:3.8.2-2jpp_2fc +- Rebuilt. + +* Thu Jun 22 2006 Deepak Bhole - 0:3.8.2-2jpp_1fc +- Upgrade to 3.8.2 +- Added conditional native compilation. +- Fix path where demo is located. + +* Fri Mar 03 2006 Ralph Apel - 0:3.8.2-1jpp +- First JPP-1.7 release + +* Mon Aug 23 2004 Randy Watler - 0:3.8.1-4jpp +- Rebuild with ant-1.6.2 +* Fri May 09 2003 David Walluck 0:3.8.1-3jpp +- update for JPackage 1.5 + +* Fri Mar 21 2003 Nicolas Mailhot 3.8.1-2jpp +- For jpackage-utils 1.5 + +* Fri Sep 06 2002 Henri Gomez 3.8.1-1jpp +- 3.8.1 + +* Sun Sep 01 2002 Guillaume Rousse 3.8-2jpp +- used original zip file + +* Thu Aug 29 2002 Guillaume Rousse 3.8-1jpp +- 3.8 +- group, vendor and distribution tags + +* Sat Jan 19 2002 Guillaume Rousse 3.7-6jpp +- versioned dir for javadoc +- no dependencies for manual and javadoc packages +- stricter dependency for demo package +- additional sources in individual archives +- section macro + +* Sat Dec 1 2001 Guillaume Rousse 3.7-5jpp +- javadoc in javadoc package + +* Wed Nov 21 2001 Christian Zoffoli 3.7-4jpp +- fixed previous releases ...grrr + +* Wed Nov 21 2001 Christian Zoffoli 3.7-3jpp +- added jpp extension +- removed packager tag + +* Sun Sep 30 2001 Guillaume Rousse 3.7-2jpp +- first unified release +- s/jPackage/JPackage + +* Mon Sep 17 2001 Guillaume Rousse 3.7-1mdk +- 3.7 +- vendor tag +- packager tag +- s/Copyright/License/ +- truncated description to 72 columns in spec +- spec cleanup +- used versioned jar +- moved demo files to %%{_datadir}/%%{name} + +* Sat Feb 17 2001 Guillaume Rousse 3.5-1mdk +- first Mandrake release diff --git a/sources b/sources new file mode 100644 index 0000000..0147a32 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA1 (hamcrest-java-1.3.tar.gz) = 0134b5b0f9c7b4173ead77a390ed34f54c482301