public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jens Petersen <petersen@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/ghc-gi-gdk4] f45: Requires gtk4-devel bounds with LUA (#2503913)
Date: Sat, 14 Nov 2026 11:01:14 GMT	[thread overview]
Message-ID: <179465407499.1.1209195945032328505.rpms-ghc-gi-gdk4-835624f64cba@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/ghc-gi-gdk4
Branch : f45
Commit : 835624f64cbab3ebc01e2657ca0f17cbb5cccfd7
Author : Jens Petersen <petersen@redhat.com>
Date   : 2026-11-14T17:26:36+08:00
Stats  : +22/-0 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/ghc-gi-gdk4/c/835624f64cbab3ebc01e2657ca0f17cbb5cccfd7?branch=f45

Log:
Requires gtk4-devel bounds with LUA (#2503913)

---
diff --git a/ghc-gi-gdk4.spec b/ghc-gi-gdk4.spec
index f1374d5..f86fb8f 100644
--- a/ghc-gi-gdk4.spec
+++ b/ghc-gi-gdk4.spec
@@ -5,6 +5,25 @@
 %global pkgver %{pkg_name}-%{version}
 %{?haskell_setup}
 
+%{lua:
+local f = io.open(rpm.expand("%{_libdir}/pkgconfig/gtk4.pc"), "r")
+if f then
+  local content = f:read("*a")
+  f:close()
+  local ver = content:match("\nVersion:%s*([%d%.]+)")
+  local maj, min = (ver or ""):match("^(%d+)%.(%d+)")
+  if maj and min then
+    local min_n = tonumber(min)
+    -- for even stable release: only allow 4.X
+    -- for odd devel release: also allow 4.(X+1)
+    local upper_min = (min_n % 2 == 1) and (min_n + 2) or (min_n + 1)
+    local lower_ver = (min_n % 2 == 1) and ver or (maj .. "." .. min)
+    rpm.define("gtk4_lower " .. lower_ver)
+    rpm.define("gtk4_upper " .. maj .. "." .. upper_min)
+  end
+end
+}
+
 Name:           ghc-%{pkg_name}
 Version:        4.0.10
 Release:        5%{?dist}
@@ -66,6 +85,9 @@ Requires:       %{name}%{?_isa} = %{version}-%{release}
 # Begin cabal-rpm deps:
 Requires:       pkgconfig(gtk4)
 # End cabal-rpm deps
+%if %{defined gtk4_lower}
+Requires:       (gtk4-devel >= %{gtk4_lower} with gtk4-devel < %{gtk4_upper})
+%endif
 
 %description devel
 This package provides the Haskell %{pkg_name} library development files.

                 reply	other threads:[~2026-11-14 11:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179465407499.1.1209195945032328505.rpms-ghc-gi-gdk4-835624f64cba@fedoraproject.org \
    --to=petersen@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox