guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/05: gnu: libmad: Install pkg-config file.


From: guix-commits
Subject: 02/05: gnu: libmad: Install pkg-config file.
Date: Sun, 27 Dec 2020 16:42:44 -0500 (EST)

kkebreau pushed a commit to branch master
in repository guix.

commit 83afa4e9a6aa4dc69f86651d795007dc96a31e64
Author: Kei Kebreau <kkebreau@posteo.net>
AuthorDate: Sun Aug 2 16:54:03 2020 -0400

    gnu: libmad: Install pkg-config file.
    
    * gnu/packages/mp3.scm (libmad)[arguments]: Add 'install-pkg-config phase.
---
 gnu/packages/mp3.scm | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm
index 591bc27..7a0c350 100644
--- a/gnu/packages/mp3.scm
+++ b/gnu/packages/mp3.scm
@@ -81,7 +81,25 @@
           (lambda _
             ;; remove option that is not supported by gcc any more
             (substitute* "configure" ((" -fforce-mem") ""))
-            #t)))))
+            #t))
+        (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 "/mad.pc")
+                (lambda _
+                  (format #t
+                          "prefix=~@*~a~@
+                           libdir=${prefix}/lib~@
+                           includedir=${prefix}/include~@
+
+                           Name: libmad~@
+                           Description:~@
+                           Version: ~a~@
+                           Libs: -L${libdir} -lmad~@
+                           Cflags: -I${includedir}~%"
+                          out ,version)))))))))
    (synopsis "MPEG audio decoder")
    (description
     "MAD (MPEG Audio Decoder) supports MPEG-1 and the MPEG-2 extension to



reply via email to

[Prev in Thread] Current Thread [Next in Thread]