1 |
commit: 0a1957fa5c6358025d3a2ade143598fba87dc95c |
2 |
Author: Alexander Tsoy <alexander <AT> tsoy <DOT> me> |
3 |
AuthorDate: Sun Oct 25 00:06:15 2020 +0000 |
4 |
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Dec 28 12:10:01 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a1957fa |
7 |
|
8 |
media-sound/ardour: Desktop-related improvements |
9 |
|
10 |
* Install additional freedesktop files. |
11 |
* Fix blurry application icon by installing (symlinking) icons for all |
12 |
provided sizes. |
13 |
* Install slightly modified upstream .desktop file instead of generating |
14 |
our own. |
15 |
* Use xdg.eclass to update desktop/icon/mimeinfo cache/databases. |
16 |
* Convert waf configure options into an array. |
17 |
|
18 |
Signed-off-by: Alexander Tsoy <alexander <AT> tsoy.me> |
19 |
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org> |
20 |
|
21 |
media-sound/ardour/ardour-6.5-r1.ebuild | 181 ++++++++++++++++++++++++++++++++ |
22 |
1 file changed, 181 insertions(+) |
23 |
|
24 |
diff --git a/media-sound/ardour/ardour-6.5-r1.ebuild b/media-sound/ardour/ardour-6.5-r1.ebuild |
25 |
new file mode 100644 |
26 |
index 00000000000..f1c48e775b0 |
27 |
--- /dev/null |
28 |
+++ b/media-sound/ardour/ardour-6.5-r1.ebuild |
29 |
@@ -0,0 +1,181 @@ |
30 |
+# Copyright 1999-2020 Gentoo Authors |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+ |
33 |
+EAPI=6 |
34 |
+PYTHON_COMPAT=( python3_{6,7,8,9} ) |
35 |
+PYTHON_REQ_USE='threads(+)' |
36 |
+PLOCALES="cs de el en_GB es eu fr it ja nn pl pt pt_PT ru sv zh" |
37 |
+inherit eutils toolchain-funcs flag-o-matic l10n python-any-r1 waf-utils xdg |
38 |
+ |
39 |
+DESCRIPTION="Digital Audio Workstation" |
40 |
+HOMEPAGE="https://ardour.org/" |
41 |
+ |
42 |
+if [[ ${PV} == *9999* ]]; then |
43 |
+ EGIT_REPO_URI="https://git.ardour.org/ardour/ardour.git" |
44 |
+ inherit git-r3 |
45 |
+else |
46 |
+ KEYWORDS="~amd64 ~x86" |
47 |
+ SRC_URI="https://dev.gentoo.org/~fordfrog/distfiles/Ardour-${PV}.0.tar.bz2" |
48 |
+ S="${WORKDIR}/Ardour-${PV}.0" |
49 |
+fi |
50 |
+ |
51 |
+LICENSE="GPL-2" |
52 |
+SLOT="6" |
53 |
+IUSE="altivec doc jack nls phonehome pulseaudio cpu_flags_x86_sse cpu_flags_x86_mmx cpu_flags_x86_3dnow" |
54 |
+ |
55 |
+RDEPEND=" |
56 |
+ >=dev-cpp/glibmm-2.32.0 |
57 |
+ >=dev-cpp/gtkmm-2.16:2.4 |
58 |
+ >=dev-cpp/libgnomecanvasmm-2.26:2.6 |
59 |
+ dev-libs/boost:= |
60 |
+ >=dev-libs/glib-2.10.1:2 |
61 |
+ dev-libs/libsigc++:2 |
62 |
+ >=dev-libs/libxml2-2.6:2 |
63 |
+ dev-libs/libxslt |
64 |
+ >=gnome-base/libgnomecanvas-2 |
65 |
+ media-libs/alsa-lib |
66 |
+ media-libs/aubio |
67 |
+ media-libs/flac |
68 |
+ media-libs/freetype:2 |
69 |
+ media-libs/libart_lgpl |
70 |
+ media-libs/liblo |
71 |
+ >=media-libs/liblrdf-0.4.0-r20 |
72 |
+ >=media-libs/libsamplerate-0.1 |
73 |
+ >=media-libs/libsndfile-1.0.18 |
74 |
+ >=media-libs/libsoundtouch-1.6.0 |
75 |
+ media-libs/raptor:2 |
76 |
+ >=media-libs/rubberband-1.6.0 |
77 |
+ >=media-libs/taglib-1.7 |
78 |
+ media-libs/vamp-plugin-sdk |
79 |
+ net-misc/curl |
80 |
+ sys-libs/readline:0= |
81 |
+ sci-libs/fftw:3.0[threads] |
82 |
+ virtual/libusb:1 |
83 |
+ x11-libs/cairo |
84 |
+ >=x11-libs/gtk+-2.8.1:2 |
85 |
+ x11-libs/pango |
86 |
+ jack? ( virtual/jack ) |
87 |
+ pulseaudio? ( media-sound/pulseaudio ) |
88 |
+ media-libs/lilv |
89 |
+ media-libs/sratom |
90 |
+ dev-libs/sord |
91 |
+ >=media-libs/suil-0.6.10 |
92 |
+ >=media-libs/lv2-1.4.0" |
93 |
+# !bundled-libs? ( media-sound/fluidsynth ) at leat libltc is missing to be able to unbundle... |
94 |
+ |
95 |
+DEPEND="${RDEPEND} |
96 |
+ ${PYTHON_DEPS} |
97 |
+ dev-util/itstool |
98 |
+ sys-devel/gettext |
99 |
+ virtual/pkgconfig |
100 |
+ doc? ( app-doc/doxygen[dot] ) |
101 |
+ jack? ( virtual/jack )" |
102 |
+ |
103 |
+pkg_pretend() { |
104 |
+ [[ $(tc-getLD) == *gold* ]] && (has_version sci-libs/fftw[openmp] || has_version sci-libs/fftw[threads]) && \ |
105 |
+ ewarn "Linking with gold linker might produce broken executable, see bug #733972" |
106 |
+} |
107 |
+ |
108 |
+pkg_setup() { |
109 |
+ if has_version \>=dev-libs/libsigc++-2.6 ; then |
110 |
+ append-cxxflags -std=c++11 |
111 |
+ fi |
112 |
+ python-any-r1_pkg_setup |
113 |
+} |
114 |
+ |
115 |
+src_prepare() { |
116 |
+ default |
117 |
+ xdg_src_prepare |
118 |
+ |
119 |
+ sed 's/'full-optimization\'\ :\ \\[.*'/'full-optimization\'\ :\ \'\','/' -i "${S}"/wscript || die |
120 |
+ MARCH=$(get-flag march) |
121 |
+ OPTFLAGS="" |
122 |
+ if use cpu_flags_x86_sse; then |
123 |
+ if [[ ${MARCH} == "i686" ]] || [[ ${MARCH} == "i486" ]]; then |
124 |
+ elog "You enabled sse but use an march that does not support sse!" |
125 |
+ elog "We add -msse to the flags now, but please consider switching your march in make.conf!" |
126 |
+ fi |
127 |
+ OPTFLAGS="sse" |
128 |
+ fi |
129 |
+ if use cpu_flags_x86_mmx; then |
130 |
+ if [[ ${MARCH} == "i486" ]]; then |
131 |
+ elog "You enabled mmx with i486 set as march! You have been warned!" |
132 |
+ fi |
133 |
+ OPTFLAGS="${OPTFLAGS} mmx" |
134 |
+ fi |
135 |
+ if use cpu_flags_x86_3dnow; then |
136 |
+ OPTFLAGS="${OPTFLAGS} 3dnow" |
137 |
+ fi |
138 |
+ sed 's/flag_line\ =\ o.*/flag_line\ =\ \": '"${OPTFLAGS}"' just some place holders\"/' \ |
139 |
+ -i "${S}"/wscript || die |
140 |
+ sed 's/cpu\ ==\ .*/cpu\ ==\ "LeaveMarchAsIs":/' -i "${S}"/wscript || die |
141 |
+ append-flags "-lboost_system" |
142 |
+ python_fix_shebang "${S}"/wscript |
143 |
+ python_fix_shebang "${S}"/waf |
144 |
+ my_lcmsg() { |
145 |
+ rm -f {gtk2_ardour,gtk2_ardour/appdata,libs/ardour,libs/gtkmm2ext}/po/${1}.po |
146 |
+ } |
147 |
+ l10n_for_each_disabled_locale_do my_lcmsg |
148 |
+} |
149 |
+ |
150 |
+src_configure() { |
151 |
+ local backends="alsa" |
152 |
+ use jack && backends+=",jack" |
153 |
+ use pulseaudio && backends+=",pulseaudio" |
154 |
+ |
155 |
+ tc-export CC CXX |
156 |
+ mkdir -p "${D}" |
157 |
+ local myconf=( |
158 |
+ --configdir=/etc |
159 |
+ --freedesktop |
160 |
+ --noconfirm |
161 |
+ --optimize |
162 |
+ --with-backends=${backends} |
163 |
+ $({ use altivec || use cpu_flags_x86_sse; } && echo "--fpu-optimization" || echo "--no-fpu-optimization") |
164 |
+ $(usex doc "--docs" '') |
165 |
+ $(usex nls "--nls" "--no-nls") |
166 |
+ $(usex phonehome "--phone-home" "--no-phone-home") |
167 |
+ # not possible right now --use-external-libs |
168 |
+ ) |
169 |
+ |
170 |
+ waf-utils_src_configure "${myconf[@]}" |
171 |
+} |
172 |
+ |
173 |
+src_compile() { |
174 |
+ waf-utils_src_compile |
175 |
+ use nls && waf-utils_src_compile i18n |
176 |
+} |
177 |
+ |
178 |
+src_install() { |
179 |
+ local s |
180 |
+ |
181 |
+ waf-utils_src_install |
182 |
+ |
183 |
+ mv ${PN}.1 ${PN}${SLOT}.1 || die |
184 |
+ doman ${PN}${SLOT}.1 |
185 |
+ |
186 |
+ for s in 16 22 32 48 256 512; do |
187 |
+ dosym ../../../../ardour${SLOT}/resources/Ardour-icon_${s}px.png \ |
188 |
+ /usr/share/icons/hicolor/${s}x${s}/apps/ardour${SLOT}.png |
189 |
+ done |
190 |
+ |
191 |
+ sed -i \ |
192 |
+ -e "s/\(^Name=\).*/\1Ardour ${SLOT}/" \ |
193 |
+ -e 's/;AudioEditing;/;X-AudioEditing;/' \ |
194 |
+ build/gtk2_ardour/ardour${SLOT}.desktop || die |
195 |
+ domenu build/gtk2_ardour/ardour${SLOT}.desktop |
196 |
+ |
197 |
+ insinto /usr/share/mime/packages |
198 |
+ newins build/gtk2_ardour/ardour.xml ardour${SLOT}.xml |
199 |
+ |
200 |
+ insinto /usr/share/metainfo |
201 |
+ doins build/gtk2_ardour/ardour${SLOT}.appdata.xml |
202 |
+} |
203 |
+ |
204 |
+pkg_postinst() { |
205 |
+ xdg_pkg_postinst |
206 |
+ |
207 |
+ elog "Please do _not_ report problems with the package to ${PN} upstream." |
208 |
+ elog "If you think you've found a bug, check the upstream binary package" |
209 |
+ elog "before you report anything to upstream." |
210 |
+} |