gnu: portmidi: Install pkg-config file.

* gnu/packages/music.scm (portmidi)[arguments]: Add 'install-pkg-config phase.
This commit is contained in:
Kei Kebreau 2020-12-09 14:34:43 -05:00
parent 83afa4e9a6
commit 64af916d6f
No known key found for this signature in database
GPG key ID: E6A5EE3C19467A0D

View file

@ -2411,8 +2411,25 @@ (define-public portmidi
(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