From 457e1166981db9f7593340f0fc2f4d228cf11361 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Wed, 31 Jul 2019 18:17:30 +0200 Subject: gnu: swig: Fix cross-compilation. * gnu/packages/swig.scm (swig)[inputs]: Add pcre that is needed when cross-compiling. --- gnu/packages/swig.scm | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/packages/swig.scm') diff --git a/gnu/packages/swig.scm b/gnu/packages/swig.scm index b1b17fc68d..90d698a8b4 100644 --- a/gnu/packages/swig.scm +++ b/gnu/packages/swig.scm @@ -62,6 +62,7 @@ (native-inputs `(("boost" ,boost) ("pcre" ,pcre "bin"))) ;for 'pcre-config' (inputs `(;; Provide these to run the corresponding tests. + ("pcre" ,pcre) ("guile" ,guile-2.0) ("perl" ,perl))) ;; FIXME: reactivate input python as soon as the test failures -- cgit 1.4.1 From 7ed91f8c8de0de7df992c1534a1c86219ab5ba84 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 1 Dec 2019 10:31:28 +0200 Subject: gnu: swig: Clean up inputs. * gnu/packages/swig.scm (swig)[inputs]: Move perl, guile-2.0 ... [inputs]: ... to here. --- gnu/packages/swig.scm | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'gnu/packages/swig.scm') diff --git a/gnu/packages/swig.scm b/gnu/packages/swig.scm index 90d698a8b4..e10e30b332 100644 --- a/gnu/packages/swig.scm +++ b/gnu/packages/swig.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2013, 2015, 2016 Ludovic Courtès ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2018 Marius Bakke +;;; Copyright © 2019 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; @@ -60,18 +61,12 @@ (("-isystem ") "-I")) #t))))) (native-inputs `(("boost" ,boost) - ("pcre" ,pcre "bin"))) ;for 'pcre-config' - (inputs `(;; Provide these to run the corresponding tests. - ("pcre" ,pcre) - ("guile" ,guile-2.0) - ("perl" ,perl))) - ;; FIXME: reactivate input python as soon as the test failures - ;; fatal error: Python.h: No such file or directory - ;; # include - ;; are fixed. - ;; The python part probably never worked and does not seem to - ;; be needed for currently dependent packages. -;; ("python" ,python-wrapper))) + ("pcre" ,pcre "bin") ;for 'pcre-config' + ;; The following are for tests and examples: + ("guile" ,guile-2.0) + ("perl" ,perl))) + ;;("python" ,python-wrapper) + (inputs `(("pcre" ,pcre))) (home-page "http://swig.org/") (synopsis "Interface compiler that connects C/C++ code to higher-level languages") -- cgit 1.4.1 From 60bd56c6d8368c23dcd97b26501771c82316fc8c Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 1 Dec 2019 10:35:09 +0200 Subject: gnu: swig.scm: Sort module inputs alphabetically. * gnu/packages/swig.scm: Sort module inputs alphabetically. --- gnu/packages/swig.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gnu/packages/swig.scm') diff --git a/gnu/packages/swig.scm b/gnu/packages/swig.scm index e10e30b332..655c1a19ab 100644 --- a/gnu/packages/swig.scm +++ b/gnu/packages/swig.scm @@ -25,11 +25,11 @@ #:use-module (guix licenses) #:use-module (guix build-system gnu) #:use-module (gnu packages) - #:use-module (gnu packages pcre) - #:use-module (gnu packages guile) #:use-module (gnu packages boost) - #:use-module (gnu packages python) - #:use-module (gnu packages perl)) + #:use-module (gnu packages guile) + #:use-module (gnu packages pcre) + #:use-module (gnu packages perl) + #:use-module (gnu packages python)) (define-public swig (package -- cgit 1.4.1 From 8b2c4eb5020eff458690f600351b56ed97465db1 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 3 Dec 2019 00:15:26 +0100 Subject: gnu: swig: Update to 4.0.1. * gnu/packages/patches/swig-guile-gc.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/swig.scm (swig): Update to 4.0.1. [source](patches): Remove. [arguments]: Remove 'set-env' phase. [inputs]: Change GUILE-2.0 to GUILE-2.2. --- gnu/local.mk | 1 - gnu/packages/patches/swig-guile-gc.patch | 76 -------------------------------- gnu/packages/swig.scm | 10 +---- 3 files changed, 2 insertions(+), 85 deletions(-) delete mode 100644 gnu/packages/patches/swig-guile-gc.patch (limited to 'gnu/packages/swig.scm') diff --git a/gnu/local.mk b/gnu/local.mk index 0c0f5651a9..122e23f68a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1370,7 +1370,6 @@ dist_patch_DATA = \ %D%/packages/patches/superlu-dist-fix-mpi-deprecations.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 655c1a19ab..df49428964 100644 --- a/gnu/packages/swig.scm +++ b/gnu/packages/swig.scm @@ -34,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 -- cgit 1.4.1 From d45720d8b456e82380601d77e25bd05c6e0dc36a Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 12 Dec 2019 03:44:48 +0200 Subject: gnu: swig: Build with guile-2.2. This is a follow-up to 8b2c4eb5020eff458690f600351b56ed97465db1. * gnu/packages/swig.scm (swig)[native-inputs]: Replace guile-2.0 with guile-2.2. --- gnu/packages/swig.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/swig.scm') diff --git a/gnu/packages/swig.scm b/gnu/packages/swig.scm index df49428964..3de6343da8 100644 --- a/gnu/packages/swig.scm +++ b/gnu/packages/swig.scm @@ -57,7 +57,7 @@ (native-inputs `(("boost" ,boost) ("pcre" ,pcre "bin") ;for 'pcre-config' ;; The following are for tests and examples: - ("guile" ,guile-2.0) + ("guile" ,guile-2.2) ("perl" ,perl))) ;;("python" ,python-wrapper) (inputs `(("pcre" ,pcre))) -- cgit 1.4.1 From e607cc3a479b39d11e9d2b5979b9719e133008a0 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sun, 23 Feb 2020 11:59:42 +0530 Subject: gnu: swig: Use guile-3.0 instead of guile-2.2. * gnu/packages/swig.scm (swig)[native-inputs]: Replace guile-2.2 with guile-3.0. Signed-off-by: Marius Bakke --- gnu/packages/swig.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gnu/packages/swig.scm') diff --git a/gnu/packages/swig.scm b/gnu/packages/swig.scm index 3de6343da8..86c1407da9 100644 --- a/gnu/packages/swig.scm +++ b/gnu/packages/swig.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2018 Marius Bakke ;;; Copyright © 2019 Efraim Flashner +;;; Copyright © 2020 Arun Isaac ;;; ;;; This file is part of GNU Guix. ;;; @@ -57,7 +58,7 @@ (native-inputs `(("boost" ,boost) ("pcre" ,pcre "bin") ;for 'pcre-config' ;; The following are for tests and examples: - ("guile" ,guile-2.2) + ("guile" ,guile-3.0) ("perl" ,perl))) ;;("python" ,python-wrapper) (inputs `(("pcre" ,pcre))) -- cgit 1.4.1