diff --git a/x11-drivers/xf86-video-intel/Makefile b/x11-drivers/xf86-video-intel/Makefile index 08a3ba6d4856..ff1b17eed08a 100644 --- a/x11-drivers/xf86-video-intel/Makefile +++ b/x11-drivers/xf86-video-intel/Makefile @@ -1,52 +1,53 @@ # Created by: lesi@FreeBSD.org PORTNAME= xf86-video-intel DISTVERSION= 2.99.917-916 DISTVERSIONSUFFIX= -g${GL_COMMIT:C/(.{12}).*/\1/} +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org legacy driver for Intel integrated graphics chipsets LICENSE= MIT # various LICENSE_FILE= ${WRKSRC}/COPYING ONLY_FOR_ARCHS= amd64 i386 ONLY_FOR_ARCHS_REASON= Only Intel integrated GPUs on x86 are supported LIB_DEPENDS= libdrm_intel.so:graphics/libdrm USES= cpe localbase xorg xorg-cat:driver CPE_VENDOR= x USE_GITLAB= yes GL_COMMIT= 31486f40f8e8f8923ca0799aea84b58799754564 USE_XORG= pciaccess pixman CONFIGURE_ENV= ac_cv_header_sys_sysinfo_h=no # XXX ports/242236 CONFIGURE_ARGS= --with-builderstring="${DISTVERSIONFULL}" TEST_TARGET= check # XXX bug 214593: SNA crashes on pre-SandyBridge hardware CONFIGURE_ARGS+=--with-default-accel=uxa # XXX Remove after FreeBSD 11 EOL CPPFLAGS+= -D_WITH_GETLINE OPTIONS_DEFINE= UDEV XVMC OPTIONS_DEFAULT=UDEV XVMC OPTIONS_SUB= yes UDEV_DESC= udev-based monitor hotplug detection UDEV_LIB_DEPENDS= libudev.so:devel/libudev-devd UDEV_CONFIGURE_ENABLE= udev XVMC_LIB_DEPENDS= libxcb-util.so:x11/xcb-util XVMC_USE= XORG=x11,xcb,xvmc XVMC_CONFIGURE_ENABLE= xvmc XVMC_VARS= USE_LDCONFIG=yes post-patch: .if ${CONFIGURE_ARGS:M--with-default-accel=uxa} @${REINPLACE_CMD} '/^Default/s/SNA/UXA/' ${WRKSRC}/man/intel.man .endif .include diff --git a/x11-drivers/xf86-video-intel/files/patch-src_sna_kgem.c b/x11-drivers/xf86-video-intel/files/patch-src_sna_kgem.c new file mode 100644 index 000000000000..f71962e56a63 --- /dev/null +++ b/x11-drivers/xf86-video-intel/files/patch-src_sna_kgem.c @@ -0,0 +1,24 @@ +--- src/sna/kgem.c.orig 2021-01-15 20:59:05 UTC ++++ src/sna/kgem.c +@@ -1189,13 +1189,18 @@ static int gem_param(struct kgem *kgem, int name) + static bool test_has_execbuffer2(struct kgem *kgem) + { + struct drm_i915_gem_execbuffer2 execbuf; ++ int ret; + + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffer_count = 1; + +- return do_ioctl(kgem->fd, +- DRM_IOCTL_I915_GEM_EXECBUFFER2, +- &execbuf) == -EFAULT; ++ ret = do_ioctl(kgem->fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf); ++#ifdef __FreeBSD__ ++ /* XXX FreeBSD returns ENOENT instead of EFAULT. */ ++ if (ret == -ENOENT) ++ return true; ++#endif ++ return ret == -EFAULT; + } + + static bool test_has_no_reloc(struct kgem *kgem)