gnu: emacs-consult: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / rdf.scm
index ff79b90..0baed8f 100644 (file)
@@ -1,7 +1,12 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2015, 2016, 2018 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
+;;; Copyright © 2020 Pjotr Prins <pjotr.guix@thebird.nl>
+;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2020 pukkamustard <pukkamustard@posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -19,9 +24,9 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages rdf)
-  #:use-module ((guix licenses)
-                #:select (non-copyleft isc gpl2 lgpl2.1 lgpl2.1+))
+  #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
+  #:use-module (guix git-download)
   #:use-module (guix download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system waf)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
-  #:use-module (gnu packages databases)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages cyrus-sasl)
   #:use-module (gnu packages documentation)
+  #:use-module (gnu packages dbm)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages multiprecision)
@@ -44,6 +49,7 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-web)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages time)
   #:use-module (gnu packages tls)
@@ -55,7 +61,7 @@
     (version "2.0.15")
     (source (origin
              (method url-fetch)
-             (uri (string-append "http://download.librdf.org/source/" name
+             (uri (string-append "https://download.librdf.org/source/" name
                                  "-" version ".tar.gz"))
              (patches
               (search-patches "raptor2-heap-overflow.patch"))
@@ -70,7 +76,7 @@
        ("zlib" ,zlib)))
     (arguments
      `(#:parallel-tests? #f))
-    (home-page "http://librdf.org/raptor/")
+    (home-page "https://librdf.org/raptor/")
     (synopsis "RDF syntax library")
     (description "Raptor is a C library providing a set of parsers and
 serialisers that generate Resource Description Framework (RDF) triples
@@ -81,7 +87,7 @@ of RSS, Atom 1.0 and 0.3, GRDDL and microformats for HTML, XHTML and
 XML.  The serialising syntaxes are RDF/XML (regular, abbreviated, XMP),
 Turtle 2013, N-Quads, N-Triples 1.1, Atom 1.0, RSS 1.0, GraphViz DOT,
 HTML and JSON.")
-    (license lgpl2.1+))) ; or any choice of gpl2+ or asl2.0
+    (license license:lgpl2.1+))) ; or any choice of gpl2+ or asl2.0
 
 (define-public clucene
   (package
@@ -115,20 +121,52 @@ HTML and JSON.")
     (description "CLucene is a high-performance, scalable, cross platform,
 full-featured indexing and searching API.  It is a port of the very popular
 Java Lucene text search engine API to C++.")
-    (license lgpl2.1)))
+    (license license:lgpl2.1)))
+
+(define-public lucene++
+  (package
+    (name "lucene++")
+    (version "3.0.7")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                     (url "https://github.com/luceneplusplus/LucenePlusPlus")
+                     (commit (string-append "rel_" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "06b37fly6l27zc6kbm93f6khfsv61w792j8xihfagpcm9cfz2zi1"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags
+       ;; CXX_FLAGS suggested in a closed issue on github:
+       ;; https://github.com/luceneplusplus/LucenePlusPlus/issues/100
+       (list "-Wno-dev" "-DCMAKE_CXX_FLAGS=-DBOOST_VARIANT_USE_RELAXED_GET_BY_DEFAULT"
+             ;; Install in lib64 break rpath
+             "-DCMAKE_INSTALL_LIBDIR:PATH=lib")))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("boost" ,boost)))
+    (home-page "https://github.com/luceneplusplus/LucenePlusPlus")
+    (synopsis "Text search engine")
+    (description "Lucene++ is an up to date C++ port of the popular Java
+Lucene library, a high-performance, full-featured text search engine.")
+    (license (list license:asl2.0 license:lgpl3+)))); either asl or lgpl.
 
 (define-public lrdf
   (package
     (name "lrdf")
     (version "0.6.1")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/swh/LRDF/archive/v"
-                                  version ".tar.gz"))
-              (file-name (string-append name "-" version ".tar.gz"))
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/swh/LRDF")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "1vxii4mlcpyi16dizcmnqfl2j9gffgr986yd8ic67hvs8xy42yfm"))))
+                "00wzkfb8y0aqd519ypz067cq099dpc89w69zw8ln39vl6f9x2pd4"))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases
@@ -140,9 +178,9 @@ Java Lucene text search engine API to C++.")
                (("instances_test remove_test") "instances_test")
                (("\\$\\(TESTS\\) remove_test") "$(TESTS)"))
              #t))
-         (add-after 'remove-out-of-tree-references 'autoreconf
-           (lambda _
-             (zero? (system* "autoreconf" "-vfi")))))))
+         ;; The default bootstrap phase executes autogen.sh, which fails.
+         (replace 'bootstrap
+           (lambda _ (invoke "autoreconf" "-vif") #t)))))
     (inputs
      `(("raptor" ,raptor2)
        ("cyrus-sasl" ,cyrus-sasl)
@@ -159,7 +197,7 @@ Java Lucene text search engine API to C++.")
 LADSPA plugins.  It can also be used for general RDF manipulation.  It can
 read RDF/XLM and N3 files and export N3 files, and it also has a light
 taxonomic inference capability.")
-    (license gpl2)))
+    (license license:gpl2)))
 
 (define-public rasqal
   (package
@@ -182,7 +220,7 @@ taxonomic inference capability.")
        ("libxml2" ,libxml2)
        ("mpfr" ,mpfr)
        ("pcre" ,pcre)
-       ("util-linux" ,util-linux)))
+       ("util-linux" ,util-linux "lib")))
     (propagated-inputs
      `(("raptor2" ,raptor2))) ; stipulated by rasqal.pc
     (arguments
@@ -200,7 +238,7 @@ SPARQL Query 1.1, SPARQL Update 1.1 (no executing) and the Experimental
 SPARQL extensions (LAQRS).  Rasqal can write binding query results in the
 SPARQL XML, SPARQL JSON, CSV, TSV, HTML, ASCII tables, RDF/XML and
 Turtle/N3 and read them in SPARQL XML, RDF/XML and Turtle/N3.")
-    (license lgpl2.1+))) ; or any choice of gpl2+ or asl2.0
+    (license license:lgpl2.1+))) ; or any choice of gpl2+ or asl2.0
 
 (define-public redland
   (package
@@ -225,22 +263,22 @@ Turtle/N3 and read them in SPARQL XML, RDF/XML and Turtle/N3.")
     (synopsis "RDF library")
     (description "The Redland RDF Library (librdf) provides the RDF API
 and triple stores.")
-    (license lgpl2.1+))) ; or any choice of gpl2+ or asl2.0
+    (license license:lgpl2.1+))) ; or any choice of gpl2+ or asl2.0
 
 (define-public serd
   (package
     (name "serd")
-    (version "0.28.0")
+    (version "0.30.8")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.drobilla.net/serd-"
                                  version ".tar.bz2"))
              (sha256
               (base32
-               "1v4ai4zyj1q3255nghicns9817jkwb3bh60ssprsjmnjfj41mwhx"))))
+               "11zs53yx40mv62vxsl15mvdh7s17y5v6lgcgahdvzxgnan7w8bk7"))))
     (build-system waf-build-system)
     (arguments
-     `(#:tests? #f ; no check target
+     `(#:tests? #f                      ; no check target
        #:phases
        (modify-phases %standard-phases
          (add-before
@@ -259,22 +297,22 @@ knife of RDF syntax, but rather is suited to resource limited or performance
 critical applications (e.g. converting many gigabytes of NTriples to Turtle),
 or situations where a simple reader/writer with minimal dependencies is
 ideal (e.g. in LV2 implementations or embedded applications).")
-    (license isc)))
+    (license license:isc)))
 
 (define-public sord
   (package
     (name "sord")
-    (version "0.16.2")
+    (version "0.16.8")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.drobilla.net/sord-"
                                  version ".tar.bz2"))
              (sha256
               (base32
-               "13fshxwpipjrvsah1m2jw1kf022z2q5vpw24bzcznglgvms13x89"))))
+               "052y7zllrg0bzyky2rmrrwnnf16p6bk7q40rq9mgm0mzm8p9sa3w"))))
     (build-system waf-build-system)
     (arguments
-     `(#:tests? #f ; no check target
+     `(#:tests? #f                      ; no check target
        #:phases
        (modify-phases %standard-phases
          (add-before
@@ -285,35 +323,31 @@ ideal (e.g. in LV2 implementations or embedded applications).")
                                    (assoc-ref outputs "out") "/lib"))
             #t)))))
     (inputs
-     `(("serd" ,serd)))
+     `(("pcre" ,pcre)))
     (native-inputs
      `(("pkg-config" ,pkg-config)))
+    (propagated-inputs
+     `(("serd" ,serd)))                 ; required by sord-0.pc
     (home-page "https://drobilla.net/software/sord/")
     (synopsis "C library for storing RDF data in memory")
     (description
      "Sord is a lightweight C library for storing RDF data in memory.")
-    (license isc)))
+    (license license:isc)))
 
 (define-public python-rdflib
   (package
     (name "python-rdflib")
-    (version "4.1.2")
+    (version "4.2.2")
     (source
       (origin
         (method url-fetch)
-        (uri (string-append
-              "https://pypi.python.org/packages/source/r/rdflib/rdflib-"
-              version
-              ".tar.gz"))
-        (patches
-          ;; The patch has no effect under Python 3.
-          (search-patches "python2-rdflib-drop-sparqlwrapper.patch"))
+        (uri (pypi-uri "rdflib" version))
         (sha256
-          (base32
-            "0kvaf332cqbi47rqzlpdx4mbkvw12mkrzkj8n9l19wk713d4py9w"))))
+         (base32
+          "0398c714znnhaa2x7v51b269hk20iz073knq2mvmqp2ma92z27fs"))))
     (build-system python-build-system)
     (arguments
-     '(;; FIXME: Three test failures. Try uncommenting the below next update.
+     '(;; FIXME: Three test failures. Should be fixed next release.
        #:tests? #f))
        ;; #:phases
        ;; (modify-phases %standard-phases
@@ -321,7 +355,7 @@ ideal (e.g. in LV2 implementations or embedded applications).")
        ;;     (lambda _
        ;;       ;; Run tests from the build directory so python3 only
        ;;       ;; sees the installed 2to3 version.
-       ;;       (zero? (system* "nosetests" "--where=./build/src")))))
+       ;;       (invoke "nosetests" "--where=./build/src"))))))
     (native-inputs
      `(("python-nose" ,python-nose)))
     (propagated-inputs
@@ -329,13 +363,83 @@ ideal (e.g. in LV2 implementations or embedded applications).")
         ("python-isodate" ,python-isodate)
         ("python-pyparsing" ,python-pyparsing)))
     (home-page "https://github.com/RDFLib/rdflib")
-    (synopsis
-      "Python RDF library")
+    (synopsis "Python RDF library")
     (description
       "RDFLib is a Python library for working with RDF, a simple yet
 powerful language for representing information.")
-    (license (non-copyleft "file://LICENSE"
-                        "See LICENSE in the distribution."))))
+    (license (license:non-copyleft "file://LICENSE"
+                                   "See LICENSE in the distribution."))))
 
 (define-public python2-rdflib
   (package-with-python2 python-rdflib))
+
+(define-public python-rdflib-jsonld
+  (package
+    (name "python-rdflib-jsonld")
+    (version "0.5.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "rdflib-jsonld" version))
+        (sha256
+         (base32
+          "1v85f4hdlrrk0l1najmqmm79ijrvcj259kwsrrxiq1q5chr5azag"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-nose" ,python-nose)))
+    (propagated-inputs
+     `(("python-rdflib" ,python-rdflib)))
+    (home-page "https://github.com/RDFLib/rdflib-jsonld")
+    (synopsis "rdflib extension adding JSON-LD parser and serializer")
+    (description "This package provides an rdflib extension adding JSON-LD
+parser and serializer.")
+    (license license:bsd-3)))
+
+(define-public python-cfgraph
+  (package
+    (name "python-cfgraph")
+    (version "0.2.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "CFGraph" version))
+        (sha256
+         (base32
+          "0x7yz0lvqb6mkhl5fbml27sppmscgpf8v2ism9jzzf0h982ffzxm"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-rdflib" ,python-rdflib)))
+    (home-page "https://github.com/hsolbrig/CFGraph")
+    (synopsis "RDF Collections flattener for rdflib")
+    (description
+     "This package contains RDF Collections flattener for @code{rdflib}.")
+    (license license:asl2.0)))
+
+(define-public hdt-cpp
+  (package
+    (name "hdt-cpp")
+    (version "1.3.3")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                     (url "https://github.com/rdfhdt/hdt-cpp")
+                     (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1vsq80jnix6cy78ayag7v8ajyw7h8dqyad1q6xkf2hzz3skvr34z"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("serd" ,serd)
+       ("zlib" ,zlib)))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)))
+    (home-page "https://github.com/rdfhdt/hdt-cpp")
+    (synopsis "C++ implementation of the HDT compression format")
+    (description "Header Dictionary Triples (HDT) is a compression format for
+RDF data that can also be queried for Triple Patterns.  This package provides a
+C++ library as well as various command-line tools to to work with HDT.")
+(license license:lgpl2.1+)))