From c2bbbf11ca422f0cf546b8c9e558c21b7139193a4e637462d4f87dd0f13099ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 2 Jun 2016 16:34:25 +0000 Subject: [PATCH 1/5] Accepting request 399833 from home:dimstar:Factory Fix build with newer, stricter java 1.8 OBS-URL: https://build.opensuse.org/request/show/399833 OBS-URL: https://build.opensuse.org/package/show/Java:packages/hamcrest?expand=0&rev=19 --- hamcrest-1.3-javadoc.patch | 16 ++++++++++++++++ hamcrest.changes | 6 ++++++ hamcrest.spec | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/hamcrest-1.3-javadoc.patch b/hamcrest-1.3-javadoc.patch index 2d387ef..fade757 100644 --- a/hamcrest-1.3-javadoc.patch +++ b/hamcrest-1.3-javadoc.patch @@ -18,3 +18,19 @@ Index: hamcrest-1.3/build.xml + ++ + + + +@@ -304,6 +304,7 @@ + + + ++ + + + diff --git a/hamcrest.changes b/hamcrest.changes index 488c207..fd199f1 100644 --- a/hamcrest.changes +++ b/hamcrest.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jun 2 15:33:14 UTC 2016 - dimstar@opensuse.org + +- Update hamcrest-1.3-javadoc.patch: Fix build with recent Java 1.8 + by disabling doclint. + ------------------------------------------------------------------- Wed Mar 18 09:46:07 UTC 2015 - tchvatal@suse.com diff --git a/hamcrest.spec b/hamcrest.spec index e464ad3..641f546 100644 --- a/hamcrest.spec +++ b/hamcrest.spec @@ -1,7 +1,7 @@ # # spec file for package hamcrest # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed From e7a6c472da3f887621d5448ff4dd7ae16b0f00b6893ba51f027c206468bee979 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Fri, 3 Jun 2016 08:06:06 +0000 Subject: [PATCH 2/5] OBS-URL: https://build.opensuse.org/package/show/Java:packages/hamcrest?expand=0&rev=20 --- hamcrest-1.3-javadoc.patch | 8 -------- hamcrest-1.3-no-doclint.patch | 12 ++++++++++++ hamcrest.changes | 8 +++++--- hamcrest.spec | 5 +++++ 4 files changed, 22 insertions(+), 11 deletions(-) create mode 100644 hamcrest-1.3-no-doclint.patch diff --git a/hamcrest-1.3-javadoc.patch b/hamcrest-1.3-javadoc.patch index fade757..fa8b39b 100644 --- a/hamcrest-1.3-javadoc.patch +++ b/hamcrest-1.3-javadoc.patch @@ -26,11 +26,3 @@ Index: hamcrest-1.3/build.xml -@@ -304,6 +304,7 @@ - - - -+ - - - diff --git a/hamcrest-1.3-no-doclint.patch b/hamcrest-1.3-no-doclint.patch new file mode 100644 index 0000000..b12798e --- /dev/null +++ b/hamcrest-1.3-no-doclint.patch @@ -0,0 +1,12 @@ +Index: hamcrest-1.3/build.xml +=================================================================== +--- hamcrest-1.3.orig/build.xml ++++ hamcrest-1.3/build.xml +@@ -304,6 +304,7 @@ + + + ++ + + + diff --git a/hamcrest.changes b/hamcrest.changes index fd199f1..72b477b 100644 --- a/hamcrest.changes +++ b/hamcrest.changes @@ -1,8 +1,10 @@ ------------------------------------------------------------------- -Thu Jun 2 15:33:14 UTC 2016 - dimstar@opensuse.org +Fri Jun 3 08:04:27 UTC 2016 - fstrba@suse.com -- Update hamcrest-1.3-javadoc.patch: Fix build with recent Java 1.8 - by disabling doclint. +- Added patch: + * hamcrest-1.3-no-doclint.patch: + - Fix build on systems that use recent Java 1.8 by disabling + doclint. ------------------------------------------------------------------- Wed Mar 18 09:46:07 UTC 2015 - tchvatal@suse.com diff --git a/hamcrest.spec b/hamcrest.spec index 641f546..d7698a3 100644 --- a/hamcrest.spec +++ b/hamcrest.spec @@ -69,6 +69,8 @@ Patch2: %{name}-%{version}-no-integration.patch Patch3: %{name}-%{version}-javadoc.patch #PATCH-FIX-UPSTREAM: random build crash fix Patch4: hamcrest-1.3-random-build-crash.patch +#PATCH-FIX-OPENSUSE: disable doclint +Patch5: hamcrest-1.3-no-doclint.patch Requires: java >= 1.6.0 Requires: qdox @@ -164,6 +166,9 @@ ln -sf $(build-classpath testng-jdk15) lib/integration/ %endif %patch3 -p1 %patch4 -p1 +%if 0%{?suse_version} >= 1330 +%patch5 -p1 +%endif perl -pi -e 's/\r$//g' LICENSE.txt From e5bd433100ca13d2b0f0a1c395c2d9c8d48780777b83fdaea49bb1686bbcafa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 3 Jun 2016 09:25:01 +0000 Subject: [PATCH 3/5] Accepting request 399939 from Java:packages OBS-URL: https://build.opensuse.org/request/show/399939 OBS-URL: https://build.opensuse.org/package/show/Java:packages/hamcrest?expand=0&rev=21 --- hamcrest-1.3-javadoc.patch | 8 -------- hamcrest-1.3-no-doclint.patch | 12 ------------ hamcrest.changes | 8 -------- hamcrest.spec | 7 +------ 4 files changed, 1 insertion(+), 34 deletions(-) delete mode 100644 hamcrest-1.3-no-doclint.patch diff --git a/hamcrest-1.3-javadoc.patch b/hamcrest-1.3-javadoc.patch index fa8b39b..2d387ef 100644 --- a/hamcrest-1.3-javadoc.patch +++ b/hamcrest-1.3-javadoc.patch @@ -18,11 +18,3 @@ Index: hamcrest-1.3/build.xml - -+ - - - diff --git a/hamcrest-1.3-no-doclint.patch b/hamcrest-1.3-no-doclint.patch deleted file mode 100644 index b12798e..0000000 --- a/hamcrest-1.3-no-doclint.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: hamcrest-1.3/build.xml -=================================================================== ---- hamcrest-1.3.orig/build.xml -+++ hamcrest-1.3/build.xml -@@ -304,6 +304,7 @@ - - - -+ - - - diff --git a/hamcrest.changes b/hamcrest.changes index 72b477b..488c207 100644 --- a/hamcrest.changes +++ b/hamcrest.changes @@ -1,11 +1,3 @@ -------------------------------------------------------------------- -Fri Jun 3 08:04:27 UTC 2016 - fstrba@suse.com - -- Added patch: - * hamcrest-1.3-no-doclint.patch: - - Fix build on systems that use recent Java 1.8 by disabling - doclint. - ------------------------------------------------------------------- Wed Mar 18 09:46:07 UTC 2015 - tchvatal@suse.com diff --git a/hamcrest.spec b/hamcrest.spec index d7698a3..e464ad3 100644 --- a/hamcrest.spec +++ b/hamcrest.spec @@ -1,7 +1,7 @@ # # spec file for package hamcrest # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -69,8 +69,6 @@ Patch2: %{name}-%{version}-no-integration.patch Patch3: %{name}-%{version}-javadoc.patch #PATCH-FIX-UPSTREAM: random build crash fix Patch4: hamcrest-1.3-random-build-crash.patch -#PATCH-FIX-OPENSUSE: disable doclint -Patch5: hamcrest-1.3-no-doclint.patch Requires: java >= 1.6.0 Requires: qdox @@ -166,9 +164,6 @@ ln -sf $(build-classpath testng-jdk15) lib/integration/ %endif %patch3 -p1 %patch4 -p1 -%if 0%{?suse_version} >= 1330 -%patch5 -p1 -%endif perl -pi -e 's/\r$//g' LICENSE.txt From 978f5b55729b738784a79ba7690a73771599be477620330173b8daf055916e8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 19 May 2017 13:15:05 +0000 Subject: [PATCH 4/5] - Fix homepage - Update to build with new javapacakges-tools OBS-URL: https://build.opensuse.org/package/show/Java:packages/hamcrest?expand=0&rev=22 --- hamcrest.changes | 6 +++ hamcrest.spec | 101 ++++------------------------------------------- 2 files changed, 14 insertions(+), 93 deletions(-) diff --git a/hamcrest.changes b/hamcrest.changes index 488c207..073d2a3 100644 --- a/hamcrest.changes +++ b/hamcrest.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri May 19 13:11:37 UTC 2017 - tchvatal@suse.com + +- Fix homepage +- Update to build with new javapacakges-tools + ------------------------------------------------------------------- Wed Mar 18 09:46:07 UTC 2015 - tchvatal@suse.com diff --git a/hamcrest.spec b/hamcrest.spec index e464ad3..44709cf 100644 --- a/hamcrest.spec +++ b/hamcrest.spec @@ -1,7 +1,7 @@ # # spec file for package hamcrest # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,32 +16,13 @@ # -%define _without_integration 1 -%define _without_tests 1 -%define _withouth_jarjar 1 - -# This option controls integration which requires easymock2 and jmock and junit -%bcond_without integration - -# This option controls jarjar on qdox -# Since bundling the qdox classes prevents upgrades, we disable it by default -%bcond_with jarjar - -# This option controls tests which requires ant-junit and testng -%bcond_without tests - -# If integration is disabled, then tests are disabled -%if %without integration -%bcond_with tests -%endif - Name: hamcrest Version: 1.3 Release: 0 Summary: Library of matchers for building test expressions License: BSD-3-Clause Group: Development/Libraries/Java -Url: http://code.google.com/p/%{name}/ +Url: https://github.com/hamcrest/JavaHamcrest Source0: http://%{name}.googlecode.com/files/%{name}-%{version}.tgz Source1: http://repo1.maven.org/maven2/org/%{name}/%{name}-parent/%{version}/%{name}-parent-%{version}.pom Source2: http://repo1.maven.org/maven2/org/%{name}/%{name}-library/%{version}/%{name}-library-%{version}.pom @@ -52,13 +33,11 @@ Source6: http://repo1.maven.org/maven2/org/%{name}/%{name}-all/%{version} # This file was added by the maintainer for compatibility with maven dep # solving system Source7: %{name}-text-%{version}.pom - Source8: hamcrest-core-MANIFEST.MF Source9: hamcrest-library-MANIFEST.MF Source10: hamcrest-text-MANIFEST.MF Source11: hamcrest-integration-MANIFEST.MF Source12: hamcrest-generator-MANIFEST.MF - #PATCH-FIX-OPENSUSE: don't use versioned deps, no overview in html Patch0: %{name}-%{version}-build.patch #PATCH-FIX-OPENSUSE: don't bundle QDox classes into hamcrest-generator.jar @@ -69,33 +48,14 @@ Patch2: %{name}-%{version}-no-integration.patch Patch3: %{name}-%{version}-javadoc.patch #PATCH-FIX-UPSTREAM: random build crash fix Patch4: hamcrest-1.3-random-build-crash.patch - -Requires: java >= 1.6.0 -Requires: qdox -%if %with integration -Requires: easymock2 -Requires: jmock -%endif - BuildRequires: ant >= 1.6.5 BuildRequires: java-devel >= 1.6.0 +BuildRequires: javapackages-local BuildRequires: javapackages-tools -BuildRequires: zip -%if %with integration -BuildRequires: easymock2 -%endif -%if %with jarjar -BuildRequires: jarjar -%endif -%if %with integration -BuildRequires: ant-junit -BuildRequires: jmock -BuildRequires: junit -%endif BuildRequires: qdox -%if %with tests -BuildRequires: testng -%endif +BuildRequires: zip +Requires: java >= 1.6.0 +Requires: qdox BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch @@ -105,8 +65,6 @@ 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 javadoc Summary: Javadoc for %{name} Group: Documentation/HTML @@ -119,49 +77,21 @@ Summary: Demo files for %{name} Group: Development/Libraries/Java Requires: %{name} = %{version} Requires: junit -%if %with tests -Requires: testng -%endif %description demo Demo files for %{name}. %prep -%setup -q +%setup -q 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/%{name}-%{version}/lib/generator/jarjar-1.0rc3.jar.no -%if %with jarjar -ln -sf $(build-classpath jarjar) lib/generator/ -%endif -# BUILD/%{name}-%{version}/lib/generator/qdox-1.6.1.jar.no ln -sf $(build-classpath qdox) lib/generator/ -# BUILD/%{name}-%{version}/lib/integration/easymock-2.2.jar.no -%if %with integration -ln -sf $(build-classpath easymock2) lib/integration/ -%endif -# BUILD/%{name}-%{version}/lib/integration/jmock-%{version}0RC1.jar.no -%if %with integration -ln -sf $(build-classpath jmock) lib/integration/ -# BUILD/%{name}-%{version}/lib/integration/junit-3.8.1.jar.no -ln -sf $(build-classpath junit) lib/integration/ -# BUILD/%{name}-%{version}/lib/integration/junit-4.0.jar.no -#ln -sf $(build-classpath junit) lib/integration/ -%endif -# BUILD/%{name}-%{version}/lib/integration/testng-4.6-jdk15.jar.no -%if %with tests -ln -sf $(build-classpath testng-jdk15) lib/integration/ -%endif %patch0 -p1 -%if %without jarjar %patch1 -p1 -%endif -%if %without integration %patch2 -p1 -%endif %patch3 -p1 %patch4 -p1 @@ -169,11 +99,6 @@ perl -pi -e 's/\r$//g' LICENSE.txt %build export CLASSPATH=$(build-classpath qdox) -%if %with integration -export OPT_JAR_LIST="junit ant/ant-junit" -%endif -# 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 @@ -229,23 +154,13 @@ install -m 644 build/%{name}-library-%{version}.jar %{buildroot}%{_javadir}/%{na install -m 644 %{SOURCE2} %{buildroot}%{_mavenpomdir}/JPP.%{name}-library.pom %add_maven_depmap JPP.%{name}-library.pom %{name}/library.jar -%if %with integration -install -m 644 build/%{name}-integration-%{version}.jar %{buildroot}%{_javadir}/%{name}/integration.jar -install -m 644 %{SOURCE3} %{buildroot}%{_mavenpomdir}/JPP.%{name}-integration.pom -%add_maven_depmap JPP.%{name}-integration.pom %{name}/integration.jar -%endif - install -m 644 build/%{name}-text-%{version}.jar %{buildroot}%{_javadir}/%{name}/text.jar install -m 644 %{SOURCE7} %{buildroot}%{_mavenpomdir}/JPP.%{name}-text.pom %add_maven_depmap JPP.%{name}-text.pom %{name}/text.jar -%if %with tests -install -m 644 build/%{name}-unit-test-%{version}.jar %{buildroot}%{_javadir}/%{name}/unit-test.jar -%endif - # javadoc install -d -m 755 %{buildroot}%{_javadocdir}/%{name} -cp -pr build/temp/hamcrest-all-1.3-javadoc.jar.contents/* $RPM_BUILD_ROOT%{_javadocdir}/%{name} +cp -pr build/temp/hamcrest-all-1.3-javadoc.jar.contents/* %{buildroot}%{_javadocdir}/%{name} # demo install -d -m 755 %{buildroot}%{_datadir}/%{name} From 569e43d08611f8d038208f42645650deafac11b07d6f823d91e04c4e4bc1137c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 29 May 2017 16:03:59 +0000 Subject: [PATCH 5/5] - Apply patch from fedora: * hamcrest-1.3-fork-javac.patch OBS-URL: https://build.opensuse.org/package/show/Java:packages/hamcrest?expand=0&rev=23 --- hamcrest-1.3-fork-javac.patch | 22 ++++++++++++++++++++++ hamcrest.changes | 6 ++++++ hamcrest.spec | 2 ++ 3 files changed, 30 insertions(+) create mode 100644 hamcrest-1.3-fork-javac.patch diff --git a/hamcrest-1.3-fork-javac.patch b/hamcrest-1.3-fork-javac.patch new file mode 100644 index 0000000..9186591 --- /dev/null +++ b/hamcrest-1.3-fork-javac.patch @@ -0,0 +1,22 @@ +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(-) + +Index: hamcrest-1.3/build.xml +=================================================================== +--- hamcrest-1.3.orig/build.xml ++++ hamcrest-1.3/build.xml +@@ -268,7 +268,7 @@ + + + +- ++ + + + diff --git a/hamcrest.changes b/hamcrest.changes index 073d2a3..c66b0ae 100644 --- a/hamcrest.changes +++ b/hamcrest.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon May 29 16:05:25 UTC 2017 - tchvatal@suse.com + +- Apply patch from fedora: + * hamcrest-1.3-fork-javac.patch + ------------------------------------------------------------------- Fri May 19 13:11:37 UTC 2017 - tchvatal@suse.com diff --git a/hamcrest.spec b/hamcrest.spec index 44709cf..2a334fa 100644 --- a/hamcrest.spec +++ b/hamcrest.spec @@ -48,6 +48,7 @@ Patch2: %{name}-%{version}-no-integration.patch Patch3: %{name}-%{version}-javadoc.patch #PATCH-FIX-UPSTREAM: random build crash fix Patch4: hamcrest-1.3-random-build-crash.patch +Patch5: hamcrest-1.3-fork-javac.patch BuildRequires: ant >= 1.6.5 BuildRequires: java-devel >= 1.6.0 BuildRequires: javapackages-local @@ -94,6 +95,7 @@ ln -sf $(build-classpath qdox) lib/generator/ %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 perl -pi -e 's/\r$//g' LICENSE.txt