Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 749357 | Differences between
and this patch

Collapse All | Expand All

(-)a/media-sound/pulseaudio/pulseaudio-14.0.ebuild (-79 / +61 lines)
Lines 2-8 Link Here
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
3
4
EAPI=7
4
EAPI=7
5
inherit autotools bash-completion-r1 flag-o-matic gnome2-utils linux-info systemd toolchain-funcs udev multilib-minimal
5
inherit meson bash-completion-r1 flag-o-matic gnome2-utils linux-info systemd toolchain-funcs udev multilib-minimal
6
6
7
DESCRIPTION="A networked sound server with an advanced plugin system"
7
DESCRIPTION="A networked sound server with an advanced plugin system"
8
HOMEPAGE="https://www.freedesktop.org/wiki/Software/PulseAudio/"
8
HOMEPAGE="https://www.freedesktop.org/wiki/Software/PulseAudio/"
Lines 19-25 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-l Link Here
19
19
20
# +alsa-plugin as discussed in bug #519530
20
# +alsa-plugin as discussed in bug #519530
21
IUSE="+alsa +alsa-plugin +asyncns bluetooth +caps dbus doc equalizer elogind gconf
21
IUSE="+alsa +alsa-plugin +asyncns bluetooth +caps dbus doc equalizer elogind gconf
22
+gdbm +glib gtk ipv6 jack libsamplerate libressl lirc native-headset cpu_flags_arm_neon
22
+gdbm +glib gtk ipv6 jack libsamplerate libressl lirc native-headset
23
ofono-headset +orc oss qt5 realtime selinux sox ssl systemd system-wide tcpd test
23
ofono-headset +orc oss qt5 realtime selinux sox ssl systemd system-wide tcpd test
24
+udev +webrtc-aec +X zeroconf"
24
+udev +webrtc-aec +X zeroconf"
25
25
Lines 151-245 src_prepare() { Link Here
151
	# Skip test that cannot work with sandbox, bug #501846
151
	# Skip test that cannot work with sandbox, bug #501846
152
	sed -i -e '/lock-autospawn-test /d' src/Makefile.am || die
152
	sed -i -e '/lock-autospawn-test /d' src/Makefile.am || die
153
	sed -i -e 's/lock-autospawn-test$(EXEEXT) //' src/Makefile.in || die
153
	sed -i -e 's/lock-autospawn-test$(EXEEXT) //' src/Makefile.in || die
154
}
155
156
pa_meson_multilib_native_use_enable() {
157
	echo "-D ${2:-${1}}=$(multilib_native_usex ${1} true false)"
158
}
154
159
155
	eautoreconf
160
pa_meson_multilib_native_use_feature() {
161
	echo "-D ${2:-${1}}=$(multilib_native_usex ${1} enabled disabled)"
156
}
162
}
157
163
158
multilib_src_configure() {
164
multilib_src_configure() {
159
	local myconf=(
165
	local emesonargs=(
160
		--disable-adrian-aec
166
		-D adrian-aec=false
161
		--disable-esound
162
		--disable-gconf
163
		--disable-solaris
164
		--enable-largefile
165
		--localstatedir="${EPREFIX}"/var
167
		--localstatedir="${EPREFIX}"/var
166
		--with-systemduserunitdir=$(systemd_get_userunitdir)
168
		-D systemduserunitdir=$(systemd_get_userunitdir)
167
		--with-udev-rules-dir="${EPREFIX}/$(get_udevdir)"/rules.d
169
		-D udevrulesdir="${EPREFIX}/$(get_udevdir)"/rules.d
168
		$(multilib_native_use_enable alsa)
170
		-D bashcompletiondir="$(get_bashcompdir)"
169
		$(multilib_native_use_enable bluetooth bluez5)
171
		$(pa_meson_multilib_native_use_feature alsa)
170
		$(multilib_native_use_enable glib gsettings)
172
		$(pa_meson_multilib_native_use_enable bluetooth bluez5)
171
		$(multilib_native_use_enable gtk gtk3)
173
		$(pa_meson_multilib_native_use_feature glib gsettings)
172
		$(multilib_native_use_enable jack)
174
		$(pa_meson_multilib_native_use_feature gtk)
173
		$(multilib_native_use_enable libsamplerate samplerate)
175
		$(pa_meson_multilib_native_use_feature jack)
174
		$(multilib_native_use_enable lirc)
176
		$(pa_meson_multilib_native_use_feature libsamplerate samplerate)
175
		$(multilib_native_use_enable orc)
177
		$(pa_meson_multilib_native_use_feature lirc)
176
		$(multilib_native_use_enable oss oss-output)
178
		$(pa_meson_multilib_native_use_feature orc)
177
		$(multilib_native_use_enable ssl openssl)
179
		$(pa_meson_multilib_native_use_enable oss oss-output)
180
		$(pa_meson_multilib_native_use_feature ssl openssl)
178
		# tests involve random modules, so just do them for the native
181
		# tests involve random modules, so just do them for the native
179
		$(multilib_native_use_enable test default-build-tests)
182
		$(pa_meson_multilib_native_use_enable test tests)
180
		$(multilib_native_use_enable udev)
183
		$(pa_meson_multilib_native_use_feature udev)
181
		$(multilib_native_use_enable webrtc-aec)
184
		$(pa_meson_multilib_native_use_feature webrtc-aec)
182
		$(multilib_native_use_enable zeroconf avahi)
185
		$(pa_meson_multilib_native_use_feature zeroconf avahi)
183
		$(multilib_native_use_with equalizer fftw)
186
		$(pa_meson_multilib_native_use_feature equalizer fftw)
184
		$(multilib_native_use_with sox soxr)
187
		$(pa_meson_multilib_native_use_feature sox soxr)
185
		$(multilib_native_usex gdbm '--with-database=gdbm' '--with-database=simple')
188
		-D database=$(multilib_native_usex gdbm gdbm simple)
186
		$(use_enable glib glib2)
189
		$(meson_feature glib)
187
		$(use_enable asyncns)
190
		$(meson_feature asyncns)
188
		$(use_enable cpu_flags_arm_neon neon-opt)
191
		#$(meson_use cpu_flags_arm_neon neon-opt)
189
		$(use_enable tcpd tcpwrap)
192
		$(meson_use tcpd tcpwrap)
190
		$(use_enable dbus)
193
		$(meson_feature dbus)
191
		$(use_enable X x11)
194
		$(meson_feature X x11)
192
		$(use_enable systemd systemd-daemon)
195
		$(meson_feature systemd)
193
		# systemd-login isn't necessary for non-native, but the rest of systemd are; not changing it at this point close to a meson port
196
		$(meson_use ipv6)
194
		$(use_enable systemd systemd-login)
195
		$(use_enable systemd systemd-journal)
196
		$(use_enable ipv6)
197
		$(use_with caps)
198
	)
197
	)
199
198
200
	if use elogind && multilib_is_native_abi; then
199
	#if use elogind && multilib_is_native_abi; then
201
		local PKGCONFIG="$(tc-getPKG_CONFIG)"
200
	#	local PKGCONFIG="$(tc-getPKG_CONFIG)"
202
		myconf+=(
201
	#	myconf+=(
203
			--enable-systemd-login
202
	#		--enable-systemd-login
204
			SYSTEMDLOGIN_CFLAGS="$(${PKGCONFIG} --cflags "libelogind" 2>/dev/null)"
203
	#		SYSTEMDLOGIN_CFLAGS="$(${PKGCONFIG} --cflags "libelogind" 2>/dev/null)"
205
			SYSTEMDLOGIN_LIBS="$(${PKGCONFIG} --libs "libelogind" 2>/dev/null)"
204
	#		SYSTEMDLOGIN_LIBS="$(${PKGCONFIG} --libs "libelogind" 2>/dev/null)"
206
		)
205
	#	)
207
	fi
206
	#fi
208
207
209
	if use bluetooth; then
208
	if use bluetooth; then
210
		myconf+=(
209
		emesonargs+=(
211
			$(multilib_native_use_enable native-headset bluez5-native-headset)
210
			$(pa_meson_multilib_native_use_enable native-headset bluez5-native-headset)
212
			$(multilib_native_use_enable ofono-headset bluez5-ofono-headset)
211
			$(pa_meson_multilib_native_use_enable ofono-headset bluez5-ofono-headset)
213
		)
212
		)
214
	fi
213
	fi
215
214
216
	if ! multilib_is_native_abi; then
215
	if multilib_is_native_abi; then
217
		myconf+=(
218
			# hack around unnecessary checks
219
			# (results don't matter, we're not building anything using it)
220
			ac_cv_lib_ltdl_lt_dladvise_init=yes
221
			LIBSPEEX_CFLAGS=' '
222
			LIBSPEEX_LIBS=' '
223
		)
224
	else
225
		# Make padsp work for non-native ABI, supposedly only possible with glibc; this is used by /usr/bin/padsp that comes from native build, thus we need this argument for native build
216
		# Make padsp work for non-native ABI, supposedly only possible with glibc; this is used by /usr/bin/padsp that comes from native build, thus we need this argument for native build
226
		if use elibc_glibc ; then
217
		if use elibc_glibc ; then
227
			myconf+=( --with-pulsedsp-location="${EPREFIX}"'/usr/\\$$LIB/pulseaudio' )
218
			emesonargs+=( -D pulsedsp-location="${EPREFIX}"'/usr/\\$$LIB/pulseaudio' )
228
		fi
219
		fi
229
	fi
220
	fi
230
221
231
	ECONF_SOURCE=${S} \
222
	meson_src_configure
232
	econf "${myconf[@]}"
233
}
223
}
234
224
235
multilib_src_compile() {
225
multilib_src_compile() {
226
	meson_src_compile
227
236
	if multilib_is_native_abi; then
228
	if multilib_is_native_abi; then
237
		emake
229
		use doc && meson_src_compile doxygen
238
		use doc && emake doxygen
239
	else
240
		local targets=( libpulse.la libpulsedsp.la libpulse-simple.la )
241
		use glib && targets+=( libpulse-mainloop-glib.la )
242
		emake -C src ${targets[*]}
243
	fi
230
	fi
244
}
231
}
245
232
Lines 248-273 multilib_src_test() { Link Here
248
	# po/'s tests too, and they are broken. Officially, it should work
235
	# po/'s tests too, and they are broken. Officially, it should work
249
	# with intltool 0.41, but that doesn't look like a stable release.
236
	# with intltool 0.41, but that doesn't look like a stable release.
250
	if multilib_is_native_abi; then
237
	if multilib_is_native_abi; then
251
		emake -C src check
238
		meson_src_test
252
	fi
239
	fi
253
}
240
}
254
241
255
multilib_src_install() {
242
multilib_src_install() {
243
	meson_src_install
244
256
	if multilib_is_native_abi; then
245
	if multilib_is_native_abi; then
257
		emake -j1 DESTDIR="${D}" bashcompletiondir="$(get_bashcompdir)" install
258
		if use doc ; then
246
		if use doc ; then
259
			docinto html
247
			docinto html
260
			dodoc -r doxygen/html/
248
			dodoc -r doxygen/html/
261
		fi
249
		fi
262
	else
250
	else
263
		local targets=( libpulse.la libpulse-simple.la )
251
		# remove foreign abi modules
264
		use glib && targets+=( libpulse-mainloop-glib.la )
252
		rm -rf "${ED}"/usr/$(get_libdir)/pulse-*/
265
		emake DESTDIR="${D}" install-pkgconfigDATA
266
		emake DESTDIR="${D}" -C src \
267
			install-libLTLIBRARIES \
268
			install-padsplibLTLIBRARIES \
269
			lib_LTLIBRARIES="${targets[*]}" \
270
			install-pulseincludeHEADERS
271
	fi
253
	fi
272
}
254
}
273
255

Return to bug 749357