From deb75abebf74be37d2afedd9e5d8f8b07c65ab06 Mon Sep 17 00:00:00 2001 From: Kei Kebreau Date: Wed, 30 May 2018 08:34:42 -0400 Subject: [PATCH] gnu: shogun: Use a patched swig for Octave 4.4. * gnu/packages/swig.scm (swig-git): New variable * gnu/packages/machine-learning.scm (shogun)[inputs]: Replace swig with swig-git. --- gnu/packages/machine-learning.scm | 2 +- gnu/packages/swig.scm | 34 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index e135ee0ee..bc618bad2 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -487,7 +487,7 @@ sample proximities between pairs of cases.") ("numpy" ,python-numpy) ("r-minimal" ,r-minimal) ("octave" ,octave) - ("swig" ,swig) + ("swig" ,swig-git) ("eigen" ,eigen) ("hdf5" ,hdf5) ("atlas" ,atlas) diff --git a/gnu/packages/swig.scm b/gnu/packages/swig.scm index b931db412..3a1139dbb 100644 --- a/gnu/packages/swig.scm +++ b/gnu/packages/swig.scm @@ -20,8 +20,12 @@ (define-module (gnu packages swig) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix git-download) #:use-module (guix licenses) + #:use-module (guix utils) #:use-module (guix build-system gnu) + #:use-module (gnu packages autotools) + #:use-module (gnu packages bison) #:use-module (gnu packages pcre) #:use-module (gnu packages guile) #:use-module (gnu packages boost) @@ -74,3 +78,33 @@ you tailor the wrapping process to suit your application.") ;; See http://www.swig.org/Release/LICENSE for details. (license gpl3+))) + +;; This package contains upstream fixes that haven't been released as part of a +;; stable version of SWIG. This is necessary for software that uses SWIG to +;; compile the correct and up-to-date programming language interfaces. +(define-public swig-git + (let ((commit "12c66f9b7d884020e896ce92b9783bc3bac95d2d") + (revision "1")) + (package/inherit swig + (name "swig-git") + (version (git-version "4.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/swig/swig.git") + (commit commit))) + (sha256 (base32 "1367y47kdkly9cwyp4d60cm5d660am83g4p52k1hmzvimghwgvlp")) + (file-name (git-file-name name version)))) + (arguments + (substitute-keyword-arguments (package-arguments swig) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'autogen + (lambda _ + (invoke "sh" "autogen.sh"))))))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("bison" ,bison) + ,@(package-native-inputs swig)))))) -- 2.17.1