Subject: [bug#55538] [PATCH] gnu: virtuoso-ose: Update to 7.2.7.

From: Roel Janssen <[email-masked]>
Date: Fri, 20 May 2022 10:41:46 +0200

Dear Guix,

I'd like to update Virtuoso OSE to the latest release (see attached patch).

Other than the version number and checksum bump I noticed that some JAR files made it in the build
output.  I tried removing them from the source tarball using a snippet, but then one needs to
include a patch for various Makefile.am files and run the autogen.sh script.  I thought this was
simpler and clearer on what's actually achieved.

Kind regards,
Roel Janssen

From a5591def946ba8a5d9a2c5ccc3259efe9e43391c Mon Sep 17 00:00:00 2001
From: Roel Janssen <[email-masked]>
Date: Fri, 20 May 2022 10:36:50 +0200
Subject: [PATCH] gnu: virtuoso-ose: Update to 7.2.7.

* gnu/packages/databases.scm (virtuoso-ose): Update to 7.2.7; Remove pre-built
  blobs from the build output.
---
 gnu/packages/databases.scm | 25 ++++++++++++++++++++++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index feedfe68e7..03e191bab2 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -3229,14 +3229,14 @@ (define-public python-lmdb
 (define-public virtuoso-ose
   (package
     (name "virtuoso-ose")
-    (version "7.2.6")
+    (version "7.2.7")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://sourceforge/virtuoso/virtuoso/" version "/"
                            "virtuoso-opensource-" version ".tar.gz"))
        (sha256
-        (base32 "0ly7s7a3w2a2zhhi9rq9k2qlnzapqbbc1rcdqb3zqqpgg81krz9q"))))
+        (base32 "1853ln0smiilf3pni70gq6nmi9ps039cy44g6b5i9d2z1n9hnj02"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f ; Tests require a network connection.
@@ -3255,7 +3255,26 @@ (define-public virtuoso-ose
                (for-each (lambda (file)
                            (delete-file (string-append lib "/" file)))
                          '("libvirtuoso-t.a"
-                           "libvirtuoso-t.la"))))))))
+                           "libvirtuoso-t.la")))))
+         ;; Optional bundled Java archives are copied into the build output.
+         ;; This phase removes them.
+         (add-after 'install 'remove-static-libs
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
+               (for-each (lambda (directory)
+                           (delete-file-recursively
+                            (string-append lib "/" directory)))
+                         '("hibernate"
+                           "jdbc-4.0"
+                           "jdbc-4.1"
+                           "jdbc-4.2"
+                           "jdbc-4.3"
+                           "jena"
+                           "jena2"
+                           "jena3"
+                           "jena4"
+                           "rdf4j"
+                           "sesame"))))))))
     (inputs
      (list openssl net-tools readline zlib))
     (home-page "http://vos.openlinksw.com/owiki/wiki/VOS/")
-- 
2.36.1