public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/spice-gtk] rawhide: fix spice-version.h generation
@ 2026-06-08  7:58 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-06-08  7:58 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/spice-gtk
            Branch : rawhide
            Commit : 0082c232f35ed9766a9f3742fc6c4a0f7c2ffc02
            Author : Marc-André Lureau <marcandre.lureau@redhat.com>
            Date   : 2026-06-08T11:58:18+04:00
            Stats  : +57/-0 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/spice-gtk/c/0082c232f35ed9766a9f3742fc6c4a0f7c2ffc02?branch=rawhide

            Log:
            fix spice-version.h generation

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

---
diff --git a/0001-build-sys-fix-spice-version.h-generation.patch b/0001-build-sys-fix-spice-version.h-generation.patch
new file mode 100644
index 0000000..4327886
--- /dev/null
+++ b/0001-build-sys-fix-spice-version.h-generation.patch
@@ -0,0 +1,55 @@
+From 9fe5884a22761b84ed408fda327f2b4b7fe0c02e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
+Date: Wed, 3 Jun 2026 17:38:10 +0400
+Subject: [PATCH spice-gtk] build-sys: fix spice-version.h generation
+
+Move version_data configuration right after parsing the project
+version, before the foreach loops that reuse the same variable names
+for generating SPICE_GTK_VERSION macros.
+
+Also strip git suffixes (e.g. '-dirty') from the minor version
+component, matching what was already done for micro.
+
+Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
+---
+ src/meson.build | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/src/meson.build b/src/meson.build
+index 4dc58011..7289f8da 100644
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -12,13 +12,18 @@ if meson.project_version().startswith('UNKNOWN')
+ else
+   version_info = meson.project_version().split('.')
+   major = '@0@'.format(version_info[0])
+-  minor = '@0@'.format(version_info[1])
++  minor = '@0@'.format(version_info[1].split('-')[0])
+   micro = '0'
+   if version_info.length() > 2
+     micro = version_info[2].split('-')[0]
+   endif
+ endif
+ 
++version_data = configuration_data()
++version_data.set('SPICE_GTK_MAJOR_VERSION', major)
++version_data.set('SPICE_GTK_MINOR_VERSION', minor)
++version_data.set('SPICE_GTK_MICRO_VERSION', micro)
++
+ script = ''
+ # versions, [major, minimum_minor, maximum_minor]
+ versions = [[ 0, 1, 43 ]]
+@@ -62,10 +67,6 @@ foreach version: versions
+ '''.format('0', version, script)
+ endforeach
+ 
+-version_data = configuration_data()
+-version_data.set('SPICE_GTK_MAJOR_VERSION', major)
+-version_data.set('SPICE_GTK_MINOR_VERSION', minor)
+-version_data.set('SPICE_GTK_MICRO_VERSION', micro)
+ version_data.set('SPICE_VERSION_MACROS', script)
+ spice_version_h = configure_file(input : 'spice-version.h.in',
+                                  output : 'spice-version.h',
+-- 
+2.54.0
+

diff --git a/spice-gtk.spec b/spice-gtk.spec
index 8cdb8ff..c37cdbb 100644
--- a/spice-gtk.spec
+++ b/spice-gtk.spec
@@ -18,6 +18,8 @@ Source0:        https://www.spice-space.org/download/gtk/%{name}-%{version}%{?_v
 #Source1:        https://www.spice-space.org/download/gtk/%{name}-%{version}%{?_version_suffix}.tar.xz.sig
 #Source2:        victortoso-E37A484F.keyring
 
+Patch0000:     0001-build-sys-fix-spice-version.h-generation.patch
+
 BuildRequires: git-core
 BuildRequires: meson
 BuildRequires: usbredir-devel >= 0.7.1

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

only message in thread, other threads:[~2026-06-08  7:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-08  7:58 [rpms/spice-gtk] rawhide: fix spice-version.h generation 

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