Index: head/graphics/libosmesa/Makefile =================================================================== --- head/graphics/libosmesa/Makefile (revision 537997) +++ head/graphics/libosmesa/Makefile (revision 537998) @@ -1,37 +1,51 @@ # Created by: gahr # $FreeBSD$ PORTNAME= libosmesa PORTVERSION= ${MESAVERSION} CATEGORIES= graphics COMMENT= Off-Screen Mesa implementation of the OpenGL API USES= xorg USE_XORG= xorgproto .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" -CONFIGURE_ARGS+= --disable-dri --disable-egl --disable-gbm \ - --disable-gles2 --with-gallium-drivers=swrast -MESA_BUILD_WRKSRC= src/util src/compiler src/mapi src/mesa + +# Disable some options +MESON_ARGS+= -Ddri-drivers="" \ + -Dgallium-drivers=swrast \ + -Dvulkan-drivers="" \ + -Dplatforms="" \ + -Dgallium-vdpau=false \ + -Dgallium-omx=disabled \ + -Dgallium-va=false \ + -Dgallium-opencl=disabled \ + -Dgallium-xa=false \ + -Dgallium-xvmc=false \ + -Dgallium-nine=false \ + -Dgles1=false \ + -Dgles2=false \ + -Dopengl=false \ + -Dglx=disabled \ + -Degl=false \ + -Dgbm=false \ + -Dtools="" LDFLAGS_i386= -Wl,-znotext -.if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH:Marm*} || ${ARCH} == i386 || ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} -CONFIGURE_ARGS+= --enable-osmesa-gallium -MESA_BUILD_WRKSRC+= src/gallium -MESA_INSTALL_WRKSRC= src/gallium/state_trackers/osmesa src/gallium/targets/osmesa +.if ${ARCH} == sparc64 +MESON_ARGS+= -Dosmesa=classic .else -CONFIGURE_ARGS+= --enable-osmesa -MESA_INSTALL_WRKSRC= src/mesa/drivers/osmesa +MESON_ARGS+= -Dosmesa=gallium .endif .include "${MASTERDIR}/Makefile.targets" post-install: @${MKDIR} ${STAGEDIR}${PREFIX}/include/GL ${INSTALL_DATA} ${WRKSRC}/include/GL/osmesa.h \ ${STAGEDIR}${PREFIX}/include/GL .include Index: head/graphics/libosmesa/pkg-plist =================================================================== --- head/graphics/libosmesa/pkg-plist (revision 537997) +++ head/graphics/libosmesa/pkg-plist (revision 537998) @@ -1,5 +1,6 @@ include/GL/osmesa.h lib/libOSMesa.so lib/libOSMesa.so.8 lib/libOSMesa.so.8.0.0 libdata/pkgconfig/osmesa.pc +@comment share/drirc.d/00-mesa-defaults.conf Index: head/graphics/libxatracker/Makefile =================================================================== --- head/graphics/libxatracker/Makefile (revision 537997) +++ head/graphics/libxatracker/Makefile (revision 537998) @@ -1,38 +1,43 @@ # Created by: johalun # $FreeBSD$ PORTNAME= libxatracker PORTVERSION= ${MESAVERSION} PORTREVISION= 2 CATEGORIES= graphics COMMENT= Mesa XA state tracker -USES= xorg +USES= xorg meson USE_XORG= xorgproto .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" ONLY_FOR_ARCHS= i386 amd64 ONLY_FOR_ARCHS_REASON= Used only by VMWare supported architectures -CONFIGURE_ARGS+= --disable-dri \ - --disable-egl \ - --disable-gbm \ - --disable-gles2 \ - --disable-glx \ - --disable-opengl \ - --disable-shared-glapi \ - --with-gallium-drivers= \ - --with-platforms= +MESON_ARGS+= -Ddri-drivers="" \ + -Dgallium-drivers="svga" \ + -Dvulkan-drivers="" \ + -Dgallium-vdpau=false \ + -Dgallium-omx=disabled \ + -Dgallium-va=false \ + -Dgallium-opencl=disabled \ + -Dgallium-xvmc=false \ + -Dgallium-nine=false \ + -Degl=false \ + -Dgbm=false \ + -Dgles2=false \ + -Dglx=disabled \ + -Dopengl=false \ + -Dshared-glapi=false \ + -Dosmesa=none \ + -Dplatforms= -MESA_BUILD_WRKSRC= src/util src/compiler LDFLAGS_i386= -Wl,-znotext -CONFIGURE_ARGS+= --enable-xa -MESA_BUILD_WRKSRC+= src/gallium -MESA_INSTALL_WRKSRC= src/gallium/state_trackers/xa src/gallium/targets/xa +MESA_ARGS+= -Dgallium-xa=true .include "${MASTERDIR}/Makefile.targets" .include Index: head/graphics/libxatracker/pkg-plist =================================================================== --- head/graphics/libxatracker/pkg-plist (revision 537997) +++ head/graphics/libxatracker/pkg-plist (revision 537998) @@ -1,7 +1,8 @@ include/xa_composite.h include/xa_context.h include/xa_tracker.h lib/libxatracker.so lib/libxatracker.so.2 lib/libxatracker.so.2.5.0 libdata/pkgconfig/xatracker.pc +@comment share/drirc.d/00-mesa-defaults.conf Index: head/graphics/mesa-dri/Makefile =================================================================== --- head/graphics/mesa-dri/Makefile (revision 537997) +++ head/graphics/mesa-dri/Makefile (revision 537998) @@ -1,115 +1,126 @@ # 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_CONFIGURE_ENABLE= va +VAAPI_MESON_ON= -Dgallium-va=true VAAPI_LIB_DEPENDS= libva.so:multimedia/libva VAAPI_USE= XORG=xcb -VDPAU_CONFIGURE_ENABLE= vdpau +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 RADEON R200 SWRAST +ALL_DRI_DRIVERS= I915 I965 R100 R200 SWRAST ALL_GALLIUM_DRIVERS= FREEDRENO R300 R600 RADEONSI SVGA SWRAST VC4 -ALL_VULKAN_DRIVERS= INTEL RADEON +ALL_VULKAN_DRIVERS= INTEL AMD -DRI_DRIVERS= SWRAST # classic swrast .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+= RADEON R200 +DRI_DRIVERS+= R100 R200 GALLIUM_DRIVERS+= R300 R600 RADEONSI -VULKAN_DRIVERS+= RADEON +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) -CONFIGURE_ARGS+= --with-platforms=x11,surfaceless,drm,wayland +MESON_ARGS+= -Dplatforms=x11,surfaceless,drm,wayland .endif -CONFIGURE_ARGS+= --with-dri-drivers="${DRI_DRIVERS:tl}" \ - --with-gallium-drivers="${GALLIUM_DRIVERS:tl}" \ - --with-vulkan-drivers="${VULKAN_DRIVERS:tl}" +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="" ARCH="${ARCH}" +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 537997) +++ head/graphics/mesa-dri/Makefile.common (revision 537998) @@ -1,109 +1,103 @@ # 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 +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 gettext-tools gmake libtool \ - localbase pathfix pkgconfig python:2.7,build shebangfix tar:xz +USES+= compiler:c++11-lib bison meson pathfix pkgconfig \ + python:3.6+,build shebangfix tar:xz + USE_LDCONFIG= yes -GNU_CONFIGURE= yes -CONFIGURE_ARGS+=--enable-autotools # 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 -.if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH:Marm*} || ${ARCH} == i386 || ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} +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 -CONFIGURE_ENV+= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${LLVM_DEFAULT} +BINARY_ALIAS+= llvm-config=llvm-config${LLVM_DEFAULT} LDFLAGS+= -Wl,-rpath=${LOCALBASE}/llvm${LLVM_DEFAULT}/lib -CONFIGURE_ARGS+= --enable-llvm -.else -CONFIGURE_ARGS+= --disable-llvm +MESON_ARGS+= -Dllvm=true .endif -# There are issues that need to be fixed to use TLS model "initial-exec" -# So stick with "global-dynamic"'s model for now. kan@ is working on a -# patch for rtld. We might want to backport global-dynamic or -# pthread_setspecific which it uses now by default. But since this -# configure switch is going away ... -# https://lists.freebsd.org/pipermail/freebsd-arch/2016-February/017699.html -CONFIGURE_ARGS+= --disable-glx-tls - # we don't care about GLes v1 -CONFIGURE_ARGS+= --disable-gles1 +MESON_ARGS+= -Dgles1=false Index: head/graphics/mesa-dri/Makefile.targets =================================================================== --- head/graphics/mesa-dri/Makefile.targets (revision 537997) +++ head/graphics/mesa-dri/Makefile.targets (revision 537998) @@ -1,36 +1,7 @@ # $FreeBSD$ # # this file holds common targets post-patch: -.if ${OPSYS} == FreeBSD - @${REINPLACE_CMD} -e 's|x86_64|amd64|' ${WRKSRC}/configure -.endif @${REINPLACE_CMD} -e 's|/etc/|${PREFIX}/etc/|g' \ ${WRKSRC}/src/util/xmlconfig.c - -pre-build: mesa-pre-build - -#custom targets so we can build parts of Mesa -mesa-pre-build: -# do propper gmake target. - @cd ${WRKSRC}/src && ${MAKE_CMD} git_sha1.h libglsl_util.la - @cd ${WRKSRC}/src/mesa/drivers/dri/common/ && ${MAKE_CMD} - @cd ${WRKSRC}/src/loader && ${MAKE_CMD} -# libloader.la - -.if defined(MESA_BUILD_WRKSRC) -do-build: -. for dir in ${MESA_BUILD_WRKSRC} - (cd ${WRKSRC}/${dir}; ${DO_MAKE_BUILD} ${ALL_TARGET};) -. endfor -.endif - -.if defined(MESA_INSTALL_WRKSRC) -do-install: -. for dir in ${MESA_INSTALL_WRKSRC} - (cd ${WRKSRC}/${dir} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \ - ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}) -. endfor -.endif - Index: head/graphics/mesa-dri/files/patch-src_intel_Makefile.in =================================================================== --- head/graphics/mesa-dri/files/patch-src_intel_Makefile.in (revision 537997) +++ head/graphics/mesa-dri/files/patch-src_intel_Makefile.in (nonexistent) @@ -1,18 +0,0 @@ -../../src/util/.libs/libmesautil.a(libmesautil_la-half_float.o): In function `_mesa_float_to_half': -half_float.c:(.text+0x94): undefined reference to `lrintf' -half_float.c:(.text+0xbf): undefined reference to `lrintf' -cc: error: linker command failed with exit code 1 (use -v to see invocation) -gmake[5]: *** [Makefile:2706: tools/aubinator_error_decode] Error 1 - ---- src/intel/Makefile.in.orig 2017-12-24 10:29:12 UTC -+++ src/intel/Makefile.in -@@ -1977,7 +1977,8 @@ tools_aubinator_error_decode_LDADD = \ - compiler/libintel_compiler.la \ - $(top_builddir)/src/util/libmesautil.la \ - $(PTHREAD_LIBS) \ -- $(ZLIB_LIBS) -+ $(ZLIB_LIBS) \ -+ -lm - - tools_aubinator_error_decode_CFLAGS = \ - $(AM_CFLAGS) \ Property changes on: head/graphics/mesa-dri/files/patch-src_intel_Makefile.in ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/graphics/mesa-dri/files/patch-configure =================================================================== --- head/graphics/mesa-dri/files/patch-configure (revision 537997) +++ head/graphics/mesa-dri/files/patch-configure (nonexistent) @@ -1,153 +0,0 @@ ---- configure.orig 2019-01-17 11:26:29 UTC -+++ configure -@@ -20767,7 +20767,7 @@ case "$host_os" in - *-android*) - android=yes - ;; --linux*|*-gnu*|gnu*|cygwin*) -+linux*|*-gnu*|gnu*|cygwin*|freebsd*) - DEFINES="$DEFINES -D_GNU_SOURCE" - ;; - solaris*) -@@ -22648,12 +22648,13 @@ case "$host_os" in - darwin*) - ;; - *) -- for ac_func in clock_gettime -+ for ac_func in clock_gettime clock_nanosleep - do : -- ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" --if test "x$ac_cv_func_clock_gettime" = xyes; then : -+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -+if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF --#define HAVE_CLOCK_GETTIME 1 -+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 - _ACEOF - CLOCK_LIB= - else -@@ -23319,8 +23320,12 @@ $as_echo_n "checking whether pthread_setaffinity_np is - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -+ #if defined(__DragonFly__) || defined(__FreeBSD__) -+ #include -+ #else - #define _GNU_SOURCE - #include -+ #endif - int main() { - void *a = (void*) &pthread_setaffinity_np; - long b = (long) a; -@@ -23339,11 +23344,20 @@ rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$save_LIBS" - --ac_fn_c_check_header_mongrel "$LINENO" "linux/futex.h" "ac_cv_header_linux_futex_h" "$ac_includes_default" --if test "x$ac_cv_header_linux_futex_h" = xyes; then : -- DEFINES="$DEFINES -DHAVE_LINUX_FUTEX_H" -+for ac_header in linux/futex.h sys/umtx.h -+do : -+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include -+ #include -+" -+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : -+ cat >>confdefs.h <<_ACEOF -+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+_ACEOF -+ DEFINES="$DEFINES -DHAVE_LINUX_FUTEX_H" - fi - -+done - - - # Check whether --enable-selinux was given. -@@ -24241,7 +24255,7 @@ fi - - - case "$host_os" in --linux*) -+linux* | freebsd*) - dri3_default=yes - ;; - *) -@@ -26542,31 +26556,11 @@ fi - # Put the nasty error message in config.log where it belongs - echo "$XCB_RANDR_PKG_ERRORS" >&5 - -- as_fn_error $? "Package requirements ($randr_modules) were not met: -- --$XCB_RANDR_PKG_ERRORS -- --Consider adjusting the PKG_CONFIG_PATH environment variable if you --installed software in a non-standard prefix. -- --Alternatively, you may set the environment variables XCB_RANDR_CFLAGS --and XCB_RANDR_LIBS to avoid the need to call pkg-config. --See the pkg-config man page for more details." "$LINENO" 5 -+ have_xlease=no - elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 - $as_echo "no" >&6; } -- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 --$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it --is in your PATH or set the PKG_CONFIG environment variable to the full --path to pkg-config. -- --Alternatively, you may set the environment variables XCB_RANDR_CFLAGS --and XCB_RANDR_LIBS to avoid the need to call pkg-config. --See the pkg-config man page for more details. -- --To get pkg-config, see . --See \`config.log' for more details" "$LINENO" 5; } -+ have_xlease=no - else - XCB_RANDR_CFLAGS=$pkg_cv_XCB_RANDR_CFLAGS - XCB_RANDR_LIBS=$pkg_cv_XCB_RANDR_LIBS -@@ -26634,31 +26628,11 @@ fi - # Put the nasty error message in config.log where it belongs - echo "$XLIB_RANDR_PKG_ERRORS" >&5 - -- as_fn_error $? "Package requirements ($xlib_randr_modules) were not met: -- --$XLIB_RANDR_PKG_ERRORS -- --Consider adjusting the PKG_CONFIG_PATH environment variable if you --installed software in a non-standard prefix. -- --Alternatively, you may set the environment variables XLIB_RANDR_CFLAGS --and XLIB_RANDR_LIBS to avoid the need to call pkg-config. --See the pkg-config man page for more details." "$LINENO" 5 -+ have_xlease=no - elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 - $as_echo "no" >&6; } -- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 --$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it --is in your PATH or set the PKG_CONFIG environment variable to the full --path to pkg-config. -- --Alternatively, you may set the environment variables XLIB_RANDR_CFLAGS --and XLIB_RANDR_LIBS to avoid the need to call pkg-config. --See the pkg-config man page for more details. -- --To get pkg-config, see . --See \`config.log' for more details" "$LINENO" 5; } -+ have_xlease=no - else - XLIB_RANDR_CFLAGS=$pkg_cv_XLIB_RANDR_CFLAGS - XLIB_RANDR_LIBS=$pkg_cv_XLIB_RANDR_LIBS -@@ -28694,9 +28668,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ - CLANG_LIBDIR=${LLVM_LIBDIR} - fi - CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION} -- if test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"; then : -- as_fn_error $? "Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries." "$LINENO" 5 --fi - fi - if test "x$enable_opencl" = xyes; then - HAVE_CLOVER_TRUE= Property changes on: head/graphics/mesa-dri/files/patch-configure ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/graphics/mesa-dri/files/configure.ac =================================================================== --- head/graphics/mesa-dri/files/configure.ac (revision 537997) +++ head/graphics/mesa-dri/files/configure.ac (nonexistent) @@ -1,66 +0,0 @@ ---- configure.ac.orig 2018-11-09 11:03:00 UTC -+++ configure.ac -@@ -931,7 +931,7 @@ case "$host_os" in - darwin*) - ;; - *) -- AC_CHECK_FUNCS([clock_gettime], [CLOCK_LIB=], -+ AC_CHECK_FUNCS([clock_gettime clock_nanosleep], [CLOCK_LIB=], - [AC_CHECK_LIB([rt], [clock_gettime], [CLOCK_LIB=-lrt], - [AC_MSG_ERROR([Could not find clock_gettime])])]) - AC_SUBST([CLOCK_LIB]) -@@ -982,8 +982,12 @@ save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS" - AC_MSG_CHECKING(whether pthread_setaffinity_np is supported) - AC_LINK_IFELSE([AC_LANG_SOURCE([[ -+ #if defined(__DragonFly__) || defined(__FreeBSD__) -+ #include -+ #else - #define _GNU_SOURCE - #include -+ #endif - int main() { - void *a = (void*) &pthread_setaffinity_np; - long b = (long) a; -@@ -995,7 +999,10 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([[ - LIBS="$save_LIBS" - - dnl Check for futex for fast inline simple_mtx_t. --AC_CHECK_HEADER([linux/futex.h], [DEFINES="$DEFINES -DHAVE_LINUX_FUTEX_H"]) -+AC_CHECK_HEADERS([linux/futex.h sys/umtx.h], -+ [DEFINES="$DEFINES -DHAVE_LINUX_FUTEX_H"],, -+ [#include -+ #include ]) - - dnl SELinux awareness. - AC_ARG_ENABLE([selinux], -@@ -1278,7 +1285,7 @@ fi - AC_SUBST(LIBSENSORS_LIBS) - - case "$host_os" in --linux*) -+linux* | freebsd*) - dri3_default=yes - ;; - *) -@@ -1932,9 +1939,9 @@ fi - - if test x"$have_xlease" = xyes; then - randr_modules="x11-xcb xcb-randr" -- PKG_CHECK_MODULES([XCB_RANDR], [$randr_modules]) -+ PKG_CHECK_MODULES([XCB_RANDR], [$randr_modules],, [have_xlease=no]) - xlib_randr_modules="xrandr" -- PKG_CHECK_MODULES([XLIB_RANDR], [$xlib_randr_modules]) -+ PKG_CHECK_MODULES([XLIB_RANDR], [$xlib_randr_modules],, [have_xlease=no]) - fi - - AM_CONDITIONAL(HAVE_PLATFORM_X11, echo "$platforms" | grep -q 'x11') -@@ -2515,8 +2522,6 @@ if test "x$enable_opencl" = xyes; then - CLANG_LIBDIR=${LLVM_LIBDIR} - fi - CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION} -- AS_IF([test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"], -- [AC_MSG_ERROR([Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries.])]) - fi - AM_CONDITIONAL(HAVE_CLOVER, test "x$enable_opencl" = xyes) - AM_CONDITIONAL(HAVE_CLOVER_ICD, test "x$enable_opencl_icd" = xyes) Property changes on: head/graphics/mesa-dri/files/configure.ac ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -1 \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/graphics/mesa-dri/files/patch-src_gallium_state__trackers_xvmc_Makefile.in =================================================================== --- head/graphics/mesa-dri/files/patch-src_gallium_state__trackers_xvmc_Makefile.in (revision 537997) +++ head/graphics/mesa-dri/files/patch-src_gallium_state__trackers_xvmc_Makefile.in (nonexistent) @@ -1,11 +0,0 @@ ---- src/gallium/state_trackers/xvmc/Makefile.in.orig 2019-10-21 15:12:43 UTC -+++ src/gallium/state_trackers/xvmc/Makefile.in -@@ -674,7 +674,7 @@ AM_CFLAGS = \ - noinst_LTLIBRARIES = libxvmctracker.la - libxvmctracker_la_SOURCES = $(C_SOURCES) - noinst_HEADERS = tests/testlib.h --TEST_LIBS = $(XVMC_LIBS) -lXvMCW $(VL_LIBS) $(XCB_DRI3_LIBS) -+TEST_LIBS = $(XVMC_LIBS) -lXv -lXvMCW $(VL_LIBS) $(XCB_DRI3_LIBS) - tests_test_context_SOURCES = tests/test_context.c tests/testlib.c - tests_test_context_LDADD = $(TEST_LIBS) - tests_test_surface_SOURCES = tests/test_surface.c tests/testlib.c Property changes on: head/graphics/mesa-dri/files/patch-src_gallium_state__trackers_xvmc_Makefile.in ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/graphics/mesa-dri/files/patch-src_gallium_targets_xvmc_Makefile.in =================================================================== --- head/graphics/mesa-dri/files/patch-src_gallium_targets_xvmc_Makefile.in (revision 537997) +++ head/graphics/mesa-dri/files/patch-src_gallium_targets_xvmc_Makefile.in (nonexistent) @@ -1,11 +0,0 @@ ---- src/gallium/targets/xvmc/Makefile.in.orig 2019-10-21 16:05:11 UTC -+++ src/gallium/targets/xvmc/Makefile.in -@@ -718,7 +718,7 @@ libXvMCgallium_la_LIBADD = $(top_builddir)/src/gallium - $(top_builddir)/src/gallium/auxiliary/libgalliumvlwinsys.la \ - $(top_builddir)/src/gallium/auxiliary/libgalliumvl.la \ - $(top_builddir)/src/gallium/auxiliary/libgallium.la \ -- $(top_builddir)/src/util/libmesautil.la $(XVMC_LIBS) \ -+ $(top_builddir)/src/util/libmesautil.la $(XVMC_LIBS) -lXv \ - $(VL_LIBS) $(XCB_DRI3_LIBS) $(LIBDRM_LIBS) \ - $(GALLIUM_COMMON_LIB_DEPS) $(am__append_13) $(am__append_14) \ - $(am__append_15) Property changes on: head/graphics/mesa-dri/files/patch-src_gallium_targets_xvmc_Makefile.in ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/graphics/mesa-dri/files/patch-meson.build =================================================================== --- head/graphics/mesa-dri/files/patch-meson.build (nonexistent) +++ head/graphics/mesa-dri/files/patch-meson.build (revision 537998) @@ -0,0 +1,26 @@ +- 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 +@@ -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') Property changes on: head/graphics/mesa-dri/files/patch-meson.build ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/mesa-dri/files/patch-src_gallium_state__trackers_xvmc_meson.build =================================================================== --- head/graphics/mesa-dri/files/patch-src_gallium_state__trackers_xvmc_meson.build (nonexistent) +++ head/graphics/mesa-dri/files/patch-src_gallium_state__trackers_xvmc_meson.build (revision 537998) @@ -0,0 +1,19 @@ +--- src/gallium/state_trackers/xvmc/meson.build.orig 2019-06-26 20:14:08 UTC ++++ src/gallium/state_trackers/xvmc/meson.build +@@ -18,12 +18,15 @@ + # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + # SOFTWARE. + ++XVMC_MAJOR = 1 ++XVMC_MINOR = 0 ++ + libxvmc_st = static_library( + 'xvmc_st', + files('attributes.c', 'block.c', 'context.c', 'surface.c', 'subpicture.c'), + c_args : [c_vis_args], + include_directories : [inc_common], +- dependencies : [dep_xvmc, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3], ++ dependencies : [dep_xvmc, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3, dep_xv], + ) + + # These tests will not work without a working xvmc configuration. Property changes on: head/graphics/mesa-dri/files/patch-src_gallium_state__trackers_xvmc_meson.build ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/mesa-dri/files/patch-src_gallium_targets_xvmc_meson.build =================================================================== --- head/graphics/mesa-dri/files/patch-src_gallium_targets_xvmc_meson.build (nonexistent) +++ head/graphics/mesa-dri/files/patch-src_gallium_targets_xvmc_meson.build (revision 537998) @@ -0,0 +1,11 @@ +--- src/gallium/targets/xvmc/meson.build.orig 2020-06-04 18:31:48 UTC ++++ src/gallium/targets/xvmc/meson.build +@@ -55,7 +55,7 @@ libxvmc_gallium = shared_library( + + foreach d : [[with_gallium_r600, 'r600'], [with_gallium_nouveau, 'nouveau']] + if d[0] +- xvmc_drivers += 'libXvMC@0@.so'.format(d[1]) ++ xvmc_drivers += 'libXvMC@0@.so.@1@.@2@.0'.format(d[1], XVMC_MAJOR, XVMC_MINOR) + endif + endforeach + Property changes on: head/graphics/mesa-dri/files/patch-src_gallium_targets_xvmc_meson.build ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/mesa-dri/files/patch-src_mesa_main_macros.h =================================================================== --- head/graphics/mesa-dri/files/patch-src_mesa_main_macros.h (nonexistent) +++ head/graphics/mesa-dri/files/patch-src_mesa_main_macros.h (revision 537998) @@ -0,0 +1,13 @@ +--- src/mesa/main/macros.h.orig 2019-06-26 20:14:08 UTC ++++ src/mesa/main/macros.h +@@ -677,6 +677,10 @@ minify(unsigned value, unsigned levels) + * + * \sa ROUND_DOWN_TO() + */ ++#ifdef __FreeBSD__ ++#undef ALIGN ++#endif ++ + static inline uintptr_t + ALIGN(uintptr_t value, int32_t alignment) + { Property changes on: head/graphics/mesa-dri/files/patch-src_mesa_main_macros.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/mesa-dri/files/patch-src_util_futex.h =================================================================== --- head/graphics/mesa-dri/files/patch-src_util_futex.h (revision 537997) +++ head/graphics/mesa-dri/files/patch-src_util_futex.h (revision 537998) @@ -1,45 +1,52 @@ - Implement futex_wake() and futex_wait() via _umtx_op() - ---- src/util/futex.h.orig 2018-09-24 16:00:57 UTC +--- src/util/futex.h.orig 2019-06-26 20:14:08 UTC +++ src/util/futex.h -@@ -29,10 +29,32 @@ +@@ -24,15 +24,37 @@ + #ifndef UTIL_FUTEX_H + #define UTIL_FUTEX_H + +-#if defined(HAVE_LINUX_FUTEX_H) ++/* #if defined(HAVE_LINUX_FUTEX_H) */ + #include #include #include +#if defined(__FreeBSD__) +#include +#include +#else #include #include +#endif #include +#if defined(__FreeBSD__) +static inline int futex_wake(uint32_t *addr, int count) +{ + return _umtx_op(addr, UMTX_OP_WAKE, (uint32_t)count, NULL, NULL) == -1 ? errno : 0; +} + +static inline int futex_wait(uint32_t *addr, int32_t value, struct timespec *timeout) +{ + void *uaddr = NULL, *uaddr2 = NULL; + if (timeout != NULL) { + const struct _umtx_time tmo = { ._timeout = *timeout, ._flags = UMTX_ABSTIME, ._clockid = CLOCK_MONOTONIC }; + uaddr = (void *)(uintptr_t)sizeof(tmo); + uaddr2 = (void *)&tmo; + } + return _umtx_op(addr, UMTX_OP_WAIT_UINT, (uint32_t)value, uaddr, uaddr2) == -1 ? errno : 0; +} +#else static inline long sys_futex(void *addr1, int op, int val1, const struct timespec *timeout, void *addr2, int val3) { return syscall(SYS_futex, addr1, op, val1, timeout, addr2, val3); -@@ -50,6 +72,7 @@ static inline int futex_wait(uint32_t *addr, int32_t v +@@ -50,7 +72,8 @@ static inline int futex_wait(uint32_t *addr, int32_t v return sys_futex(addr, FUTEX_WAIT_BITSET, value, timeout, NULL, FUTEX_BITSET_MATCH_ANY); } -+#endif - +- #endif ++ ++/* #endif */ + #endif /* UTIL_FUTEX_H */ Index: head/graphics/mesa-dri/pkg-plist =================================================================== --- head/graphics/mesa-dri/pkg-plist (revision 537997) +++ head/graphics/mesa-dri/pkg-plist (revision 537998) @@ -1,93 +1,52 @@ -@comment include/EGL/egl.h -@comment include/EGL/eglext.h -@comment include/EGL/eglextchromium.h -@comment include/EGL/eglmesaext.h -@comment include/EGL/eglplatform.h @comment include/GL/gl.h @comment include/GL/gl_mangle.h @comment include/GL/glcorearb.h @comment include/GL/glext.h -@comment include/GL/glx.h -@comment include/GL/glx_mangle.h -@comment include/GL/glxext.h include/GL/internal/dri_interface.h -@comment include/GL/osmesa.h -@comment include/GLES2/gl2.h -@comment include/GLES2/gl2ext.h -@comment include/GLES2/gl2platform.h -@comment include/GLES3/gl3.h -@comment include/GLES3/gl31.h -@comment include/GLES3/gl32.h -@comment include/GLES3/gl3ext.h -@comment include/GLES3/gl3platform.h @comment include/KHR/khrplatform.h @comment include/gbm.h %%INTEL_VDRIVER%%include/vulkan/vulkan_intel.h %%I915_DRIVER%%lib/dri/i915_dri.so %%I965_DRIVER%%lib/dri/i965_dri.so %%FREEDRENO_GDRIVER%%lib/dri/kgsl_dri.so %%SWRAST_GDRIVER%%lib/dri/kms_swrast_dri.so %%FREEDRENO_GDRIVER%%lib/dri/msm_dri.so %%R200_DRIVER%%lib/dri/r200_dri.so %%R300_GDRIVER%%lib/dri/r300_dri.so %%R600_GDRIVER%%lib/dri/r600_dri.so %%VAAPI%%%%R600_GDRIVER%%lib/dri/r600_drv_video.so -%%RADEON_DRIVER%%lib/dri/radeon_dri.so +%%R100_DRIVER%%lib/dri/radeon_dri.so %%RADEONSI_GDRIVER%%lib/dri/radeonsi_dri.so %%VAAPI%%%%RADEONSI_GDRIVER%%lib/dri/radeonsi_drv_video.so -%%SWRAST_DRIVER%%lib/dri/swrast_dri.so +%%SWRAST_GDRIVER%%lib/dri/swrast_dri.so %%VC4_GDRIVER%%lib/dri/vc4_dri.so %%SVGA_GDRIVER%%lib/dri/vmwgfx_dri.so -@comment lib/gallium-pipe/pipe_r300.so -@comment lib/gallium-pipe/pipe_r600.so -@comment lib/gallium-pipe/pipe_radeonsi.so -@comment lib/gallium-pipe/pipe_swrast.so -@comment lib/gallium-pipe/pipe_vmwgfx.so -@comment lib/libEGL.so -@comment lib/libEGL.so.1 -@comment lib/libEGL.so.1.0.0 -@comment lib/libGL.so -@comment lib/libGL.so.1 -@comment lib/libGL.so.1.2.0 -@comment lib/libGLESv2.so -@comment lib/libGLESv2.so.2 -@comment lib/libGLESv2.so.2.0.0 -@comment lib/libMesaOpenCL.so -@comment lib/libMesaOpenCL.so.1 -@comment lib/libMesaOpenCL.so.1.0.0 -@comment lib/libOSMesa.so -@comment lib/libOSMesa.so.8 -@comment lib/libOSMesa.so.8.0.0 %%R600_GDRIVER%%lib/libXvMCr600.so %%R600_GDRIVER%%lib/libXvMCr600.so.1 %%R600_GDRIVER%%lib/libXvMCr600.so.1.0 %%R600_GDRIVER%%lib/libXvMCr600.so.1.0.0 @comment lib/libgbm.so @comment lib/libgbm.so.1 @comment lib/libgbm.so.1.0.0 @comment lib/libglapi.so @comment lib/libglapi.so.0 @comment lib/libglapi.so.0.0.0 %%VDPAU%%%%R300_GDRIVER%%lib/vdpau/libvdpau_r300.so %%VDPAU%%%%R300_GDRIVER%%lib/vdpau/libvdpau_r300.so.1 %%VDPAU%%%%R300_GDRIVER%%lib/vdpau/libvdpau_r300.so.1.0 %%VDPAU%%%%R300_GDRIVER%%lib/vdpau/libvdpau_r300.so.1.0.0 %%VDPAU%%%%R600_GDRIVER%%lib/vdpau/libvdpau_r600.so %%VDPAU%%%%R600_GDRIVER%%lib/vdpau/libvdpau_r600.so.1 %%VDPAU%%%%R600_GDRIVER%%lib/vdpau/libvdpau_r600.so.1.0 %%VDPAU%%%%R600_GDRIVER%%lib/vdpau/libvdpau_r600.so.1.0.0 %%VDPAU%%%%RADEONSI_GDRIVER%%lib/vdpau/libvdpau_radeonsi.so %%VDPAU%%%%RADEONSI_GDRIVER%%lib/vdpau/libvdpau_radeonsi.so.1 %%VDPAU%%%%RADEONSI_GDRIVER%%lib/vdpau/libvdpau_radeonsi.so.1.0 %%VDPAU%%%%RADEONSI_GDRIVER%%lib/vdpau/libvdpau_radeonsi.so.1.0.0 %%INTEL_VDRIVER%%lib/libvulkan_intel.so -%%RADEON_VDRIVER%%lib/libvulkan_radeon.so +%%AMD_VDRIVER%%lib/libvulkan_radeon.so libdata/pkgconfig/dri.pc -@comment libdata/pkgconfig/egl.pc @comment libdata/pkgconfig/gbm.pc -@comment libdata/pkgconfig/gl.pc -@comment libdata/pkgconfig/glesv2.pc -@comment libdata/pkgconfig/osmesa.pc share/drirc.d/00-mesa-defaults.conf %%INTEL_VDRIVER%%share/vulkan/icd.d/intel_icd.%%ARCH%%.json -%%RADEON_VDRIVER%%share/vulkan/icd.d/radeon_icd.%%ARCH%%.json +%%AMD_VDRIVER%%share/vulkan/icd.d/radeon_icd.%%ARCH%%.json Index: head/graphics/mesa-libs/Makefile =================================================================== --- head/graphics/mesa-libs/Makefile (revision 537997) +++ head/graphics/mesa-libs/Makefile (revision 537998) @@ -1,59 +1,56 @@ # Created by: Eric Anholt # $FreeBSD$ PORTNAME= mesa-libs PORTVERSION= ${MESAVERSION} CATEGORIES= graphics COMMENT= OpenGL libraries that support GLX and EGL clients CONFLICTS_INSTALL= libglvnd # include/GL/gl.h USES= xorg USE_XORG= xorgproto x11 xcb xdamage xext \ - xfixes xshmfence xxf86vm + xfixes xshmfence xxf86vm xrandr OPTIONS_DEFINE= WAYLAND OPTIONS_DEFAULT=WAYLAND OPTIONS_SUB= yes WAYLAND_DESC= Enable support for the Wayland platform in EGL WAYLAND_BUILD_DEPENDS= wayland-protocols>=1.8:graphics/wayland-protocols WAYLAND_LIB_DEPENDS= libwayland-egl.so:graphics/wayland .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" -CONFIGURE_ARGS+= --with-dri-drivers="" --with-gallium-drivers="" +MESON_ARGS+= -Dgallium-drivers="" \ + -Dgallium-vdpau=false \ + -Dgallium-xvmc=false \ + -Dgallium-omx=disabled \ + -Dgallium-va=false \ + -Dgallium-xa=false \ + -Dgallium-nine=false \ + -Dgallium-clover=disabled \ + -Dosmesa=none \ + -Dtools="" \ + -Degl=true \ + -Dgbm=true \ + -Dvulkan-drivers="" +# Building EGL and GBM requires a dri driver so add swrast +MESON_ARGS+= -Ddri-drivers="swrast" .if ${PORT_OPTIONS:MWAYLAND} -CONFIGURE_ARGS+= --with-platforms=x11,surfaceless,drm,wayland +MESON_ARGS+= -Dplatforms=x11,surfaceless,drm,wayland .endif -MESA_BUILD_WRKSRC= src/mapi src/util -MESA_INSTALL_WRKSRC= src/mapi - -.if ${PORT_OPTIONS:MWAYLAND} -MESA_BUILD_WRKSRC+= src/egl/wayland/wayland-drm -.endif - -MESA_BUILD_WRKSRC+= src/gbm src/glx -MESA_INSTALL_WRKSRC+= src/gbm src/glx - -MESA_BUILD_WRKSRC+= src/egl -MESA_INSTALL_WRKSRC+= src/egl - .if ${ARCH} == "i386" # PR230239 Fix the build for i386 when WITH_LLD_IS_LD is set LDFLAGS+=-Wl,-z,notext .elif ${ARCH} == "powerpc" USE_GCC= yes .endif .include "${MASTERDIR}/Makefile.targets" - -post-install: - @cd ${WRKSRC}/src && ${SETENV} DESTDIR=${STAGEDIR} \ - ${MAKE_CMD} install-pkgconfigDATA install-glHEADERS install-glxHEADERS .include Index: head/graphics/mesa-libs/pkg-plist =================================================================== --- head/graphics/mesa-libs/pkg-plist (revision 537997) +++ head/graphics/mesa-libs/pkg-plist (revision 537998) @@ -1,42 +1,45 @@ -@comment etc/drirc include/EGL/egl.h include/EGL/eglext.h include/EGL/eglextchromium.h include/EGL/eglmesaext.h include/EGL/eglplatform.h include/GL/gl.h include/GL/gl_mangle.h include/GL/glcorearb.h include/GL/glext.h include/GL/glx.h include/GL/glx_mangle.h include/GL/glxext.h +@comment include/GL/internal/dri_interface.h include/GLES2/gl2.h include/GLES2/gl2ext.h include/GLES2/gl2platform.h include/GLES3/gl3.h include/GLES3/gl31.h include/GLES3/gl32.h include/GLES3/gl3ext.h include/GLES3/gl3platform.h include/KHR/khrplatform.h include/gbm.h +@comment lib/dri/swrast_dri.so lib/libEGL.so lib/libEGL.so.1 lib/libEGL.so.1.0.0 lib/libGL.so lib/libGL.so.1 lib/libGL.so.1.2.0 lib/libGLESv2.so lib/libGLESv2.so.2 lib/libGLESv2.so.2.0.0 lib/libgbm.so lib/libgbm.so.1 lib/libgbm.so.1.0.0 lib/libglapi.so lib/libglapi.so.0 lib/libglapi.so.0.0.0 +@comment libdata/pkgconfig/dri.pc libdata/pkgconfig/egl.pc libdata/pkgconfig/gbm.pc libdata/pkgconfig/gl.pc libdata/pkgconfig/glesv2.pc +@comment share/drirc.d/00-mesa-defaults.conf Index: head/lang/clover/Makefile =================================================================== --- head/lang/clover/Makefile (revision 537997) +++ head/lang/clover/Makefile (revision 537998) @@ -1,39 +1,52 @@ # $FreeBSD$ PORTNAME= clover PORTVERSION= ${MESAVERSION} CATEGORIES= lang COMMENT= Mesa OpenCL implementation for AMD GPUs BUILD_DEPENDS= libclc>=0.3.0:devel/libclc \ opencl>=0:devel/opencl LIB_DEPENDS= libOpenCL.so:devel/ocl-icd RUN_DEPENDS= libclc>=0.3.0:devel/libclc \ opencl>=0:devel/opencl ONLY_FOR_ARCHS= i386 amd64 ONLY_FOR_ARCHS_REASON= Clover needs a GPU supported by the Radeon KMS driver .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" -CONFIGURE_ARGS+= --enable-opencl --enable-opencl-icd --disable-dri \ - --disable-egl --disable-gbm --disable-gles2 --disable-glx \ - --disable-va --disable-vdpau --disable-xvmc \ - --with-gallium-drivers=r600,radeonsi # only supported GPUs +MESON_ARGS+= -Ddri-drivers="" \ + -Dgallium-drivers=r600,radeonsi \ + -Dvulkan-drivers="" \ + -Dplatforms="" \ + -Dgallium-vdpau=false \ + -Dgallium-omx=disabled \ + -Dgallium-va=false \ + -Dgallium-opencl=disabled \ + -Dgallium-xa=false \ + -Dgallium-xvmc=false \ + -Dgallium-nine=false \ + -Dgles1=false \ + -Dgles2=false \ + -Dopengl=false \ + -Dglx=disabled \ + -Degl=false \ + -Dgbm=false \ + -Dgallium-opencl=icd \ + -Dtools="" + LDFLAGS_i386= -Wl,-znotext -#MESA_BUILD_WRKSRC= src/util src/compiler src/mesa src/gallium -MESA_INSTALL_WRKSRC= src/gallium/targets/opencl src/gallium/targets/pipe-loader - .include "${MASTERDIR}/Makefile.targets" -pre-configure: +pre-patch: @if [ -e ${LOCALBASE}/bin/llvm-config${LLVM_DEFAULT} ] && \ ! [ -e ${LOCALBASE}/bin/clang${LLVM_DEFAULT} ]; then \ ${ECHO_MSG} "Your llvm${LLVM_DEFAULT} is not built with clang support, which is required."; \ ${FALSE}; \ fi .include Index: head/lang/clover/pkg-plist =================================================================== --- head/lang/clover/pkg-plist (revision 537997) +++ head/lang/clover/pkg-plist (revision 537998) @@ -1,6 +1,7 @@ etc/OpenCL/vendors/mesa.icd lib/gallium-pipe/pipe_r600.so lib/gallium-pipe/pipe_radeonsi.so lib/libMesaOpenCL.so lib/libMesaOpenCL.so.1 lib/libMesaOpenCL.so.1.0.0 +@comment share/drirc.d/00-mesa-defaults.conf