diff --git a/graphics/mesa-dri/Makefile b/graphics/mesa-dri/Makefile index f9ba777266c4..b656f81d0a7d 100644 --- a/graphics/mesa-dri/Makefile +++ b/graphics/mesa-dri/Makefile @@ -1,114 +1,108 @@ PORTNAME= mesa-dri PORTVERSION= ${MESAVERSION} +PORTREVISION= 1 CATEGORIES= graphics COMMENT= OpenGL hardware acceleration drivers for DRI2+ WWW= https://www.mesa3d.org/ LIB_DEPENDS+= libglapi.so:graphics/mesa-libs USES+= llvm:lib,noexport OPTIONS_GROUP= PLATFORM -OPTIONS_GROUP_PLATFORM= PLATFORM_X11 PLATFORM_WAYLAND -PLATFORM_X11_DESC= Enable X11 support for GBM/EGL -PLATFORM_WAYLAND_DESC= Enable Wayland support for GBM/EGL -PLATFORM_WAYLAND_IMPLIES= WAYLAND - -OPTIONS_DEFINE= WAYLAND ZSTD -OPTIONS_DEFAULT= WAYLAND PLATFORM_X11 PLATFORM_WAYLAND ZSTD +OPTIONS_GROUP_PLATFORM= X11 WAYLAND +X11_DESC= Enable X11 support for GBM/EGL +WAYLAND_DESC= Enable Wayland support for GBM/EGL and Vulkan +WAYLAND_BUILD_DEPENDS= wayland-protocols>=1.8:graphics/wayland-protocols +WAYLAND_LIB_DEPENDS= libwayland-client.so:graphics/wayland + +OPTIONS_DEFINE= ZSTD +OPTIONS_DEFAULT= WAYLAND X11 ZSTD OPTIONS_SUB= yes -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 -WAYLAND_IMPLIES= PLATFORM_WAYLAND - ZSTD_DESC= Use ZSTD for shader cache ZSTD_LIB_DEPENDS= libzstd.so:archivers/zstd ZSTD_MESON_ENABLED= zstd .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" ALL_GALLIUM_DRIVERS= CROCUS I915 IRIS PANFROST R300 R600 RADEONSI SVGA \ SWRAST ZINK ALL_VULKAN_DRIVERS= INTEL AMD SWRAST GALLIUM_DRIVERS+= SWRAST \ ZINK VULKAN_DRIVERS+= SWRAST # lavapipe .if ${ARCH} == aarch64 GALLIUM_DRIVERS+= PANFROST .endif .if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH} == i386 \ || ${ARCH:Mpowerpc*} || ${ARCH} == riscv64 GALLIUM_DRIVERS+= R300 R600 RADEONSI VULKAN_DRIVERS+= AMD BUILD_DEPENDS+= glslangValidator:graphics/glslang .endif .if ${ARCH} == amd64 || ${ARCH} == i386 GALLIUM_DRIVERS+= CROCUS I915 IRIS SVGA VULKAN_DRIVERS+= INTEL .endif LDFLAGS_i386= -Wl,-znotext -.if ${PORT_OPTIONS:MPLATFORM_X11} +.if ${PORT_OPTIONS:MX11} MESA_PLATFORMS+= x11 -USE_XORG+= xorgproto x11 xdamage xext xfixes xshmfence xv -.if defined(VULKAN_DRIVERS) -USE_XORG+= xcb xrandr -.endif +USE_XORG+= xcb xorgproto xrandr x11 xdamage xext xfixes xshmfence xv .endif -.if ${PORT_OPTIONS:MPLATFORM_WAYLAND} +.if ${PORT_OPTIONS:MWAYLAND} MESA_PLATFORMS+= wayland .endif MESON_ARGS+= -Dgallium-drivers="${GALLIUM_DRIVERS:ts,:tl}" \ -Dvulkan-drivers="${VULKAN_DRIVERS:ts,:tl}" \ -Dplatforms="${MESA_PLATFORMS:ts,:tl}" # Vulkan Video extensions (keep in sync with mesa-gallium-va) MESON_ARGS+= -Dvideo-codecs="vc1dec,h264dec,h264enc,h265dec,h265enc,av1dec,av1enc,vp9dec" # Disable some options MESON_ARGS+= -Dandroid-libbacktrace=disabled \ -Dgallium-xa=disabled \ -Dgallium-vdpau=disabled \ -Dgallium-va=disabled \ -Dgles1=enabled \ -Dgles2=enabled \ -Dglx=disabled \ -Degl=enabled \ -Dlmsensors=disabled \ -Dmicrosoft-clc=disabled \ -Dosmesa=false \ -Dvalgrind=disabled .for _gd in ${ALL_GALLIUM_DRIVERS} . if defined(GALLIUM_DRIVERS) && ${GALLIUM_DRIVERS:M${_gd}} PLIST_SUB+= ${_gd}_GDRIVER="" . else PLIST_SUB+= ${_gd}_GDRIVER="@comment " . endif .endfor PLIST_SUB += ARCH=${ARCH:S/amd/x86_/} .for _vd in ${ALL_VULKAN_DRIVERS} . if defined(VULKAN_DRIVERS) && ${VULKAN_DRIVERS:M${_vd}} PLIST_SUB+= ${_vd}_VDRIVER="" . else PLIST_SUB+= ${_vd}_VDRIVER="@comment " . endif .endfor post-install: @${RM} -r ${STAGEDIR}/etc/OpenCL ${INSTALL_DATA} ${FILESDIR}/01-freebsd.conf \ ${STAGEDIR}${PREFIX}/share/drirc.d .include diff --git a/graphics/mesa-dri/Makefile.common b/graphics/mesa-dri/Makefile.common index 6e9bb1fcf85f..66dde6177702 100644 --- a/graphics/mesa-dri/Makefile.common +++ b/graphics/mesa-dri/Makefile.common @@ -1,80 +1,80 @@ # Makefile.common - shared code between MesaLib ports. # # !!! Here be dragons !!! (they seem to be everywhere these days) # # Remember to upgrade the following ports everytime you bump MESAVERSION: # # - graphics/libosmesa # - graphics/mesa-dri # - graphics/mesa-libs # - lang/clover MESAVERSION= 24.0.9 MASTER_SITES= https://mesa.freedesktop.org/archive/ DISTFILES= mesa-${MESAVERSION}${EXTRACT_SUFX} PATCH_SITES= https://gitlab.freedesktop.org/mesa/mesa/-/commit/ PATCHFILES+= 4a253aae7ca437201d2a31d2a11a1a5434fe41f1.patch:-p1 # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26284 PATCHFILES+= 7c565db35d39bdbf4e4f867ea19f78b97c8c126f.patch:-p1 # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27184 MAINTAINER= x11@FreeBSD.org LICENSE= MIT LICENSE_FILE= ${WRKSRC}/docs/license.rst COMPONENT= ${PORTNAME:tl:C/^lib//:C/mesa-//} BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}mako>0:textproc/py-mako@${PY_FLAVOR} .if ${COMPONENT} != clover -.if ${PORT_OPTIONS:MPLATFORM_X11} +.if ${PORT_OPTIONS:MX11} USES+= xorg .endif .endif LIB_DEPENDS+= libdrm.so:graphics/libdrm .if ${COMPONENT} != osmesa LIB_DEPENDS+= libexpat.so:textproc/expat2 .endif USES+= compiler:c++11-lib bison meson pathfix pkgconfig \ python:build shebangfix tar:xz # only have one port to check with portscout. .if ${PORTNAME} != mesa-dri PORTSCOUT= ignore:1 .endif MASTERDIR= ${.CURDIR:H:H}/graphics/mesa-dri PATCHDIR= ${MASTERDIR}/files WRKSRC= ${WRKDIR}/mesa-${MESAVERSION} DESCR= ${.CURDIR}/pkg-descr PLIST= ${.CURDIR}/pkg-plist PKGHELP= ${.CURDIR}/pkg-help PKGINSTALL= ${.CURDIR}/pkg-install PKGDEINSTALL= ${.CURDIR}/pkg-deinstall .include BINARY_ALIAS+= python3=${PYTHON_VERSION} CONFIGURE_ENV+= LLVM_CONFIG=${LLVM_CONFIG} # Deal with unclean env if the user have elfutils installed # and build the port directly without poudriere .if exists(${LOCALBASE}/include/libelf.h) LIB_DEPENDS+= libelf.so:devel/elfutils MESON_ARGS+= -Dlibelf=enabled .else MESON_ARGS+= -Dlibelf=disabled .endif # Some symbols in mesa's linker version scripts are not always defined, # depending on configuration options. Suppress errors with lld >= 17 due to # these undefined symbols. LDFLAGS+= -Wl,--undefined-version LDFLAGS+= -Wl,-rpath=${LOCALBASE}/llvm${LLVM_VERSION}/lib MESON_ARGS+= -Dllvm=enabled \ -Dlibunwind=disabled diff --git a/graphics/mesa-libs/Makefile b/graphics/mesa-libs/Makefile index f0bb8f7ec8e7..c1e04551a089 100644 --- a/graphics/mesa-libs/Makefile +++ b/graphics/mesa-libs/Makefile @@ -1,83 +1,80 @@ PORTNAME= mesa-libs PORTVERSION= ${MESAVERSION} +PORTREVISION= 1 CATEGORIES= graphics COMMENT= OpenGL libraries that support GLX and EGL clients WWW= https://www.mesa3d.org/ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/docs/license.rst USES= llvm:noexport BUILD_DEPENDS= libglvnd>=0:graphics/libglvnd -OPTIONS_GROUP= PLATFORM -OPTIONS_GROUP_PLATFORM= PLATFORM_X11 PLATFORM_WAYLAND -PLATFORM_X11_DESC= Enable X11 support for GBM/EGL -PLATFORM_WAYLAND_DESC= Enable Wayland support for GBM/EGL -PLATFORM_WAYLAND_IMPLIES= WAYLAND - -OPTIONS_DEFINE= WAYLAND ZSTD -OPTIONS_DEFAULT=WAYLAND PLATFORM_X11 PLATFORM_WAYLAND ZSTD -OPTIONS_SUB= yes - -WAYLAND_DESC= Enable support for the Wayland platform in EGL +OPTIONS_GROUP= PLATFORM +OPTIONS_GROUP_PLATFORM= X11 WAYLAND +X11_DESC= Enable X11 support for GBM/EGL +WAYLAND_DESC= Enable Wayland support for GBM/EGL WAYLAND_BUILD_DEPENDS= wayland-protocols>=1.8:graphics/wayland-protocols WAYLAND_LIB_DEPENDS= libwayland-server.so:graphics/wayland -WAYLAND_IMPLIES= PLATFORM_WAYLAND + +OPTIONS_DEFINE= ZSTD +OPTIONS_DEFAULT= WAYLAND X11 ZSTD +OPTIONS_SUB= yes ZSTD_DESC= Use ZSTD for shader cache ZSTD_LIB_DEPENDS= libzstd.so:archivers/zstd ZSTD_MESON_ENABLED= zstd USE_LDCONFIG= yes .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" MESON_ARGS+= -Dandroid-libbacktrace=disabled \ -Dgallium-vdpau=disabled \ -Dgallium-omx=disabled \ -Dgallium-va=disabled \ -Dgallium-xa=disabled \ -Dgallium-nine=false \ -Dlmsensors=disabled \ -Dmicrosoft-clc=disabled \ -Dosmesa=false \ -Dtools="" \ -Dvalgrind=disabled \ -Degl=enabled \ -Dgbm=enabled \ -Dvulkan-drivers="" \ -Dglvnd=true # Building EGL and GBM requires a driver so add r300 MESON_ARGS+= -Dgallium-drivers="r300" -.if ${PORT_OPTIONS:MPLATFORM_X11} +.if ${PORT_OPTIONS:MX11} MESA_PLATFORMS+= x11 USE_XORG+= xorgproto x11 xcb xdamage xext \ xfixes xshmfence xxf86vm xrandr PLIST_SUB+= GLX="" .else MESON_ARGS+= -Dglx=disabled PLIST_SUB+= GLX="@comment " .endif -.if ${PORT_OPTIONS:MPLATFORM_WAYLAND} && ${PORT_OPTIONS:MWAYLAND} +.if ${PORT_OPTIONS:MWAYLAND} MESA_PLATFORMS+= wayland .endif MESON_ARGS+= -Dplatforms="${MESA_PLATFORMS:ts,:tl}" .if ${ARCH} == "i386" # PR230239 Fix the build for i386 when WITH_LLD_IS_LD is set LDFLAGS+=-Wl,-z,notext .endif post-install: # Fallback if GLX_EXT_libglvnd is missing or vendor library doesn't exist @${ECHO_CMD} "libGLX_indirect.so.0 libGLX_mesa.so.0" \ >${STAGEDIR}${PREFIX}/etc/libmap.d/mesa.conf .include