diff --git a/graphics/mesa-gallium-va/Makefile b/graphics/mesa-gallium-va/Makefile index efdfeebcd73e..84e1e1e22d9b 100644 --- a/graphics/mesa-gallium-va/Makefile +++ b/graphics/mesa-gallium-va/Makefile @@ -1,67 +1,89 @@ PORTNAME= mesa-gallium-va PORTVERSION= ${MESAVERSION} CATEGORIES= graphics COMMENT= Mesa Gallium VAAPI drivers WWW= https://www.mesa3d.org/ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/docs/license.rst -ONLY_FOR_ARCHS= aarch64 amd64 powerpc64 powerpc64le +ONLY_FOR_ARCHS= aarch64 i386 amd64 powerpc64 powerpc64le ONLY_FOR_ARCHS_REASON= used only by AMD/Radeon hardware BUILD_DEPENDS= libva>=0:multimedia/libva LIB_DEPENDS= libzstd.so:archivers/zstd USES= llvm:lib,noexport OPTIONS_DEFINE= X11 +OPTIONS_GROUP= GALLIUM OPTIONS_DEFAULT= X11 +OPTIONS_SUB= yes + X11_DESC= Enable X11 support X11_USES= xorg X11_USE= xorg=xorgproto,x11,xcb,xdamage,xext,xfixes,xshmfence,xxf86vm,xrandr +OPTIONS_GROUP_GALLIUM= radeonsi r600 +GALLIUM_DESC= Gallium Video Drivers +radeonsi_DESC= AMD/ATI Southern Islands and newer +r600_DESC= AMD/ATI R600, R700, Evergreen, Northern Islands +OPTIONS_EXCLUDE+= ${ARCH:Mi386:C/.+/radeonsi/} + +MESON_ARGS+= -Dgallium-drivers=${GALLIUM_DRIVERS:ts,} +. for _gd in ${OPTIONS_GROUP_GALLIUM} +OPTIONS_DEFAULT+= ${_gd} +${_gd}_VARS+= GALLIUM_DRIVERS+=${_gd} +. endfor + .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" MESON_ARGS+= -Dvideo-codecs="vc1dec,h264dec,h264enc,h265dec,h265enc,av1dec,av1enc,vp9dec" \ - -Dgallium-drivers="radeonsi,r600" \ -Dvulkan-drivers="" \ -Dandroid-libbacktrace=disabled \ -Dgallium-vdpau=disabled \ -Dgallium-omx=disabled \ -Dgallium-xa=disabled \ -Dgallium-opencl=disabled \ -Dgallium-nine=false \ -Dgbm=disabled \ -Dgles1=disabled \ -Dgles2=disabled \ -Dglvnd=disabled \ -Dlmsensors=disabled \ -Dmicrosoft-clc=disabled \ -Dosmesa=false \ -Dvalgrind=disabled \ -Dglx=disabled \ -Ddri3=enabled LDFLAGS_i386= -Wl,-znotext MESON_ARGS+= -Dgallium-va=enabled .if ${ARCH} != amd64 MESON_ARGS+= -Dintel-rt=disabled # https://gitlab.freedesktop.org/mesa/mesa/-/issues/10629 .endif +.for _gd in ${OPTIONS_GROUP_GALLIUM} +. if defined(GALLIUM_DRIVERS) && ${GALLIUM_DRIVERS:M${_gd}} +PLIST_SUB+= ${_gd}="" +. else +PLIST_SUB+= ${_gd}="@comment " +. endif +.endfor + .if ${PORT_OPTIONS:MX11} MESON_ARGS+= -Dplatforms="x11" .else MESON_ARGS+= -Dglx=disabled \ -Degl=disabled \ -Dopengl=false \ -Dshared-glapi=disabled \ -Dxlib-lease=disabled \ -Dplatforms="" .endif .include diff --git a/graphics/mesa-gallium-va/pkg-plist b/graphics/mesa-gallium-va/pkg-plist index f8a847c7bff0..1d4632cf7d73 100644 --- a/graphics/mesa-gallium-va/pkg-plist +++ b/graphics/mesa-gallium-va/pkg-plist @@ -1,23 +1,23 @@ @comment include/EGL/egl.h @comment include/EGL/eglext.h @comment include/EGL/eglext_angle.h @comment include/EGL/eglmesaext.h @comment include/EGL/eglplatform.h @comment include/GL/gl.h @comment include/GL/glcorearb.h @comment include/GL/glext.h @comment include/GL/internal/dri_interface.h @comment include/KHR/khrplatform.h @comment lib/dri/r600_dri.so -lib/dri/r600_drv_video.so +%%r600%%lib/dri/r600_drv_video.so @comment lib/dri/radeonsi_dri.so -lib/dri/radeonsi_drv_video.so +%%radeonsi%%lib/dri/radeonsi_drv_video.so @comment lib/libEGL.so @comment lib/libEGL.so.1 @comment lib/libEGL.so.1.0.0 @comment lib/libglapi.so @comment lib/libglapi.so.0 @comment lib/libglapi.so.0.0.0 @comment libdata/pkgconfig/dri.pc @comment libdata/pkgconfig/egl.pc @comment share/drirc.d/00-mesa-defaults.conf diff --git a/graphics/mesa-gallium-vdpau/Makefile b/graphics/mesa-gallium-vdpau/Makefile index 23dce3055494..a4d2f06c89db 100644 --- a/graphics/mesa-gallium-vdpau/Makefile +++ b/graphics/mesa-gallium-vdpau/Makefile @@ -1,52 +1,74 @@ PORTNAME= mesa-gallium-vdpau PORTVERSION= ${MESAVERSION} CATEGORIES= graphics COMMENT= Mesa Gallium VDPAU drivers WWW= https://www.mesa3d.org/ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/docs/license.rst -ONLY_FOR_ARCHS= aarch64 amd64 powerpc64 powerpc64le +ONLY_FOR_ARCHS= aarch64 i386 amd64 powerpc64 powerpc64le ONLY_FOR_ARCHS_REASON= used only by AMD/Radeon hardware BUILD_DEPENDS= libvdpau>=0:multimedia/libvdpau LIB_DEPENDS= libzstd.so:archivers/zstd USES= llvm:lib,noexport xorg USE_XORG= xorgproto x11 xcb xdamage xext xfixes xshmfence xxf86vm xrandr +OPTIONS_GROUP= GALLIUM +OPTIONS_SUB= yes + +OPTIONS_GROUP_GALLIUM= radeonsi r600 +GALLIUM_DESC= Gallium Video Drivers +radeonsi_DESC= AMD/ATI Southern Islands and newer +r600_DESC= AMD/ATI R600, R700, Evergreen, Northern Islands +OPTIONS_EXCLUDE+= ${ARCH:Mi386:C/.+/radeonsi/} + +MESON_ARGS+= -Dgallium-drivers=${GALLIUM_DRIVERS:ts,} +. for _gd in ${OPTIONS_GROUP_GALLIUM} +OPTIONS_DEFAULT+= ${_gd} +${_gd}_VARS+= GALLIUM_DRIVERS+=${_gd} +. endfor + .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" -MESON_ARGS+= -Dgallium-drivers="r600,radeonsi" \ - -Dvulkan-drivers="" \ +MESON_ARGS+= -Dvulkan-drivers="" \ -Dandroid-libbacktrace=disabled \ -Dgallium-va=disabled \ -Dgallium-omx=disabled \ -Dgallium-xa=disabled \ -Dgallium-opencl=disabled \ -Dgallium-nine=false \ -Dgbm=disabled \ -Dgles1=disabled \ -Dgles2=disabled \ -Dglvnd=disabled \ -Dlmsensors=disabled \ -Dmicrosoft-clc=disabled \ -Dosmesa=false \ -Dvalgrind=disabled \ -Dglx=disabled \ -Ddri3=enabled LDFLAGS_i386= -Wl,-znotext MESON_ARGS+= -Dplatforms="x11" \ -Dgallium-vdpau=enabled .if ${ARCH} != amd64 MESON_ARGS+= -Dintel-rt=disabled # https://gitlab.freedesktop.org/mesa/mesa/-/issues/10629 .endif +.for _gd in ${OPTIONS_GROUP_GALLIUM} +. if defined(GALLIUM_DRIVERS) && ${GALLIUM_DRIVERS:M${_gd}} +PLIST_SUB+= ${_gd}="" +. else +PLIST_SUB+= ${_gd}="@comment " +. endif +.endfor + .include diff --git a/graphics/mesa-gallium-vdpau/pkg-plist b/graphics/mesa-gallium-vdpau/pkg-plist index 4d88ba1194b7..8d03b4978739 100644 --- a/graphics/mesa-gallium-vdpau/pkg-plist +++ b/graphics/mesa-gallium-vdpau/pkg-plist @@ -1,32 +1,32 @@ @comment include/EGL/egl.h @comment include/EGL/eglext.h @comment include/EGL/eglext_angle.h @comment include/EGL/eglmesaext.h @comment include/EGL/eglplatform.h @comment include/GL/gl.h @comment include/GL/glcorearb.h @comment include/GL/glext.h @comment include/GL/internal/dri_interface.h @comment include/KHR/khrplatform.h @comment lib/dri/r300_dri.so @comment lib/dri/r600_dri.so @comment lib/dri/r600_drv_video.so @comment lib/dri/radeonsi_dri.so @comment lib/dri/radeonsi_drv_video.so @comment lib/libEGL.so @comment lib/libEGL.so.1 @comment lib/libEGL.so.1.0.0 @comment lib/libglapi.so @comment lib/libglapi.so.0 @comment lib/libglapi.so.0.0.0 -lib/vdpau/libvdpau_r600.so -lib/vdpau/libvdpau_r600.so.1 -lib/vdpau/libvdpau_r600.so.1.0 -lib/vdpau/libvdpau_r600.so.1.0.0 -lib/vdpau/libvdpau_radeonsi.so -lib/vdpau/libvdpau_radeonsi.so.1 -lib/vdpau/libvdpau_radeonsi.so.1.0 -lib/vdpau/libvdpau_radeonsi.so.1.0.0 +%%r600%%lib/vdpau/libvdpau_r600.so +%%r600%%lib/vdpau/libvdpau_r600.so.1 +%%r600%%lib/vdpau/libvdpau_r600.so.1.0 +%%r600%%lib/vdpau/libvdpau_r600.so.1.0.0 +%%radeonsi%%lib/vdpau/libvdpau_radeonsi.so +%%radeonsi%%lib/vdpau/libvdpau_radeonsi.so.1 +%%radeonsi%%lib/vdpau/libvdpau_radeonsi.so.1.0 +%%radeonsi%%lib/vdpau/libvdpau_radeonsi.so.1.0.0 @comment libdata/pkgconfig/dri.pc @comment libdata/pkgconfig/egl.pc @comment share/drirc.d/00-mesa-defaults.conf