Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 644504 - media-libs/mesa: lm_sensors, extra-hud support
Summary: media-libs/mesa: lm_sensors, extra-hud support
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-14 07:13 UTC by Luke McKee
Modified: 2018-02-09 23:23 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
media-libs/mesa: updated stable ebuild for review by maintainer. (mesa-17.3.2.ebuild,14.74 KB, text/plain)
2018-01-14 07:13 UTC, Luke McKee
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke McKee 2018-01-14 07:13:40 UTC
Created attachment 514740 [details]
media-libs/mesa: updated stable ebuild for review by maintainer.

To the gentoo maintainer of mesa:

There is a new stable release but when you roll it out next can you support llvm6 support like I have with the attached ebuild. I haven't checked if it's llvm5.0 compatible though.

Also this patch mentioned on the development mailing list last November needs to be applied - it's referred to in the ebuild.

https://patchwork.freedesktop.org/patch/186737/
https://patchwork.freedesktop.org/patch/186831/ (duplicate)

llvm6.0 works great.
https://www.phoronix.com/scan.php?page=article&item=vega-pre415dc-comp&num=1

To see the changes to the ebuild (not much) see the inline patch below.

I've also added lm_sensors support and an extra configure option to enable extra attributes in the gallium driver heads up display. Personally I only wanted lm_sensors support but I added that as well.

The new use flags will have to be added to the metadata.xml by the maintainer.

--- /usr/portage/media-libs/mesa/mesa-17.3.1.ebuild	2018-01-09 00:55:32.406635512 +0700
+++ mesa-17.3.2.ebuild	2018-01-11 22:15:40.319478190 +0700
@@ -41,7 +41,7 @@
 IUSE="${IUSE_VIDEO_CARDS}
 	bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
 	+llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
-	vdpau vulkan wayland xvmc xa"
+	vdpau vulkan wayland xvmc xa lm_sensors extra_hud"
 
 REQUIRED_USE="
 	d3d9?   ( dri3 gallium )
@@ -52,6 +52,8 @@
 	gles2?  ( egl )
 	vaapi? ( gallium )
 	vdpau? ( gallium )
+	lm_sensors? ( gallium )
+	extra_hud? ( gallium )
 	vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
 			  video_cards_radeonsi? ( llvm ) )
 	wayland? ( egl gbm )
@@ -146,14 +148,13 @@
 # 1. List all the working slots (with min versions) in ||, newest first.
 # 2. Update the := to specify *max* version, e.g. < 7.
 # 3. Specify LLVM_MAX_SLOT, e.g. 6.
-LLVM_MAX_SLOT="5"
+LLVM_MAX_SLOT="6"
 LLVM_DEPSTR="
 	|| (
-		sys-devel/llvm:5[${MULTILIB_USEDEP}]
+		sys-devel/llvm:6[${MULTILIB_USEDEP}]
 		sys-devel/llvm:4[${MULTILIB_USEDEP}]
 		>=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
 	)
-	<sys-devel/llvm-6:=[${MULTILIB_USEDEP}]
 "
 LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
 CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
@@ -242,6 +243,8 @@
 S="${WORKDIR}/${MY_P}"
 EGIT_CHECKOUT_DIR=${S}
 
+PATCHES="${FILESDIR}/${PN}-17.3.2-llvm-6.patch"
+
 QA_WX_LOAD="
 x86? (
 	!pic? (
@@ -281,6 +284,7 @@
 
 src_prepare() {
 	[[ ${PV} == 9999 ]] && eautoreconf
+	[[ -n ${PATCHES} ]] && eapply ${PATCHES}
 	eapply_user
 }
 
@@ -382,7 +386,6 @@
 
 	# build fails with BSD indent, bug #428112
 	use userland_GNU || export INDENT=cat
-
 	ECONF_SOURCE="${S}" \
 	econf \
 		--enable-dri \
@@ -398,6 +401,8 @@
 		$(use_enable gles2) \
 		$(use_enable nptl glx-tls) \
 		$(use_enable unwind libunwind) \
+		$(use_enable lm_sensors lmsensors) \
+		$(use_enable extra_hud gallium-extra-hud) \
 		--enable-valgrind=$(usex valgrind auto no) \
 		--enable-llvm-shared-libs \
 		--with-dri-drivers=${DRI_DRIVERS} \
Comment 1 Luke McKee 2018-01-16 02:53:21 UTC
p.s. fix the deps in the ebuild to support LLVM 5.0 for the people who are still using that instead of 6.0 that just got released.
Comment 2 Matt Turner gentoo-dev 2018-01-18 01:34:20 UTC
Thanks. Looks like you're very eager to help out. That's great.

A few things:

I have not added 17.3.2 to the tree because it contains a pretty bad bug fixed in 17.3.3, and also it accidentally requires mako, which I don't want to have to deal with.

As a policy, Mesa does not support LLVM versions released after it. We're not going to add LLVM compatibility patches because while it may work it's had no actual testing from the developers.

The extra-hud/lm_sensors bits look okay, except for their misplacement in IUSE=. They should be added to the mesa-9999.ebuild first and then that change will propagate into the next major Mesa release (18.0 in February).

You might consider submitting a pull request on GitHub. That way it'll automatically go through some automated checks.