Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 531842
Collapse All | Expand All

(-)a/media-libs/mesa/mesa-10.3.4.ebuild (-56 lines)
Lines 333-364 multilib_src_configure() { Link Here
333
multilib_src_install() {
333
multilib_src_install() {
334
	emake install DESTDIR="${D}"
334
	emake install DESTDIR="${D}"
335
335
336
	# Move libGL and others from /usr/lib to /usr/lib/opengl/blah/lib
337
	# because user can eselect desired GL provider.
338
	ebegin "Moving libGL and friends for dynamic switching"
339
		local x
340
		local gl_dir="/usr/$(get_libdir)/opengl/${OPENGL_DIR}/"
341
		dodir ${gl_dir}/{lib,extensions,include/GL}
342
		for x in "${ED}"/usr/$(get_libdir)/lib{EGL,GL*,OpenVG}.{la,a,so*}; do
343
			if [ -f ${x} -o -L ${x} ]; then
344
				mv -f "${x}" "${ED}${gl_dir}"/lib \
345
					|| die "Failed to move ${x}"
346
			fi
347
		done
348
		for x in "${ED}"/usr/include/GL/{gl.h,glx.h,glext.h,glxext.h}; do
349
			if [ -f ${x} -o -L ${x} ]; then
350
				mv -f "${x}" "${ED}${gl_dir}"/include/GL \
351
					|| die "Failed to move ${x}"
352
			fi
353
		done
354
		for x in "${ED}"/usr/include/{EGL,GLES*,VG,KHR}; do
355
			if [ -d ${x} ]; then
356
				mv -f "${x}" "${ED}${gl_dir}"/include \
357
					|| die "Failed to move ${x}"
358
			fi
359
		done
360
	eend $?
361
362
	if use classic || use gallium; then
336
	if use classic || use gallium; then
363
			ebegin "Moving DRI/Gallium drivers for dynamic switching"
337
			ebegin "Moving DRI/Gallium drivers for dynamic switching"
364
			local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
338
			local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
Lines 390-409 multilib_src_install() { Link Here
390
			popd
364
			popd
391
		eend $?
365
		eend $?
392
	fi
366
	fi
393
	if use opencl; then
394
		ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
395
		local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
396
		dodir ${cl_dir}/{lib,include}
397
		if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
398
			mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
399
			"${ED}"${cl_dir}
400
		fi
401
		if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
402
			mv -f "${ED}"/usr/include/CL \
403
			"${ED}"${cl_dir}/include
404
		fi
405
		eend $?
406
	fi
407
367
408
	if use openmax; then
368
	if use openmax; then
409
		echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
369
		echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
Lines 437-463 multilib_src_test() { Link Here
437
}
397
}
438
398
439
pkg_postinst() {
399
pkg_postinst() {
440
	# Switch to the xorg implementation.
441
	echo
442
	eselect opengl set --use-old ${OPENGL_DIR}
443
444
	# switch to xorg-x11 and back if necessary, bug #374647 comment 11
445
	OLD_IMPLEM="$(eselect opengl show)"
446
	if [[ ${OPENGL_DIR}x != ${OLD_IMPLEM}x ]]; then
447
		eselect opengl set ${OPENGL_DIR}
448
		eselect opengl set ${OLD_IMPLEM}
449
	fi
450
451
	# Select classic/gallium drivers
400
	# Select classic/gallium drivers
452
	if use classic || use gallium; then
401
	if use classic || use gallium; then
453
		eselect mesa set --auto
402
		eselect mesa set --auto
454
	fi
403
	fi
455
404
456
	# Switch to mesa opencl
457
	if use opencl; then
458
		eselect opencl set --use-old ${PN}
459
	fi
460
461
	# run omxregister-bellagio to make the OpenMAX drivers known system-wide
405
	# run omxregister-bellagio to make the OpenMAX drivers known system-wide
462
	if use openmax; then
406
	if use openmax; then
463
		ebegin "Registering OpenMAX drivers"
407
		ebegin "Registering OpenMAX drivers"
(-)a/x11-base/xorg-server/xorg-server-1.16.2.ebuild (-29 lines)
Lines 187-211 src_configure() { Link Here
187
		--with-sha1=libcrypto
187
		--with-sha1=libcrypto
188
	)
188
	)
189
189
190
	# Xorg-server requires includes from OS mesa which are not visible for
191
	# users of binary drivers.
192
	mkdir -p "${T}/mesa-symlinks/GL"
193
	for i in gl glx glxmd glxproto glxtokens; do
194
		ln -s "${EROOT}usr/$(get_libdir)/opengl/xorg-x11/include/$i.h" "${T}/mesa-symlinks/GL/$i.h" || die
195
	done
196
	for i in glext glxext; do
197
		ln -s "${EROOT}usr/$(get_libdir)/opengl/global/include/$i.h" "${T}/mesa-symlinks/GL/$i.h" || die
198
	done
199
	append-cppflags "-I${T}/mesa-symlinks"
200
201
	xorg-2_src_configure
190
	xorg-2_src_configure
202
}
191
}
203
192
204
src_install() {
193
src_install() {
205
	xorg-2_src_install
194
	xorg-2_src_install
206
195
207
	dynamic_libgl_install
208
209
	server_based_install
196
	server_based_install
210
197
211
	if ! use minimal &&	use xorg; then
198
	if ! use minimal &&	use xorg; then
Lines 223-231 src_install() { Link Here
223
}
210
}
224
211
225
pkg_postinst() {
212
pkg_postinst() {
226
	# sets up libGL and DRI2 symlinks if needed (ie, on a fresh install)
227
	eselect opengl set xorg-x11 --use-old
228
229
	if [[ ${PV} != 9999 && $(get_version_component_range 2 ${REPLACING_VERSIONS}) != $(get_version_component_range 2 ${PV}) ]]; then
213
	if [[ ${PV} != 9999 && $(get_version_component_range 2 ${REPLACING_VERSIONS}) != $(get_version_component_range 2 ${PV}) ]]; then
230
		elog "You should consider reading upgrade guide for this release:"
214
		elog "You should consider reading upgrade guide for this release:"
231
		elog "  http://www.gentoo.org/proj/en/desktop/x/x11/xorg-server-$(get_version_component_range 1-2)-upgrade-guide.xml"
215
		elog "  http://www.gentoo.org/proj/en/desktop/x/x11/xorg-server-$(get_version_component_range 1-2)-upgrade-guide.xml"
Lines 248-266 pkg_postrm() { Link Here
248
	fi
232
	fi
249
}
233
}
250
234
251
dynamic_libgl_install() {
252
	# next section is to setup the dynamic libGL stuff
253
	ebegin "Moving GL files for dynamic switching"
254
		dodir /usr/$(get_libdir)/opengl/xorg-x11/extensions
255
		local x=""
256
		for x in "${ED}"/usr/$(get_libdir)/xorg/modules/extensions/lib{glx,dri,dri2}*; do
257
			if [ -f ${x} -o -L ${x} ]; then
258
				mv -f ${x} "${ED}"/usr/$(get_libdir)/opengl/xorg-x11/extensions
259
			fi
260
		done
261
	eend 0
262
}
263
264
server_based_install() {
235
server_based_install() {
265
	if ! use xorg; then
236
	if ! use xorg; then
266
		rm "${ED}"/usr/share/man/man1/Xserver.1x \
237
		rm "${ED}"/usr/share/man/man1/Xserver.1x \

Return to bug 531842