From d98e64b4e5b46a67b582df5032647bb169427d6d Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Fri, 3 Jan 2020 19:53:04 -0600 Subject: gnu: Rename module gprolog to prolog. * gnu/local.mk (GNU_SYSTEM_MODULES): Replace gprolog.scm => prolog.scm. * gnu/packages/{gprolog.scm -> prolog.scm}: Rename file so it is not implementation specific. --- gnu/packages/prolog.scm | 69 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 gnu/packages/prolog.scm (limited to 'gnu/packages/prolog.scm') diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm new file mode 100644 index 0000000000..7c344988d5 --- /dev/null +++ b/gnu/packages/prolog.scm @@ -0,0 +1,69 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013 Nikita Karetnikov +;;; Copyright © 2013 Mark H Weaver +;;; Copyright © 2020 Brett Gilio +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages prolog) + #:use-module (guix download) + #:use-module (guix licenses) + #:use-module (guix packages) + #:use-module (guix build-system gnu) + #:use-module (srfi srfi-1)) + +(define-public gprolog + (package + (name "gprolog") + (version "1.4.5") + (source + (origin + (method url-fetch) + ;; Recent versions are not hosted on the GNU mirrors. + (uri (list (string-append "http://gprolog.org/gprolog-" version + ".tar.gz") + (string-append "mirror://gnu/gprolog/gprolog-" version + ".tar.gz"))) + (sha256 + (base32 + "0z4cc42n3k6i35b8mr816iwsvrpxshw6d7dgz6s2h1hy0l7g1p5z")))) + (build-system gnu-build-system) + (arguments + `(#:configure-flags + (list (string-append + "--with-install-dir=" %output "/share/gprolog")) + #:phases + (modify-phases %standard-phases + (add-before 'configure 'change-dir-n-fix-shells + (lambda _ + (chdir "src") + (substitute* "configure" + (("-/bin/sh") (string-append "-" (which "sh"))) + (("= /bin/sh") (string-append "= " (which "sh")))) + #t))))) + (home-page "https://www.gnu.org/software/gprolog/") + (synopsis "Prolog compiler") + (description + "GNU Prolog is a standards-compliant Prolog compiler with constraint +solving over finite domains. It accepts Prolog+ constraint programs and +produces a compiled, native binary which can function in a stand-alone +manner. It also features an interactive interpreter.") + (license (list gpl2+ lgpl3+)) + + ;; See 'configure' for the list of supported architectures. + (supported-systems (fold delete + %supported-systems + '("armhf-linux" "mips64el-linux"))))) -- cgit v1.2.3 From 3f37f3909712eb7269b6e8184c0d61bfc61b67f9 Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Fri, 13 Dec 2019 21:46:26 -0600 Subject: gnu: Add swi-prolog. * gnu/packages/prolog.scm (swi-prolog): New variable. --- gnu/packages/prolog.scm | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'gnu/packages/prolog.scm') diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm index 7c344988d5..20e6119731 100644 --- a/gnu/packages/prolog.scm +++ b/gnu/packages/prolog.scm @@ -67,3 +67,46 @@ manner. It also features an interactive interpreter.") (supported-systems (fold delete %supported-systems '("armhf-linux" "mips64el-linux"))))) + +;; TODO: This current version of SWI-PROLOG using the +;; tarball from the official website is completely self-contained +;; such that all submodules are provided. Eventually replace this +;; and manually patch those submodules. +(define-public swi-prolog + (package + (name "swi-prolog") + (version "8.0.3") + (source + (origin + (method url-fetch) + (uri (string-append "https://www.swi-prolog.org/download/stable/src/swipl-" + version ".tar.gz")) + (sha256 + (base32 + "1bnnwbdxnifb1qj42prsqhx8y0k2z596wgvh4bbnd0bw8w59rrff")))) + (build-system cmake-build-system) + (arguments + `(#:parallel-build? #f + #:tests? #t)) ; FIXME: + ;#:configure-flags + ; (list "-DINSTALL_DOCUMENTATION=OFF"))) ; FIXME: + (native-inputs + `(("zlib" ,zlib) + ("gmp" ,gmp) + ("readline" ,readline) + ;("texlive" ,texlive) + ("texinfo" ,texinfo) + ("libunwind" ,libunwind) + ("libjpeg", libjpeg) + ("libxft" ,libxft) + ("fontconfig" ,fontconfig) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("openssl" ,openssl))) + (home-page "https://www.swi-prolog.org/") + (synopsis "ISO/Edinburgh-style Prolog interpreter") + (description "SWI-Prolog is a fast and powerful ISO/Edinburgh-style Prolog +compiler with a rich set of built-in predicates. It offers a fast, robust and +small environment which enables substantial applications to be developed with +it.") + (license #f))) ; TODO: -- cgit v1.2.3 From a06a4f918243dc784f9089d60690559b72a4e308 Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Fri, 3 Jan 2020 20:15:44 -0600 Subject: Revert "gnu: Add swi-prolog." This reverts commit 3f37f3909712eb7269b6e8184c0d61bfc61b67f9. --- gnu/packages/prolog.scm | 43 ------------------------------------------- 1 file changed, 43 deletions(-) (limited to 'gnu/packages/prolog.scm') diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm index 20e6119731..7c344988d5 100644 --- a/gnu/packages/prolog.scm +++ b/gnu/packages/prolog.scm @@ -67,46 +67,3 @@ manner. It also features an interactive interpreter.") (supported-systems (fold delete %supported-systems '("armhf-linux" "mips64el-linux"))))) - -;; TODO: This current version of SWI-PROLOG using the -;; tarball from the official website is completely self-contained -;; such that all submodules are provided. Eventually replace this -;; and manually patch those submodules. -(define-public swi-prolog - (package - (name "swi-prolog") - (version "8.0.3") - (source - (origin - (method url-fetch) - (uri (string-append "https://www.swi-prolog.org/download/stable/src/swipl-" - version ".tar.gz")) - (sha256 - (base32 - "1bnnwbdxnifb1qj42prsqhx8y0k2z596wgvh4bbnd0bw8w59rrff")))) - (build-system cmake-build-system) - (arguments - `(#:parallel-build? #f - #:tests? #t)) ; FIXME: - ;#:configure-flags - ; (list "-DINSTALL_DOCUMENTATION=OFF"))) ; FIXME: - (native-inputs - `(("zlib" ,zlib) - ("gmp" ,gmp) - ("readline" ,readline) - ;("texlive" ,texlive) - ("texinfo" ,texinfo) - ("libunwind" ,libunwind) - ("libjpeg", libjpeg) - ("libxft" ,libxft) - ("fontconfig" ,fontconfig) - ("perl" ,perl) - ("pkg-config" ,pkg-config) - ("openssl" ,openssl))) - (home-page "https://www.swi-prolog.org/") - (synopsis "ISO/Edinburgh-style Prolog interpreter") - (description "SWI-Prolog is a fast and powerful ISO/Edinburgh-style Prolog -compiler with a rich set of built-in predicates. It offers a fast, robust and -small environment which enables substantial applications to be developed with -it.") - (license #f))) ; TODO: -- cgit v1.2.3 From e4ed9929532794b5b52c795b7356ff7413829eed Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Fri, 3 Jan 2020 21:43:34 -0600 Subject: gnu: gprolog: Use license prefix. * gnu/packages/prolog.scm (gprolog)[license]: Use prefix for list of licenses. --- gnu/packages/prolog.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gnu/packages/prolog.scm') diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm index 7c344988d5..3eba35abed 100644 --- a/gnu/packages/prolog.scm +++ b/gnu/packages/prolog.scm @@ -20,7 +20,7 @@ (define-module (gnu packages prolog) #:use-module (guix download) - #:use-module (guix licenses) + #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix build-system gnu) #:use-module (srfi srfi-1)) @@ -61,7 +61,8 @@ solving over finite domains. It accepts Prolog+ constraint programs and produces a compiled, native binary which can function in a stand-alone manner. It also features an interactive interpreter.") - (license (list gpl2+ lgpl3+)) + (license (list license:gpl2+ + license:lgpl3+)) ;; See 'configure' for the list of supported architectures. (supported-systems (fold delete -- cgit v1.2.3 From 7eef98484c4eea2ce92fd53a86a001f006a78c16 Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Fri, 3 Jan 2020 21:44:18 -0600 Subject: gnu: Add swi-prolog. * gnu/packages/prolog.scm (swi-prolog): New variable. --- gnu/packages/prolog.scm | 57 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) (limited to 'gnu/packages/prolog.scm') diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm index 3eba35abed..4963691cb5 100644 --- a/gnu/packages/prolog.scm +++ b/gnu/packages/prolog.scm @@ -20,9 +20,23 @@ (define-module (gnu packages prolog) #:use-module (guix download) + #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) + #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) + #:use-module (gnu packages backup) + #:use-module (gnu packages compression) + #:use-module (gnu packages fontutils) + #:use-module (gnu packages image) + #:use-module (gnu packages libunwind) + #:use-module (gnu packages multiprecision) + #:use-module (gnu packages perl) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages readline) + #:use-module (gnu packages texinfo) + #:use-module (gnu packages tls) + #:use-module (gnu packages xorg) #:use-module (srfi srfi-1)) (define-public gprolog @@ -68,3 +82,46 @@ manner. It also features an interactive interpreter.") (supported-systems (fold delete %supported-systems '("armhf-linux" "mips64el-linux"))))) + +(define-public swi-prolog + (package + (name "swi-prolog") + (version "8.1.19") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/SWI-Prolog/swipl-devel.git") + (recursive? #t) ; TODO: Determine if this can be split out. + (commit (string-append "V" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0p1psf1lrkm9vdz5fggyfnr7hwyf6rvf80gygbw47hhfx46li8jh")))) + (build-system cmake-build-system) + (arguments + `(#:parallel-build? #t + #:tests? #f ; FIXME: Some tests require network access. + #:configure-flags + (list "-DINSTALL_DOCUMENTATION=ON" + "-DBUILD_PDF_DOCUMENTATION=ON" + "-DSWIPL_INSTALL_IN_LIB=OFF"))) ; FIXME: Breaks RUNPATH validation. + (native-inputs + `(("zlib" ,zlib) + ("gmp" ,gmp) + ("readline" ,readline) + ("texinfo" ,texinfo) + ("libarchive" ,libarchive) + ("libunwind" ,libunwind) + ("libjpeg", libjpeg) + ("libxft" ,libxft) + ("fontconfig" ,fontconfig) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("openssl" ,openssl))) + (home-page "https://www.swi-prolog.org/") + (synopsis "ISO/Edinburgh-style Prolog interpreter") + (description "SWI-Prolog is a fast and powerful ISO/Edinburgh-style Prolog +compiler with a rich set of built-in predicates. It offers a fast, robust and +small environment which enables substantial applications to be developed with +it.") + (license license:bsd-2))) -- cgit v1.2.3 From 5a92e7c9542f60cfe9d932833bbe61d0af7a2860 Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Sat, 4 Jan 2020 14:50:52 -0600 Subject: gnu: swi-prolog: Enable tests. * gnu/packages/prolog.scm (swi-prolog)[arguments]: Enable tests and work around tests that cause failure by trying to write to the store, or establishing a network connection. --- gnu/packages/prolog.scm | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'gnu/packages/prolog.scm') diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm index 4963691cb5..bd89c9ad2f 100644 --- a/gnu/packages/prolog.scm +++ b/gnu/packages/prolog.scm @@ -100,11 +100,37 @@ manner. It also features an interactive interpreter.") (build-system cmake-build-system) (arguments `(#:parallel-build? #t - #:tests? #f ; FIXME: Some tests require network access. + #:tests? #t #:configure-flags (list "-DINSTALL_DOCUMENTATION=ON" "-DBUILD_PDF_DOCUMENTATION=ON" "-DSWIPL_INSTALL_IN_LIB=OFF"))) ; FIXME: Breaks RUNPATH validation. + #:phases + (modify-phases %standard-phases + ;; XXX: Delete a variety of tests which fail either attempting to + ;; establish a network connection, or attempts to write to the + ;; immutable store. Phases marked *-pre are disabled /before/ building. + ;; Phases marked *-post are disabled /after/ building. + (add-after 'unpack 'delete-failing-tests-pre + (lambda _ + (substitute* "src/CMakeLists.txt" + ((" save") "")) + (substitute* "src/test.pl" + (("testdir\\('Tests/save'\\).") "")) + (with-directory-excursion "src/Tests" + (for-each delete-file-recursively + '("save"))) + #t)) + (add-before 'check 'delete-failing-tests-post + (lambda _ + (with-directory-excursion "packages" + (for-each delete-file-recursively + '("http" + "pengines" + "RDF" + "semweb" + "ssl"))) + #t))))) (native-inputs `(("zlib" ,zlib) ("gmp" ,gmp) -- cgit v1.2.3 From 235c67341b5373f7d21edfd56a2ff19da4a25efb Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Sat, 4 Jan 2020 14:51:44 -0600 Subject: gnu: swi-prolog: Modify documentation installation. * gnu/packages/prolog.scm (swi-prolog)[arguments]: Remove configuration step for PDF documentation. --- gnu/packages/prolog.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gnu/packages/prolog.scm') diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm index bd89c9ad2f..a85e58e19f 100644 --- a/gnu/packages/prolog.scm +++ b/gnu/packages/prolog.scm @@ -103,8 +103,7 @@ manner. It also features an interactive interpreter.") #:tests? #t #:configure-flags (list "-DINSTALL_DOCUMENTATION=ON" - "-DBUILD_PDF_DOCUMENTATION=ON" - "-DSWIPL_INSTALL_IN_LIB=OFF"))) ; FIXME: Breaks RUNPATH validation. + "-DSWIPL_INSTALL_IN_LIB=OFF") ; FIXME: Breaks RUNPATH validation. #:phases (modify-phases %standard-phases ;; XXX: Delete a variety of tests which fail either attempting to -- cgit v1.2.3 From bcd47c67b04c94e33631fd9a71fd907a9eed379b Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Sat, 4 Jan 2020 14:52:22 -0600 Subject: gnu: swi-prolog: Update to 8.1.20. * gnu/packages/prolog.scm (swi-prolog): Update to 8.1.20. --- gnu/packages/prolog.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/prolog.scm') diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm index a85e58e19f..ca280f77fa 100644 --- a/gnu/packages/prolog.scm +++ b/gnu/packages/prolog.scm @@ -86,7 +86,7 @@ manner. It also features an interactive interpreter.") (define-public swi-prolog (package (name "swi-prolog") - (version "8.1.19") + (version "8.1.20") (source (origin (method git-fetch) (uri (git-reference @@ -96,7 +96,7 @@ manner. It also features an interactive interpreter.") (file-name (git-file-name name version)) (sha256 (base32 - "0p1psf1lrkm9vdz5fggyfnr7hwyf6rvf80gygbw47hhfx46li8jh")))) + "0blpw5g0gszi83wmvyhlh7pk4wlyx00vgaj6qr3ris36cdl8j10a")))) (build-system cmake-build-system) (arguments `(#:parallel-build? #t -- cgit v1.2.3