all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Yarl Baudig via Guix-patches via <guix-patches@gnu.org>
To: 75148@debbugs.gnu.org
Cc: Yarl Baudig <yarl-baudig@mailoo.org>, jjbigorra@gmail.com
Subject: [bug#75148] [PATCH] * gnu/packages/guile-xyz.scm (guile-dbi): Update to 2.1.9.
Date: Fri, 27 Dec 2024 22:02:34 +0100	[thread overview]
Message-ID: <20241227210235.136392-1-yarl-baudig@mailoo.org> (raw)

Along with guile-dbd-sqlite3, guile-dbd-postgresql and
guile-dbd-mysql. Transition to guile3. With guix style.

Change-Id: I7199030cec603a038f1b1cdab714127336a795c5
---
 gnu/packages/guile-xyz.scm | 130 ++++++++++++++++++++-----------------
 1 file changed, 71 insertions(+), 59 deletions(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index dd0f620133..59e3e9e98d 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -1969,16 +1969,16 @@ (define-public guile-yamlpp
 (define-public guile-dbi
   (package
     (name "guile-dbi")
-    (version "2.1.8")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://github.com/opencog/guile-dbi")
-                    (commit (string-append "guile-dbi-" version))))
-              (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "123m4j82bi60s1v95pjh4djb7bh6zdwmljbpyg7zq8ni2gyal7lw"))))
+    (version "2.1.9")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/opencog/guile-dbi")
+             (commit (string-append "guile-dbi-" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1i0vsg173499jsvimzqb81lqrw6r8l77qkjmsdha442r933nq473"))))
     (build-system gnu-build-system)
     (arguments
      `(#:modules (((guix build guile-build-system)
@@ -1986,30 +1986,42 @@ (define-public guile-dbi
                   ,@%default-gnu-modules)
        #:imported-modules ((guix build guile-build-system)
                            ,@%default-gnu-imported-modules)
-       #:configure-flags
-       (list (string-append
-              "--with-guile-site-dir=" %output "/share/guile/site/"
-              (target-guile-effective-version (assoc-ref %build-inputs "guile"))))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'chdir
-           (lambda _
-             ;; The upstream Git repository contains all the code, so change
-             ;; to the directory specific to guile-dbi.
-             (chdir "guile-dbi")))
-         (add-after 'install 'patch-extension-path
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (dbi.scm (string-append out "/share/guile/site/"
-                                            (target-guile-effective-version
-                                             (assoc-ref inputs "guile"))
-                                            "/dbi/dbi.scm"))
-                    (ext (string-append out "/lib/libguile-dbi")))
-               (substitute* dbi.scm (("libguile-dbi") ext))))))))
-    (native-inputs
-     (list autoconf automake libtool perl texinfo))
-    (propagated-inputs
-     (list guile-2.2))
+       #:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'chdir
+                    (lambda _
+                      ;; The upstream Git repository contains all the code, so change
+                      ;; to the directory specific to guile-dbi.
+                      (chdir "guile-dbi")))
+                  (add-after 'chdir 'patch-Makefile
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out"))
+                             (datadir (string-append out "/share/guile/site/"
+                                                     (target-guile-effective-version
+                                                      (assoc-ref inputs
+                                                                 "guile")))))
+                        (substitute* "src/dbi/Makefile.am"
+                          (("\\$\\(GUILE_SITE\\)")
+                           datadir)))))
+                  (add-after 'install 'patch-extension-path
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out"))
+                             (dbi.scm (string-append out "/share/guile/site/"
+                                                     (target-guile-effective-version
+                                                      (assoc-ref inputs
+                                                                 "guile"))
+                                                     "/dbi/dbi.scm"))
+                             (ext (string-append out "/lib/libguile-dbi")))
+                        (substitute* dbi.scm
+                          (("libguile-dbi")
+                           ext))))))))
+    (native-inputs (list autoconf
+                         automake
+                         pkg-config
+                         libtool
+                         perl
+                         texinfo
+                         guile-3.0-latest))
+    (inputs (list guile-3.0-latest libltdl))
     (synopsis "Guile database abstraction layer")
     (home-page "https://github.com/opencog/guile-dbi")
     (description
@@ -2036,13 +2048,11 @@ (define-public guile-dbd-sqlite3
                ;; The upstream Git repository contains all the code, so change
                ;; to the directory specific to guile-dbd-sqlite3.
                (chdir "guile-dbd-sqlite3")))
-           (delete 'patch-extension-path)))))
-    (inputs
-     (list sqlite zlib))
-    (native-inputs
-     (modify-inputs (package-native-inputs guile-dbi)
-       (prepend guile-dbi ; only required for headers
-                pkg-config)))
+           (delete 'patch-extension-path)
+           (delete 'patch-Makefile)))))
+    (native-inputs (modify-inputs (package-native-inputs guile-dbi)
+                     (prepend guile-dbi)))
+    (inputs (list sqlite zlib libltdl))
     (synopsis "Guile DBI driver for SQLite")
     (description
      "guile-dbi is a library for Guile that provides a convenient interface to
@@ -2064,14 +2074,15 @@ (define-public guile-dbd-postgresql
            (add-after 'chdir 'patch-src
              (lambda _
                (substitute* "src/guile-dbd-postgresql.c"
-                 (("postgresql/libpq-fe\\.h") "libpq-fe.h"))))
-           (delete 'patch-extension-path)))))
+                 (("postgresql/libpq-fe\\.h")
+                  "libpq-fe.h"))))
+           (delete 'patch-extension-path)
+           (delete 'patch-Makefile)))))
+    (native-inputs (modify-inputs (package-native-inputs guile-dbi)
+                     (prepend guile-dbi)))
     (inputs
-     (list postgresql zlib))
-    (native-inputs
-     (modify-inputs (package-native-inputs guile-dbi)
-       (prepend guile-dbi ; only required for headers
-                )))
+     ;; openssl to satisfy pkg-config, postgresql built with openssl
+     (list postgresql zlib libltdl openssl))
     (synopsis "Guile DBI driver for PostgreSQL")
     (description
      "@code{guile-dbi} is a library for Guile that provides a convenient
@@ -2094,19 +2105,20 @@ (define-public guile-dbd-mysql
            (add-after 'chdir 'patch-src
              (lambda _
                (substitute* "configure.ac"
-                 (("mariadbclient") "mariadb"))
+                 (("mariadbclient")
+                  "mariadb"))
                (substitute* "src/guile-dbd-mysql.c"
-                 (("<mariadb/") "<mysql/"))))
-           (delete 'patch-extension-path)))))
-    (inputs
-     (list `(,mariadb "dev")
-           `(,mariadb "lib") zlib))
-    (native-inputs
-     (modify-inputs (package-native-inputs guile-dbi)
-       (prepend guile-dbi ; only required for headers
-                )))
+                 (("<mariadb/")
+                  "<mysql/"))))
+           (delete 'patch-extension-path)
+           (delete 'patch-Makefile)))))
+    (native-inputs (modify-inputs (package-native-inputs guile-dbi)
+                     (prepend guile-dbi)))
+    (inputs (list `(,mariadb "dev")
+                  `(,mariadb "lib") zlib libltdl))
     (synopsis "Guile DBI driver for MySQL")
-    (description "@code{guile-dbi} is a library for Guile that provides a
+    (description
+     "@code{guile-dbi} is a library for Guile that provides a
 convenient interface to SQL databases.  This package implements the interface
 for MySQL.")
     (license license:gpl2+)))
-- 
2.46.0







                 reply	other threads:[~2024-12-27 21:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241227210235.136392-1-yarl-baudig@mailoo.org \
    --to=guix-patches@gnu.org \
    --cc=75148@debbugs.gnu.org \
    --cc=jjbigorra@gmail.com \
    --cc=yarl-baudig@mailoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.