From f1af93971b7490792d8541bc790e0d8c6d787059 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 6 Sep 2019 10:28:05 +0100 Subject: gentoo resync : 06.08.2019 --- media-sound/audacity/Manifest | 5 + media-sound/audacity/audacity-2.3.2.ebuild | 141 +++++++++++++++++++++ .../audacity-2.3.2-Fix-building-without-midi.patch | 71 +++++++++++ ...3.2-fix_building_against_system_portaudio.patch | 56 ++++++++ 4 files changed, 273 insertions(+) create mode 100644 media-sound/audacity/audacity-2.3.2.ebuild create mode 100644 media-sound/audacity/files/audacity-2.3.2-Fix-building-without-midi.patch create mode 100644 media-sound/audacity/files/audacity-2.3.2-fix_building_against_system_portaudio.patch (limited to 'media-sound/audacity') diff --git a/media-sound/audacity/Manifest b/media-sound/audacity/Manifest index cbafc6d1ce5d..e71d51ff7e64 100644 --- a/media-sound/audacity/Manifest +++ b/media-sound/audacity/Manifest @@ -1,7 +1,12 @@ AUX audacity-2.2.1-portmixer.patch 776 BLAKE2B 18e5e3a3394c2a56afd9314993bde41376a59bc7c480b159ca9d14ff812f507de32018d5b28ee9a2cdd4f3b5f1a6e420e85f3d8660c0fa0e28941f6fdce9fb6a SHA512 f00fdd46150181873bc4aa24f95b3491471198429f47fae2d4f79f0f360a642adf94936dcf63bb02e84f9581d87c05dc8d93ed37eddaf43e31d900d505b50805 AUX audacity-2.2.2-automake.patch 916 BLAKE2B 8de3bb400bebcfcd1b2e51ce8ada2d24e9524b56219f31bd9181e6c6c6c7382aee3d32bfb2024b7d3155f9f2464c541c5e12c7e395ce3fd9197234db8347b4d1 SHA512 2e89f45595674c3388648a6aeac4f43b82fdda2f5ba8efda2d2d98a11be2a76cab5cd0d8a87d8e581810a6ed3984d88b01e7462b51544dea550952ab563defca AUX audacity-2.2.2-midi.patch 4999 BLAKE2B 74e99c16abbd64f4f74ccc1dc4e76a156d492e0f8d929e8e47bf12f574741fdf052ad7c9b780fb8c578790c505990d42712239470bacc5ba132dbdcb8fa3bc78 SHA512 5c0f9ca7d25ac2c15cc12a643408066eb7b320fb7c1476d9169be25128b3a4b682ed77e9d101923c7c6df187571874b9e67635d98472e875b7520053909b271a +AUX audacity-2.3.2-Fix-building-without-midi.patch 1845 BLAKE2B 482cf34d9a43d7fcd9b9104ad5e5a0a5ebe5b744cbc9cd9f2e267e591c822781acf601c355665a0bdb95ee94a758eac72fe4d74b6f9f72cb48b40c7f0cd0a2ac SHA512 d2fcf0c57a7c9a13a15daf6c901430e114193c0cdf395fbacaaf10be6717a6c74dcb1284ede3d12eca1c418f2948483f84fc75c78e80176531c3adbfbbeeae31 +AUX audacity-2.3.2-fix_building_against_system_portaudio.patch 1991 BLAKE2B 2e9609542728d3d5c80471d95a49f3051c061a3a06290820db90a0cad346c759c666ae66a36c26b7005f727f73049c40423fbb2c86c6492f0b89023c80972bf1 SHA512 7b7612249ec7f1eb765fd40b15b89e90fe7e251cd6a49d54643c43e8e2ab6e319b5a49c8432abe6d2440a610a306c6553538835a018ecb0c832aab88cc3f033a +DIST Audacity-2.3.2.tar.gz 61972597 BLAKE2B 968c3d877392af92e2a23d8357fe65c3eb608122185d037e741ed6165d1acb3af70fc15dce63140eff14cd032fb3e3dc1b8b4f7bca9016f8e0e56aaef8a27802 SHA512 a59d6e9e974d5f78f5ca561e3bea31fc1b3e88f9ea60b2df7ce8bcec264d886f3fdc8f20030e11a86daff8ffeb735850b5e5f73c45fbef0bfcc58692423e7cd0 DIST audacity-manual-2.2.2.zip 13501474 BLAKE2B f0289f22dc4134b31f38d4acee3bda9f915829842030f8454cce1801377d177c32a7f35077673ce7db0a0f059a644d8146457e6a6377c5f6abc01c11da6a4f53 SHA512 a34ded796157d763fa024e0a235ecce7c67a68bcce86b487f8c022d45d8337fe550e40f56df4155a16293b974511d0bcf130cb086b3594bc0c42d9d0f84f1e86 +DIST audacity-manual-2.3.2.zip 21163508 BLAKE2B 6a0ec89567db63164e897aad21af6fb31557e2519640788c781b21e885c0f704174529d9abf3e8645ccb3bca0f7b987fa708b1ce64597b282357b823e8addd44 SHA512 5e541065236badfdc2331681e43dee2564f933c33a3a588806f189acc8d8285a2c60bf9bc0c7052c6cb23fa1ee29a9f5e0428540cd556901dcf896def1c7c0ac DIST audacity-minsrc-2.2.2.tar.xz 8210700 BLAKE2B b887cff6994f2d5315b5d22b47d460a6b7c7b7af4f212585740a7534dc1345a8b3cda701a8541fabeef1aedf30cd336466798b2da4ef62ed010152540ee02d26 SHA512 8e52b4456a3a328a9933961746722ab5c545d17f7c05f3ae4aa83ba5d4f8323590ffa070de9462163362032b372aa48bc61fc96459e5565eec29a146b7a0351c EBUILD audacity-2.2.2.ebuild 3343 BLAKE2B 11ad65e95ea0a16b6434017246b0b5063c13df6821a856bcc4116de082f5a673394480a1a15e63065ccded4d8bdea786eb7988dc747440b11d5fbb6fb4504601 SHA512 80136688f1ef9a75424f24bdb98ccfbb8ad7c1dfdabd7a8ede9c4ba837de7039c2109e92fe7b1e13e5e0fa05e6f39af109bc779b20dc04af0ee96b93ba3af660 +EBUILD audacity-2.3.2.ebuild 3308 BLAKE2B 26a4dbfbfa65f793da903e9856925df8f5cfa3dab66f2af941862152769a591c1a1943f2375e4120548b7bbc31c09db1d0fa02209e8e989c4444551e7ac61170 SHA512 1635af065e989252de42db1cd9089d4584b7e4691b4bcb6541657e57abaefef13decc48f4aabee759b02b8471f5c93842336ce7abb77db66edc224b202c77f1f MISC metadata.xml 1175 BLAKE2B 4579a87e1bc8a5b420f05774e640471e859e76d0526e581d6dbfbf1f39b36462d3d87677cd98d67b458486f32c34c215c69c9318069732c722cf4ef351a7803b SHA512 5d522d5b6d837f7632f8e1bb25d13d4f134880c7ddd12c637dd1235054c234f0679d02c7b6a0e3caa0c9d20782d5621bfa312239c177e4db4298e3f38d6d80ae diff --git a/media-sound/audacity/audacity-2.3.2.ebuild b/media-sound/audacity/audacity-2.3.2.ebuild new file mode 100644 index 000000000000..1f561978a5fe --- /dev/null +++ b/media-sound/audacity/audacity-2.3.2.ebuild @@ -0,0 +1,141 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic wxwidgets xdg + +MY_P="Audacity-${PV}" +DOC_PV="${PV}" +DESCRIPTION="Free crossplatform audio editor" +HOMEPAGE="https://web.audacityteam.org/" +# wget doesn't seem to work on FossHub links, so we mirror +SRC_URI="https://github.com/audacity/audacity/archive/${MY_P}.tar.gz + doc? ( https://dev.gentoo.org/~polynomial-c/dist/${PN}-manual-${DOC_PV}.zip )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~mips ~x86" +IUSE="alsa cpu_flags_x86_sse doc ffmpeg +flac id3tag jack +ladspa +lame libav + +lv2 mad midi nls +portmixer sbsms +soundtouch twolame vamp +vorbis +vst" + +RESTRICT="test" + +RDEPEND=">=app-arch/zip-2.3 + dev-libs/expat + >=media-libs/libsndfile-1.0.0 + >=media-libs/portaudio-19.06.00-r2[alsa?] + =media-video/ffmpeg-1.2:= ) + ) + flac? ( >=media-libs/flac-1.3.1[cxx] ) + id3tag? ( media-libs/libid3tag ) + jack? ( virtual/jack ) + lame? ( >=media-sound/lame-3.70 ) + lv2? ( + media-libs/lilv + media-libs/lv2 + media-libs/suil + ) + mad? ( >=media-libs/libmad-0.14.2b ) + sbsms? ( media-libs/libsbsms ) + soundtouch? ( >=media-libs/libsoundtouch-1.3.1 ) + twolame? ( media-sound/twolame ) + vamp? ( >=media-libs/vamp-plugin-sdk-2.0 ) + vorbis? ( >=media-libs/libvorbis-1.0 ) +" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig + nls? ( sys-devel/gettext ) +" + +S="${WORKDIR}/${PN}-${MY_P}" + +PATCHES=( + "${FILESDIR}"/${PN}-2.3.2-fix_building_against_system_portaudio.patch + "${FILESDIR}"/${PN}-2.3.2-Fix-building-without-midi.patch +) + +src_prepare() { + default + + use midi || sed -i \ + -e 's:^\(#define EXPERIMENTAL_MIDI_OUT\):// \1:' \ + src/Experimental.h || die +} + +src_configure() { + local WX_GTK_VER="3.0" + setup-wxwidgets + append-cxxflags -std=gnu++14 + + # * always use system libraries if possible + # * options listed in the order that configure --help lists them + local myeconfargs=( + --disable-dynamic-loading + --enable-nyquist=local + --enable-unicode + --with-expat + --with-lib-preference=system + --with-libsndfile + --with-libsoxr + --with-mod-script-pipe + --with-mod-nyq-bench + --with-portaudio + --with-widgetextra=local + --with-wx-version=${WX_GTK_VER} + $(use_enable cpu_flags_x86_sse sse) + $(use_enable ladspa) + $(use_enable nls) + $(use_enable vst) + $(use_with ffmpeg) + $(use_with flac libflac) + $(use_with id3tag libid3tag) + $(use_with lame) + $(use_with lv2) + $(use_with mad libmad) + $(use_with midi portmidi local) + $(use_with midi "" local) + $(use_with portmixer) + $(use_with sbsms) + $(use_with soundtouch) + $(use_with twolame libtwolame) + $(use_with vamp libvamp) + $(use_with vorbis libvorbis) + ) + econf "${myeconfargs[@]}" +} + +src_install() { + emake DESTDIR="${D}" install + + # Remove bad doc install + rm -r "${ED}"/usr/share/doc || die + + # Install our docs + einstalldocs + + if use doc ; then + docinto html + dodoc -r "${WORKDIR}"/help/manual/{m,man,manual} + dodoc "${WORKDIR}"/help/manual/{favicon.ico,index.html,quick_help.html} + dosym ../../doc/${PF}/html /usr/share/${PN}/help/manual + fi +} + +pkg_preinst() { + xdg_pkg_preinst +} + +pkg_postinst() { + xdg_pkg_postinst +} + +pkg_postrm() { + xdg_pkg_postrm +} diff --git a/media-sound/audacity/files/audacity-2.3.2-Fix-building-without-midi.patch b/media-sound/audacity/files/audacity-2.3.2-Fix-building-without-midi.patch new file mode 100644 index 000000000000..d4ec1a7320f6 --- /dev/null +++ b/media-sound/audacity/files/audacity-2.3.2-Fix-building-without-midi.patch @@ -0,0 +1,71 @@ +diff -urpN a/src/Track.h b/src/Track.h +--- a/src/Track.h 2019-05-04 13:38:57.000000000 +0300 ++++ b/src/Track.h 2019-08-27 19:32:36.937551831 +0300 +@@ -53,10 +53,6 @@ using WaveTrackConstArray = std::vector + + using NoteTrackConstArray = std::vector < std::shared_ptr< const NoteTrack > >; + +-#if defined(USE_MIDI) +-class NoteTrack; +-#endif +- + class TrackList; + + using ListOfTracks = std::list< std::shared_ptr< Track > >; +@@ -74,9 +70,7 @@ enum class TrackKind + { + None, + Wave, +-#if defined(USE_MIDI) + Note, +-#endif + Label, + Time, + Audio, +diff -urpN a/src/menus/FileMenus.cpp b/src/menus/FileMenus.cpp +--- a/src/menus/FileMenus.cpp 2019-05-04 13:38:57.000000000 +0300 ++++ b/src/menus/FileMenus.cpp 2019-08-27 19:32:36.939551720 +0300 +@@ -141,8 +141,6 @@ AudacityProject *DoImportMIDI( + } + #endif + +-#ifdef USE_MIDI +- + // Menu handler functions + + struct Handler : CommandHandlerObject { +@@ -480,6 +478,7 @@ void OnImportLabels(const CommandContext + } + } + ++#ifdef USE_MIDI + void OnImportMIDI(const CommandContext &context) + { + auto &project = context.project; +@@ -496,7 +495,7 @@ void OnImportMIDI(const CommandContext & + if (!fileName.empty()) + DoImportMIDI(&project, fileName); + } +-#endif ++#endif // USE_MIDI + + void OnImportRaw(const CommandContext &context) + { +diff -urpN a/src/tracks/ui/TimeShiftHandle.cpp b/src/tracks/ui/TimeShiftHandle.cpp +--- a/src/tracks/ui/TimeShiftHandle.cpp 2019-05-04 13:38:57.000000000 +0300 ++++ b/src/tracks/ui/TimeShiftHandle.cpp 2019-08-27 19:32:36.940551665 +0300 +@@ -393,12 +393,12 @@ UIHandle::Result TimeShiftHandle::Click + ok = false; + else + captureClips = true; +- }, + #ifdef USE_MIDI ++ }, + [&](NoteTrack *) { + captureClips = true; +- } + #endif ++ } + ); + + if ( ! ok ) diff --git a/media-sound/audacity/files/audacity-2.3.2-fix_building_against_system_portaudio.patch b/media-sound/audacity/files/audacity-2.3.2-fix_building_against_system_portaudio.patch new file mode 100644 index 000000000000..fa785fdd6c5e --- /dev/null +++ b/media-sound/audacity/files/audacity-2.3.2-fix_building_against_system_portaudio.patch @@ -0,0 +1,56 @@ +From 5f9482a191359f2c477763a36d2c865c5f186602 Mon Sep 17 00:00:00 2001 +From: Antonio Ospite +Date: Tue, 7 Nov 2017 13:06:33 +0100 +Subject: [PATCH] Fix building against the system portaudio library + +Building against the system portaudio results in this error: + +./src/AudioIO.cpp:983: undefined reference to `PaUtil_GetTime' +audacity-AudioIO.o: In function `audacityAudioCallback(void const*, void*, +unsigned long, PaStreamCallbackTimeInfo const*, unsigned long, void*)': +./src/AudioIO.cpp:4630: undefined reference to `PaUtil_GetTime' +collect2: error: ld returned 1 exit status +Makefile:2349: recipe for target 'audacity' failed +make[3]: *** [audacity] Error 1 + +This is because PaUtil_GetTime is declared as a C symbol in pa_util.h +but is resolved as a C++ symbol at link time. + +Audacity fixes this in the local tree with this change: +https://github.com/audacity/audacity/commit/38fd97b8e26060332ab3e9e000a8882326a70ba7 + +However this is not general enough for the portaudio debian package. + +Since PaUtil_GetTime() is the only function causing problems, just copy +over the code where it's used. +--- + src/AudioIO.cpp | 17 ++++++++++++++++- + 1 file changed, 16 insertions(+), 1 deletion(-) + +--- a/src/AudioIO.cpp ++++ b/src/AudioIO.cpp +@@ -465,8 +465,23 @@ TimeTrack and AudioIOListener and whethe + #define ROUND(x) (int) ((x)+0.5) + //#include + #include "../lib-src/portmidi/pm_common/portmidi.h" +- #include "../lib-src/portaudio-v19/src/common/pa_util.h" + #include "NoteTrack.h" ++ ++PaTime PaUtil_GetTime( void ) ++{ ++#ifdef HAVE_MACH_ABSOLUTE_TIME ++ return mach_absolute_time() * machSecondsConversionScaler_; ++#elif defined(HAVE_CLOCK_GETTIME) ++ struct timespec tp; ++ clock_gettime(CLOCK_REALTIME, &tp); ++ return (PaTime)(tp.tv_sec + tp.tv_nsec * 1e-9); ++#else ++ struct timeval tv; ++ gettimeofday( &tv, NULL ); ++ return (PaTime) tv.tv_usec * 1e-6 + tv.tv_sec; ++#endif ++} ++ + #endif + + #ifdef EXPERIMENTAL_AUTOMATED_INPUT_LEVEL_ADJUSTMENT -- cgit v1.2.3