From 1fef6828095a37ddc955820c164dd8537ef124e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Lopez?= Date: Sun, 6 Jul 2025 23:43:52 +0200 Subject: [PATCH] gnu: guile-gi: Fix build. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/patches/guile-gi-fix-marshall-tests.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/guile-xyz.scm (guile-gi) [source]: Use git-fetch. Use “guile-gi-fix-marshall-tests.patch”. [#:configure-flags]: Add “--enable-hardening” like upstream. [#:phases]: Remove ‘remove-dotted-circle-from-combining-character’. Add ‘disable-failing-tests’. [inputs]: Remove webkitgtk-for-gtk3. Move gtk+… [native-inputs]: … here. Add autoconf, automake, texinfo and grilo. Replace xorg-server with xorg-server-for-tests. Change-Id: Idbc92cac219947fec268e8afcc9bf6527cc8a217 Signed-off-by: Liliana Marie Prikler --- gnu/local.mk | 1 + gnu/packages/guile-xyz.scm | 54 +++++++++++-------- .../patches/guile-gi-fix-marshall-tests.patch | 27 ++++++++++ 3 files changed, 59 insertions(+), 23 deletions(-) create mode 100644 gnu/packages/patches/guile-gi-fix-marshall-tests.patch diff --git a/gnu/local.mk b/gnu/local.mk index a0c3803cc5d87c406f6a33dbf51c879949b6ad0a..43caa2ce0b57a235e877b39fabc3f1b9ba04bf31 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1572,6 +1572,7 @@ dist_patch_DATA = \ %D%/packages/patches/guile-fibers-libevent-timeout.patch \ %D%/packages/patches/guile-fix-invalid-unicode-handling.patch \ %D%/packages/patches/guile-gdbm-ffi-support-gdbm-1.14.patch \ + %D%/packages/patches/guile-gi-fix-marshall-tests.patch \ %D%/packages/patches/guile-hurd-posix-spawn.patch \ %D%/packages/patches/guile-lzlib-gcc-14.patch \ %D%/packages/patches/guile-lzlib-hurd64.patch \ diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index 11eed6dba5936a444f38545b589f70cbeeba11d5..32227b4af8695e111cd485886273162e6b61ae3c 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -4476,37 +4476,40 @@ list of components. This module takes care of that for you.") (license license:lgpl3+))) (define-public guile-gi + (let ((commit "388653ac9e95802d1a69c585aef1d60e35e6b71c") + (revision "0")) (package (name "guile-gi") - (version "0.3.2") + (version (git-version "0.3.2" revision commit)) (source (origin - (method url-fetch) - (uri (string-append "http://lonelycactus.com/tarball/guile_gi-" - version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/spk121/guile-gi.git") + (commit commit))) + (file-name (git-file-name name version)) (sha256 (base32 - "019mbhgyga57k2074kg97mh3qsa8ny9l0kjgqids8cg3c6vbjdby")))) + "1ndzqbgy5jbfm2fan6y31xfxdxglzjhgqib4c34b3w5inxzkrm6v")) + (patches (search-patches "guile-gi-fix-marshall-tests.patch")))) (build-system glib-or-gtk-build-system) (arguments `(#:configure-flags '("CFLAGS=-Wno-error=incompatible-pointer-types" - "--with-gnu-filesystem-hierarchy") + "--with-gnu-filesystem-hierarchy" + "--enable-hardening") #:modules ((guix build glib-or-gtk-build-system) (guix build utils) (ice-9 popen) (ice-9 rdelim)) - #:disallowed-references ,(list gtk+ webkitgtk-for-gtk3) + #:disallowed-references ,(list grilo gtk+) #:phases (modify-phases %standard-phases - (add-after 'unpack 'remove-dotted-circle-from-combining-character - ;; The test/string.scm files contain ◌̀, which is a dotted circle - ;; (U+25cc) followed by an upper combining character (U+0300). The - ;; old guile 3.0.2 reader incorrectly ignores the dotted circle, - ;; and parses it as the combining character alone, but the new - ;; guile reader does not. - ;; See https://github.com/spk121/guile-gi/issues/112 - (lambda* _ - (substitute* "test/string.scm" - (("#\\\\◌̀") "#\\x0300")))) + (add-after 'unpack 'disable-failing-tests + (lambda _ + (substitute* "test/value.scm" + ;; This test segfaults sometimes. Reported at + ;; . + (("\\(test-equal \"inout-closure\"") + "#;(test-equal \"inout-closure\"")))) (add-after 'unpack 'patch-references-to-extension (lambda* (#:key outputs #:allow-other-keys) (let ((effective (read-line @@ -4534,20 +4537,25 @@ list of components. This module takes care of that for you.") (setenv "DISPLAY" ":1") #t))))) (native-inputs - (list gettext-minimal + (list autoconf + automake + texinfo + gettext-minimal `(,glib "bin") ; for glib-compile-resources - libtool pkg-config xorg-server)) + grilo + gtk+ + libtool + pkg-config + xorg-server-for-tests)) (propagated-inputs (list gobject-introspection)) - (inputs (list guile-3.0 glib - ;; For tests, only relevant when compiling natively - gtk+ webkitgtk-for-gtk3)) + (inputs (list guile-3.0 glib)) (home-page "https://github.com/spk121/guile-gi") (synopsis "GObject bindings for Guile") (description "Guile-GI is a library for Guile that allows using GObject-based libraries, such as GTK+3. Its README comes with the disclaimer: This is pre-alpha code.") - (license license:gpl3+))) + (license license:gpl3+)))) (define-public guile2.2-gi (package diff --git a/gnu/packages/patches/guile-gi-fix-marshall-tests.patch b/gnu/packages/patches/guile-gi-fix-marshall-tests.patch new file mode 100644 index 0000000000000000000000000000000000000000..dc2bd2607beac951b551b7e77f12b04c44ca29f0 --- /dev/null +++ b/gnu/packages/patches/guile-gi-fix-marshall-tests.patch @@ -0,0 +1,27 @@ +From 776c456dc767a261e026865ab5c3a76fe68ff4a2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?No=C3=A9=20Lopez?= +Date: Tue, 12 Aug 2025 12:30:31 +0200 +Subject: [PATCH] Fix marshall tests + +See . + +--- + test/marshall.scm | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/marshall.scm b/test/marshall.scm +index e15b3ee..fd826de 100644 +--- a/test/marshall.scm ++++ b/test/marshall.scm +@@ -23,7 +23,7 @@ + (("Marshall" "1.0") + #:renamer (protect* '(sizeof short int long size_t))) + (("GLib" "2.0") +- #:renamer (protect* '(test-equal test-assert test-skip)))) ++ #:renamer (protect* '(test-equal test-assert test-skip int)))) + + (define-syntax-rule (boolarray-input f) + (test-assert (symbol->string (quote f)) +-- +2.50.1 +