From 64af916d6f08ae5c59ee76c15fdd9cff343595a4 Mon Sep 17 00:00:00 2001 From: Kei Kebreau Date: Wed, 9 Dec 2020 14:34:43 -0500 Subject: gnu: portmidi: Install pkg-config file. * gnu/packages/music.scm (portmidi)[arguments]: Add 'install-pkg-config phase. --- gnu/packages/music.scm | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index 8fcc22f26d..3c8d3c5881 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -2411,8 +2411,25 @@ main purpose is to liberate raw audio rendering from audio and MIDI drivers.") (let* ((out (assoc-ref outputs "out")) (lib (string-append out "/lib"))) (with-directory-excursion lib - (symlink "libportmidi.so" "libporttime.so"))) - #t))))) + (symlink "libportmidi.so" "libporttime.so"))))) + (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 "/portmidi.pc") + (lambda _ + (format #t + "prefix=~@*~a~@ + libdir=${prefix}/lib~@ + includedir=${prefix}/include~@ + + Name: portmidi~@ + Description:~@ + Version: ~a~@ + Libs: -L${libdir} -lportmidi~@ + Cflags: -I${includedir}~%" + out ,version))))))))) (inputs `(("alsa-lib" ,alsa-lib))) (native-inputs -- cgit v1.2.3