Сравнение audacity-2.4.2-r3 с audacity-3.2.5-r1

/usr/portage/media-sound/audacity/audacity-3.2.5-r1.ebuild 2023-10-09 14:52:31.764368407 +0300
1 1
# Copyright 1999-2023 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=7
5
WX_GTK_VER="3.0-gtk3"
4
EAPI=8
6 5

  
7
inherit cmake flag-o-matic wxwidgets xdg
6
WX_GTK_VER="3.2-gtk3"
7

  
8
inherit cmake wxwidgets xdg
8 9

  
9 10
MY_P="Audacity-${PV}"
10 11
DOC_PV="${PV}"
11 12
DESCRIPTION="Free crossplatform audio editor"
12 13
HOMEPAGE="https://www.audacityteam.org/"
13
# wget doesn't seem to work on FossHub links, so we mirror
14

  
15
# A header-only thread pool library, without a build system, about 100
16
# lines of code.  Probably not worth packaging individually.  Check
17
# cmake-proxies/CMakeLists.txt and search for "ThreadPool".
18
MY_THREADPOOL_DATE=20140926
19
MY_THREADPOOL="https://raw.githubusercontent.com/progschj/ThreadPool/9a42ec1329f259a5f4881a291db1dcb8f2ad9040/ThreadPool.h -> progschj-ThreadPool-${MY_THREADPOOL_DATE}.h"
14 20
SRC_URI="https://github.com/audacity/audacity/archive/${MY_P}.tar.gz
15
	doc? ( https://dev.gentoo.org/~fordfrog/distfiles/${PN}-manual-${DOC_PV}.zip )"
21
	doc? ( https://github.com/audacity/audacity-manual/releases/download/v${PV}/audacity-manual-${PV}.tar.gz )
22
	audiocom? ( ${MY_THREADPOOL} )"
16 23
S="${WORKDIR}/${PN}-${MY_P}"
17 24

  
18
LICENSE="GPL-2"
25
# GPL-2+, GPL-3 - Audacity itself
26
# ZLIB - The ThreadPool single-header library
27
# CC-BY-3.0 - Documentation
28
LICENSE="GPL-2+
29
	GPL-3
30
	doc? ( CC-BY-3.0 )
31
	audiocom? ( ZLIB )
32
"
19 33
SLOT="0"
20
KEYWORDS="amd64 ~arm64 ~mips ppc ppc64 ~riscv x86"
21
IUSE="alsa doc ffmpeg +flac id3tag jack +ladspa +lv2 mad ogg oss
22
	portmidi +portmixer portsmf sbsms twolame vamp +vorbis +vst"
34
KEYWORDS="amd64 ~riscv"
35
IUSE="alsa audiocom doc ffmpeg +flac id3tag +ladspa +lv2 mad mpg123 ogg
36
	opus +portmixer sbsms twolame vamp +vorbis wavpack"
23 37

  
38
# The testsuite consists of two tests, 50% of which fail.
24 39
RESTRICT="test"
25 40

  
26
RDEPEND="dev-libs/expat
41
# dev-db/sqlite:3 hard dependency.
42
# dev-libs/glib:2, x11-libs/gtk+:3 hard dependency, from
43
#   cmake-proxies/cmake-modules/dependencies/wxwidgets.cmake
44
# sys-apps/util-linux hard dependency, from cmake-proxies/CMakeLists.txt
45
#   for libuuid
46
# portmidi became non-optional: building without it results in build
47
#   failures, even with some of the Debian patches.  It's probably not
48
#   in our best interest to fix that as a patch series.
49
# glib, gtk and gdk are all directly relied on in the source, not just
50

  
51
# Libraries used at runtime via dlopen:
52
# - dev-libs/{serd,sord} - for LV2 support
53
# - media-libs/{opus,sratom} :: For Opus and LV2 respectively
54
# - media-sound/lame :: For MP3 export
55
# - media-video/ffmpeg :: For generic FFMPEG export
56
#   This one has the interesting property of many versions being
57
#   supported at runtime.  See: libraries/lib-ffmpeg-support/impl
58
#   Current support grid:
59
#   - Lavf - 5[789]
60
#   - Lavc - 5[789]
61
#   - Lavu - 5[2567]
62

  
63
RDEPEND="dev-db/sqlite:3
64
	dev-libs/expat
65
	dev-libs/glib:2
27 66
	media-libs/libsndfile
28 67
	media-libs/libsoundtouch:=
29 68
	media-libs/portaudio[alsa?]
69
	media-libs/portmidi
70
	media-libs/portsmf:=
30 71
	media-libs/soxr
31
	>=media-sound/lame-3.100-r3
72
	media-sound/lame
73
	x11-libs/gdk-pixbuf:2
74
	x11-libs/gtk+:3
32 75
	x11-libs/wxGTK:${WX_GTK_VER}[X]
76
	sys-apps/util-linux
33 77
	alsa? ( media-libs/alsa-lib )
34
	ffmpeg? ( media-video/ffmpeg:= )
78
	audiocom? (
79
		dev-libs/rapidjson
80
		net-misc/curl
81
	)
82
	ffmpeg? ( media-video/ffmpeg )
35 83
	flac? ( media-libs/flac:=[cxx] )
36 84
	id3tag? ( media-libs/libid3tag:= )
37
	jack? ( virtual/jack )
38 85
	lv2? (
39 86
		dev-libs/serd
40 87
		dev-libs/sord
41
		>=media-libs/lilv-0.24.6-r2
88
		media-libs/lilv
42 89
		media-libs/lv2
43 90
		media-libs/sratom
44 91
		media-libs/suil
45 92
	)
46
	mad? ( >=media-libs/libmad-0.15.1b )
93
	mad? ( media-libs/libmad )
94
	mpg123? ( media-sound/mpg123 )
47 95
	ogg? ( media-libs/libogg )
48
	portmidi? ( media-libs/portmidi )
96
	opus? ( media-libs/opus )
49 97
	sbsms? ( media-libs/libsbsms )
50 98
	twolame? ( media-sound/twolame )
51 99
	vamp? ( media-libs/vamp-plugin-sdk )
52 100
	vorbis? ( media-libs/libvorbis )
101
	wavpack? ( media-sound/wavpack )
53 102
"
54 103
DEPEND="${RDEPEND}"
55 104
BDEPEND="app-arch/unzip
......
57 106
	virtual/pkgconfig
58 107
"
59 108

  
60
REQUIRED_USE="portmidi? ( portsmf )"
109
REQUIRED_USE="
110
	mad? ( !mpg123 )
111
"
61 112

  
62 113
PATCHES=(
63
	"${FILESDIR}"/${PN}-2.3.3-Fix-building-against-system-portaudio.patch
64
	"${FILESDIR}/${P}-fix-vertical-track-resizing.patch"
65
	"${FILESDIR}/${P}-fix-gettimeofday.patch"
66
	"${FILESDIR}/${P}-fix-metainfo.patch"
67
	"${FILESDIR}/${P}-add-missing-include-portaudio.patch"
68
	"${FILESDIR}/${P}-disable-ccache.patch"
114
	# Equivalent to previous versions
115
	"${FILESDIR}/${PN}-3.2.3-disable-ccache.patch"
116
	# From Debian
117
	"${FILESDIR}/${PN}-3.2.3-fix-rpaths.patch"
118

  
119
	# Disables some header-based detection
120
	"${FILESDIR}/${PN}-3.2.3-allow-overriding-alsa-jack.patch"
121

  
122
	# For has_networking
123
	"${FILESDIR}/${PN}-3.2.3-remove-conan-threadpool.patch"
124
	"${FILESDIR}/${PN}-3.2.3-allow-finding-rapidjson-pkgconfig.patch"
125

  
126
	# GCC 13
127
	"${FILESDIR}/${PN}-3.2.5-gcc13-deux.patch"
128

  
129
	# gettext 0.22
130
	"${FILESDIR}/${PN}-3.2.5-gettext-0.22.patch"
69 131
)
70 132

  
71 133
src_prepare() {
72 134
	cmake_src_prepare
135

  
136
	local header_subs="${S}/lib-src/header-substitutes"
137
	cat <<-EOF >"${header_subs}/allegro.h" || die
138
	/* Hack the allegro.h header substitute to use system headers.  */
139
	#include <portsmf/allegro.h>
140
	EOF
141

  
142
	# Keep in sync with has_networking and the ThreadPool.h SRC_URI.
143
	if use audiocom; then
144
		mkdir -p "${S}/"/lib-src/threadpool/ThreadPool/ || die
145
		cp "${DISTDIR}"/progschj-ThreadPool-"${MY_THREADPOOL_DATE}".h \
146
		   "${S}"/lib-src/threadpool/ThreadPool/ThreadPool.h || die
147
	fi
73 148
}
74 149

  
75 150
src_configure() {
76 151
	setup-wxwidgets
77
	append-cxxflags -std=gnu++14
78 152

  
79 153
	# * always use system libraries if possible
80
	# * options listed in the order that cmake-gui lists them
154
	# * options listed roughly in the order specified in
155
	#   cmake-proxies/CMakeLists.txt
156
	# * USE_VST was omitted, it appears to no longer have dependencies
157
	#   (this is different from VST3)
81 158
	local mycmakeargs=(
82
#		--disable-dynamic-loading
159
		# Tell the CMake-based build system it's building a release.
160
		-DAUDACITY_BUILD_LEVEL=2
161
		-Daudacity_use_nyquist=local
162
		#-Daudacity_use_pch leaving it to the default behavior
163
		-Daudacity_use_portmixer=$(usex portmixer system off)
164
		-Daudacity_use_soxr=system
165

  
166
		-Daudacity_conan_enabled=OFF
167

  
168
		-Daudacity_has_networking=$(usex audiocom on off)
169
		# Not useful on Gentoo.
170
		-Daudacity_has_updates_check=OFF
171
		-Daudacity_has_audiocom_upload=$(usex audiocom on off)
172
		-Daudacity_has_threadpool=local
173

  
174
		# The VST3 SDK is unpackaged, and it appears to be under a breed
175
		# of a proprietary license and the GPL.
176
		-Daudacity_has_vst3=OFF
83 177
		-Daudacity_lib_preference=system
178
		-Daudacity_obey_system_dependencies=ON
84 179
		-Daudacity_use_expat=system
85 180
		-Daudacity_use_ffmpeg=$(usex ffmpeg loaded off)
86
		-Daudacity_use_flac=$(usex flac system off)
87
		-Daudacity_use_id3tag=$(usex id3tag system off)
181
		-Daudacity_use_libid3tag=$(usex id3tag system off)
88 182
		-Daudacity_use_ladspa=$(usex ladspa)
89 183
		-Daudacity_use_lame=system
184
		-Daudacity_use_wxwidgets=system
185
		-Daudacity_use_libmp3lame=system
186
		-Daudacity_use_libmpg123=$(usex mpg123 system off)
187
		-Daudacity_use_libmad=$(usex mad system off)
188
		-Daudacity_use_wavpack=$(usex wavpack system off)
189
		-Daudacity_use_libogg=$(usex ogg system off)
190
		-Daudacity_use_libflac=$(usex flac system off)
191
		-Daudacity_use_libopus=$(usex flac system off)
192
		-Daudacity_use_libvorbis=$(usex vorbis system off)
193
		-Daudacity_use_libsndfile=system
194
		-Daudacity_use_portaudio=system
195
		-Daudacity_use_midi=system
196
		-Daudacity_use_vamp=$(usex vamp system off)
90 197
		-Daudacity_use_lv2=$(usex lv2 system off)
91
		-Daudacity_use_mad=$(usex mad system off)
92
		-Daudacity_use_midi=$(usex portmidi system off)
93
		-Daudacity_use_nyquist=local
94
		-Daudacity_use_ogg=$(usex ogg system off)
95
		-Daudacity_use_pa_alsa=$(usex alsa)
96
		-Daudacity_use_pa_jack=$(usex jack linked off)
97
		-Daudacity_use_pa_oss=$(usex oss)
98
		#-Daudacity_use_pch leaving it to the default behavior
99
		-Daudacity_use_portaudio=local # only 'local' option is present
100
		-Daudacity_use_portmixer=$(usex portmixer local off)
101
		-Daudacity_use_portsmf=$(usex portsmf local off)
102
		-Daudacity_use_sbsms=$(usex sbsms local off) # no 'system' option in configuration?
103
		-Daudacity_use_sndfile=system
198
		-Daudacity_use_portsmf=system
199
		-Daudacity_use_sbsms=$(usex sbsms system off)
104 200
		-Daudacity_use_soundtouch=system
105
		-Daudacity_use_soxr=system
106 201
		-Daudacity_use_twolame=$(usex twolame system off)
107
		-Daudacity_use_vamp=$(usex vamp system off)
108
		-Daudacity_use_vorbis=$(usex vorbis system off)
109
		-Daudacity_use_vst=$(usex vst)
110
		-Daudacity_use_wxwidgets=system
202

  
203
		# Disable telemetry features.
204
		-Daudacity_has_sentry_reporting=off
205
		-Daudacity_has_crashreports=off
206

  
207
		# See the allow-overriding-alsa-jack.patch patch
208
		-DPA_HAS_ALSA=$(usex alsa on off)
209
		## Keep watch of PA_HAS_OSS in lib-src/portmixer/CMakeLists.txt;
210
		## AFAICT it introduces no deps as-is, but that could change.
211
		## Similar goes for PA_HAS_JACK.
111 212
	)
112 213

  
113 214
	cmake_src_configure
114

  
115
	# if git is not installed, this (empty) file is not being created and the compilation fails
116
	# so we create it manually
117
	touch "${BUILD_DIR}/src/private/RevisionIdent.h" || die "failed to create file"
118 215
}
119 216

  
120 217
src_install() {
......
125 222

  
126 223
	if use doc ; then
127 224
		docinto html
128
		dodoc -r "${WORKDIR}"/help/manual/{m,man,manual}
225
		dodoc -r "${WORKDIR}"/help/manual/{m,man}
129 226
		dodoc "${WORKDIR}"/help/manual/{favicon.ico,index.html,quick_help.html}
130 227
		dosym ../../doc/${PF}/html /usr/share/${PN}/help/manual
131 228
	fi
Спасибо!