Line 0
Link Here
|
|
|
1 |
# Copyright 1999-2020 Gentoo Authors |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
|
4 |
EAPI=7 |
5 |
WX_GTK_VER="3.0-gtk3" |
6 |
|
7 |
inherit cmake flag-o-matic wxwidgets xdg |
8 |
|
9 |
MY_P="Audacity-${PV}" |
10 |
DOC_PV="${PV}" |
11 |
DESCRIPTION="Free crossplatform audio editor" |
12 |
HOMEPAGE="https://web.audacityteam.org/" |
13 |
# wget doesn't seem to work on FossHub links, so we mirror |
14 |
SRC_URI="https://github.com/audacity/audacity/archive/refs/tags/Audacity-${PV}.tar.gz |
15 |
doc? ( https://dev.gentoo.org/~fordfrog/distfiles/${PN}-manual-${DOC_PV}.zip )" |
16 |
S="${WORKDIR}/${PN}-${MY_P}" |
17 |
|
18 |
LICENSE="GPL-2" |
19 |
SLOT="0" |
20 |
KEYWORDS="~amd64 ~arm64 ~mips ~ppc ~ppc64 ~x86" |
21 |
IUSE="alsa doc ffmpeg +flac id3tag jack +ladspa +lv2 mad ogg oss |
22 |
portmidi +portmixer portsmf sbsms twolame vamp +vorbis +vst" |
23 |
|
24 |
RESTRICT="test" |
25 |
|
26 |
RDEPEND="dev-libs/expat |
27 |
media-libs/libsndfile |
28 |
media-libs/libsoundtouch |
29 |
media-libs/portaudio[alsa?] |
30 |
media-libs/soxr |
31 |
>=media-sound/lame-3.100-r3 |
32 |
x11-libs/wxGTK:${WX_GTK_VER}[X] |
33 |
alsa? ( media-libs/alsa-lib ) |
34 |
ffmpeg? ( media-video/ffmpeg:= ) |
35 |
flac? ( media-libs/flac[cxx] ) |
36 |
id3tag? ( media-libs/libid3tag ) |
37 |
jack? ( virtual/jack ) |
38 |
lv2? ( |
39 |
dev-libs/serd |
40 |
dev-libs/sord |
41 |
>=media-libs/lilv-0.24.6-r2 |
42 |
media-libs/lv2 |
43 |
media-libs/sratom |
44 |
media-libs/suil |
45 |
) |
46 |
mad? ( >=media-libs/libmad-0.15.1b ) |
47 |
ogg? ( media-libs/libogg ) |
48 |
portmidi? ( media-libs/portmidi ) |
49 |
sbsms? ( media-libs/libsbsms ) |
50 |
twolame? ( media-sound/twolame ) |
51 |
vamp? ( media-libs/vamp-plugin-sdk ) |
52 |
vorbis? ( media-libs/libvorbis ) |
53 |
" |
54 |
DEPEND="${RDEPEND}" |
55 |
BDEPEND="app-arch/unzip |
56 |
sys-devel/gettext |
57 |
virtual/pkgconfig |
58 |
" |
59 |
|
60 |
REQUIRED_USE="portmidi? ( portsmf )" |
61 |
|
62 |
PATCHES=( |
63 |
"${FILESDIR}"/${PN}-2.3.3-Fix-building-against-system-portaudio.patch |
64 |
"${FILESDIR}/${PN}-2.4.2-fix-vertical-track-resizing.patch" |
65 |
"${FILESDIR}/${PN}-2.4.2-fix-gettimeofday.patch" |
66 |
"${FILESDIR}/${P}-fix-metainfo.patch" |
67 |
"${FILESDIR}/${PN}-2.4.2-add-missing-include-portaudio.patch" |
68 |
"${FILESDIR}/${PN}-2.4.2-disable-ccache.patch" |
69 |
) |
70 |
|
71 |
src_prepare() { |
72 |
cmake_src_prepare |
73 |
} |
74 |
|
75 |
src_configure() { |
76 |
setup-wxwidgets |
77 |
append-cxxflags -std=gnu++14 |
78 |
|
79 |
# * always use system libraries if possible |
80 |
# * options listed in the order that cmake-gui lists them |
81 |
local mycmakeargs=( |
82 |
# --disable-dynamic-loading |
83 |
-Daudacity_lib_preference=system |
84 |
-Daudacity_use_expat=system |
85 |
-Daudacity_use_ffmpeg=$(usex ffmpeg loaded off) |
86 |
-Daudacity_use_flac=$(usex flac system off) |
87 |
-Daudacity_use_id3tag=$(usex id3tag system off) |
88 |
-Daudacity_use_ladspa=$(usex ladspa) |
89 |
-Daudacity_use_lame=system |
90 |
-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 |
104 |
-Daudacity_use_soundtouch=system |
105 |
-Daudacity_use_soxr=system |
106 |
-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 |
111 |
) |
112 |
|
113 |
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 |
} |
119 |
|
120 |
src_install() { |
121 |
cmake_src_install |
122 |
|
123 |
# Remove bad doc install |
124 |
rm -r "${ED}"/usr/share/doc || die |
125 |
|
126 |
if use doc ; then |
127 |
docinto html |
128 |
dodoc -r "${WORKDIR}"/help/manual/{m,man,manual} |
129 |
dodoc "${WORKDIR}"/help/manual/{favicon.ico,index.html,quick_help.html} |
130 |
dosym ../../doc/${PF}/html /usr/share/${PN}/help/manual |
131 |
fi |
132 |
} |