commit 11ba54b8ba94414c93466ebb5663b6c81d412ff0
Author: Antonio Trande <sagitter(a)fedoraproject.org>
Date: Sat Mar 9 15:47:20 2024 +0100
Patched for GCC14| Use %%defattr macros
sources | 2 +-
xbill-gcc14.patch | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
xbill.spec | 35 ++++++++++++++++++++++-------------
3 files changed, 75 insertions(+), 14 deletions(-)
---
diff --git a/sources b/sources
index 1e422ae..b237b39 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-585e4866b15255a24203db9959407b2f xbill-2.1.tar.gz
+SHA512 (xbill-2.1.tar.gz) =
127604d88258db0ec47084209c656f8817146d70b0fe16f5a1d79883415cf38200594834b39080d78c627104ae6d204f3c12caf127fa094108c4edfbfa98d966
diff --git a/xbill-gcc14.patch b/xbill-gcc14.patch
new file mode 100644
index 0000000..f501c41
--- /dev/null
+++ b/xbill-gcc14.patch
@@ -0,0 +1,52 @@
+--- a/Game.orig.c 2024-03-09 14:30:16.087727650 +0100
++++ b/Game.c 2024-03-09 14:33:06.880520169 +0100
+@@ -1,3 +1,10 @@
++#if defined __GNUC__ && __GNUC__ >= 14
++#pragma GCC diagnostic warning "-Wimplicit-function-declaration"
++#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
++#pragma GCC diagnostic warning "-Wint-conversion"
++#pragma GCC diagnostic warning "-Wreturn-mismatch"
++#endif
++
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+--- a/Scorelist.orig.c 2024-03-09 14:34:56.730100377 +0100
++++ b/Scorelist.c 2024-03-09 15:04:51.231663266 +0100
+@@ -1,3 +1,10 @@
++#if defined __GNUC__ && __GNUC__ >= 14
++#pragma GCC diagnostic warning "-Wimplicit-function-declaration"
++#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
++#pragma GCC diagnostic warning "-Wint-conversion"
++#pragma GCC diagnostic warning "-Wreturn-mismatch"
++#endif
++
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+--- a/UI.orig.c 2001-10-17 05:16:48.000000000 +0200
++++ b/UI.c 2024-03-09 15:07:27.784359915 +0100
+@@ -1,3 +1,10 @@
++#if defined __GNUC__ && __GNUC__ >= 14
++#pragma GCC diagnostic warning "-Wimplicit-function-declaration"
++#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
++#pragma GCC diagnostic warning "-Wint-conversion"
++#pragma GCC diagnostic warning "-Wreturn-mismatch"
++#endif
++
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+--- a/gtk.orig.c 2001-10-30 19:28:27.000000000 +0100
++++ b/gtk.c 2024-03-09 15:17:01.180923586 +0100
+@@ -1,3 +1,10 @@
++#if defined __GNUC__ && __GNUC__ >= 14
++#pragma GCC diagnostic warning "-Wimplicit-function-declaration"
++#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
++#pragma GCC diagnostic warning "-Wint-conversion"
++#pragma GCC diagnostic warning "-Wreturn-mismatch"
++#endif
++
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
diff --git a/xbill.spec b/xbill.spec
index f962cdf..1420757 100644
--- a/xbill.spec
+++ b/xbill.spec
@@ -1,9 +1,8 @@
Name: xbill
Version: 2.1
-Release: 22%{?dist}
+Release: 23%{?dist}
Summary: Stop Bill from loading his OS into all the computers
-
-License: GPL+
+License: GPL-1.0-or-later
URL:
http://www.xbill.org/
Source0:
http://www.xbill.org/download/%{name}-%{version}.tar.gz
Source1: %{name}.desktop
@@ -16,6 +15,11 @@ Patch1: %{name}-2.1-hurd_logos.patch
Patch2: %{name}-2.1-score.patch
Patch3: %{name}-2.1-dropsgid.patch
+# These aren't real fixes (waiting upstream for this)
+# Just a way to accommodate C code generators.
+# See
https://gcc.gnu.org/gcc-14/porting_to.html
+Patch4: %{name}-gcc14.patch
+
BuildRequires: gcc
BuildRequires: libtool
BuildRequires: gtk2-devel
@@ -35,16 +39,16 @@ and it is very popular at Red Hat.
%prep
%setup -q
-%patch0 -p0
-%patch1 -p1
+%patch -P 0 -p0 -b .backup
+%patch -P 1 -p1 -b .backup
# Patch2 must be applied before patch3
-%patch2 -p1
-%patch3 -p1
-
+%patch -P 2 -p1 -b .backup
+%patch -P 3 -p1 -b .backup
+%patch -P 4 -p1 -b .backup
%build
-autoreconf
+autoreconf -ivf
%configure \
--disable-motif \
--localstatedir=%{_localstatedir}/games
@@ -76,18 +80,23 @@ appstream-util validate-relax --nonet
%{buildroot}%{_datadir}/metainfo/*.appdata
%files
-%attr(2755,root,games) %{_bindir}/%{name}
-%{_localstatedir}/games/%{name}
-%attr(0664,root,games) %config(noreplace) %{_localstatedir}/games/%{name}/scores
-%{_datadir}/%{name}
+%{_datadir}/%{name}/
%{_mandir}/man6/%{name}.6*
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
%{_datadir}/applications/%{name}.desktop
%{_datadir}/metainfo/%{name}.appdata.xml
%doc ChangeLog README
+%defattr(2755,root,games)
+%{_bindir}/%{name}
+%defattr(0664,root,games)
+%config(noreplace) %{_localstatedir}/games/%{name}/scores
%changelog
+* Sat Mar 09 2024 Antonio Trande <sagitter(a)fedoraproject.org> - 2.1-23
+- Patched for GCC14
+- Use %%defattr macros
+
* Sun Feb 04 2024 RPM Fusion Release Engineering <sergiomb(a)rpmfusion.org> - 2.1-22
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild