pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/50090: x11/xf86-video-intel fix build and enable functionality on newer DragonFly and FreeBSD
>Number: 50090
>Category: pkg
>Synopsis: x11/xf86-video-intel fix build and enable functionality on newer DragonFly and FreeBSD
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jul 25 23:25:00 +0000 2015
>Originator: David Shao
>Release: pkgsrc current
>Organization:
>Environment:
DragonFly 4.3-DEVELOPMENT DragonFly v4.2.2.123.g14929-DEVELOPMENT #10: Sat Jul 25 07:24:55 PDT 2015 xxxxx@:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64
>Description:
On at least newer DragonFly and FreeBSD, and possibly maybe none of them, x11/xf86-video-intel cannot build due to a problem finding getline() in src/sna/kgem.c
kgem.c: In function 'cpu_cache_size':
kgem.c:996:10: error: implicit declaration of function 'getline' [-Werror=implicit-function-declaration]
while (getline(&line, &len, file) != -1) {
Fortunately this has a fix in the Makefile that does not touch the original source code.
Unfortunately to actually make xf86-video-intel functional on newer DragonFly and probably FreeBSD, there is yet another patch from DragonFly dports / FreeBSD ports that will never be accepted by upstream.
>How-To-Repeat:
>Fix:
--- Makefile.orig 2015-05-28 19:59:23.000000000 -0700
+++ Makefile 2015-07-22 14:03:32.000000000 -0700
@@ -24,6 +24,10 @@
CONFIGURE_ENV+= DRIVER_MAN_SUFFIX=4
.endif
+.if ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly"
+CFLAGS+= -D_WITH_GETLINE=1
+.endif
+
BUILDLINK_API_DEPENDS.libdrm+= libdrm>=2.4.7
.include "../../x11/modular-xorg-server/buildlink3.mk"
$NetBSD$
--- src/intel_device.c.orig 2015-07-23 00:34:18.755727000 +0000
+++ src/intel_device.c
@@ -398,8 +398,13 @@ static int __intel_open_device__legacy(c
pci->domain, pci->bus, pci->dev, pci->func);
ret = drmCheckModesettingSupported(id);
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+ if (ret || 1) {
+ if (xf86LoadKernelModule("i915kms"))
+#else
if (ret) {
if (xf86LoadKernelModule("i915"))
+#endif
ret = drmCheckModesettingSupported(id);
if (ret)
return -1;
Home |
Main Index |
Thread Index |
Old Index