Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This update also links against system portaudio. Closes: https://bugs.gentoo.org/777366 Closes: https://bugs.gentoo.org/822978 Signed-off-by: Arsen Arsenović <arsen@aarsen.me>
- Loading branch information
1 parent
57dbd2c
commit e63a7ce
Showing
8 changed files
with
526 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
DIST Audacity-2.4.2.tar.gz 61248430 BLAKE2B bb7e31e22d2a09c38767b019ed5c2c2be31741594715d73452fc4622d171a6209e87009b6f820873cc1cff2f6b85547a3dea0a2d8d4dd7195617509e571ee9b8 SHA512 0d9cdabf5ba2c7207e8d8e4a8bdfc3e7d32277386436ecb480e3ff781720f5449a56b310ba91c78ca67afb752e2ab736abd5b7ce40d19d153bfc4a2067343a3d | ||
DIST Audacity-3.2.2.tar.gz 56986082 BLAKE2B 9800f5f0d782c4f6a3d10765bc57cde6e8dd9bd47581bed80502120d1ecb098e67092fdeb0873f248acc8448958e907e74877bfa94e2b144f3e8289dcd79d26d SHA512 629d502acc78b02d50a191045a8ececabf7096a77fe63f491291a36cca452c47dec74aef55d0f837345dab2e5f6296d40a2396dea5788a998d619820335abc73 | ||
DIST audacity-manual-2.4.2.zip 22459298 BLAKE2B 001ca56f73c3c48f9b49b3b6478c6de6fb4c305fb869b11d93e41d5aee7ee45133bd7047c4d281fed4859d6c6061352dfaeb995e7b2602e42e09ab04e05e00dc SHA512 8afc7faffb0da87efe0c2cb64f8593777357252b4893ae0522ec7b37b4f7806ad9582ca9e4b751d085c2598aba6b580dacd805daa00b236a4ff8f6663a80135c | ||
DIST audacity-manual-3.2.2.tar.gz 22372238 BLAKE2B 890705377bec542210b6d41ce4851a85094b3496054e63c2e5a9d59c025ed8c512c62273721fb7088152504a11cf73b7c314e020f4e81682bee7d468bf9ce15a SHA512 6bf84f50a722cb42f2f8bfeb523697e023121dea0dad63c253194e50c127368466395ec37b6fd58e7154b2b620186b46333c6615937202e376b7e234120ebb18 | ||
DIST progschj-ThreadPool.h 2612 BLAKE2B 54d050ad443512e60e5c99449dd7133f3884c1067288cfc36b96c06855537b83d9b599cd8b8fb7f24e20cbc4898585b11d98d3a33dc7571a886b57c806ad3b14 SHA512 f927489de9afe0217bb0552c45bea238693f9f183a062cb12a48e19576dc50a4d0ba449a12397012ae790cc5ebd741decc08128b66f795310dba4778122e9f3d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,232 @@ | ||
# Copyright 1999-2022 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=7 | ||
WX_GTK_VER="3.2-gtk3" | ||
|
||
inherit cmake wxwidgets xdg | ||
|
||
MY_P="Audacity-${PV}" | ||
DOC_PV="${PV}" | ||
# A header-only thread pool library, without a build system, about 100 | ||
# lines of code. Probably not worth packaging individually. Check | ||
# cmake-proxies/CMakeLists.txt and search for "ThreadPool". | ||
DESCRIPTION="Free crossplatform audio editor" | ||
HOMEPAGE="https://web.audacityteam.org/" | ||
MY_THREADPOOL="https://raw.githubusercontent.com/progschj/ThreadPool/9a42ec1329f259a5f4881a291db1dcb8f2ad9040/ThreadPool.h -> progschj-ThreadPool.h" | ||
SRC_URI="https://github.com/audacity/audacity/archive/${MY_P}.tar.gz | ||
doc? ( https://github.com/audacity/audacity-manual/releases/download/v${PV}/audacity-manual-${PV}.tar.gz ) | ||
telemetry? ( ${MY_THREADPOOL} ) | ||
audiocom? ( ${MY_THREADPOOL} )" | ||
S="${WORKDIR}/${PN}-${MY_P}" | ||
|
||
LICENSE="GPL-2+" | ||
SLOT="0" | ||
KEYWORDS="~amd64" | ||
IUSE="alsa audiocom doc ffmpeg +flac id3tag +ladspa +lv2 mad mpg123 ogg | ||
opus oss +portmixer portsmf sbsms telemetry twolame vamp | ||
+vorbis wavpack" | ||
|
||
# The testsuite consists of two tests, 50% of which fail. | ||
RESTRICT="test" | ||
|
||
# dev-db/sqlite:3 hard dependency. | ||
# dev-libs/glib:2, x11-libs/gtk+:3 hard dependency, from | ||
# cmake-proxies/cmake-modules/dependencies/wxwidgets.cmake | ||
# sys-apps/util-linux hard dependency, from cmake-proxies/CMakeLists.txt | ||
# for libuuid | ||
# portmidi became non-optional: building without it results in build | ||
# failures, even with some of the Debian patches. It's probably not | ||
# in our best interest to fix that as a patch series. | ||
# glib, gtk and gdk are all directly relied on in the source, not just | ||
# through wxGTK | ||
|
||
# These are needed for Sentry and audio.com. | ||
MY_NETDEPEND=" | ||
net-misc/curl | ||
dev-libs/rapidjson | ||
" | ||
|
||
RDEPEND="dev-db/sqlite:3 | ||
dev-libs/expat | ||
dev-libs/glib:2 | ||
media-libs/libsndfile | ||
media-libs/libsoundtouch:= | ||
media-libs/portaudio[alsa?] | ||
media-libs/portmidi | ||
media-libs/soxr | ||
>=media-sound/lame-3.100-r3 | ||
x11-libs/gdk-pixbuf:2 | ||
x11-libs/gtk+:3 | ||
x11-libs/wxGTK:${WX_GTK_VER}[X] | ||
sys-apps/util-linux | ||
sys-libs/zlib | ||
alsa? ( media-libs/alsa-lib ) | ||
ffmpeg? ( media-video/ffmpeg ) | ||
flac? ( media-libs/flac:=[cxx] ) | ||
id3tag? ( media-libs/libid3tag:= ) | ||
lv2? ( | ||
dev-libs/serd | ||
dev-libs/sord | ||
>=media-libs/lilv-0.24.6-r2 | ||
media-libs/lv2 | ||
media-libs/sratom | ||
media-libs/suil | ||
) | ||
mad? ( >=media-libs/libmad-0.15.1b ) | ||
mpg123? ( media-sound/mpg123 ) | ||
ogg? ( media-libs/libogg ) | ||
opus? ( media-libs/opus ) | ||
portsmf? ( media-libs/portsmf:= ) | ||
sbsms? ( media-libs/libsbsms ) | ||
telemetry? ( ${MY_NETDEPEND} ) | ||
audiocom? ( ${MY_NETDEPEND} ) | ||
twolame? ( media-sound/twolame ) | ||
vamp? ( media-libs/vamp-plugin-sdk ) | ||
vorbis? ( media-libs/libvorbis ) | ||
wavpack? ( media-sound/wavpack ) | ||
" | ||
DEPEND="${RDEPEND}" | ||
BDEPEND="app-arch/unzip | ||
sys-devel/gettext | ||
virtual/pkgconfig | ||
" | ||
|
||
REQUIRED_USE=" | ||
mad? ( !mpg123 ) | ||
" | ||
|
||
PATCHES=( | ||
# Equivalent to previous versions | ||
"${FILESDIR}/${PN}-3.2.2-disable-ccache.patch" | ||
# From Debian | ||
"${FILESDIR}/${PN}-3.2.2-fix-rpaths.patch" | ||
|
||
# Disables some header-based detection | ||
"${FILESDIR}/${PN}-3.2.2-allow-overriding-alsa-jack.patch" | ||
|
||
# Allows re-enabling telemetry | ||
"${FILESDIR}/${PN}-3.2.2-remove-conan-threadpool.patch" | ||
"${FILESDIR}/${PN}-3.2.2-allow-finding-rapidjson-pkgconfig.patch" | ||
) | ||
|
||
src_prepare() { | ||
cmake_src_prepare | ||
|
||
local header_subs="${S}/lib-src/header-substitutes" | ||
cat <<-EOF >"${header_subs}/allegro.h" || die | ||
/* Hack the allegro.h header substitute to use system headers. */ | ||
#include <portsmf/allegro.h> | ||
EOF | ||
|
||
# Keep condition in sync with has_networking in src_configure. | ||
if use telemetry || use audiocom; then | ||
mkdir -p "${S}/"/lib-src/threadpool/ThreadPool/ || die | ||
cp "${DISTDIR}"/progschj-ThreadPool.h "${S}"/lib-src/threadpool/ThreadPool/ThreadPool.h || die | ||
fi | ||
} | ||
|
||
# NOTES: | ||
# I traced a bunch of dlopens via LD_AUDIT, and concluded that | ||
# dev-libs/{serd,sord}, media-libs/{opus,sratom}, media-sound/lame, | ||
# media-video/ffmpeg (yes), sys-libs/zlib are all used via dlopen. | ||
# FFmpeg in particular could even lose it's slot dependency, because | ||
# Audacity picks which version of the ABI it interacts with at runtime, | ||
# but I'm not sure how good of an idea that is. Anyway - for this | ||
# release, the supported Lavc versions are 5[789], Lavu are 5[2567], and | ||
# Lavf are 5[789]. Check libraries/lib-ffmpeg-support/impl if you want | ||
# to check. It's also useful to grep for wxDynamicLibrary and dlsym. | ||
|
||
src_configure() { | ||
setup-wxwidgets | ||
|
||
# Audio.com uploading and telemetry both require networking | ||
# features. | ||
local has_networking=off | ||
if use audiocom; then | ||
has_networking=on | ||
fi | ||
|
||
if use telemetry; then | ||
has_networking=on | ||
# Extracted from the official AppImage build. | ||
local -x SENTRY_DSN_KEY="Temporarily omitted." | ||
local -x SENTRY_HOST="Temporarily omitted." | ||
local -x SENTRY_PROJECT="Temporarily omitted." | ||
# This omits crash reporting, since Audacity fails to compile | ||
# with our current breakpad, and upstream doesn't have our | ||
# users' debuginfo anyway. | ||
fi | ||
|
||
# * always use system libraries if possible | ||
# * options listed roughly in the order specified in | ||
# cmake-proxies/CMakeLists.txt | ||
# * USE_VST was omitted, it appears to no longer have dependencies | ||
# (this is different from VST3) | ||
local mycmakeargs=( | ||
-Daudacity_use_nyquist=local | ||
#-Daudacity_use_pch leaving it to the default behavior | ||
-Daudacity_use_portmixer=$(usex portmixer system off) | ||
-Daudacity_use_soxr=system | ||
|
||
-Daudacity_conan_enabled=OFF | ||
|
||
-Daudacity_has_networking="${has_networking}" | ||
# Not useful on Gentoo. | ||
-Daudacity_has_updates_check=OFF | ||
-Daudacity_has_audiocom_upload=$(usex audiocom on off) | ||
-Daudacity_has_sentry_reporting=$(usex telemetry on off) | ||
-Daudacity_has_threadpool=local | ||
|
||
# The VST3 SDK is unpackaged, and it appears to be under a breed | ||
# of a proprietary license and the GPL. | ||
-Daudacity_has_vst3=OFF | ||
-Daudacity_lib_preference=system | ||
-Daudacity_obey_system_dependencies=ON | ||
-Daudacity_use_expat=system | ||
-Daudacity_use_ffmpeg=$(usex ffmpeg loaded off) | ||
-Daudacity_use_libid3tag=$(usex id3tag system off) | ||
-Daudacity_use_ladspa=$(usex ladspa) | ||
-Daudacity_use_lame=system | ||
-Daudacity_use_wxwidgets=system | ||
-Daudacity_use_libmp3lame=system | ||
-Daudacity_use_libmpg123=$(usex mpg123 system off) | ||
-Daudacity_use_libmad=$(usex mad system off) | ||
-Daudacity_use_wavpack=$(usex wavpack system off) | ||
-Daudacity_use_libogg=$(usex ogg system off) | ||
-Daudacity_use_libflac=$(usex flac system off) | ||
-Daudacity_use_libopus=$(usex flac system off) | ||
-Daudacity_use_libvorbis=$(usex vorbis system off) | ||
-Daudacity_use_libsndfile=system | ||
-Daudacity_use_portaudio=system | ||
-Daudacity_use_midi=system | ||
-Daudacity_use_vamp=$(usex vamp system off) | ||
-Daudacity_use_lv2=$(usex lv2 system off) | ||
-Daudacity_use_portsmf=$(usex portsmf system off) | ||
-Daudacity_use_sbsms=$(usex sbsms system off) | ||
-Daudacity_use_soundtouch=system | ||
-Daudacity_use_twolame=$(usex twolame system off) | ||
|
||
# See the allow-overriding-alsa-jack.patch patch | ||
-DPA_HAS_ALSA=$(usex alsa on off) | ||
## Keep watch of PA_HAS_OSS in lib-src/portmixer/CMakeLists.txt; | ||
## AFAICT it introduces no deps as-is, but that could change. | ||
## Similar goes for PA_HAS_JACK. | ||
) | ||
|
||
cmake_src_configure | ||
} | ||
|
||
src_install() { | ||
cmake_src_install | ||
|
||
# Remove bad doc install | ||
rm -r "${ED}"/usr/share/doc || die | ||
|
||
if use doc ; then | ||
docinto html | ||
dodoc -r "${WORKDIR}"/help/manual/{m,man} | ||
dodoc "${WORKDIR}"/help/manual/{favicon.ico,index.html,quick_help.html} | ||
dosym ../../doc/${PF}/html /usr/share/${PN}/help/manual | ||
fi | ||
} |
24 changes: 24 additions & 0 deletions
24
media-sound/audacity/files/audacity-3.2.2-allow-finding-rapidjson-pkgconfig.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
From 0a786020046c9d608f1e2f463575d4ca8febf909 Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me> | ||
Date: Sun, 18 Dec 2022 13:41:06 +0100 | ||
Subject: [PATCH 3/3] Add pkg-config fallback for RapidJSON | ||
|
||
--- | ||
cmake-proxies/CMakeLists.txt | 1 + | ||
1 file changed, 1 insertion(+) | ||
|
||
diff --git a/cmake-proxies/CMakeLists.txt b/cmake-proxies/CMakeLists.txt | ||
index 7568bb32f..db40dcf63 100644 | ||
--- a/cmake-proxies/CMakeLists.txt | ||
+++ b/cmake-proxies/CMakeLists.txt | ||
@@ -289,6 +289,7 @@ if( ${_OPT}has_sentry_reporting OR ${_OPT}has_audiocom_upload ) | ||
RapidJSON | ||
rapidjson/1.1.0 | ||
REQUIRED | ||
+ PKG_CONFIG "RapidJSON" | ||
) | ||
endif() | ||
|
||
-- | ||
2.39.0 | ||
|
37 changes: 37 additions & 0 deletions
37
media-sound/audacity/files/audacity-3.2.2-allow-overriding-alsa-jack.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
From 5d6a6cbc9b2b9f8621fbc441d010e2e7f60c388d Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me> | ||
Date: Sat, 17 Dec 2022 21:13:56 +0100 | ||
Subject: [PATCH] portmixer: Allow overriding PA_HAS_{ALSA,JACK} | ||
|
||
Not included for OSS as OSS is always included AFAICT. | ||
--- | ||
After committing, I realized that PA_HAS_JACK is also completely unused. The | ||
block that enables it was left in, but commented, for future reference. | ||
|
||
lib-src/portmixer/CMakeLists.txt | 9 ++++++--- | ||
1 file changed, 6 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/lib-src/portmixer/CMakeLists.txt b/lib-src/portmixer/CMakeLists.txt | ||
index 65a384fa0..1ddc8ed50 100644 | ||
--- a/lib-src/portmixer/CMakeLists.txt | ||
+++ b/lib-src/portmixer/CMakeLists.txt | ||
@@ -8,9 +8,13 @@ if (UNIX AND NOT APPLE) | ||
include(CheckIncludeFile) | ||
set(CMAKE_REQUIRED_LIBRARIES PortAudio::PortAudio) | ||
|
||
- check_include_file( "pa_jack.h" PA_HAS_JACK ) | ||
- | ||
- check_include_file( "pa_linux_alsa.h" PA_HAS_ALSA ) | ||
+# if ( NOT DEFINED PA_HAS_JACK ) | ||
+# check_include_file( "pa_jack.h" PA_HAS_JACK ) | ||
+# endif() | ||
+ if ( NOT DEFINED PA_HAS_ALSA ) | ||
+ check_include_file( "pa_linux_alsa.h" PA_HAS_ALSA ) | ||
+ endif() | ||
+ set( PA_HAS_JACK FALSE ) | ||
if( PA_HAS_ALSA ) | ||
find_package( ALSA REQUIRED QUIET ) | ||
endif() | ||
-- | ||
2.39.0 | ||
|
33 changes: 33 additions & 0 deletions
33
media-sound/audacity/files/audacity-3.2.2-disable-ccache.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
From afd777fbcbaa9e9c14b80374c60ecd631eb537ea Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me> | ||
Date: Fri, 16 Dec 2022 23:37:36 +0100 | ||
Subject: [PATCH] Don't force enable ccache | ||
|
||
--- | ||
Analogous to the similar patches in prior versions. | ||
|
||
CMakeLists.txt | 8 -------- | ||
1 file changed, 8 deletions(-) | ||
|
||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 9c1c7baf2..42e765691 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -142,14 +142,6 @@ set( CMAKE_PREFIX_PATH | ||
set( CMAKE_CXX_STANDARD 17 ) | ||
set( CMAKE_CXX_STANDARD_REQUIRED ON ) | ||
|
||
-# Use ccache if available | ||
-find_program( CCACHE_PROGRAM ccache ) | ||
-mark_as_advanced( FORCE CCACHE_PROGRAM ) | ||
- | ||
-if( CCACHE_PROGRAM ) | ||
- set_property( GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}" ) | ||
-endif() | ||
- | ||
# Define option() prefix | ||
set( _OPT "audacity_" ) | ||
|
||
-- | ||
2.39.0 | ||
|
Oops, something went wrong.