diff --git a/graphics/mesa-devel/Makefile b/graphics/mesa-devel/Makefile index d371f653f239..ab036c3aca96 100644 --- a/graphics/mesa-devel/Makefile +++ b/graphics/mesa-devel/Makefile @@ -1,161 +1,160 @@ # $FreeBSD$ PORTNAME= mesa -DISTVERSION= 20.3-branchpoint-1033 -DISTVERSIONSUFFIX= -gd3c67d7e7ec +DISTVERSION= 20.3-branchpoint-1120 +DISTVERSIONSUFFIX= -gef9362acb81 CATEGORIES= graphics PKGNAMESUFFIX= -devel PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ PATCHFILES+= 9f52b5177728.patch:-p1 # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1598 PATCHFILES+= 2b9168cf579b.patch:-p1 # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1598 PATCHFILES+= 55822330540d.patch:-p1 # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1598 PATCHFILES+= f6c7569ad9ea.patch:-p1 # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1598 PATCHFILES+= cb8f7a253934.patch:-p1 # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3568 PATCHFILES+= 700efacda59c.patch:-p1 PATCHFILES+= 4ed6d957f689.patch:-p1 # https://gitlab.freedesktop.org/mesa/mesa/-/issues/966#note_394512 PATCHFILES+= 167fa293d7b7.patch:-p1 # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5464 PATCHFILES+= 19e001833ec1.patch:-p1 # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7778 -PATCHFILES+= 789f6a802b0c.patch:-p1 # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7887 MAINTAINER= jbeich@FreeBSD.org COMMENT= Bleeding edge Mesa drivers (OpenGL, Vulkan) LICENSE= MIT ONLY_FOR_ARCHS= aarch64 amd64 i386 powerpc64 powerpc64le ONLY_FOR_ARCHS_REASON= Limited scope: no old drivers and no software rendering. \ See also https://mesamatrix.net/ BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}mako>0:textproc/py-mako@${PY_FLAVOR} LIB_DEPENDS= libdrm.so:graphics/libdrm \ libexpat.so:textproc/expat2 .if !exists(/usr/lib/libelf.so) # DragonFly doesn't install it yet LIB_DEPENDS+= libelf.so:devel/libelf .endif USES= bison compiler:c++11-lib meson pkgconfig python:3.6+,build shebangfix USE_GITHUB= yes GH_ACCOUNT= mesa3d USE_LDCONFIG= yes BINARY_ALIAS= python=${PYTHON_CMD} SHEBANG_FILES= src/vulkan/overlay-layer/${PORTNAME}-overlay-control.py MESON_ARGS= -Dgallium-omx=disabled \ -Dgallium-opencl=disabled \ -Dgallium-xa=disabled \ -Dgallium-xvmc=disabled \ -Dplatforms=${PLATFORMS:O:[-1..1]:ts,} \ ${BINARY_ALIAS:D--native-file=binary_alias.ini} \ ${NULL} PLIST_SUB= ARCH=${ARCH:S/amd/x86_/} .if exists(/usr/bin/ld.lld) && ${/usr/bin/ld:L:tA} != /usr/bin/ld.lld # --build-id isn't supported by old GNU ld.bfd in base LDFLAGS+= -fuse-ld=lld .endif OPTIONS_DEFINE= ${OPTIONS_MULTI} LIBUNWIND LLVM VAAPI VDPAU WAYLAND X11 ZSTD OPTIONS_DEFAULT= ${OPTIONS_MULTI} LIBUNWIND LLVM VAAPI VDPAU WAYLAND X11 ZSTD OPTIONS_MULTI= DRI GALLIUM VULKAN OPTIONS_MULTI_DRI= i965 OPTIONS_MULTI_GALLIUM= iris r600 radeonsi OPTIONS_MULTI_VULKAN= anv radv OPTIONS_EXCLUDE_DragonFly= LIBUNWIND anv OPTIONS_EXCLUDE+= ${ARCH:Namd64:Ni386:Nx86_64:C/.+/anv i965 iris/} OPTIONS_EXCLUDE+= ${ARCH:Naarch64:Namd64:Ni386:Npowerpc64:Nx86_64:C/.+/LIBUNWIND/} OPTIONS_EXCLUDE+= ${"${GL_DEFAULT:S/,/ /g:[-1]}"==${.CURDIR:T}:?COINST:} OPTIONS_EXCLUDE+= ${"${GL_DEFAULT:S/,/ /g:[1]}"!=libglvnd:?GLVND:} OPTIONS_SLAVE+= ${"${GL_DEFAULT:S/,/ /g:[-1]}"!=${.CURDIR:T}:?COINST:} OPTIONS_SLAVE+= ${"${GL_DEFAULT:S/,/ /g:[1]}"==libglvnd:?GLVND:} OPTIONS_SUB= yes # Convert options to -D-drivers= .for i in ${OPTIONS_MULTI} MESON_ARGS+= -D${i:tl}-drivers=${${i}_DRIVERS:ts,} . for j in ${OPTIONS_MULTI_${i}} OPTIONS_DEFAULT+= ${j} ${j}_VARS+= ${i}_DRIVERS+=${j:S/anv/intel/:S/radv/amd/} . endfor .endfor DRI_DESC= Classic OpenGL drivers i965_DESC= GMA 3000 (Gen4) and newer GALLIUM_DESC= Unified OpenGL drivers iris_DESC= Broadwell and newer r600_DESC= R600, R700, Evergreen, Northern Islands radeonsi_DESC= Southern Islands and newer COINST_DESC= Allow co-installation with another Mesa port COINST_VARS= LLVM_DEFAULT=10 # chase mesa-dri COINST_MESON_ON= -Degl-lib-suffix=${PKGNAMESUFFIX} COINST_PLIST_SUB= SUFFIX=${PKGNAMESUFFIX} COINST_SUB_FILES= libmap.conf COINST_SUB_LIST= SUFFIX=${PKGNAMESUFFIX} COINST_PLIST_SUB_OFF= SUFFIX= GLVND_DESC= GL Vendor-Neutral Dispatch support GLVND_BUILD_DEPENDS= libglvnd>=1.3.2:graphics/libglvnd GLVND_MESON_TRUE= glvnd LIBUNWIND_DESC= Use libunwind for stacktraces LIBUNWIND_LIB_DEPENDS= libunwind.so:devel/libunwind LIBUNWIND_MESON_ENABLED= libunwind LLVM_DESC= Build with LLVM support LLVM_LIB_DEPENDS= libLLVM-${LLVM_DEFAULT:C/^([6-9])0/\1/:S/-devel/12/}.so:devel/llvm${LLVM_DEFAULT} LLVM_MESON_ENABLED= llvm LLVM_BINARY_ALIAS= llvm-config=llvm-config${LLVM_DEFAULT} .for i in r600 radeonsi radv ${i}_IMPLIES+= LLVM .endfor VAAPI_BUILD_DEPENDS= libva>0:multimedia/libva VAAPI_MESON_ENABLED= gallium-va VDPAU_BUILD_DEPENDS= libvdpau>0:multimedia/libvdpau VDPAU_MESON_ENABLED= gallium-vdpau VULKAN_DESC= Vulkan drivers and layers VULKAN_BUILD_DEPENDS= glslangValidator:devel/glslang VULKAN_MESON_TRUE= vulkan-device-select-layer vulkan-overlay-layer anv_DESC= Haswell and newer radv_DESC= Southern Islands and newer WAYLAND_BUILD_DEPENDS= wayland-protocols>0:graphics/wayland-protocols WAYLAND_LIB_DEPENDS= libwayland-server.so:graphics/wayland WAYLAND_VARS= PLATFORMS+=wayland X11_USES= xorg X11_USE= XORG=x11,xcb,xdamage,xext,xfixes,xorgproto,xrandr,xshmfence,xxf86vm X11_VARS= PLATFORMS+=x11 X11_MESON_OFF= -Dglx=disabled ZSTD_DESC= Use ZSTD for shader cache ZSTD_LIB_DEPENDS= libzstd.so:archivers/zstd ZSTD_MESON_ENABLED= zstd post-extract: # Work around Meson lookup order e.g., llvm-config .if defined(BINARY_ALIAS) @${ECHO_CMD} '[binaries]' >${WRKSRC}/binary_alias.ini @for f in ${BINARY_ALIAS}; do \ ${ECHO_CMD} "$${f%%=*} = '$${f#*=}'"; \ done >>${WRKSRC}/binary_alias.ini .endif post-patch: # Extract (snapshot) version from the port instead of empty string @${REINPLACE_CMD} '/MESA_GIT_SHA1/s/""/" (git-${DISTVERSIONSUFFIX:C/.*-g//})"/' \ ${WRKSRC}/bin/git_sha1_gen.py post-patch-COINST-on: @${MV} ${WRKSRC}/src/util/00-${PORTNAME}-defaults.conf \ ${WRKSRC}/src/util/00-${PKGBASE}-defaults.conf post-install-COINST-on: @${INSTALL_DATA} ${WRKDIR}/libmap.conf \ ${STAGEDIR}${PREFIX}/etc/libmap.d/${PKGBASE}.conf.sample .include diff --git a/graphics/mesa-devel/distinfo b/graphics/mesa-devel/distinfo index 741ba45125b5..c4d596e9b83b 100644 --- a/graphics/mesa-devel/distinfo +++ b/graphics/mesa-devel/distinfo @@ -1,23 +1,21 @@ -TIMESTAMP = 1606941813 -SHA256 (mesa3d-mesa-20.3-branchpoint-1033-gd3c67d7e7ec_GH0.tar.gz) = a49a3ce78962d16c78999eda36e420254d19e567ef3ff97520be8b88b71f1e83 -SIZE (mesa3d-mesa-20.3-branchpoint-1033-gd3c67d7e7ec_GH0.tar.gz) = 22359853 +TIMESTAMP = 1607126460 +SHA256 (mesa3d-mesa-20.3-branchpoint-1120-gef9362acb81_GH0.tar.gz) = 06651320bf43679d7775519f2ca1b67b7218577fe6e96980377f53f0aaf2507b +SIZE (mesa3d-mesa-20.3-branchpoint-1120-gef9362acb81_GH0.tar.gz) = 22452260 SHA256 (9f52b5177728.patch) = d4f380b8872726b88c1aa75d0a9cb63adf79144a7c34da6b7fd525ea417d2b73 SIZE (9f52b5177728.patch) = 832 SHA256 (2b9168cf579b.patch) = 2c664de141894b21368abab34fb1a1671d68845551520c9acb7dd5f1d0125072 SIZE (2b9168cf579b.patch) = 1575 SHA256 (55822330540d.patch) = fc776fee1d59f743a060ad1f78e1d9eba8826beb1fe7abef1734a407734b6109 SIZE (55822330540d.patch) = 1278 SHA256 (f6c7569ad9ea.patch) = 481784ca37e35549bf265e21eee1b9a29d2b0b8d3294de1d5b6b83a84f3d7a9b SIZE (f6c7569ad9ea.patch) = 1653 SHA256 (cb8f7a253934.patch) = 9e914ac8325ce15ab0cc38610e72b683f958114c57402d3a948c7533fce65393 SIZE (cb8f7a253934.patch) = 3512 SHA256 (700efacda59c.patch) = f034cfbe09edff0baba67e46e7e3812fdef73ff3cf3e579050c024c95234c8d5 SIZE (700efacda59c.patch) = 981 SHA256 (4ed6d957f689.patch) = 36b5383a369c35fb609b38ceb8893d6ca4d8440371757168ba03a65a425ccab5 SIZE (4ed6d957f689.patch) = 41008 SHA256 (167fa293d7b7.patch) = cc3ad8e59d5d4d7380917e715f676abba65549b07e377dbf6fcec5c294915360 SIZE (167fa293d7b7.patch) = 2496 SHA256 (19e001833ec1.patch) = 5ac28692c61dc3dcc5f7e74a8053d63365fc28fb28136ddb11791990a414f762 SIZE (19e001833ec1.patch) = 4057 -SHA256 (789f6a802b0c.patch) = cf31d0b04a4d134595adc04acbf861fc6e95a2f92c2f3343615f28bc09a441f3 -SIZE (789f6a802b0c.patch) = 868 diff --git a/graphics/mesa-devel/files/patch-suffix b/graphics/mesa-devel/files/patch-suffix index 116cff824df1..087c454c932e 100644 --- a/graphics/mesa-devel/files/patch-suffix +++ b/graphics/mesa-devel/files/patch-suffix @@ -1,162 +1,162 @@ Add library suffix to avoid conflict with mesa-libs + mesa-dri. Library selection is handled by libglvnd and/or libmap.conf. --- meson.build.orig 2020-05-30 21:28:01 UTC +++ meson.build @@ -79,7 +79,7 @@ with_imgui = with_intel_tools or with_vulkan_overlay_l dri_drivers_path = get_option('dri-drivers-path') if dri_drivers_path == '' - dri_drivers_path = join_paths(get_option('prefix'), get_option('libdir'), 'dri') + dri_drivers_path = join_paths(get_option('prefix'), get_option('libdir'), 'dri' + get_option('egl-lib-suffix')) endif dri_search_path = get_option('dri-search-path') if dri_search_path == '' @@ -427,9 +427,6 @@ if with_glvnd elif with_glx == 'disabled' and not with_egl error('glvnd requires DRI based GLX and/or EGL') endif - if get_option('egl-lib-suffix') != '' - error('''EGL lib suffix can't be used with libglvnd''') - endif endif if with_vulkan_icd_dir == '' @@ -491,7 +488,7 @@ if with_gallium_vdpau endif vdpau_drivers_path = get_option('vdpau-libs-path') if vdpau_drivers_path == '' - vdpau_drivers_path = join_paths(get_option('libdir'), 'vdpau') + vdpau_drivers_path = join_paths(get_option('libdir'), 'vdpau' + get_option('egl-lib-suffix')) endif if with_gallium_zink @@ -638,7 +635,7 @@ endif va_drivers_path = get_option('va-libs-path') if va_drivers_path == '' - va_drivers_path = join_paths(get_option('libdir'), 'dri') + va_drivers_path = join_paths(get_option('libdir'), 'dri' + get_option('egl-lib-suffix')) endif _xa = get_option('gallium-xa') --- src/amd/vulkan/meson.build.orig 2020-06-03 10:34:22 UTC +++ src/amd/vulkan/meson.build @@ -149,7 +149,7 @@ if with_platform_android endif libvulkan_radeon = shared_library( - 'vulkan_radeon', + 'vulkan_radeon' + get_option('egl-lib-suffix'), [libradv_files, radv_entrypoints, radv_extensions_c, amd_vk_format_table_c, sha1_h], include_directories : [ inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_amd, inc_amd_common, inc_amd_common_llvm, inc_compiler, inc_util, inc_vulkan_wsi, ---- src/egl/meson.build.orig 2020-05-30 21:28:01 UTC +--- src/egl/meson.build.orig 2020-12-03 22:36:27 UTC +++ src/egl/meson.build -@@ -147,7 +147,7 @@ if not with_glvnd +@@ -144,7 +144,7 @@ if not with_glvnd egl_lib_name = 'EGL' + get_option('egl-lib-suffix') egl_lib_version = '1.0.0' else -- egl_lib_name = 'EGL_mesa' -+ egl_lib_name = 'EGL_mesa' + get_option('egl-lib-suffix') +- egl_lib_name = 'EGL_@0@'.format(glvnd_vendor_name) ++ egl_lib_name = 'EGL_@0@'.format(glvnd_vendor_name) + get_option('egl-lib-suffix') egl_lib_version = '0.0.0' deps_for_egl += dep_glvnd files_egl += [g_egldispatchstubs_h, g_egldispatchstubs_c] --- src/gbm/backends/dri/gbm_dri.c.orig 2020-05-30 21:28:01 UTC +++ src/gbm/backends/dri/gbm_dri.c @@ -307,14 +307,6 @@ dri_bind_extensions(struct gbm_dri_device *dri, static const __DRIextension ** dri_open_driver(struct gbm_dri_device *dri) { - /* Temporarily work around dri driver libs that need symbols in libglapi - * but don't automatically link it in. - */ - /* XXX: Library name differs on per platforms basis. Update this as - * osx/cygwin/windows/bsd gets support for GBM.. - */ - dlopen("libglapi.so.0", RTLD_LAZY | RTLD_GLOBAL); - static const char *search_path_vars[] = { /* Read GBM_DRIVERS_PATH first for compatibility, but LIBGL_DRIVERS_PATH * is recommended over GBM_DRIVERS_PATH. --- src/gbm/meson.build.orig 2020-05-30 21:28:01 UTC +++ src/gbm/meson.build @@ -44,7 +44,7 @@ if with_platform_wayland endif libgbm = shared_library( - 'gbm', + 'gbm' + get_option('egl-lib-suffix'), files_gbm, include_directories : incs_gbm, c_args : [c_vis_args, args_gbm], ---- src/glx/meson.build.orig 2020-05-30 21:28:01 UTC +--- src/glx/meson.build.orig 2020-12-03 22:36:27 UTC +++ src/glx/meson.build -@@ -113,10 +113,10 @@ elif with_dri_platform == 'windows' +@@ -108,10 +108,10 @@ elif with_dri_platform == 'windows' endif if not with_glvnd - gl_lib_name = 'GL' + gl_lib_name = 'GL' + get_option('egl-lib-suffix') gl_lib_version = '1.2.0' else -- gl_lib_name = 'GLX_mesa' -+ gl_lib_name = 'GLX_mesa' + get_option('egl-lib-suffix') +- gl_lib_name = 'GLX_@0@'.format(glvnd_vendor_name) ++ gl_lib_name = 'GLX_@0@'.format(glvnd_vendor_name) + get_option('egl-lib-suffix') gl_lib_version = '0.0.0' files_libglx += files( 'g_glxglvnddispatchfuncs.c', --- src/intel/vulkan/meson.build.orig 2020-05-30 21:28:01 UTC +++ src/intel/vulkan/meson.build @@ -188,7 +188,7 @@ libanv_common = static_library( ) libvulkan_intel = shared_library( - 'vulkan_intel', + 'vulkan_intel' + get_option('egl-lib-suffix'), [files('anv_gem.c'), anv_entrypoints[0], anv_extensions_h], include_directories : [ inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_intel, inc_compiler, inc_vulkan_wsi, --- src/mapi/es1api/meson.build.orig 2020-05-30 21:28:01 UTC +++ src/mapi/es1api/meson.build @@ -33,7 +33,7 @@ if with_platform_windows endif libglesv1_cm = shared_library( - 'GLESv1_CM' + get_option('gles-lib-suffix'), + 'GLESv1_CM' + get_option('egl-lib-suffix') + get_option('gles-lib-suffix'), ['../entry.c', es1_glapi_mapi_tmp_h], c_args : [ c_msvc_compat_args, --- src/mapi/es2api/meson.build.orig 2020-05-30 21:28:01 UTC +++ src/mapi/es2api/meson.build @@ -33,7 +33,7 @@ if with_platform_windows endif libgles2 = shared_library( - 'GLESv2' + get_option('gles-lib-suffix'), + 'GLESv2' + get_option('egl-lib-suffix') + get_option('gles-lib-suffix'), ['../entry.c', es2_glapi_mapi_tmp_h], c_args : [ c_msvc_compat_args, --- src/mapi/shared-glapi/meson.build.orig 2020-05-30 21:28:01 UTC +++ src/mapi/shared-glapi/meson.build @@ -42,7 +42,7 @@ if with_platform_windows endif libglapi = shared_library( - 'glapi', + 'glapi' + get_option('egl-lib-suffix'), [files_mapi_glapi, files_mapi_util, shared_glapi_mapi_tmp_h], c_args : [ _glapi_c_args, --- src/util/meson.build.orig 2020-05-30 21:28:01 UTC +++ src/util/meson.build @@ -122,7 +122,7 @@ files_mesa_util = files( 'xxhash.h', ) -files_drirc = files('00-mesa-defaults.conf') +files_drirc = files('00-mesa@0@-defaults.conf'.format(get_option('egl-lib-suffix'))) install_data(files_drirc, install_dir : join_paths(get_option('datadir'), 'drirc.d'))