unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#39723] [PATCH] gnu: swig: Update to 4.0.1.
@ 2020-02-21 21:43 Arun Isaac
  2020-02-22 17:11 ` bug#39723: " Jakub Kądziołka
  0 siblings, 1 reply; 3+ messages in thread
From: Arun Isaac @ 2020-02-21 21:43 UTC (permalink / raw)
  To: 39723; +Cc: Arun Isaac

* gnu/packages/swig.scm (swig): Update to 4.0.1.
[source]: Remove swig-guile-gc.patch.
[arguments]: Remove set-env phase.
[inputs]: Replace guile-2.0 with guile-3.0.
* gnu/packages/patches/swig-guile-gc.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): Unregister it.
---
 gnu/local.mk                             |  1 -
 gnu/packages/patches/swig-guile-gc.patch | 76 ------------------------
 gnu/packages/swig.scm                    | 13 ++--
 3 files changed, 4 insertions(+), 86 deletions(-)
 delete mode 100644 gnu/packages/patches/swig-guile-gc.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index f2289518e5..552861a515 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1411,7 +1411,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/superlu-dist-awpm-grid.patch		\
   %D%/packages/patches/superlu-dist-scotchmetis.patch		\
   %D%/packages/patches/supertux-unbundle-squirrel.patch		\
-  %D%/packages/patches/swig-guile-gc.patch			\
   %D%/packages/patches/swish-e-search.patch			\
   %D%/packages/patches/swish-e-format-security.patch		\
   %D%/packages/patches/symmetrica-bruch.patch			\
diff --git a/gnu/packages/patches/swig-guile-gc.patch b/gnu/packages/patches/swig-guile-gc.patch
deleted file mode 100644
index 0e745a6247..0000000000
--- a/gnu/packages/patches/swig-guile-gc.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-Fix garbage collection for Guile versions >= 2.0.12.  This issue showed
-up when running the tests on i686-linux.
-
-Taken from this upstream commit:
-https://github.com/swig/swig/commit/38f2ab0c30e369e63bbd0a6152108488d0de68e1
-
-diff --git a/Lib/guile/guile_scm_run.swg b/Lib/guile/guile_scm_run.swg
-index 274f197158..0d04cb7c62 100644
---- a/Lib/guile/guile_scm_run.swg
-+++ b/Lib/guile/guile_scm_run.swg
-@@ -99,6 +99,7 @@ SWIG_Guile_scm2newstr(SCM str, size_t *len) {
- static int swig_initialized = 0;
- static scm_t_bits swig_tag = 0;
- static scm_t_bits swig_collectable_tag = 0;
-+static scm_t_bits swig_finalized_tag = 0;
- static scm_t_bits swig_destroyed_tag = 0;
- static scm_t_bits swig_member_function_tag = 0;
- static SCM swig_make_func = SCM_EOL;
-@@ -163,7 +164,19 @@ SWIG_Guile_PointerType(SCM object)
-   }
-   else scm_wrong_type_arg("SWIG-Guile-PointerType", 1, object);
- }
--  
-+
-+SWIGINTERN int
-+SWIG_Guile_IsValidSmob(SCM smob)
-+{
-+  /* We do not accept smobs representing destroyed pointers, but we have to
-+     allow finalized smobs because Guile >= 2.0.12 sets all smob instances
-+     to the 'finalized' type before calling their 'free' function. This change
-+     was introduced to Guile in commit 8dff3af087c6eaa83ae0d72aa8b22aef5c65d65d */
-+  return SCM_SMOB_PREDICATE(swig_tag, smob)
-+    || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)
-+    || SCM_SMOB_PREDICATE(swig_finalized_tag, smob);
-+}
-+
- SWIGINTERN int
- SWIG_Guile_ConvertPtr(SCM s, void **result, swig_type_info *type, int flags)
- {
-@@ -179,8 +192,7 @@ SWIG_Guile_ConvertPtr(SCM s, void **result, swig_type_info *type, int flags)
-     *result = SCM_POINTER_VALUE(s);
-     return SWIG_OK;
- #endif /* if SCM_MAJOR_VERSION >= 2 */
--  } else if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) {
--    /* we do not accept smobs representing destroyed pointers */
-+  } else if (SWIG_Guile_IsValidSmob(smob)) {
-     from = (swig_type_info *) SCM_CELL_WORD_2(smob);
-     if (!from) return SWIG_ERROR;
-     if (type) {
-@@ -239,7 +251,7 @@ SWIG_Guile_MarkPointerNoncollectable(SCM s)
- {
-   SCM smob = SWIG_Guile_GetSmob(s);
-   if (!SCM_NULLP(smob)) {
--    if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) {
-+    if (SWIG_Guile_IsValidSmob(smob)) {
-       SCM_SET_CELL_TYPE(smob, swig_tag);
-     }
-     else scm_wrong_type_arg(NULL, 0, s);
-@@ -252,7 +264,7 @@ SWIG_Guile_MarkPointerDestroyed(SCM s)
- {
-   SCM smob = SWIG_Guile_GetSmob(s);
-   if (!SCM_NULLP(smob)) {
--    if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) {
-+    if (SWIG_Guile_IsValidSmob(smob)) {
-       SCM_SET_CELL_TYPE(smob, swig_destroyed_tag);
-     }
-     else scm_wrong_type_arg(NULL, 0, s);
-@@ -419,6 +431,8 @@ SWIG_Guile_Init ()
-     scm_set_smob_print(swig_collectable_tag, print_collectable_swig);
-     scm_set_smob_equalp(swig_collectable_tag, equalp_swig);
-     scm_set_smob_free(swig_collectable_tag, free_swig);
-+    /* For Guile >= 2.0.12. See libguile/smob.c:clear_smobnum */
-+    swig_finalized_tag = swig_collectable_tag & ~0xff00;
-   }
-   if (ensure_smob_tag(swig_module, &swig_destroyed_tag,
- 		      "destroyed-swig-pointer", "destroyed-swig-pointer-tag")) {
diff --git a/gnu/packages/swig.scm b/gnu/packages/swig.scm
index b1b17fc68d..5506a3bd2e 100644
--- a/gnu/packages/swig.scm
+++ b/gnu/packages/swig.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2013, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -33,25 +34,19 @@
 (define-public swig
   (package
     (name "swig")
-    (version "3.0.12")
+    (version "4.0.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://sourceforge/" name "/" name "/"
                                  name "-" version "/"
                                  name "-" version ".tar.gz"))
-             (patches (search-patches "swig-guile-gc.patch"))
              (sha256
               (base32
-               "0kf99ygrjs5616gsqhz1l7bib3a12izmxi7g48bwblbymr3z9ybw"))))
+               "1ac7g0gd8ndwv3ybqn5vjgqxa7090bby4db164a7mn9ssp8b803s"))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'set-env
-           ;; Required since Perl 5.26.0's removal of the current
-           ;; working directory from @INC.
-           ;; TODO Try removing this for later versions of SWIG.
-           (lambda _ (setenv "PERL_USE_UNSAFE_INC" "1") #t))
          (add-before 'configure 'workaround-gcc-bug
            (lambda _
              ;; XXX: Don't add the -isystem flag, or GCCs #include_next
@@ -62,7 +57,7 @@
     (native-inputs `(("boost" ,boost)
                      ("pcre" ,pcre "bin")))       ;for 'pcre-config'
     (inputs `(;; Provide these to run the corresponding tests.
-              ("guile" ,guile-2.0)
+              ("guile" ,guile-3.0)
               ("perl" ,perl)))
               ;; FIXME: reactivate input python as soon as the test failures
               ;;   fatal error: Python.h: No such file or directory
-- 
2.23.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#39723: [PATCH] gnu: swig: Update to 4.0.1.
  2020-02-21 21:43 [bug#39723] [PATCH] gnu: swig: Update to 4.0.1 Arun Isaac
@ 2020-02-22 17:11 ` Jakub Kądziołka
  2020-02-22 17:50   ` [bug#39723] " Arun Isaac
  0 siblings, 1 reply; 3+ messages in thread
From: Jakub Kądziołka @ 2020-02-22 17:11 UTC (permalink / raw)
  To: Arun Isaac; +Cc: 39723-done

[-- Attachment #1: Type: text/plain, Size: 951 bytes --]

On Sat, Feb 22, 2020 at 03:13:18AM +0530, Arun Isaac wrote:
> * gnu/packages/swig.scm (swig): Update to 4.0.1.
> [source]: Remove swig-guile-gc.patch.
> [arguments]: Remove set-env phase.
> [inputs]: Replace guile-2.0 with guile-3.0.
> * gnu/packages/patches/swig-guile-gc.patch: Delete file.
> * gnu/local.mk (dist_patch_DATA): Unregister it.

Hi,

swig is depended upon by 5206 packages. This means that any updates will
have to go through the core-updates branch. The branch has swig 4.0.1
since this December. Sorry for the duplicated effort...

You might want to send a patch to build swig with guile-3.0 instead of
the guile-2.2 used currently on core-updates. If you decide to do so,
please use [PATCH core-updates] in the subject. You can do this easily
by passing --subject-prefix="PATCH core-updates" to git format-patch.

See point 8 of `info '(guix)Submitting Patches'` for more details.

Regards,
Jakub Kądziołka

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [bug#39723] [PATCH] gnu: swig: Update to 4.0.1.
  2020-02-22 17:11 ` bug#39723: " Jakub Kądziołka
@ 2020-02-22 17:50   ` Arun Isaac
  0 siblings, 0 replies; 3+ messages in thread
From: Arun Isaac @ 2020-02-22 17:50 UTC (permalink / raw)
  To: Jakub Kądziołka; +Cc: 39723-done

[-- Attachment #1: Type: text/plain, Size: 700 bytes --]


> swig is depended upon by 5206 packages. This means that any updates will
> have to go through the core-updates branch.

True.

> The branch has swig 4.0.1 since this December. Sorry for the
> duplicated effort...

No problem! :-)

> You might want to send a patch to build swig with guile-3.0 instead of
> the guile-2.2 used currently on core-updates.

Ok, will do.

> If you decide to do so, please use [PATCH core-updates] in the
> subject. You can do this easily by passing --subject-prefix="PATCH
> core-updates" to git format-patch.
>
> See point 8 of `info '(guix)Submitting Patches'` for more details.

Sorry, I didn't know I had to do this. Will do for all my future
core-updates patches.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-02-22 17:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-21 21:43 [bug#39723] [PATCH] gnu: swig: Update to 4.0.1 Arun Isaac
2020-02-22 17:11 ` bug#39723: " Jakub Kądziołka
2020-02-22 17:50   ` [bug#39723] " Arun Isaac

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).