[PATCH 1/5] gnu: libid3tag: Install pkg-config file.

  • Done
  • quality assurance status badge
Details
2 participants
  • Efraim Flashner
  • Kei Kebreau
Owner
unassigned
Submitted by
Kei Kebreau
Severity
normal

Debbugs page

Kei Kebreau wrote 4 years ago
(address . guix-patches@gnu.org)(name . Kei Kebreau)(address . kkebreau@posteo.net)
20201209221143.23539-1-kkebreau@posteo.net
* gnu/packages/mp3.scm (libid3tag)[arguments]: Add 'install-pkg-config phase.
---
gnu/packages/mp3.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (35 lines)
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
--
2.29.2
Kei Kebreau wrote 4 years ago
[PATCH 2/5] gnu: libmad: Install pkg-config file.
(address . 45150@debbugs.gnu.org)(name . Kei Kebreau)(address . kkebreau@posteo.net)
20201209221333.23645-1-kkebreau@posteo.net
* gnu/packages/mp3.scm (libmad)[arguments]: Add 'install-pkg-config phase.
---
gnu/packages/mp3.scm | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)

Toggle diff (34 lines)
diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm
index d5c8ee14b4..9dd6f5c4a7 100644
--- a/gnu/packages/mp3.scm
+++ b/gnu/packages/mp3.scm
@@ -81,7 +81,26 @@
(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
--
2.29.2
Kei Kebreau wrote 4 years ago
[PATCH 3/5] gnu: portmidi: Install pkg-config file.
(address . 45150@debbugs.gnu.org)(name . Kei Kebreau)(address . kkebreau@posteo.net)
20201209221333.23645-2-kkebreau@posteo.net
* gnu/packages/music.scm (portmidi)[arguments]: Add 'install-pkg-config phase.
---
gnu/packages/music.scm | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)

Toggle diff (35 lines)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 2f75c39dd8..fa58ddd236 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -2406,8 +2406,26 @@ 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
--
2.29.2
Kei Kebreau wrote 4 years ago
[PATCH 4/5] gnu: lame: Install pkg-config file.
(address . 45150@debbugs.gnu.org)(name . Kei Kebreau)(address . kkebreau@posteo.net)
20201209221333.23645-3-kkebreau@posteo.net
* gnu/packages/mp3.scm (lame)[arguments]: Add 'install-pkg-config phase.
---
gnu/packages/mp3.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm
index 9dd6f5c4a7..3591372d6b 100644
--- a/gnu/packages/mp3.scm
+++ b/gnu/packages/mp3.scm
@@ -430,6 +430,28 @@ use with CD-recording software).")
(base32
"07nsn5sy3a8xbmw1bidxnsj5fj6kg9ai04icmqw40ybkp353dznx"))))
(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 "/lame.pc")
+ (lambda _
+ (format #t
+ "prefix=~@*~a~@
+ libdir=${prefix}/lib~@
+ includedir=${prefix}/include~@
+
+ Name: lame~@
+ Description:~@
+ Version: ~a~@
+ Libs: -L${libdir} -lmp3lame~@
+ Cflags: -I${includedir}~%"
+ out
+ ,version)))))))))
(home-page "http://lame.sourceforge.net/")
(synopsis "MPEG Audio Layer III (MP3) encoder")
(description "LAME is a high quality MPEG Audio Layer III (MP3) encoder.")
--
2.29.2
Kei Kebreau wrote 4 years ago
[PATCH 5/5] gnu: audacity: Update to 2.4.2.
(address . 45150@debbugs.gnu.org)(name . Kei Kebreau)(address . kkebreau@posteo.net)
20201209221333.23645-4-kkebreau@posteo.net
* gnu/packages/audio.scm (audacity): Update to 2.4.2.
[source]: Add patch. Don't delete portaudio-v19, since only the bundled copy
can be built.
[build-system]: Switch to cmake-build-system.
[inputs]: Remove portaudio.
[arguments]: Adjust configure flags for CMake. Remove 'fix-sbsms-check
phase. Add 'comment-out-revision-ident phase.
* gnu/local.mk (dist_patch_DATA): Register patch.
* gnu/packages/patches/audacity-add-include.patch: New file.
---
gnu/local.mk | 1 +
gnu/packages/audio.scm | 75 +++++--------------
.../patches/audacity-add-include.patch | 15 ++++
3 files changed, 36 insertions(+), 55 deletions(-)
create mode 100644 gnu/packages/patches/audacity-add-include.patch

Toggle diff (166 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 67482b8226..9284e487fe 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -801,6 +801,7 @@ dist_patch_DATA = \
%D%/packages/patches/ath9k-htc-firmware-gcc.patch \
%D%/packages/patches/ath9k-htc-firmware-objcopy.patch \
%D%/packages/patches/audacity-build-with-system-portaudio.patch \
+ %D%/packages/patches/audacity-add-include.patch \
%D%/packages/patches/audiofile-fix-datatypes-in-tests.patch \
%D%/packages/patches/audiofile-fix-sign-conversion.patch \
%D%/packages/patches/audiofile-CVE-2015-7747.patch \
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 7a5dfe0223..e4d82817b4 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -703,7 +703,7 @@ engineers, musicians, soundtrack editors and composers.")
(define-public audacity
(package
(name "audacity")
- (version "2.4.1")
+ (version "2.4.2")
(source
(origin
(method git-fetch)
@@ -713,8 +713,9 @@ engineers, musicians, soundtrack editors and composers.")
(file-name (git-file-name name version))
(sha256
(base32
- "1xk0piv72d2xd3p7igr916fhcbrm76fhjr418k1rlqdzzg1hfljn"))
- (patches (search-patches "audacity-build-with-system-portaudio.patch"))
+ "0lklcvqkxrr2gkb9gh3422iadzl2rv9v0a8s76rwq43lj2im7546"))
+ (patches (search-patches "audacity-build-with-system-portaudio.patch"
+ "audacity-add-include.patch"))
(modules '((guix build utils)))
(snippet
;; Remove bundled libraries.
@@ -724,7 +725,7 @@ engineers, musicians, soundtrack editors and composers.")
(delete-file-recursively (string-append "lib-src/" dir)))
'("expat" "ffmpeg" "lame" "libflac" "libid3tag" "libmad" "libogg"
"libsndfile" "libsoxr" "libvamp" "libvorbis" "lv2"
- "portaudio-v19" "portmidi" "soundtouch" "twolame"
+ "portmidi" "soundtouch" "twolame"
;; FIXME: these libraries have not been packaged yet:
;; "libnyquist"
;; "libscorealign"
@@ -738,7 +739,7 @@ engineers, musicians, soundtrack editors and composers.")
;; "sbsms"
))
#t))))
- (build-system glib-or-gtk-build-system)
+ (build-system cmake-build-system)
(inputs
`(("wxwidgets" ,wxwidgets)
("gtk+" ,gtk+)
@@ -760,7 +761,6 @@ engineers, musicians, soundtrack editors and composers.")
("lv2" ,lv2)
("lilv" ,lilv) ;for lv2
("suil" ,suil) ;for lv2
- ("portaudio" ,portaudio)
("portmidi" ,portmidi)))
(native-inputs
`(("autoconf" ,autoconf)
@@ -772,52 +772,18 @@ engineers, musicians, soundtrack editors and composers.")
("which" ,which)))
(arguments
`(#:configure-flags
- (let ((libid3tag (assoc-ref %build-inputs "libid3tag"))
- (libmad (assoc-ref %build-inputs "libmad"))
- (portmidi (assoc-ref %build-inputs "portmidi")))
- (list
- ;; Loading FFmpeg dynamically is problematic.
- "--disable-dynamic-loading"
- ;; SSE instructions are available on Intel systems only.
- ,@(if (any (cute string-prefix? <> (or (%current-target-system)
- (%current-system)))
- '("x86_64" "i686"))
- '()
- '("--enable-sse=no"))
- ;; portmidi, libid3tag and libmad provide no .pc files, so
- ;; pkg-config fails to find them. Force their inclusion.
- (string-append "ID3TAG_CFLAGS=-I" libid3tag "/include")
- (string-append "ID3TAG_LIBS=-L" libid3tag "/lib -lid3tag -lz")
- (string-append "LIBMAD_CFLAGS=-I" libmad "/include")
- (string-append "LIBMAD_LIBS=-L" libmad "/lib -lmad")
- (string-append "PORTMIDI_CFLAGS=-I" portmidi "/include")
- (string-append "PORTMIDI_LIBS=-L" portmidi "/lib -lportmidi")
- "EXPAT_USE_SYSTEM=yes"
- "FFMPEG_USE_SYSTEM=yes"
- "LAME_USE_SYSTEM=yes"
- "LIBFLAC_USE_SYSTEM=yes"
- "LIBID3TAG_USE_SYSTEM=yes"
- "LIBMAD_USE_SYSTEM=yes"
- "USE_LOCAL_LIBNYQUIST=" ;not packaged yet
- ;;"LIBSBSMS_USE_SYSTEM=yes" ;bundled version is patched
- "LIBSNDFILE_USE_SYSTEM=yes"
- "LIBSOUNDTOUCH_USE_SYSTEM=yes"
- "LIBSOXR_USE_SYSTEM=yes"
- "LIBTWOLAME_USE_SYSTEM=yes"
- "LIBVAMP_USE_SYSTEM=yes"
- "LIBVORBIS_USE_SYSTEM=yes"
- "LV2_USE_SYSTEM=yes"
- "PORTAUDIO_USE_SYSTEM=yes"))
+ (list
+ ;; Loading FFmpeg dynamically is problematic.
+ "-Daudacity_use_ffmpeg=linked"
+ "-Daudacity_use_lame=system"
+ "-Daudacity_use_portsmf=system")
#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'fix-sbsms-check
+ (add-after 'unpack 'comment-out-revision-ident
(lambda _
- ;; This check is wrong: there is no 2.2.0 release; not even the
- ;; bundled sources match this release string.
- (substitute* '("m4/audacity_checklib_libsbsms.m4"
- "configure")
- (("sbsms >= 2.2.0") "sbsms >= 2.0.0"))
- #t))
+ (substitute* "src/AboutDialog.cpp"
+ (("(.*RevisionIdent\\.h.*)" include-line)
+ (string-append "// " include-line)))))
(add-after 'unpack 'use-upstream-headers
(lambda* (#:key inputs #:allow-other-keys)
(substitute* '("src/NoteTrack.cpp"
@@ -827,12 +793,11 @@ engineers, musicians, soundtrack editors and composers.")
(("../lib-src/portmidi/pm_common/portmidi.h") "portmidi.h")
(("../lib-src/portmidi/porttime/porttime.h") "porttime.h"))
(substitute* "src/prefs/MidiIOPrefs.cpp"
- (("../../lib-src/portmidi/pm_common/portmidi.h") "portmidi.h"))
- #t)))
- ;; The test suite is not "well exercised" according to the developers,
- ;; and fails with various errors. See
- ;; <http://sourceforge.net/p/audacity/mailman/message/33524292/>.
- #:tests? #f))
+ (("../../lib-src/portmidi/pm_common/portmidi.h") "portmidi.h")))))
+ ;; The test suite is not "well exercised" according to the developers,
+ ;; and fails with various errors. See
+ ;; <http://sourceforge.net/p/audacity/mailman/message/33524292/>.
+ #:tests? #f))
(home-page "https://www.audacityteam.org/")
(synopsis "Software for recording and editing sounds")
(description
diff --git a/gnu/packages/patches/audacity-add-include.patch b/gnu/packages/patches/audacity-add-include.patch
new file mode 100644
index 0000000000..a7f27918e7
--- /dev/null
+++ b/gnu/packages/patches/audacity-add-include.patch
@@ -0,0 +1,15 @@
+Without <sys/time.h>, gettimeofday is undefined.
+
+diff --git a/src/AudioIO.cpp b/src/AudioIO.cpp
+index 0187e3962..e15d55f4c 100644
+--- a/src/AudioIO.cpp
++++ b/src/AudioIO.cpp
+@@ -479,6 +479,8 @@ time warp info and AudioIOListener and whether the playback is looped.
+ #include "../lib-src/portmidi/porttime/porttime.h"
+ #include "../lib-src/header-substitutes/allegro.h"
+
++#include <sys/time.h>
++
+ #define MIDI_SLEEP 10 /* milliseconds */
+ // how long do we think the thread that fills MIDI buffers,
+ // if it is separate from the portaudio thread,
--
2.29.2
Efraim Flashner wrote 4 years ago
Re: [bug#45150] [PATCH 1/5] gnu: libid3tag: Install pkg-config file.
(name . Kei Kebreau)(address . kkebreau@posteo.net)(address . 45150@debbugs.gnu.org)
X+egggUyi0qWoJQF@3900XT
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.

--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl/noIIACgkQQarn3Mo9
g1EkMQ/6Aw6AYU7wkWtmqLCHgF1QP/a4RHPSK+UalDJTa/+BsxOjhNxeduqMxBab
FRkJixnkLwlZM3coXnx5X9ELDXMuRlIhoU6zQ6e214wp8TXrI1bqxt9aaLDJyzsX
vwpWTbSZnbuyKT/HvzFgl6QoMH9Y0bVwgSSS3y7FrhVxH+aIlxkJakUYFoufRRFo
Tbh7U3cC7jpH26qYPRsw0xlYfwV4FJrw7YIuI+IfVHj6ywqs71OMDHbe6/BKrwkj
jAh9sYv0yvC0sH6so6tWJzn4w8zLOCZFG3iJVpy/TCfJ5v25zxNR0P9bcv3gjLnj
Da0LvvPQ/z4Z/mZeiZPG2lWTmvtbKIc7crv9ijs5ZOnOI295j+zqeXmC574g7/uz
vaCUe2YVwcFwUyNljVHh4AfC8GREYP928KnwtU4bdgs19kNAHB1iZxIER1BiDn0g
7ZqSOGd0YdGrsjh0oxQptK5r/D2WhcD4bgU0ZFyA9O7eVs536NDMidL9L/lomDOj
7r446wZfFRXuM0iPcxtrNpwmz29HL4B5lhXJ4sFICIxGXsWpc5m74s9VHtaNZavv
jHZDti2XMVq/kKKjzpwwZ8jkWC0PBPqObkcA9A4NBXRWzv/aMpNg7fH1h8fWSktU
PQ3CngzKnJmjUC0TCJu9BGAEld0ioVYuWTzdd+kSpn0NwJVt0xQ=
=i+hZ
-----END PGP SIGNATURE-----


Kei Kebreau wrote 4 years ago
Re: bug#45150: [PATCH 1/5] gnu: libid3tag: Install pkg-config file.
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 45150-done@debbugs.gnu.org)
87v9cmq51u.fsf_-_@posteo.net
Efraim Flashner <efraim@flashner.co.il> writes:

Toggle quote (4 lines)
> 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!
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAl/pBO0ACgkQ5qXuPBlG
eg3O4hAAmn0syWJvcorZVdwhFQ7Ruj12hYe9kBWwKwak9d9rNASH0E1vWMFHwAhr
uRiMP+Zn/Y+sq5zwsAHCS8tqNvg+Qfo/uo15OnvXech8deWmuc4xkCGrm2K0NpDi
aR5hi2rxnyn/LgyJ0DdTaPihHXp9C4IO2yCCNRUW2Zv5azrke8vWTW2HBu5p9tHX
NjQdUyN7P7hVVA7ciGJFwHKqk0JJaX93/+TkVZZCJhoB/TwXmiuPqupOYOqG5WA+
WWOJ6+NkmT3wAJ/m6Y6BQzYVy9RtKA+JvZdL7dSPDWcB9eoEkJF6LlKEGT2VCnsL
Kl2NQDHC4uZGsZKFr44OpiFvWHVq7YSgwBOBfxnf2JVyuf2c8vwJfY/eRtVWwEes
6TCkfv+T4SiVwF65xAzq9oWLoXR7jFLgksBtKkw/x+26gL92FfjJQWzDNO8kbTag
y90/A0MMzpTrHeTjwhmmOa6J1iFytx7vM8YknkBoO64Eb73/ZFHKMMcmzoq2Rjtl
+kmLc3pWy6rEYej9u6DD8aXt6b+yuXniJTIDx8v1/KYg7x0Sic+MfxIPSajBl/Rk
MFH4z60Ldxy9TP+G+AIHQuIJsw563j6W1pwOX9qanrowr50cSXh5yrwNCFCXPLeP
vfYTuDRc5F3c6KL8GoOXj418Cir4AETmECcN8cIzTqFlRI+7XAA=
=0L6D
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 45150@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 45150
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help