diff mbox series

[bug#45150,1/5] gnu: libid3tag: Install pkg-config file.

Message ID 20201209221143.23539-1-kkebreau@posteo.net
State Accepted
Headers show
Series [bug#45150,1/5] gnu: libid3tag: Install pkg-config file. | expand

Checks

Context Check Description
cbaines/submitting builds success
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Kei Kebreau Dec. 9, 2020, 10:11 p.m. UTC
* gnu/packages/mp3.scm (libid3tag)[arguments]: Add 'install-pkg-config phase.
---
 gnu/packages/mp3.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

Comments

Efraim Flashner Dec. 26, 2020, 8:43 p.m. UTC | #1
Looks good. Thanks for making all the pkg-config files. My only
suggestion is to move ,out and version to the same line on the
pkg-config file creation phases.
Kei Kebreau Dec. 27, 2020, 10:04 p.m. UTC | #2
Efraim Flashner <efraim@flashner.co.il> writes:

> Looks good. Thanks for making all the pkg-config files. My only
> suggestion is to move ,out and version to the same line on the
> pkg-config file creation phases.

Done and pushed to master.  Thanks for reviewing!
diff mbox series

Patch

diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm
index 4bdbe8b487..d5c8ee14b4 100644
--- a/gnu/packages/mp3.scm
+++ b/gnu/packages/mp3.scm
@@ -106,6 +106,28 @@  This package contains the library.")
              (base32
               "0lb1w883dc46dajbdvnia5870brl5lvnlk7g7y58y9wpg5p4znk3"))))
    (build-system gnu-build-system)
+   (arguments
+    `(#:phases
+      (modify-phases %standard-phases
+        (add-after 'install 'install-pkg-config
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let* ((out (assoc-ref outputs "out"))
+                   (pkg-config-dir (string-append out "/lib/pkgconfig")))
+              (mkdir-p pkg-config-dir)
+              (with-output-to-file (string-append pkg-config-dir "/id3tag.pc")
+                (lambda _
+                  (format #t
+                          "prefix=~@*~a~@
+                           libdir=${prefix}/lib~@
+                           includedir=${prefix}/include~@
+
+                           Name: libid3tag~@
+                           Description:~@
+                           Version: ~a~@
+                           Libs: -L${libdir} -lid3tag -lz~@
+                           Cflags: -I${includedir}~%"
+                          out
+                          ,version)))))))))
    (inputs `(("zlib" ,zlib)))
    (synopsis "Library for reading ID3 tags")
    (description