diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-12-05 01:10:49 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-12-05 17:59:10 +0100 |
commit | 3a3c9bae7999352e396bd30941913092b470b1f3 (patch) | |
tree | 5f4415d60d4df20747762710f2f1ab0eeb21468d /gnu | |
parent | d098aa3e67b934f61758430c4740cd86d1ff234d (diff) | |
download | patches-3a3c9bae7999352e396bd30941913092b470b1f3.tar patches-3a3c9bae7999352e396bd30941913092b470b1f3.tar.gz |
gnu: sqlite: Move static library to separate output.
* gnu/packages/sqlite.scm (sqlite)[outputs]: New field.
[arguments]: Add #:phases.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/sqlite.scm | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/gnu/packages/sqlite.scm b/gnu/packages/sqlite.scm index d7eb132584..195146aca2 100644 --- a/gnu/packages/sqlite.scm +++ b/gnu/packages/sqlite.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com> ;;; Copyright © 2016 David Craven <david@craven.ch> -;;; Copyright © 2016, 2017, 2018 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> @@ -65,6 +65,7 @@ "0q4f57a5995wz9c7dfiqy9zwl0kn0b900nxwinqa3llv13dm0nlc")))) (build-system gnu-build-system) (inputs `(("readline" ,readline))) + (outputs '("out" "static")) (arguments `(#:configure-flags ;; Add -DSQLITE_SECURE_DELETE, -DSQLITE_ENABLE_FTS3, @@ -75,7 +76,24 @@ "-DSQLITE_ENABLE_FTS3 " "-DSQLITE_ENABLE_UNLOCK_NOTIFY " "-DSQLITE_ENABLE_DBSTAT_VTAB " - "-DSQLITE_ENABLE_COLUMN_METADATA")))) + ;; 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 |