diff options
author | Mark H Weaver <mhw@netris.org> | 2019-07-21 11:12:36 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2019-07-21 11:12:36 -0400 |
commit | 2f4698d7d1b8baed51f313d2250809232d801db5 (patch) | |
tree | b1542c576f629e083c74b3d4418ce6fa34a2591f | |
parent | 3aec5263a3a718e9987910defbd19e1e8b30c2dc (diff) | |
download | patches-2f4698d7d1b8baed51f313d2250809232d801db5.tar patches-2f4698d7d1b8baed51f313d2250809232d801db5.tar.gz |
gnu: Add darkice.
* gnu/packages/audio.scm (darkice): New variable.
* gnu/packages/patches/darkice-workaround-fpermissive-error.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
-rw-r--r-- | gnu/local.mk | 1 | ||||
-rw-r--r-- | gnu/packages/audio.scm | 33 | ||||
-rw-r--r-- | gnu/packages/patches/darkice-workaround-fpermissive-error.patch | 62 |
3 files changed, 96 insertions, 0 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index c2b6f149a8..eb3b0dcd3b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -748,6 +748,7 @@ dist_patch_DATA = \ %D%/packages/patches/cube-nocheck.patch \ %D%/packages/patches/cursynth-wave-rand.patch \ %D%/packages/patches/cvs-CVE-2017-12836.patch \ + %D%/packages/patches/darkice-workaround-fpermissive-error.patch \ %D%/packages/patches/dbus-helper-search-path.patch \ %D%/packages/patches/dbus-CVE-2019-12749.patch \ %D%/packages/patches/dealii-mpi-deprecations.patch \ diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 3c5b6307eb..c6c42f66c6 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -3751,3 +3751,36 @@ binaural beat tracks of different frequencies and exporting of tracks into different audio formats. Gnaural can also be linked over the internet with other Gnaural instances, allowing synchronous sessions between many users.") (license license:gpl2+))) + +(define-public darkice + (package + (name "darkice") + (version "1.3") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/darkice/darkice/" + version "/darkice-" version ".tar.gz")) + (sha256 + (base32 "1rlxds7ssq7nk2in4s46xws7xy9ylxsqgcz85hxjgh17lsm0y39c")) + (patches + (search-patches "darkice-workaround-fpermissive-error.patch")))) + (build-system gnu-build-system) + (native-inputs `(("pkg-config" ,pkg-config))) + (inputs `(("lame" ,lame) + ("libvorbis" ,libvorbis) + ("opus" ,opus) + ("twolame" ,twolame) + ("alsa-lib" ,alsa-lib) + ("pulseaudio" ,pulseaudio) + ("jack" ,jack-1) + ("libsamplerate" ,libsamplerate))) + (arguments + `(#:configure-flags + (list (string-append "--with-lame-prefix=" + (assoc-ref %build-inputs "lame"))))) + (home-page "http://www.darkice.org/") + (synopsis "Live audio streamer") + (description "DarkIce is a live audio streamer. It takes audio input from +a sound card, encodes it into Ogg Vorbis and/or mp3, and sends the audio +stream to one or more IceCast and/or ShoutCast servers.") + (license license:gpl3+))) diff --git a/gnu/packages/patches/darkice-workaround-fpermissive-error.patch b/gnu/packages/patches/darkice-workaround-fpermissive-error.patch new file mode 100644 index 0000000000..5ee29147c2 --- /dev/null +++ b/gnu/packages/patches/darkice-workaround-fpermissive-error.patch @@ -0,0 +1,62 @@ +Copied from Debian: +<https://sources.debian.org/data/main/d/darkice/1.3-0.2/debian/patches/0001-Cast-float-in-SRC-lib-calls-to-delete-fpermissive-co.patch> + +From 1e2eb18d349f205c70cb2836232825442359b6e3 Mon Sep 17 00:00:00 2001 +From: belette <ouack23@yahoo.fr> +Date: Wed, 26 Oct 2016 02:43:43 +0200 +Subject: Cast float* in SRC lib calls to delete fpermissive compilation error + +--- + darkice/trunk/src/FaacEncoder.cpp | 2 +- + darkice/trunk/src/OpusLibEncoder.cpp | 2 +- + darkice/trunk/src/VorbisLibEncoder.cpp | 2 +- + darkice/trunk/src/aacPlusEncoder.cpp | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +--- a/src/FaacEncoder.cpp ++++ b/src/FaacEncoder.cpp +@@ -164,7 +164,7 @@ FaacEncoder :: write ( const void * buf, + if ( converter ) { + unsigned int converted; + #ifdef HAVE_SRC_LIB +- src_short_to_float_array ((short *) b, converterData.data_in, samples); ++ src_short_to_float_array ((short *) b, (float *) converterData.data_in, samples); + converterData.input_frames = nSamples; + converterData.data_out = resampledOffset + (resampledOffsetSize * channels); + int srcError = src_process (converter, &converterData); +--- a/src/OpusLibEncoder.cpp ++++ b/src/OpusLibEncoder.cpp +@@ -403,7 +403,7 @@ OpusLibEncoder :: write ( const void * buf, + #ifdef HAVE_SRC_LIB + (void)inCount; + converterData.input_frames = processed; +- src_short_to_float_array (shortBuffer, converterData.data_in, totalSamples); ++ src_short_to_float_array (shortBuffer, (float *) converterData.data_in, totalSamples); + int srcError = src_process (converter, &converterData); + if (srcError) + throw Exception (__FILE__, __LINE__, "libsamplerate error: ", src_strerror (srcError)); +--- a/src/VorbisLibEncoder.cpp ++++ b/src/VorbisLibEncoder.cpp +@@ -337,7 +337,7 @@ VorbisLibEncoder :: write ( const void * buf, + int converted; + #ifdef HAVE_SRC_LIB + converterData.input_frames = nSamples; +- src_short_to_float_array (shortBuffer, converterData.data_in, totalSamples); ++ src_short_to_float_array (shortBuffer, (float *) converterData.data_in, totalSamples); + int srcError = src_process (converter, &converterData); + if (srcError) + throw Exception (__FILE__, __LINE__, "libsamplerate error: ", src_strerror (srcError)); +--- a/src/aacPlusEncoder.cpp ++++ b/src/aacPlusEncoder.cpp +@@ -155,7 +155,7 @@ aacPlusEncoder :: write ( const void * buf, + if ( converter ) { + unsigned int converted; + #ifdef HAVE_SRC_LIB +- src_short_to_float_array ((short *) b, converterData.data_in, samples); ++ src_short_to_float_array ((short *) b, (float *) converterData.data_in, samples); + converterData.input_frames = nSamples; + converterData.data_out = resampledOffset + (resampledOffsetSize * channels); + int srcError = src_process (converter, &converterData); +-- +2.11.0 + |