diff options
| author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2021-10-29 01:56:24 -0400 |
|---|---|---|
| committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2021-11-11 12:18:27 -0500 |
| commit | b79d93ca3372205392797579b29d7af7d16c610e (patch) | |
| tree | 6f3c285bba17ed48b6d7325c94bc13044c056cc1 /gnu | |
| parent | bfa1e12bb893de555903cdd776032b8d63f3d58f (diff) | |
gnu: duktape: Install a pkg-config file.
* gnu/packages/javascript.scm (duktape)[phases]{install-pkg-config}: New phase.
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/javascript.scm | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm index 49ada1aedd7..d5967e72529 100644 --- a/gnu/packages/javascript.scm +++ b/gnu/packages/javascript.scm | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | ;;; Copyright © 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il> | 5 | ;;; Copyright © 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il> |
| 6 | ;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr> | 6 | ;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr> |
| 7 | ;;; Copyright © 2021 Pierre Neidhardt <mail@ambrevar.xyz> | 7 | ;;; Copyright © 2021 Pierre Neidhardt <mail@ambrevar.xyz> |
| 8 | ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> | ||
| 8 | ;;; | 9 | ;;; |
| 9 | ;;; This file is part of GNU Guix. | 10 | ;;; This file is part of GNU Guix. |
| 10 | ;;; | 11 | ;;; |
| @@ -634,12 +635,31 @@ Javascript and a small built-in standard library with C library wrappers.") | |||
| 634 | "19szwxzvl2g65fw95ggvb8h0ma5bd9vvnnccn59hwnc4dida1x4n")))) | 635 | "19szwxzvl2g65fw95ggvb8h0ma5bd9vvnnccn59hwnc4dida1x4n")))) |
| 635 | (build-system gnu-build-system) | 636 | (build-system gnu-build-system) |
| 636 | (arguments | 637 | (arguments |
| 637 | '(#:tests? #f ; No tests. | 638 | `(#:tests? #f ; No tests. |
| 638 | #:make-flags (list "-f" "Makefile.sharedlibrary" | 639 | #:make-flags (list "-f" "Makefile.sharedlibrary" |
| 639 | (string-append "INSTALL_PREFIX=" %output)) | 640 | (string-append "INSTALL_PREFIX=" %output)) |
| 640 | #:phases | 641 | #:phases |
| 641 | (modify-phases %standard-phases | 642 | (modify-phases %standard-phases |
| 642 | (delete 'configure)))) | 643 | (delete 'configure) |
| 644 | ;; At least another major GNU/Linux distribution carries their own | ||
| 645 | ;; .pc file with this package. | ||
| 646 | (add-after 'install 'install-pkg-config | ||
| 647 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 648 | (let* ((out (assoc-ref outputs "out")) | ||
| 649 | (pkg-config-dir (string-append out "/lib/pkgconfig"))) | ||
| 650 | (mkdir-p pkg-config-dir) | ||
| 651 | (with-output-to-file (string-append pkg-config-dir "/duktape.pc") | ||
| 652 | (lambda _ | ||
| 653 | (format #t "prefix=~@*~a~@ | ||
| 654 | libdir=${prefix}/lib~@ | ||
| 655 | includedir=${prefix}/include~@ | ||
| 656 | |||
| 657 | Name: duktape~@ | ||
| 658 | Description: Embeddable Javascript engine~@ | ||
| 659 | Version: ~a~@ | ||
| 660 | Libs: -L${libdir} -lduktape~@ | ||
| 661 | Cflags: -I${includedir}~%" | ||
| 662 | out ,version))))))))) | ||
| 643 | (home-page "https://duktape.org/") | 663 | (home-page "https://duktape.org/") |
| 644 | (synopsis "Small embeddable Javascript engine") | 664 | (synopsis "Small embeddable Javascript engine") |
| 645 | (description "Duktape is an embeddable Javascript engine, with a focus on | 665 | (description "Duktape is an embeddable Javascript engine, with a focus on |
