From 3853b807f69fbd4b0cfe8116cc0d934c941df6aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= Date: Sun, 1 Mar 2015 21:52:23 +0100 Subject: [PATCH 1/3] gnu: mp3: Add .pc files to libmad and libid3tag. * gnu/packages/mp3.scm (libmad, libid3tag): Add .pc files to installations. * gnu/packages/patches/libid3tag-add-pc-file.patch: New file. * gnu/packages/patches/libmad-add-pc-file.patch: New file. * gnu-system.am (dist_patch_DATA): Add them. --- gnu-system.am | 2 ++ gnu/packages/mp3.scm | 25 +++++++++++++++++++++--- gnu/packages/patches/libid3tag-add-pc-file.patch | 16 +++++++++++++++ gnu/packages/patches/libmad-add-pc-file.patch | 16 +++++++++++++++ 4 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/libid3tag-add-pc-file.patch create mode 100644 gnu/packages/patches/libmad-add-pc-file.patch diff --git a/gnu-system.am b/gnu-system.am index da19b9b..7e9d06a 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -450,6 +450,8 @@ dist_patch_DATA = \ gnu/packages/patches/libcanberra-sound-theme-freedesktop.patch \ gnu/packages/patches/libevent-dns-tests.patch \ gnu/packages/patches/liboop-mips64-deplibs-fix.patch \ + gnu/packages/patches/libid3tag-add-pc-file.patch \ + gnu/packages/patches/libmad-add-pc-file.patch \ gnu/packages/patches/libmad-mips-newgcc.patch \ gnu/packages/patches/librep-rules.mk.patch \ gnu/packages/patches/libtheora-config-guess.patch \ diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm index 55ab4b4..229edc5 100644 --- a/gnu/packages/mp3.scm +++ b/gnu/packages/mp3.scm @@ -50,7 +50,8 @@ (sha256 (base32 "14460zhacxhswnzb36qfpd1f2wbk10qvksvm6wyq5hpvdgnw7ymv")) - (patches (list (search-patch "libmad-mips-newgcc.patch"))))) + (patches (list (search-patch "libmad-mips-newgcc.patch") + (search-patch "libmad-add-pc-file.patch"))))) (build-system gnu-build-system) (arguments `(#:phases @@ -59,7 +60,14 @@ (lambda _ ;; remove option that is not supported by gcc any more (substitute* "configure" ((" -fforce-mem") ""))) - %standard-phases))) + (alist-cons-after + 'install 'install-pc-file + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (pc-dir (string-append out "/lib/pkgconfig"))) + (mkdir-p pc-dir) + (copy-file "mad.pc" (string-append pc-dir "/mad.pc")))) + %standard-phases)))) (synopsis "MPEG audio decoder") (description "MAD (MPEG Audio Decoder) supports MPEG-1 and the MPEG-2 extension to @@ -82,9 +90,20 @@ This package contains the library.") version ".tar.gz")) (sha256 (base32 - "0lb1w883dc46dajbdvnia5870brl5lvnlk7g7y58y9wpg5p4znk3")))) + "0lb1w883dc46dajbdvnia5870brl5lvnlk7g7y58y9wpg5p4znk3")) + (patches (list (search-patch "libid3tag-add-pc-file.patch"))))) (build-system gnu-build-system) (inputs `(("zlib" ,zlib))) + (arguments + '(#:phases + (alist-cons-after + 'install 'install-pc-file + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (pc-dir (string-append out "/lib/pkgconfig"))) + (mkdir-p pc-dir) + (copy-file "id3tag.pc" (string-append pc-dir "/id3tag.pc")))) + %standard-phases))) (synopsis "Library for reading ID3 tags") (description "Libid3tag is a library for reading ID3 tags, both ID3v1 and the various diff --git a/gnu/packages/patches/libid3tag-add-pc-file.patch b/gnu/packages/patches/libid3tag-add-pc-file.patch new file mode 100644 index 0000000..4d23ba1 --- /dev/null +++ b/gnu/packages/patches/libid3tag-add-pc-file.patch @@ -0,0 +1,16 @@ +Notably, Audacity's ./configure script locates this library via pkg-config(1). + +--- a/id3tag.pc ++++ b/id3tag.pc +@@ -0,0 +1,11 @@ ++prefix=/usr ++exec_prefix=${prefix} ++libdir=${exec_prefix}/lib ++includedir=${prefix}/include ++ ++Name: id3tag ++Description: ID3 tag reading library ++Requires: ++Version: 0.15.0b ++Libs: -L${libdir} -lid3tag -lz ++Cflags: -I${includedir} diff --git a/gnu/packages/patches/libmad-add-pc-file.patch b/gnu/packages/patches/libmad-add-pc-file.patch new file mode 100644 index 0000000..8a824f8 --- /dev/null +++ b/gnu/packages/patches/libmad-add-pc-file.patch @@ -0,0 +1,16 @@ +Notably, Audacity's ./configure script locates this library via pkg-config(1). + +--- a/mad.pc ++++ b/mad.pc +@@ -0,0 +1,11 @@ ++prefix=/usr ++exec_prefix=${prefix} ++libdir=${exec_prefix}/lib ++includedir=${prefix}/include ++ ++Name: mad ++Description: MPEG Audio Decoder ++Requires: ++Version: 0.15.0b ++Libs: -L${libdir} -lmad ++Cflags: -I${includedir} -- 2.2.1