unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Juliana Sims <juli@incana.org>
To: 63351@debbugs.gnu.org
Cc: Juliana Sims <juli@incana.org>
Subject: [bug#63351] [PATCH] gnu: sqlite: Use g-expressions.
Date: Sun,  7 May 2023 13:40:24 -0400	[thread overview]
Message-ID: <91dc61f35e0684a2e0ddff916d3622e768d0fc4a.1683480983.git.juli@incana.org> (raw)

Hello!

This patch simply ports sqlite to use g-expressions. Because the diff was so
large anyway, I also took the liberty of doing a bit of cleanup and running guix
style.

Thanks,
Juli

* gnu/packages/sqlite.scm (sqlite): Use g-expressions.
---
 gnu/packages/sqlite.scm | 93 ++++++++++++++++++++---------------------
 1 file changed, 45 insertions(+), 48 deletions(-)

diff --git a/gnu/packages/sqlite.scm b/gnu/packages/sqlite.scm
index 2e727bd933..727b5aa91a 100644
--- a/gnu/packages/sqlite.scm
+++ b/gnu/packages/sqlite.scm
@@ -33,12 +33,13 @@ (define-module (gnu packages sqlite)
   #:use-module (gnu packages)
   #:use-module (gnu packages hurd)
   #:use-module (gnu packages readline)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix deprecation)
+  #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
-  #:use-module (guix download)
-  #:use-module (guix build-system gnu)
   #:use-module (guix utils)
-  #:use-module (guix deprecation)
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-26))
 
@@ -62,54 +63,50 @@ (define (sqlite-uri version year)
 
 (define-public sqlite
   (package
-   (name "sqlite")
-   (version "3.39.3")
-   (source (origin
-            (method url-fetch)
-            (uri (sqlite-uri version 2022))
-            (patches (search-patches "sqlite-hurd.patch"))
-            (sha256
-             (base32
-              "1f922kq16g7f4h3gpzim78lvrp5xw9nvlvqw97s2qgxyh8qgns3q"))))
-   (build-system gnu-build-system)
-   (inputs (list readline))
-   (outputs '("out" "static"))
-   (arguments
-    `(#:configure-flags
-      ;; Add -DSQLITE_SECURE_DELETE, -DSQLITE_ENABLE_FTS3,
-      ;; -DSQLITE_ENABLE_UNLOCK_NOTIFY and -DSQLITE_ENABLE_DBSTAT_VTAB
-      ;; to CFLAGS.  GNU Icecat will refuse to use the system SQLite
-      ;; unless these options are enabled.
-      (list (string-append "CFLAGS=-O2 -g -DSQLITE_SECURE_DELETE "
-                           "-DSQLITE_ENABLE_FTS3 "
-                           "-DSQLITE_ENABLE_UNLOCK_NOTIFY "
-                           "-DSQLITE_ENABLE_DBSTAT_VTAB "
-                           ;; Column metadata is required by GNU Jami and Qt, et.al.
-                           "-DSQLITE_ENABLE_COLUMN_METADATA"))
-      #:phases (modify-phases %standard-phases
-                 (add-after 'install 'move-static-library
-                   (lambda* (#:key outputs #:allow-other-keys)
-                     (let* ((out    (assoc-ref outputs "out"))
-                            (static (assoc-ref outputs "static"))
-                            (source (string-append out "/lib/libsqlite3.a")))
-                       (mkdir-p (string-append static "/lib"))
-                       (link source (string-append static "/lib/libsqlite3.a"))
-                       (delete-file source)
-
-                       ;; Remove reference to the static library from the .la file
-                       ;; so that Libtool looks for it in the usual places.
-                       (substitute* (string-append out "/lib/libsqlite3.la")
-                         (("^old_library=.*")
-                          "old_library=''\n"))
-                       #t))))))
-   (home-page "https://www.sqlite.org/")
-   (synopsis "The SQLite database management system")
-   (description
-    "SQLite is a software library that implements a self-contained, serverless,
+    (name "sqlite")
+    (version "3.39.3")
+    (source (origin
+              (method url-fetch)
+              (uri (sqlite-uri version 2022))
+              (patches (search-patches "sqlite-hurd.patch"))
+              (sha256
+               (base32
+                "1f922kq16g7f4h3gpzim78lvrp5xw9nvlvqw97s2qgxyh8qgns3q"))))
+    (build-system gnu-build-system)
+    (inputs (list readline))
+    (outputs '("out" "static"))
+    (arguments
+     (list #:configure-flags
+           ;; Add -DSQLITE_SECURE_DELETE, -DSQLITE_ENABLE_FTS3,
+           ;; -DSQLITE_ENABLE_UNLOCK_NOTIFY and -DSQLITE_ENABLE_DBSTAT_VTAB
+           ;; to CFLAGS.  GNU Icecat will refuse to use the system SQLite
+           ;; unless these options are enabled.
+           #~(list (string-append "CFLAGS=-O2 -g -DSQLITE_SECURE_DELETE "
+                                  "-DSQLITE_ENABLE_FTS3 "
+                                  "-DSQLITE_ENABLE_UNLOCK_NOTIFY "
+                                  "-DSQLITE_ENABLE_DBSTAT_VTAB "
+                                  ;; Column metadata is required by GNU Jami and Qt, et.al.
+                                  "-DSQLITE_ENABLE_COLUMN_METADATA"))
+           #:phases #~(modify-phases %standard-phases
+                        (add-after 'install 'move-static-library
+                          (lambda _
+                            (let* ((source (string-append #$output "/lib/libsqlite3.a")))
+                              (mkdir-p (string-append #$output:static "/lib"))
+                              (link source (string-append #$output:static "/lib/libsqlite3.a"))
+                              (delete-file source)
+                              ;; Remove reference to the static library from the .la file
+                              ;; so that Libtool looks for it in the usual places.
+                              (substitute* (string-append #$output "/lib/libsqlite3.la")
+                                (("^old_library=.*")
+                                 "old_library=''\n"))))))))
+    (home-page "https://www.sqlite.org/")
+    (synopsis "The SQLite database management system")
+    (description
+     "SQLite is a software library that implements a self-contained, serverless,
 zero-configuration, transactional SQL database engine.  SQLite is the most
 widely deployed SQL database engine in the world.  The source code for SQLite
 is in the public domain.")
-   (license license:public-domain)))
+    (license license:public-domain)))
 
 ;; Newer version required for e.g. fossil.
 (define-public sqlite-next

base-commit: d16826cc32ba821e17236dea0536da7200947c97
-- 
2.39.2





             reply	other threads:[~2023-05-07 17:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-07 17:40 Juliana Sims [this message]
     [not found] ` <handler.63351.B.168348130526030.ack@debbugs.gnu.org>
2023-05-07 18:20   ` bug#63351: Acknowledgement ([PATCH] gnu: sqlite: Use g-expressions.) Juliana Sims

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=91dc61f35e0684a2e0ddff916d3622e768d0fc4a.1683480983.git.juli@incana.org \
    --to=juli@incana.org \
    --cc=63351@debbugs.gnu.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).