public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/nip2] rawhide: spec cleanup and modernization
@ 2026-08-21 20:59 Filipe Rosset
  0 siblings, 0 replies; only message in thread
From: Filipe Rosset @ 2026-08-21 20:59 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/nip2
            Branch : rawhide
            Commit : 22a8967c8b8f46bfcda38b2c4ff362a9e3ffd927
            Author : Filipe Rosset <rosset.filipe@gmail.com>
            Date   : 2026-08-21T20:59:19+00:00
            Stats  : +63/-33 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/nip2/c/22a8967c8b8f46bfcda38b2c4ff362a9e3ffd927?branch=rawhide

            Log:
            spec cleanup and modernization
fixes FTBFS on F45/rawhide
fixes rhbz#2504368 and rhbz#2434864

Signed-off-by: Filipe Rosset <rosset.filipe@gmail.com>

---
diff --git a/nip2-IM_FREEF.patch b/nip2-IM_FREEF.patch
new file mode 100644
index 0000000..2b19dc8
--- /dev/null
+++ b/nip2-IM_FREEF.patch
@@ -0,0 +1,24 @@
+Fix compilation with GCC 15 / modern glib where (void) F((S)) in IM_FREEF causes "void value not ignored as it ought to be" error when F is g_free.
+
+--- nip2-8.9.1.orig/src/ip.h
++++ nip2-8.9.1/src/ip.h
+@@ -160,6 +160,19 @@
+ #include <vips/vips7compat.h>
+ #include <vips/debug.h>
+
++#ifdef IM_FREEF
++#undef IM_FREEF
++#define IM_FREEF(F, S) \
++	G_STMT_START \
++	{ \
++		if (S) { \
++			(F)((S)); \
++			(S) = 0; \
++		} \
++	} \
++	G_STMT_END
++#endif
++
+ #include <libxml/tree.h>
+ #include <libxml/parser.h>
+

diff --git a/nip2.spec b/nip2.spec
index 3f4cef5..44d280a 100644
--- a/nip2.spec
+++ b/nip2.spec
@@ -1,29 +1,35 @@
-Name:		nip2
-Version:	8.9.1
-Release:	%autorelease
-Summary:	Interactive tool for working with large images
-
-License:	GPL-2.0-or-later
-URL:		https://libvips.github.io/libvips/
-Source0:	https://github.com/libvips/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz
+Name:           nip2
+Version:        8.9.1
+Release:        %autorelease
+Summary:        Interactive tool for working with large images
+
+License:        GPL-2.0-or-later
+URL:            https://libvips.github.io/libvips/
+Source0:        https://github.com/libvips/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz
 # Do not re-declare statfs(), declare function arguments
 # FTBFS https://bugzilla.redhat.com/show_bug.cgi?id=2340934
 Patch0:         https://github.com/libvips/nip2/pull/123.patch
-
-BuildRequires: make
-BuildRequires:	pkgconfig(vips)
-BuildRequires:	pkgconfig(gtk+-2.0)
-BuildRequires:	pkgconfig(libxml-2.0)
-BuildRequires:	pkgconfig(fftw3)
-BuildRequires:	pkgconfig(libgvc)
-BuildRequires:	pkgconfig(gsl)
-BuildRequires:	pkgconfig(libgsf-1)
-BuildRequires:	gcc
-BuildRequires:	shared-mime-info gnome-icon-theme-devel
-BuildRequires:	flex bison intltool gettext
-BuildRequires:	desktop-file-utils xdg-utils
-BuildRequires:	libappstream-glib
-
+# Fix void value error in IM_FREEF with GCC 15
+Patch1:         nip2-IM_FREEF.patch
+
+BuildRequires:  bison
+BuildRequires:  desktop-file-utils
+BuildRequires:  flex
+BuildRequires:  gcc
+BuildRequires:  gettext
+BuildRequires:  gnome-icon-theme-devel
+BuildRequires:  intltool
+BuildRequires:  libappstream-glib
+BuildRequires:  make
+BuildRequires:  pkgconfig(fftw3)
+BuildRequires:  pkgconfig(gsl)
+BuildRequires:  pkgconfig(gtk+-2.0)
+BuildRequires:  pkgconfig(libgsf-1)
+BuildRequires:  pkgconfig(libgvc)
+BuildRequires:  pkgconfig(libxml-2.0)
+BuildRequires:  pkgconfig(vips)
+BuildRequires:  shared-mime-info
+BuildRequires:  xdg-utils
 
 # description taken from Debian package
 %description
@@ -51,33 +57,33 @@ GIMP should be used instead.
 %make_install
 
 # AppStream spec changed its install directory
-mv $RPM_BUILD_ROOT%{_datadir}/appdata $RPM_BUILD_ROOT%{_datadir}/metainfo
+mv %{buildroot}%{_datadir}/appdata %{buildroot}%{_datadir}/metainfo
 
 # delete doc (we will get it later)
-rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/nip2
+rm -rf %{buildroot}%{_datadir}/doc/nip2
 
 # locale stuff
-%find_lang nip2
+%find_lang %{name}
 
 # icon
-install -d $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps
-cp -a share/nip2/data/vips-128.png	\
-	$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps/nip2.png
+install -d %{buildroot}%{_datadir}/icons/hicolor/128x128/apps
+cp -a share/nip2/data/vips-128.png \
+        %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/nip2.png
 
 
 %check
 # metainfo
-appstream-util validate-relax --nonet $RPM_BUILD_ROOT%{_datadir}/metainfo/nip2.appdata.xml
+appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/nip2.appdata.xml
 
 # desktop file
-desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/nip2.desktop
+desktop-file-validate %{buildroot}%{_datadir}/applications/nip2.desktop
 
-%files -f nip2.lang
+%files -f %{name}.lang
 %doc doc/html doc/pdf AUTHORS ChangeLog NEWS THANKS TODO
 %license COPYING
 %{_bindir}/nip2
 %{_datadir}/nip2
-%{_mandir}/man1/nip2.1.gz
+%{_mandir}/man1/nip2.1*
 %{_datadir}/icons/hicolor/*/apps/*
 %{_datadir}/metainfo/nip2.appdata.xml
 %{_datadir}/applications/nip2.desktop

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-21 20:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-21 20:59 [rpms/nip2] rawhide: spec cleanup and modernization Filipe Rosset

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox