From 2931a800f442ac91c5ccb06bf3dfefda0b4a5202 Mon Sep 17 00:00:00 2001 From: Michael Simacek Date: Thu, 22 Feb 2018 16:26:06 +0100 Subject: [PATCH] Disable -Werror --- 0001-Adapt-build.patch | 2 +- 0002-Load-system-library.patch | 2 +- 0003-Tests-headless.patch | 2 +- 0004-Fix-javadoc-build.patch | 2 +- 0005-Fix-duplicate-manifest-entry.patch | 2 +- 0006-Remove-Werror.patch | 29 +++++++++++++++++++++++++ jna.spec | 8 ++++++- 7 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 0006-Remove-Werror.patch diff --git a/0001-Adapt-build.patch b/0001-Adapt-build.patch index 53f0872..003d5db 100644 --- a/0001-Adapt-build.patch +++ b/0001-Adapt-build.patch @@ -1,7 +1,7 @@ From 52ef407584801916d6e60c4f4c5411023b5ac369 Mon Sep 17 00:00:00 2001 From: Michael Simacek Date: Mon, 16 Jan 2017 11:29:06 +0100 -Subject: [PATCH 1/5] Adapt build +Subject: [PATCH 1/6] Adapt build --- native/Makefile | 3 +-- diff --git a/0002-Load-system-library.patch b/0002-Load-system-library.patch index f5e4179..717300c 100644 --- a/0002-Load-system-library.patch +++ b/0002-Load-system-library.patch @@ -1,7 +1,7 @@ From 3d08314de0494ff8bdc1a7bccc0ecc1730dbdd60 Mon Sep 17 00:00:00 2001 From: Michael Simacek Date: Mon, 16 Jan 2017 11:31:32 +0100 -Subject: [PATCH 2/5] Load system library +Subject: [PATCH 2/6] Load system library --- src/com/sun/jna/Native.java | 97 ++------------------------------------------- diff --git a/0003-Tests-headless.patch b/0003-Tests-headless.patch index b504451..f879f9d 100644 --- a/0003-Tests-headless.patch +++ b/0003-Tests-headless.patch @@ -1,7 +1,7 @@ From c0f33e9ed0a5cfd79b58487c2a36c9b880b49947 Mon Sep 17 00:00:00 2001 From: Michael Simacek Date: Mon, 16 Jan 2017 11:32:32 +0100 -Subject: [PATCH 3/5] Tests headless +Subject: [PATCH 3/6] Tests headless --- build.xml | 1 + diff --git a/0004-Fix-javadoc-build.patch b/0004-Fix-javadoc-build.patch index ca81e99..f68b0be 100644 --- a/0004-Fix-javadoc-build.patch +++ b/0004-Fix-javadoc-build.patch @@ -1,7 +1,7 @@ From ced8baacd3bccba7ebaba80785b891bf579af215 Mon Sep 17 00:00:00 2001 From: Michael Simacek Date: Tue, 31 Jan 2017 14:21:19 +0100 -Subject: [PATCH 4/5] Fix javadoc build +Subject: [PATCH 4/6] Fix javadoc build --- build.xml | 1 + diff --git a/0005-Fix-duplicate-manifest-entry.patch b/0005-Fix-duplicate-manifest-entry.patch index 112e12b..fce0d78 100644 --- a/0005-Fix-duplicate-manifest-entry.patch +++ b/0005-Fix-duplicate-manifest-entry.patch @@ -1,7 +1,7 @@ From de939d7c9266f89542cea5ebef5980a95f1244a9 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Mon, 10 Jul 2017 11:48:43 +0200 -Subject: [PATCH 5/5] Fix duplicate manifest entry +Subject: [PATCH 5/6] Fix duplicate manifest entry Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1469022 --- diff --git a/0006-Remove-Werror.patch b/0006-Remove-Werror.patch new file mode 100644 index 0000000..60f7f02 --- /dev/null +++ b/0006-Remove-Werror.patch @@ -0,0 +1,29 @@ +From 6e8784db2fa3b3b2efedaae75d15d5d5cf3ed50c Mon Sep 17 00:00:00 2001 +From: Michael Simacek +Date: Thu, 22 Feb 2018 16:17:15 +0100 +Subject: [PATCH 6/6] Remove -Werror + +--- + native/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/native/Makefile b/native/Makefile +index 3712a9e..73a906f 100644 +--- a/native/Makefile ++++ b/native/Makefile +@@ -336,10 +336,10 @@ endif + ifeq ($(CC),gcc) + GCC_MAJOR_VERSION = $(shell gcc -dumpversion | cut -f 1 -d '.') + ifneq ($(GCC_MAJOR_VERSION),4) +- LOC_CC_OPTS=-Wno-unknown-warning-option -Werror -Wno-clobbered -Wno-unused-variable ++ LOC_CC_OPTS=-Wno-unknown-warning-option -Wno-clobbered -Wno-unused-variable + endif + else +- LOC_CC_OPTS=-Wno-unknown-warning-option -Werror -Wno-clobbered -Wno-unused-variable ++ LOC_CC_OPTS=-Wno-unknown-warning-option -Wno-clobbered -Wno-unused-variable + endif + + # Enable 64-bit builds if the arch demands it +-- +2.14.3 + diff --git a/jna.spec b/jna.spec index 61890a3..2dd442c 100644 --- a/jna.spec +++ b/jna.spec @@ -1,6 +1,6 @@ Name: jna Version: 4.5.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Pure Java access to native libraries # Most of code is dual-licensed under either LGPL 2.1 only or Apache # License 2.0. WeakIdentityHashMap.java was taken from Apache CXF, @@ -25,6 +25,8 @@ Patch3: 0004-Fix-javadoc-build.patch # Avoid generating duplicate manifest entry # See https://bugzilla.redhat.com/show_bug.cgi?id=1469022 Patch4: 0005-Fix-duplicate-manifest-entry.patch +# We don't want newly added warnings to break our build +Patch5: 0006-Remove-Werror.patch # We manually require libffi because find-requires doesn't work # inside jars. @@ -73,6 +75,7 @@ cp %{SOURCE1} . %patch2 -p1 -b .tests-headless %patch3 -p1 %patch4 -p1 +%patch5 -p1 chmod -Rf a+rX,u+w,g-w,o-w . sed -i 's|@LIBDIR@|%{_libdir}/%{name}|' src/com/sun/jna/Native.java @@ -126,6 +129,9 @@ install -m 755 build/native*/libjnidispatch*.so %{buildroot}%{_libdir}/%{name}/ %changelog +* Thu Feb 22 2018 Michael Simacek - 4.5.1-3 +- Disable -Werror + * Wed Feb 07 2018 Fedora Release Engineering - 4.5.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild