1 |
commit: c249fe51047dbe5bc689bda6a98e3d47bb1aa387 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jul 1 21:23:58 2018 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 1 21:23:58 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c249fe51 |
7 |
|
8 |
media-sound/xmms2: install perl modules into /usr, not /usr/local |
9 |
|
10 |
$ perl -MConfig -e 'print "$Config{archlib}\n"' |
11 |
/usr/lib64/perl5/5.24.3/x86_64-linux |
12 |
$ perl -MConfig -e 'print "$Config{sitearch}\n"' |
13 |
/usr/local/lib64/perl5/5.24.3/x86_64-linux |
14 |
|
15 |
Package-Manager: Portage-2.3.41, Repoman-2.3.9 |
16 |
|
17 |
.../files/xmms2-0.8_p20161122-perl-no-local.patch | 17 ++ |
18 |
media-sound/xmms2/xmms2-0.8_p20161122-r4.ebuild | 297 +++++++++++++++++++++ |
19 |
2 files changed, 314 insertions(+) |
20 |
|
21 |
diff --git a/media-sound/xmms2/files/xmms2-0.8_p20161122-perl-no-local.patch b/media-sound/xmms2/files/xmms2-0.8_p20161122-perl-no-local.patch |
22 |
new file mode 100644 |
23 |
index 00000000000..af18825ac00 |
24 |
--- /dev/null |
25 |
+++ b/media-sound/xmms2/files/xmms2-0.8_p20161122-perl-no-local.patch |
26 |
@@ -0,0 +1,17 @@ |
27 |
+Install perl modules into /usr, not /usr/local. |
28 |
+ |
29 |
+$ perl -MConfig -e 'print "$Config{archlib}\n"' |
30 |
+/usr/lib64/perl5/5.24.3/x86_64-linux |
31 |
+$ perl -MConfig -e 'print "$Config{sitearch}\n"' |
32 |
+/usr/local/lib64/perl5/5.24.3/x86_64-linux |
33 |
+--- a/waflib/Tools/perl.py |
34 |
++++ b/waflib/Tools/perl.py |
35 |
+@@ -75,7 +75,7 @@ def check_perl_ext_devel(self): |
36 |
+ env.EXTUTILS_TYPEMAP=cfg_lst('$Config{privlib}/ExtUtils/typemap') |
37 |
+ env.XSUBPP=find_xsubpp() |
38 |
+ if not getattr(Options.options,'perlarchdir',None): |
39 |
+- env.ARCHDIR_PERL=cfg_str('$Config{sitearch}') |
40 |
++ env.ARCHDIR_PERL=cfg_str('$Config{archlib}') |
41 |
+ else: |
42 |
+ env.ARCHDIR_PERL=getattr(Options.options,'perlarchdir') |
43 |
+ env.perlext_PATTERN='%s.'+cfg_str('$Config{dlext}') |
44 |
|
45 |
diff --git a/media-sound/xmms2/xmms2-0.8_p20161122-r4.ebuild b/media-sound/xmms2/xmms2-0.8_p20161122-r4.ebuild |
46 |
new file mode 100644 |
47 |
index 00000000000..44013523f07 |
48 |
--- /dev/null |
49 |
+++ b/media-sound/xmms2/xmms2-0.8_p20161122-r4.ebuild |
50 |
@@ -0,0 +1,297 @@ |
51 |
+# Copyright 1999-2018 Gentoo Foundation |
52 |
+# Distributed under the terms of the GNU General Public License v2 |
53 |
+ |
54 |
+EAPI=6 |
55 |
+ |
56 |
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) |
57 |
+USE_RUBY="ruby23 ruby24 ruby25" |
58 |
+ |
59 |
+inherit eutils multiprocessing python-single-r1 ruby-single toolchain-funcs |
60 |
+ |
61 |
+# generated as 'python2 ./utils/gen-tarball.py' from clean git tree |
62 |
+MY_P="${P%_p*}DrO_o-949-gca15e830" |
63 |
+ |
64 |
+DESCRIPTION="X(cross)platform Music Multiplexing System. Next generation of the XMMS player" |
65 |
+HOMEPAGE="https://xmms2.org/wiki/Main_Page" |
66 |
+#SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2" |
67 |
+SRC_URI="https://dev.gentoo.org/~slyfox/distfiles/${MY_P}.tar.bz2" |
68 |
+LICENSE="GPL-2 LGPL-2.1" |
69 |
+ |
70 |
+SLOT="0" |
71 |
+KEYWORDS="~alpha ~amd64 ~arm ~ppc ~x86" |
72 |
+ |
73 |
+IUSE="aac airplay +alsa ao asf cdda curl cxx ffmpeg flac fluidsynth ices |
74 |
+jack mac mlib-update mms +mad modplug mp3 mp4 musepack ofa opus oss |
75 |
+perl phonehome pulseaudio python ruby samba +server sid sndfile speex |
76 |
+test valgrind +vorbis vocoder wavpack xml zeroconf" |
77 |
+ |
78 |
+RDEPEND="server? ( |
79 |
+ >=dev-db/sqlite-3.3.4 |
80 |
+ |
81 |
+ aac? ( >=media-libs/faad2-2.0 ) |
82 |
+ airplay? ( dev-libs/openssl:0= ) |
83 |
+ alsa? ( media-libs/alsa-lib ) |
84 |
+ ao? ( media-libs/libao ) |
85 |
+ cdda? ( dev-libs/libcdio-paranoia |
86 |
+ >=media-libs/libdiscid-0.1.1 |
87 |
+ >=media-sound/cdparanoia-3.9.8 ) |
88 |
+ curl? ( >=net-misc/curl-7.15.1 ) |
89 |
+ ffmpeg? ( virtual/ffmpeg ) |
90 |
+ flac? ( media-libs/flac ) |
91 |
+ fluidsynth? ( media-sound/fluidsynth ) |
92 |
+ ices? ( media-libs/libogg |
93 |
+ media-libs/libshout |
94 |
+ media-libs/libvorbis ) |
95 |
+ jack? ( virtual/jack ) |
96 |
+ mac? ( media-sound/mac ) |
97 |
+ mms? ( virtual/ffmpeg |
98 |
+ >=media-libs/libmms-0.3 ) |
99 |
+ modplug? ( media-libs/libmodplug ) |
100 |
+ mad? ( media-libs/libmad ) |
101 |
+ mp3? ( >=media-sound/mpg123-1.5.1 ) |
102 |
+ musepack? ( media-sound/musepack-tools ) |
103 |
+ ofa? ( media-libs/libofa ) |
104 |
+ opus? ( media-libs/opus |
105 |
+ media-libs/opusfile ) |
106 |
+ pulseaudio? ( media-sound/pulseaudio ) |
107 |
+ samba? ( >=net-fs/samba-4.2 ) |
108 |
+ sid? ( media-sound/sidplay |
109 |
+ media-libs/resid ) |
110 |
+ sndfile? ( media-libs/libsndfile ) |
111 |
+ speex? ( media-libs/speex |
112 |
+ media-libs/libogg ) |
113 |
+ vorbis? ( media-libs/libvorbis ) |
114 |
+ vocoder? ( sci-libs/fftw:3.0= media-libs/libsamplerate ) |
115 |
+ wavpack? ( media-sound/wavpack ) |
116 |
+ xml? ( dev-libs/libxml2 ) |
117 |
+ zeroconf? ( net-dns/avahi[mdnsresponder-compat] ) |
118 |
+ ) |
119 |
+ |
120 |
+ >=dev-libs/glib-2.12.9 |
121 |
+ cxx? ( >=dev-libs/boost-1.32 ) |
122 |
+ perl? ( >=dev-lang/perl-5.8.8 ) |
123 |
+ python? ( ${PYTHON_DEPS} ) |
124 |
+ ruby? ( ${RUBY_DEPS} ) |
125 |
+" |
126 |
+ |
127 |
+DEPEND="${RDEPEND} |
128 |
+ dev-lang/python |
129 |
+ virtual/pkgconfig |
130 |
+ perl? ( dev-perl/Module-Build |
131 |
+ virtual/perl-Module-Metadata ) |
132 |
+ python? ( >=dev-python/cython-0.15.1 |
133 |
+ dev-python/pyrex ) |
134 |
+ test? ( dev-util/cunit |
135 |
+ valgrind? ( dev-util/valgrind ) ) |
136 |
+" |
137 |
+ |
138 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
139 |
+ |
140 |
+S="${WORKDIR}/${MY_P}" |
141 |
+ |
142 |
+pkg_setup() { |
143 |
+ # used both for building xmms2 and |
144 |
+ # optionally linking client library |
145 |
+ # against python |
146 |
+ python-single-r1_pkg_setup |
147 |
+} |
148 |
+ |
149 |
+# use_enable() is taken as proto |
150 |
+# $1 - useflag |
151 |
+# $2 - xmms2 option/plugin name (equals to $1 if not set) |
152 |
+ |
153 |
+xmms2_flag() { |
154 |
+ [[ -z $1 ]] && eerror "!!! empty arg. usage: xmms2_flag <USEFLAG> [<xmms2_flagname>]." |
155 |
+ |
156 |
+ local UWORD=${2:-$1} |
157 |
+ |
158 |
+ case $1 in |
159 |
+ ENABLED) |
160 |
+ echo ",${UWORD}" |
161 |
+ ;; |
162 |
+ DISABLED) |
163 |
+ ;; |
164 |
+ *) |
165 |
+ use $1 && echo ",${UWORD}" |
166 |
+ ;; |
167 |
+ esac |
168 |
+} |
169 |
+ |
170 |
+src_prepare() { |
171 |
+ ./waf # inflate waf |
172 |
+ cd .waf* || die |
173 |
+ # needs port |
174 |
+ #epatch "${FILESDIR}/${PN}"-0.8DrO_o-waflib-fix-perl.patch #578778 |
175 |
+ eapply "${FILESDIR}/${PN}"-0.8_p20161122-perl-no-local.patch |
176 |
+ cd "${S}" |
177 |
+ |
178 |
+ eapply "${FILESDIR}/${PN}"-0.8-ffmpeg2.patch #536232 |
179 |
+ |
180 |
+ eapply "${FILESDIR}/${PN}"-0.8-rtvg.patch #424377 |
181 |
+ |
182 |
+ # required to build tarball from git tree |
183 |
+ eapply "${FILESDIR}/${P}"-tarball.patch |
184 |
+ |
185 |
+ # fix hash to be the same on LE/BE platforms |
186 |
+ eapply "${FILESDIR}/${P}"-be-hash.patch |
187 |
+ |
188 |
+ # handle mac-3 -> -4 API change |
189 |
+ eapply "${FILESDIR}/${P}"-mac-4.patch |
190 |
+ |
191 |
+ eapply_user |
192 |
+} |
193 |
+ |
194 |
+src_configure() { |
195 |
+ # ./configure alike options. |
196 |
+ local waf_params="--prefix=/usr \ |
197 |
+ --libdir=/usr/$(get_libdir) \ |
198 |
+ --with-target-platform=${CHOST} \ |
199 |
+ --mandir=/usr/share/man \ |
200 |
+ --infodir=/usr/share/info \ |
201 |
+ --datadir=/usr/share \ |
202 |
+ --sysconfdir=/etc \ |
203 |
+ --localstatedir=/var/lib" |
204 |
+ |
205 |
+ local optionals="" |
206 |
+ local plugins="" |
207 |
+ if ! use server ; then |
208 |
+ waf_params+=" --without-xmms2d" |
209 |
+ else |
210 |
+ # some fun static mappings: |
211 |
+ local option_map=( # USE # sorted xmms2 option flag (same, as USE if empty) |
212 |
+ "phonehome et" |
213 |
+ "ENABLED launcher" |
214 |
+ "mlib-update medialib-updater" |
215 |
+ "ENABLED nycli" |
216 |
+ " perl" |
217 |
+ "ENABLED pixmaps" |
218 |
+ " python" |
219 |
+ " ruby" |
220 |
+ "DISABLED tests" |
221 |
+ "DISABLED vistest" |
222 |
+ "cxx xmmsclient++" |
223 |
+ "cxx xmmsclient++-glib" |
224 |
+ "DISABLED xmmsclient-cf" |
225 |
+ "DISABLED xmmsclient-ecore" # not in tree |
226 |
+ |
227 |
+ "test tests" |
228 |
+ ) |
229 |
+ |
230 |
+ local plugin_map=( # USE # sorted xmms2 plugin flag (same, as USE if empty) |
231 |
+ " alsa" |
232 |
+ " airplay" |
233 |
+ " ao" |
234 |
+ "ffmpeg apefile" |
235 |
+ "ffmpeg avcodec" |
236 |
+ " asf" |
237 |
+ "ENABLED asx" |
238 |
+ " cdda" |
239 |
+ "DISABLED coreaudio" # MacOS only? |
240 |
+ " curl" |
241 |
+ "ENABLED cue" |
242 |
+ "zeroconf daap" |
243 |
+ "ENABLED diskwrite" |
244 |
+ "ENABLED equalizer" |
245 |
+ "aac faad" |
246 |
+ "ENABLED file" |
247 |
+ " flac" |
248 |
+ " fluidsynth" |
249 |
+ "ffmpeg flv" |
250 |
+ "ffmpeg tta" |
251 |
+ "DISABLED gme" # not in tree |
252 |
+ "DISABLED gvfs" # obsolete #647604 |
253 |
+ "ENABLED html" |
254 |
+ " ices" |
255 |
+ "ENABLED icymetaint" |
256 |
+ "ENABLED id3v2" |
257 |
+ " jack" |
258 |
+ "ENABLED karaoke" |
259 |
+ "ENABLED m3u" |
260 |
+ " mac" |
261 |
+ " mms" |
262 |
+ " mad" |
263 |
+ "ENABLED midsquash" |
264 |
+ " mp4" # bug #387961 (aac, mp3, ape can sit there) |
265 |
+ "mp3 mpg123" |
266 |
+ " modplug" |
267 |
+ " musepack" |
268 |
+ "DISABLED nms" # not in tree |
269 |
+ "ENABLED normalize" |
270 |
+ "ENABLED null" |
271 |
+ "ENABLED nulstripper" |
272 |
+ " ofa" |
273 |
+ " opus" |
274 |
+ " oss" |
275 |
+ "ENABLED pls" |
276 |
+ "pulseaudio pulse" |
277 |
+ "ENABLED replaygain" |
278 |
+ "xml rss" |
279 |
+ " samba" |
280 |
+ "DISABLED sc68" #not in tree |
281 |
+ " sid" |
282 |
+ " sndfile" |
283 |
+ " speex" |
284 |
+ "DISABLED sun" # {Open,Net}BSD only |
285 |
+ "DISABLED tremor" # not in tree |
286 |
+ " vorbis" |
287 |
+ " vocoder" |
288 |
+ "ffmpeg tta" |
289 |
+ "ENABLED wave" |
290 |
+ "DISABLED waveout" # windows only |
291 |
+ " wavpack" |
292 |
+ "xml xspf" |
293 |
+ "ENABLED xml" |
294 |
+ ) |
295 |
+ |
296 |
+ local option |
297 |
+ for option in "${option_map[@]}"; do |
298 |
+ optionals+=$(xmms2_flag $option) |
299 |
+ done |
300 |
+ |
301 |
+ local plugin |
302 |
+ for plugin in "${plugin_map[@]}"; do |
303 |
+ plugins+=$(xmms2_flag $plugin) |
304 |
+ done |
305 |
+ fi # ! server |
306 |
+ |
307 |
+ # pass them explicitely even if empty as we try to avoid magic deps |
308 |
+ waf_params+=" --with-optionals=${optionals:1}" # skip first ',' if yet |
309 |
+ waf_params+=" --with-plugins=${plugins:1}" |
310 |
+ waf_params+=" $(use_with valgrind)" |
311 |
+ |
312 |
+ CC="$(tc-getCC)" \ |
313 |
+ CPP="$(tc-getCPP)" \ |
314 |
+ AR="$(tc-getAR)" \ |
315 |
+ RANLIB="$(tc-getRANLIB)" \ |
316 |
+ CXX="$(tc-getCXX)" \ |
317 |
+ ./waf configure ${waf_params} || die "'waf configure' failed" |
318 |
+} |
319 |
+ |
320 |
+src_compile() { |
321 |
+ # waf is very keen to run tests in build phase (bug #424377) but |
322 |
+ # it does not bother running tests twice, so the hack below works: |
323 |
+ ./waf --verbose build || ./waf --verbose build || die "waf build failed" |
324 |
+} |
325 |
+ |
326 |
+src_test() { |
327 |
+ # rerun tests |
328 |
+ ./waf --alltests || die "waf --alltests failed" |
329 |
+} |
330 |
+ |
331 |
+src_install() { |
332 |
+ ./waf --without-ldconfig --destdir="${D}" install || die "'waf install' failed" |
333 |
+ dodoc AUTHORS TODO |
334 |
+} |
335 |
+ |
336 |
+pkg_postinst() { |
337 |
+ elog "This version is built on experimental development code" |
338 |
+ elog "If you encounter any errors report them at https://bugs.xmms2.org" |
339 |
+ elog "and visit #xmms2 at irc://irc.freenode.net" |
340 |
+ if use phonehome ; then |
341 |
+ einfo "" |
342 |
+ einfo "The phone-home client xmms2-et was activated" |
343 |
+ einfo "This client sends anonymous usage-statistics to the xmms2" |
344 |
+ einfo "developers which may help finding bugs" |
345 |
+ einfo "Disable the phonehome useflag if you don't like that" |
346 |
+ fi |
347 |
+} |