Consolidate the Mesa ports, update to 17.0.4, and add Wayland option
* libGL, libEGL, libglesv2, libglapi, and gbm have been moved into mesa-libs,
graphics/dri has been renamed to mesa-dri, and USE_GL has been adjusted
* mesa-libs has a new WAYLAND option that enables platform support in libEGL
* mesa-dri now depends on graphics/s2tc for compressed texture support [1]
* re-remove obsolete dependency on makedepends [2]
* correct sed fix backported from 17.1 [3]
PR: 218799 (exp-run), 212762 [1], 218552 [2], 218562 [3]
Submitted by: dbn [1], jbeich [2,3]
Reported by: afiskon@devzen.ru [1]
Reviewed by: kwm, johalun0@gmail.com
Approved by: portmgr, swills (mentor)
Differential Revision: https://reviews.freebsd.org/D10448
2017-05-12 20:46:53 +02:00
|
|
|
# Created by: Eric Anholt <anholt@FreeBSD.org>
|
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= mesa-dri
|
|
|
|
PORTVERSION= ${MESAVERSION}
|
2020-06-16 17:38:29 +02:00
|
|
|
PORTREVISION= 7
|
Consolidate the Mesa ports, update to 17.0.4, and add Wayland option
* libGL, libEGL, libglesv2, libglapi, and gbm have been moved into mesa-libs,
graphics/dri has been renamed to mesa-dri, and USE_GL has been adjusted
* mesa-libs has a new WAYLAND option that enables platform support in libEGL
* mesa-dri now depends on graphics/s2tc for compressed texture support [1]
* re-remove obsolete dependency on makedepends [2]
* correct sed fix backported from 17.1 [3]
PR: 218799 (exp-run), 212762 [1], 218552 [2], 218562 [3]
Submitted by: dbn [1], jbeich [2,3]
Reported by: afiskon@devzen.ru [1]
Reviewed by: kwm, johalun0@gmail.com
Approved by: portmgr, swills (mentor)
Differential Revision: https://reviews.freebsd.org/D10448
2017-05-12 20:46:53 +02:00
|
|
|
CATEGORIES= graphics
|
|
|
|
|
|
|
|
COMMENT= OpenGL hardware acceleration drivers for DRI2+
|
|
|
|
|
2020-05-03 18:15:23 +02:00
|
|
|
USES= xorg
|
2020-06-10 22:12:21 +02:00
|
|
|
USE_XORG= xorgproto x11 xdamage xext xfixes xshmfence
|
Consolidate the Mesa ports, update to 17.0.4, and add Wayland option
* libGL, libEGL, libglesv2, libglapi, and gbm have been moved into mesa-libs,
graphics/dri has been renamed to mesa-dri, and USE_GL has been adjusted
* mesa-libs has a new WAYLAND option that enables platform support in libEGL
* mesa-dri now depends on graphics/s2tc for compressed texture support [1]
* re-remove obsolete dependency on makedepends [2]
* correct sed fix backported from 17.1 [3]
PR: 218799 (exp-run), 212762 [1], 218552 [2], 218562 [3]
Submitted by: dbn [1], jbeich [2,3]
Reported by: afiskon@devzen.ru [1]
Reviewed by: kwm, johalun0@gmail.com
Approved by: portmgr, swills (mentor)
Differential Revision: https://reviews.freebsd.org/D10448
2017-05-12 20:46:53 +02:00
|
|
|
|
2020-06-06 11:23:13 +02:00
|
|
|
OPTIONS_GROUP= PLATFORM
|
|
|
|
OPTIONS_GROUP_PLATFORM= PLATFORM_X11 PLATFORM_WAYLAND PLATFORM_DRM PLATFORM_SURFACELESS
|
|
|
|
PLATFORM_X11_DESC= Enable X11 support for GBM/EGL
|
|
|
|
PLATFORM_WAYLAND_DESC= Enable Wayland support for GBM/EGL
|
|
|
|
PLATFORM_DRM_DESC= Enable DRM support for GBM/EGL
|
|
|
|
PLATFORM_SURFACELESS_DESC= Enable Surfaceless support for GBM/EGL
|
|
|
|
PLATFORM_WAYLAND_IMPLIES= WAYLAND
|
|
|
|
|
2019-01-17 16:34:37 +01:00
|
|
|
OPTIONS_DEFINE= VAAPI VDPAU WAYLAND
|
2020-06-06 11:23:13 +02:00
|
|
|
OPTIONS_DEFAULT=WAYLAND PLATFORM_X11 PLATFORM_WAYLAND PLATFORM_DRM PLATFORM_SURFACELESS
|
Consolidate the Mesa ports, update to 17.0.4, and add Wayland option
* libGL, libEGL, libglesv2, libglapi, and gbm have been moved into mesa-libs,
graphics/dri has been renamed to mesa-dri, and USE_GL has been adjusted
* mesa-libs has a new WAYLAND option that enables platform support in libEGL
* mesa-dri now depends on graphics/s2tc for compressed texture support [1]
* re-remove obsolete dependency on makedepends [2]
* correct sed fix backported from 17.1 [3]
PR: 218799 (exp-run), 212762 [1], 218552 [2], 218562 [3]
Submitted by: dbn [1], jbeich [2,3]
Reported by: afiskon@devzen.ru [1]
Reviewed by: kwm, johalun0@gmail.com
Approved by: portmgr, swills (mentor)
Differential Revision: https://reviews.freebsd.org/D10448
2017-05-12 20:46:53 +02:00
|
|
|
OPTIONS_SUB= yes
|
|
|
|
|
2020-06-05 11:13:57 +02:00
|
|
|
VAAPI_MESON_ON= -Dgallium-va=true
|
Consolidate the Mesa ports, update to 17.0.4, and add Wayland option
* libGL, libEGL, libglesv2, libglapi, and gbm have been moved into mesa-libs,
graphics/dri has been renamed to mesa-dri, and USE_GL has been adjusted
* mesa-libs has a new WAYLAND option that enables platform support in libEGL
* mesa-dri now depends on graphics/s2tc for compressed texture support [1]
* re-remove obsolete dependency on makedepends [2]
* correct sed fix backported from 17.1 [3]
PR: 218799 (exp-run), 212762 [1], 218552 [2], 218562 [3]
Submitted by: dbn [1], jbeich [2,3]
Reported by: afiskon@devzen.ru [1]
Reviewed by: kwm, johalun0@gmail.com
Approved by: portmgr, swills (mentor)
Differential Revision: https://reviews.freebsd.org/D10448
2017-05-12 20:46:53 +02:00
|
|
|
VAAPI_LIB_DEPENDS= libva.so:multimedia/libva
|
2017-12-26 00:30:54 +01:00
|
|
|
VAAPI_USE= XORG=xcb
|
Consolidate the Mesa ports, update to 17.0.4, and add Wayland option
* libGL, libEGL, libglesv2, libglapi, and gbm have been moved into mesa-libs,
graphics/dri has been renamed to mesa-dri, and USE_GL has been adjusted
* mesa-libs has a new WAYLAND option that enables platform support in libEGL
* mesa-dri now depends on graphics/s2tc for compressed texture support [1]
* re-remove obsolete dependency on makedepends [2]
* correct sed fix backported from 17.1 [3]
PR: 218799 (exp-run), 212762 [1], 218552 [2], 218562 [3]
Submitted by: dbn [1], jbeich [2,3]
Reported by: afiskon@devzen.ru [1]
Reviewed by: kwm, johalun0@gmail.com
Approved by: portmgr, swills (mentor)
Differential Revision: https://reviews.freebsd.org/D10448
2017-05-12 20:46:53 +02:00
|
|
|
|
2020-06-05 11:13:57 +02:00
|
|
|
VDPAU_MESON_ON= -Dgallium-vdpau=true
|
Consolidate the Mesa ports, update to 17.0.4, and add Wayland option
* libGL, libEGL, libglesv2, libglapi, and gbm have been moved into mesa-libs,
graphics/dri has been renamed to mesa-dri, and USE_GL has been adjusted
* mesa-libs has a new WAYLAND option that enables platform support in libEGL
* mesa-dri now depends on graphics/s2tc for compressed texture support [1]
* re-remove obsolete dependency on makedepends [2]
* correct sed fix backported from 17.1 [3]
PR: 218799 (exp-run), 212762 [1], 218552 [2], 218562 [3]
Submitted by: dbn [1], jbeich [2,3]
Reported by: afiskon@devzen.ru [1]
Reviewed by: kwm, johalun0@gmail.com
Approved by: portmgr, swills (mentor)
Differential Revision: https://reviews.freebsd.org/D10448
2017-05-12 20:46:53 +02:00
|
|
|
VDPAU_LIB_DEPENDS= libvdpau.so:multimedia/libvdpau
|
|
|
|
|
2018-10-16 02:00:20 +02:00
|
|
|
WAYLAND_DESC= Enable support for the Wayland platform in Vulkan drivers
|
|
|
|
WAYLAND_BUILD_DEPENDS= wayland-protocols>=1.8:graphics/wayland-protocols
|
|
|
|
WAYLAND_LIB_DEPENDS= libwayland-client.so:graphics/wayland
|
2020-06-06 11:23:13 +02:00
|
|
|
WAYLAND_IMPLIES= PLATFORM_WAYLAND
|
2018-10-16 02:00:20 +02:00
|
|
|
|
Consolidate the Mesa ports, update to 17.0.4, and add Wayland option
* libGL, libEGL, libglesv2, libglapi, and gbm have been moved into mesa-libs,
graphics/dri has been renamed to mesa-dri, and USE_GL has been adjusted
* mesa-libs has a new WAYLAND option that enables platform support in libEGL
* mesa-dri now depends on graphics/s2tc for compressed texture support [1]
* re-remove obsolete dependency on makedepends [2]
* correct sed fix backported from 17.1 [3]
PR: 218799 (exp-run), 212762 [1], 218552 [2], 218562 [3]
Submitted by: dbn [1], jbeich [2,3]
Reported by: afiskon@devzen.ru [1]
Reviewed by: kwm, johalun0@gmail.com
Approved by: portmgr, swills (mentor)
Differential Revision: https://reviews.freebsd.org/D10448
2017-05-12 20:46:53 +02:00
|
|
|
.include <bsd.port.options.mk>
|
2017-05-21 21:30:54 +02:00
|
|
|
.include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common"
|
Consolidate the Mesa ports, update to 17.0.4, and add Wayland option
* libGL, libEGL, libglesv2, libglapi, and gbm have been moved into mesa-libs,
graphics/dri has been renamed to mesa-dri, and USE_GL has been adjusted
* mesa-libs has a new WAYLAND option that enables platform support in libEGL
* mesa-dri now depends on graphics/s2tc for compressed texture support [1]
* re-remove obsolete dependency on makedepends [2]
* correct sed fix backported from 17.1 [3]
PR: 218799 (exp-run), 212762 [1], 218552 [2], 218562 [3]
Submitted by: dbn [1], jbeich [2,3]
Reported by: afiskon@devzen.ru [1]
Reviewed by: kwm, johalun0@gmail.com
Approved by: portmgr, swills (mentor)
Differential Revision: https://reviews.freebsd.org/D10448
2017-05-12 20:46:53 +02:00
|
|
|
|
2020-06-05 11:13:57 +02:00
|
|
|
ALL_DRI_DRIVERS= I915 I965 R100 R200 SWRAST
|
2020-06-05 20:49:51 +02:00
|
|
|
ALL_GALLIUM_DRIVERS= R300 R600 RADEONSI SVGA SWRAST
|
2020-06-05 11:13:57 +02:00
|
|
|
ALL_VULKAN_DRIVERS= INTEL AMD
|
Consolidate the Mesa ports, update to 17.0.4, and add Wayland option
* libGL, libEGL, libglesv2, libglapi, and gbm have been moved into mesa-libs,
graphics/dri has been renamed to mesa-dri, and USE_GL has been adjusted
* mesa-libs has a new WAYLAND option that enables platform support in libEGL
* mesa-dri now depends on graphics/s2tc for compressed texture support [1]
* re-remove obsolete dependency on makedepends [2]
* correct sed fix backported from 17.1 [3]
PR: 218799 (exp-run), 212762 [1], 218552 [2], 218562 [3]
Submitted by: dbn [1], jbeich [2,3]
Reported by: afiskon@devzen.ru [1]
Reviewed by: kwm, johalun0@gmail.com
Approved by: portmgr, swills (mentor)
Differential Revision: https://reviews.freebsd.org/D10448
2017-05-12 20:46:53 +02:00
|
|
|
|
2019-06-30 16:56:12 +02:00
|
|
|
.if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH:Marm*} || ${ARCH} == i386 || ${ARCH:Mmips*} || ${ARCH:Mpowerpc*}
|
2020-06-11 16:22:35 +02:00
|
|
|
DRI_DRIVERS= SWRAST # llvmpipe
|
2017-05-21 21:30:54 +02:00
|
|
|
.endif
|
2017-12-27 23:53:47 +01:00
|
|
|
|
2020-02-15 21:49:31 +01:00
|
|
|
.if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH} == i386 \
|
Consolidate the Mesa ports, update to 17.0.4, and add Wayland option
* libGL, libEGL, libglesv2, libglapi, and gbm have been moved into mesa-libs,
graphics/dri has been renamed to mesa-dri, and USE_GL has been adjusted
* mesa-libs has a new WAYLAND option that enables platform support in libEGL
* mesa-dri now depends on graphics/s2tc for compressed texture support [1]
* re-remove obsolete dependency on makedepends [2]
* correct sed fix backported from 17.1 [3]
PR: 218799 (exp-run), 212762 [1], 218552 [2], 218562 [3]
Submitted by: dbn [1], jbeich [2,3]
Reported by: afiskon@devzen.ru [1]
Reviewed by: kwm, johalun0@gmail.com
Approved by: portmgr, swills (mentor)
Differential Revision: https://reviews.freebsd.org/D10448
2017-05-12 20:46:53 +02:00
|
|
|
|| ${ARCH} == powerpc || ${ARCH} == powerpc64
|
2020-06-05 11:13:57 +02:00
|
|
|
DRI_DRIVERS+= R100 R200
|
2019-06-30 16:56:12 +02:00
|
|
|
GALLIUM_DRIVERS+= R300 R600 RADEONSI
|
2020-06-05 11:13:57 +02:00
|
|
|
VULKAN_DRIVERS+= AMD
|
2020-06-10 22:12:21 +02:00
|
|
|
. if ${PORT_OPTIONS:MPLATFORM_X11}
|
|
|
|
USE_XORG+= xv xvmc
|
2020-06-05 11:13:57 +02:00
|
|
|
MESON_ARGS+= -Dgallium-xvmc=true
|
2020-06-10 22:12:21 +02:00
|
|
|
. endif
|
Consolidate the Mesa ports, update to 17.0.4, and add Wayland option
* libGL, libEGL, libglesv2, libglapi, and gbm have been moved into mesa-libs,
graphics/dri has been renamed to mesa-dri, and USE_GL has been adjusted
* mesa-libs has a new WAYLAND option that enables platform support in libEGL
* mesa-dri now depends on graphics/s2tc for compressed texture support [1]
* re-remove obsolete dependency on makedepends [2]
* correct sed fix backported from 17.1 [3]
PR: 218799 (exp-run), 212762 [1], 218552 [2], 218562 [3]
Submitted by: dbn [1], jbeich [2,3]
Reported by: afiskon@devzen.ru [1]
Reviewed by: kwm, johalun0@gmail.com
Approved by: portmgr, swills (mentor)
Differential Revision: https://reviews.freebsd.org/D10448
2017-05-12 20:46:53 +02:00
|
|
|
.endif
|
|
|
|
.if ${ARCH} == amd64 || ${ARCH} == i386
|
|
|
|
DRI_DRIVERS+= I915 I965
|
|
|
|
GALLIUM_DRIVERS+= SVGA
|
2018-04-10 02:14:03 +02:00
|
|
|
. if ${OPSYS} == FreeBSD
|
2017-06-18 16:02:35 +02:00
|
|
|
EXTRA_PATCHES+= ${PATCHDIR}/extra-src_mesa_drivers_dri_i965_intel__screen.c
|
|
|
|
. endif
|
2017-12-27 23:53:47 +01:00
|
|
|
VULKAN_DRIVERS+= INTEL
|
2017-06-06 07:09:54 +02:00
|
|
|
.endif
|
|
|
|
|
2020-06-09 21:56:17 +02:00
|
|
|
.if defined(VULKAN_DRIVERS)
|
2019-01-17 16:34:37 +01:00
|
|
|
USE_XORG+= xcb xrandr
|
2017-12-30 09:51:33 +01:00
|
|
|
.endif
|
|
|
|
|
2018-09-20 20:49:51 +02:00
|
|
|
LDFLAGS_i386= -Wl,-znotext
|
2017-12-27 23:53:47 +01:00
|
|
|
|
2020-06-06 11:23:13 +02:00
|
|
|
.if ${PORT_OPTIONS:MPLATFORM_X11}
|
|
|
|
MESA_PLATFORMS+= x11
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MPLATFORM_DRM}
|
|
|
|
MESA_PLATFORMS+= drm
|
2018-10-16 02:00:20 +02:00
|
|
|
.endif
|
|
|
|
|
2020-06-06 11:23:13 +02:00
|
|
|
.if ${PORT_OPTIONS:MPLATFORM_SURFACELESS}
|
|
|
|
MESA_PLATFORMS+= surfaceless
|
|
|
|
.endif
|
|
|
|
|
2020-06-08 12:49:33 +02:00
|
|
|
.if ${PORT_OPTIONS:MPLATFORM_WAYLAND}
|
|
|
|
MESA_PLATFORMS+= wayland
|
|
|
|
.endif
|
2020-06-06 11:23:13 +02:00
|
|
|
|
2020-06-05 11:13:57 +02:00
|
|
|
MESON_ARGS+= -Ddri-drivers="${DRI_DRIVERS:ts,:tl}" \
|
|
|
|
-Dgallium-drivers="${GALLIUM_DRIVERS:ts,:tl}" \
|
2020-06-06 11:23:13 +02:00
|
|
|
-Dvulkan-drivers="${VULKAN_DRIVERS:ts,:tl}" \
|
|
|
|
-Dplatforms="${MESA_PLATFORMS:ts,:tl}"
|
2020-06-05 11:13:57 +02:00
|
|
|
|
|
|
|
# Disable some options
|
|
|
|
MESON_ARGS+= -Dgallium-xa=false \
|
|
|
|
-Dgles1=false \
|
|
|
|
-Dgles2=false \
|
|
|
|
-Dglx=disabled \
|
|
|
|
-Degl=false \
|
|
|
|
-Dosmesa=none \
|
|
|
|
-Dtools=""
|
Consolidate the Mesa ports, update to 17.0.4, and add Wayland option
* libGL, libEGL, libglesv2, libglapi, and gbm have been moved into mesa-libs,
graphics/dri has been renamed to mesa-dri, and USE_GL has been adjusted
* mesa-libs has a new WAYLAND option that enables platform support in libEGL
* mesa-dri now depends on graphics/s2tc for compressed texture support [1]
* re-remove obsolete dependency on makedepends [2]
* correct sed fix backported from 17.1 [3]
PR: 218799 (exp-run), 212762 [1], 218552 [2], 218562 [3]
Submitted by: dbn [1], jbeich [2,3]
Reported by: afiskon@devzen.ru [1]
Reviewed by: kwm, johalun0@gmail.com
Approved by: portmgr, swills (mentor)
Differential Revision: https://reviews.freebsd.org/D10448
2017-05-12 20:46:53 +02:00
|
|
|
|
|
|
|
.for _d in ${ALL_DRI_DRIVERS}
|
2020-06-09 21:56:17 +02:00
|
|
|
. if defined(DRI_DRIVERS) && ${DRI_DRIVERS:M${_d}}
|
Consolidate the Mesa ports, update to 17.0.4, and add Wayland option
* libGL, libEGL, libglesv2, libglapi, and gbm have been moved into mesa-libs,
graphics/dri has been renamed to mesa-dri, and USE_GL has been adjusted
* mesa-libs has a new WAYLAND option that enables platform support in libEGL
* mesa-dri now depends on graphics/s2tc for compressed texture support [1]
* re-remove obsolete dependency on makedepends [2]
* correct sed fix backported from 17.1 [3]
PR: 218799 (exp-run), 212762 [1], 218552 [2], 218562 [3]
Submitted by: dbn [1], jbeich [2,3]
Reported by: afiskon@devzen.ru [1]
Reviewed by: kwm, johalun0@gmail.com
Approved by: portmgr, swills (mentor)
Differential Revision: https://reviews.freebsd.org/D10448
2017-05-12 20:46:53 +02:00
|
|
|
PLIST_SUB+= ${_d}_DRIVER=""
|
|
|
|
. else
|
|
|
|
PLIST_SUB+= ${_d}_DRIVER="@comment "
|
|
|
|
. endif
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.for _gd in ${ALL_GALLIUM_DRIVERS}
|
2020-06-09 21:56:17 +02:00
|
|
|
. if defined(GALLIUM_DRIVERS) && ${GALLIUM_DRIVERS:M${_gd}}
|
Consolidate the Mesa ports, update to 17.0.4, and add Wayland option
* libGL, libEGL, libglesv2, libglapi, and gbm have been moved into mesa-libs,
graphics/dri has been renamed to mesa-dri, and USE_GL has been adjusted
* mesa-libs has a new WAYLAND option that enables platform support in libEGL
* mesa-dri now depends on graphics/s2tc for compressed texture support [1]
* re-remove obsolete dependency on makedepends [2]
* correct sed fix backported from 17.1 [3]
PR: 218799 (exp-run), 212762 [1], 218552 [2], 218562 [3]
Submitted by: dbn [1], jbeich [2,3]
Reported by: afiskon@devzen.ru [1]
Reviewed by: kwm, johalun0@gmail.com
Approved by: portmgr, swills (mentor)
Differential Revision: https://reviews.freebsd.org/D10448
2017-05-12 20:46:53 +02:00
|
|
|
PLIST_SUB+= ${_gd}_GDRIVER=""
|
|
|
|
. else
|
|
|
|
PLIST_SUB+= ${_gd}_GDRIVER="@comment "
|
|
|
|
. endif
|
|
|
|
.endfor
|
|
|
|
|
2020-06-05 11:13:57 +02:00
|
|
|
PLIST_SUB += ARCH=${ARCH:S/amd/x86_/}
|
2017-12-27 23:53:47 +01:00
|
|
|
.for _vd in ${ALL_VULKAN_DRIVERS}
|
2020-06-09 21:56:17 +02:00
|
|
|
. if defined(VULKAN_DRIVERS) && ${VULKAN_DRIVERS:M${_vd}}
|
2020-06-05 11:13:57 +02:00
|
|
|
PLIST_SUB+= ${_vd}_VDRIVER=""
|
2017-12-27 23:53:47 +01:00
|
|
|
. else
|
|
|
|
PLIST_SUB+= ${_vd}_VDRIVER="@comment "
|
|
|
|
. endif
|
|
|
|
.endfor
|
|
|
|
|
2017-05-21 21:30:54 +02:00
|
|
|
.include "${MASTERDIR}/Makefile.targets"
|
Consolidate the Mesa ports, update to 17.0.4, and add Wayland option
* libGL, libEGL, libglesv2, libglapi, and gbm have been moved into mesa-libs,
graphics/dri has been renamed to mesa-dri, and USE_GL has been adjusted
* mesa-libs has a new WAYLAND option that enables platform support in libEGL
* mesa-dri now depends on graphics/s2tc for compressed texture support [1]
* re-remove obsolete dependency on makedepends [2]
* correct sed fix backported from 17.1 [3]
PR: 218799 (exp-run), 212762 [1], 218552 [2], 218562 [3]
Submitted by: dbn [1], jbeich [2,3]
Reported by: afiskon@devzen.ru [1]
Reviewed by: kwm, johalun0@gmail.com
Approved by: portmgr, swills (mentor)
Differential Revision: https://reviews.freebsd.org/D10448
2017-05-12 20:46:53 +02:00
|
|
|
|
|
|
|
post-install:
|
|
|
|
@${RM} -r ${STAGEDIR}/etc/OpenCL
|
|
|
|
|
2017-05-21 21:30:54 +02:00
|
|
|
.include <bsd.port.post.mk>
|