Index: head/graphics/mesa-dri/Makefile =================================================================== --- head/graphics/mesa-dri/Makefile (revision 538044) +++ head/graphics/mesa-dri/Makefile (revision 538045) @@ -1,126 +1,119 @@ # Created by: Eric Anholt # $FreeBSD$ PORTNAME= mesa-dri PORTVERSION= ${MESAVERSION} PORTREVISION= 1 CATEGORIES= graphics COMMENT= OpenGL hardware acceleration drivers for DRI2+ USES= xorg USE_XORG= xorgproto x11 xdamage xext xfixes xshmfence xv xvmc OPTIONS_DEFINE= VAAPI VDPAU WAYLAND OPTIONS_DEFAULT=WAYLAND OPTIONS_SUB= yes VAAPI_MESON_ON= -Dgallium-va=true VAAPI_LIB_DEPENDS= libva.so:multimedia/libva VAAPI_USE= XORG=xcb VDPAU_MESON_ON= -Dgallium-vdpau=true VDPAU_LIB_DEPENDS= libvdpau.so:multimedia/libvdpau 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 .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" ALL_DRI_DRIVERS= I915 I965 R100 R200 SWRAST ALL_GALLIUM_DRIVERS= FREEDRENO R300 R600 RADEONSI SVGA SWRAST VC4 ALL_VULKAN_DRIVERS= INTEL AMD .if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH:Marm*} || ${ARCH} == i386 || ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} GALLIUM_DRIVERS= SWRAST # llvmpipe .else GALLIUM_DRIVERS= "" .endif VULKAN_DRIVERS= # .if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH} == i386 \ || ${ARCH} == powerpc || ${ARCH} == powerpc64 DRI_DRIVERS+= R100 R200 GALLIUM_DRIVERS+= R300 R600 RADEONSI VULKAN_DRIVERS+= AMD MESON_ARGS+= -Dgallium-xvmc=true .endif .if ${ARCH} == amd64 || ${ARCH} == i386 DRI_DRIVERS+= I915 I965 GALLIUM_DRIVERS+= SVGA . if ${OPSYS} == FreeBSD EXTRA_PATCHES+= ${PATCHDIR}/extra-src_mesa_drivers_dri_i965_intel__screen.c . endif VULKAN_DRIVERS+= INTEL .elif ${ARCH} == aarch64 || ${ARCH} == armv6 || ${ARCH} == armv7 GALLIUM_DRIVERS+= FREEDRENO VC4 . if ${ARCH} == armv6 || ${ARCH} == armv7 EXTRA_PATCHES+= ${PATCHDIR}/extra-src_gallium_drivers_vc4_Makefile.in . endif .endif .if ${VULKAN_DRIVERS} BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}mako>0:textproc/py-mako@${PY_FLAVOR} USE_XORG+= xcb xrandr .endif LDFLAGS_i386= -Wl,-znotext -.if ${DRI_DRIVERS} || ${VULKAN_DRIVERS:MINTEL} -. if ${/usr/bin/ld:L:tA} != /usr/bin/ld.lld -# --build-id isn't supported by old GNU ld.bfd in base -USE_BINUTILS= yes -LDFLAGS+= -B${LOCALBASE}/bin -. endif -.endif # enables VK_KHR_wayland_surface in Vulkan drivers .if ${PORT_OPTIONS:MWAYLAND} && !empty(VULKAN_DRIVERS) MESON_ARGS+= -Dplatforms=x11,surfaceless,drm,wayland .endif MESON_ARGS+= -Ddri-drivers="${DRI_DRIVERS:ts,:tl}" \ -Dgallium-drivers="${GALLIUM_DRIVERS:ts,:tl}" \ -Dvulkan-drivers="${VULKAN_DRIVERS:ts,:tl}" # Disable some options MESON_ARGS+= -Dgallium-xa=false \ -Dgles1=false \ -Dgles2=false \ -Dglx=disabled \ -Degl=false \ -Dosmesa=none \ -Dtools="" .for _d in ${ALL_DRI_DRIVERS} . if ${DRI_DRIVERS:M${_d}} PLIST_SUB+= ${_d}_DRIVER="" . else PLIST_SUB+= ${_d}_DRIVER="@comment " . endif .endfor .for _gd in ${ALL_GALLIUM_DRIVERS} . if ${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 ${VULKAN_DRIVERS:M${_vd}} PLIST_SUB+= ${_vd}_VDRIVER="" . else PLIST_SUB+= ${_vd}_VDRIVER="@comment " . endif .endfor .include "${MASTERDIR}/Makefile.targets" post-install: @${RM} -r ${STAGEDIR}/etc/OpenCL .include Index: head/graphics/mesa-dri/Makefile.common =================================================================== --- head/graphics/mesa-dri/Makefile.common (revision 538044) +++ head/graphics/mesa-dri/Makefile.common (revision 538045) @@ -1,105 +1,110 @@ # 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 # # $FreeBSD$ MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/} MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/} MESABASEVERSION= 19.0.8 # if there is a subversion, don't include the '-' between 7.11-rc2. MESASUBVERSION= MASTER_SITES= https://mesa.freedesktop.org/archive/ \ https://mesa.freedesktop.org/archive/${MESABASEVERSION}/ \ ftp://ftp.freedesktop.org/pub/mesa/ \ ftp://ftp.freedesktop.org/pub/mesa/${MESABASEVERSION}/ DISTFILES= mesa-${MESADISTVERSION}${EXTRACT_SUFX} MAINTAINER= x11@FreeBSD.org COMPONENT= ${PORTNAME:tl:C/^lib//:C/mesa-//} BUILD_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/pthread-stubs.pc:devel/libpthread-stubs \ ${PYTHON_PKGNAMEPREFIX}mako>0:textproc/py-mako@${PY_FLAVOR} LIB_DEPENDS+= libexpat.so:textproc/expat2 .if ${COMPONENT} != clover USES+= xorg .endif .if ${COMPONENT} != osmesa LIB_DEPENDS+= libdrm.so:graphics/libdrm .endif .if ${COMPONENT} != libs LIB_DEPENDS+= libglapi.so:graphics/mesa-libs .endif .if ${ARCH} == amd64 || ${ARCH} == i386 LIB_DEPENDS+= libunwind.so:devel/libunwind .endif .if ${OPSYS} == DragonFly LIB_DEPENDS+= libelf.so:devel/libelf .endif USES+= compiler:c++11-lib bison meson pathfix pkgconfig \ python:3.6+,build shebangfix tar:xz USE_LDCONFIG= yes +.if ${/usr/bin/ld:L:tA} != /usr/bin/ld.lld +# --build-id isn't supported by old GNU ld.bfd in base +# Also ld.bfd have problems that seems related to --as-needed +USE_BINUTILS= yes +LDFLAGS+= -B${LOCALBASE}/bin +.endif + # only have one port to check with portscout. .if ${PORTNAME} != mesa-dri PORTSCOUT= ignore:1 .endif python_OLD_CMD= /usr/bin/env[[:space:]]python2 /usr/bin/python2 /bin/env[[:space:]]python SHEBANG_FILES= src/gallium/*/*/*.py src/gallium/tools/trace/*.py \ src/gallium/drivers/svga/svgadump/svga_dump.py \ src/mapi/glapi/gen/*.py src/mapi/mapi_abi.py \ src/util/xmlpool/gen_xmlpool.py \ src/mesa/main/get_*.py src/util/format_srgb.py \ src/amd/*/*.py src/intel/genxml/gen_pack_header.py MASTERDIR= ${.CURDIR:H:H}/graphics/mesa-dri PATCHDIR= ${MASTERDIR}/files WRKSRC= ${WRKDIR}/mesa-${MESADISTVERSION} DESCR= ${.CURDIR}/pkg-descr PLIST= ${.CURDIR}/pkg-plist PKGHELP= ${.CURDIR}/pkg-help PKGINSTALL= ${.CURDIR}/pkg-install PKGDEINSTALL= ${.CURDIR}/pkg-deinstall INSTALL_TARGET= install-strip .include .if ${ARCH} == powerpc64 LLVM_DEFAULT= 90 .elif ${LLVM_DEFAULT:C/[1-5]./&0/:S,-devel,990,} >= 90 LLVM_DEFAULT= 80 .endif - -LDFLAGS+= -fuse-ld=lld BINARY_ALIAS+= python3=${PYTHON_VERSION} .if ${ARCH} == sparc64 MESON_ARGS+= -Dllvm=false .else BUILD_DEPENDS+= llvm${LLVM_DEFAULT}>=3.9.0_4:devel/llvm${LLVM_DEFAULT} .if ${COMPONENT} != libs RUN_DEPENDS+= llvm${LLVM_DEFAULT}>=3.9.0_4:devel/llvm${LLVM_DEFAULT} .endif BINARY_ALIAS+= llvm-config=llvm-config${LLVM_DEFAULT} LDFLAGS+= -Wl,-rpath=${LOCALBASE}/llvm${LLVM_DEFAULT}/lib MESON_ARGS+= -Dllvm=true .endif # we don't care about GLes v1 MESON_ARGS+= -Dgles1=false Index: head/graphics/mesa-dri/files/patch-meson.build =================================================================== --- head/graphics/mesa-dri/files/patch-meson.build (revision 538044) +++ head/graphics/mesa-dri/files/patch-meson.build (revision 538045) @@ -1,47 +1,35 @@ - Do not define GLX_USE_TLS, this doesn't work on all FreeBSD version Later mesa version rename this to USE_ELF_TLS and make it conditional on some platform, but for now simply comment it here. See https://github.com/dumbbell/test-tls-initial-exec for more info - Add dependency on libxv for xvmc, this is fixed in later mesa version. ---- meson.build.orig 2019-06-26 20:14:08 UTC +--- meson.build.orig 2020-06-05 18:23:59 UTC +++ meson.build @@ -25,7 +25,7 @@ project( [find_program('python', 'python2', 'python3'), 'bin/meson_get_version.py'] ).stdout(), license : 'MIT', - meson_version : '>= 0.45', + meson_version : '>= 0.46', default_options : ['buildtype=debugoptimized', 'b_ndebug=if-release', 'c_std=c99', 'cpp_std=c++11'] ) @@ -336,7 +336,7 @@ if with_egl and not (with_platform_drm or with_platfor endif endif -pre_args += '-DGLX_USE_TLS' +#pre_args += '-DGLX_USE_TLS' if with_glx != 'disabled' if not (with_platform_x11 and with_any_opengl) error('Cannot build GLX support without X11 platform support and at least one OpenGL API') @@ -458,7 +458,8 @@ dep_xvmc = null_dep with_gallium_xvmc = false if _xvmc != 'false' dep_xvmc = dependency('xvmc', version : '>= 1.0.6', required : _xvmc == 'true') - with_gallium_xvmc = dep_xvmc.found() + dep_xv = dependency('xv', required: _xvmc == 'true') + with_gallium_xvmc = dep_xvmc.found() and dep_xv.found() endif xvmc_drivers_path = get_option('xvmc-libs-path') -@@ -1053,10 +1054,7 @@ if cc.links('int main() { return 0; }', - name : 'dynamic-list') - with_ld_dynamic_list = true - endif --ld_args_build_id = [] --if build_machine.system() != 'darwin' -- ld_args_build_id += '-Wl,--build-id=sha1' --endif -+ld_args_build_id = cc.get_supported_link_arguments('-Wl,--build-id=sha1') - - # check for dl support - if cc.has_function('dlopen')