Index: graphics/libosmesa/Makefile =================================================================== --- graphics/libosmesa/Makefile +++ graphics/libosmesa/Makefile @@ -13,18 +13,32 @@ .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 +MESON_ARGS+= -Dosmesa=gallium .else -CONFIGURE_ARGS+= --enable-osmesa -MESA_INSTALL_WRKSRC= src/mesa/drivers/osmesa +MESON_ARGS+= -Dosmesa=classic .endif .include "${MASTERDIR}/Makefile.targets" Index: graphics/libosmesa/pkg-plist =================================================================== --- graphics/libosmesa/pkg-plist +++ graphics/libosmesa/pkg-plist @@ -3,3 +3,4 @@ lib/libOSMesa.so.8 lib/libOSMesa.so.8.0.0 libdata/pkgconfig/osmesa.pc +@comment share/drirc.d/00-mesa-defaults.conf Index: graphics/libxatracker/Makefile =================================================================== --- graphics/libxatracker/Makefile +++ graphics/libxatracker/Makefile @@ -8,7 +8,7 @@ COMMENT= Mesa XA state tracker -USES= xorg +USES= xorg meson USE_XORG= xorgproto .include @@ -17,22 +17,27 @@ 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= - -MESA_BUILD_WRKSRC= src/util src/compiler +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= + 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: graphics/libxatracker/pkg-plist =================================================================== --- graphics/libxatracker/pkg-plist +++ graphics/libxatracker/pkg-plist @@ -5,3 +5,4 @@ lib/libxatracker.so.2 lib/libxatracker.so.2.5.0 libdata/pkgconfig/xatracker.pc +@comment share/drirc.d/00-mesa-defaults.conf Index: graphics/mesa-dri/Makefile =================================================================== --- graphics/mesa-dri/Makefile +++ graphics/mesa-dri/Makefile @@ -3,6 +3,7 @@ PORTNAME= mesa-dri PORTVERSION= ${MESAVERSION} +PORTREVISION= 1 CATEGORIES= graphics COMMENT= OpenGL hardware acceleration drivers for DRI2+ @@ -14,11 +15,11 @@ 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 @@ -28,11 +29,10 @@ .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" -ALL_DRI_DRIVERS= I915 I965 RADEON R200 SWRAST +ALL_DRI_DRIVERS= I915 I965 RADEON 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 @@ -42,9 +42,10 @@ .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 @@ -76,12 +77,21 @@ # 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}} @@ -99,9 +109,10 @@ . 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 @@ -111,5 +122,8 @@ post-install: @${RM} -r ${STAGEDIR}/etc/OpenCL + @${LN} -s ${STAGEDIR}/${PREFIX}/lib/libXvMCr600.so ${STAGEDIR}/${PREFIX}/lib/libXvMCr600.so.1 + @${LN} -s ${STAGEDIR}/${PREFIX}/lib/libXvMCr600.so ${STAGEDIR}/${PREFIX}/lib/libXvMCr600.so.1.0 + @${LN} -s ${STAGEDIR}/${PREFIX}/lib/libXvMCr600.so ${STAGEDIR}/${PREFIX}/lib/libXvMCr600.so.1.0.0 .include Index: graphics/mesa-dri/Makefile.common =================================================================== --- graphics/mesa-dri/Makefile.common +++ graphics/mesa-dri/Makefile.common @@ -29,7 +29,8 @@ 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 @@ -47,11 +48,10 @@ 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 gettext-tools libtool \ + localbase 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 @@ -84,26 +84,20 @@ LLVM_DEFAULT= 80 .endif +BINARY_ALIAS= python3=${PYTHON_VERSION} + .if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH:Marm*} || ${ARCH} == i386 || ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} 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 +MESON_ARGS+= -Dllvm=true .else -CONFIGURE_ARGS+= --disable-llvm +MESON_ARGS+= -Dllvm=false .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: graphics/mesa-dri/Makefile.targets =================================================================== --- graphics/mesa-dri/Makefile.targets +++ graphics/mesa-dri/Makefile.targets @@ -3,34 +3,5 @@ # 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: graphics/mesa-dri/files/configure.ac =================================================================== --- graphics/mesa-dri/files/configure.ac +++ /dev/null @@ -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) Index: graphics/mesa-dri/files/patch-configure =================================================================== --- graphics/mesa-dri/files/patch-configure +++ /dev/null @@ -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= Index: graphics/mesa-dri/files/patch-meson.build =================================================================== --- /dev/null +++ graphics/mesa-dri/files/patch-meson.build @@ -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') Index: graphics/mesa-dri/files/patch-src_amd_vulkan_radv__device.c =================================================================== --- graphics/mesa-dri/files/patch-src_amd_vulkan_radv__device.c +++ graphics/mesa-dri/files/patch-src_amd_vulkan_radv__device.c @@ -1,8 +1,8 @@ - Define CLOCK_MONOTONIC_RAW if missing ---- src/amd/vulkan/radv_device.c.orig 2018-11-06 16:16:02 UTC +--- src/amd/vulkan/radv_device.c.orig 2019-06-26 20:14:08 UTC +++ src/amd/vulkan/radv_device.c -@@ -50,6 +50,14 @@ +@@ -49,6 +49,14 @@ #include "util/debug.h" #include "util/mesa-sha1.h" Index: graphics/mesa-dri/files/patch-src_amd_vulkan_winsys_amdgpu_radv__amdgpu__cs.c =================================================================== --- graphics/mesa-dri/files/patch-src_amd_vulkan_winsys_amdgpu_radv__amdgpu__cs.c +++ graphics/mesa-dri/files/patch-src_amd_vulkan_winsys_amdgpu_radv__amdgpu__cs.c @@ -1,8 +1,8 @@ - Define ETIME if missing ---- src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c.orig 2018-01-23 18:08:49 UTC +--- src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c.orig 2019-06-26 20:14:08 UTC +++ src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c -@@ -33,6 +33,9 @@ +@@ -35,6 +35,9 @@ #include "radv_amdgpu_bo.h" #include "sid.h" Index: graphics/mesa-dri/files/patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c =================================================================== --- graphics/mesa-dri/files/patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c +++ graphics/mesa-dri/files/patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c @@ -25,9 +25,9 @@ Reviewed-by: Francisco Jerez ---- src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c.orig 2017-12-21 17:31:21 UTC +--- src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c.orig 2019-06-26 20:14:08 UTC +++ src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c -@@ -207,6 +207,14 @@ pipe_loader_drm_probe_fd(struct pipe_loa +@@ -228,6 +228,14 @@ pipe_loader_drm_probe_fd(struct pipe_loader_device **d } static int @@ -42,24 +42,24 @@ open_drm_render_node_minor(int minor) { char path[PATH_MAX]; -@@ -218,8 +226,15 @@ open_drm_render_node_minor(int minor) +@@ -239,8 +247,15 @@ open_drm_render_node_minor(int minor) int pipe_loader_drm_probe(struct pipe_loader_device **devs, int ndev) { - int i, j, fd; + int i, k, fd, num_render_node_devs; + int j = 0; -+ + + struct { + unsigned vendor_id; + unsigned chip_id; + } render_node_devs[DRM_RENDER_NODE_MAX_NODES]; - ++ + /* Look for render nodes first */ for (i = DRM_RENDER_NODE_MIN_MINOR, j = 0; i <= DRM_RENDER_NODE_MAX_MINOR; i++) { struct pipe_loader_device *dev; -@@ -233,6 +248,9 @@ pipe_loader_drm_probe(struct pipe_loader +@@ -254,12 +269,55 @@ pipe_loader_drm_probe(struct pipe_loader_device **devs continue; } @@ -69,10 +69,12 @@ if (j < ndev) { devs[j] = dev; } else { -@@ -242,6 +260,46 @@ pipe_loader_drm_probe(struct pipe_loader - j++; - } - + close(fd); + dev->ops->release(&dev); + } ++ j++; ++ } ++ + num_render_node_devs = j; + + /* Next look for drm devices. */ @@ -110,9 +112,6 @@ + dev->ops->release(&dev); + } + -+ j++; -+ } -+ - return j; - } + j++; + } Index: graphics/mesa-dri/files/patch-src_gallium_drivers_freedreno_freedreno__screen.c =================================================================== --- graphics/mesa-dri/files/patch-src_gallium_drivers_freedreno_freedreno__screen.c +++ graphics/mesa-dri/files/patch-src_gallium_drivers_freedreno_freedreno__screen.c @@ -1,6 +1,6 @@ - Without sysinfo() fall back to sysconf() ---- src/gallium/drivers/freedreno/freedreno_screen.c.orig 2018-04-21 05:48:24 UTC +--- src/gallium/drivers/freedreno/freedreno_screen.c.orig 2019-06-26 20:14:08 UTC +++ src/gallium/drivers/freedreno/freedreno_screen.c @@ -43,7 +43,11 @@ #include @@ -14,7 +14,7 @@ #include "freedreno_screen.h" #include "freedreno_resource.h" -@@ -837,9 +841,13 @@ fd_screen_create(struct fd_device *dev) +@@ -808,9 +812,13 @@ fd_screen_create(struct fd_device *dev, struct rendero screen->priority_mask = (1 << val) - 1; } Index: graphics/mesa-dri/files/patch-src_gallium_include_pipe_p__config.h =================================================================== --- graphics/mesa-dri/files/patch-src_gallium_include_pipe_p__config.h +++ graphics/mesa-dri/files/patch-src_gallium_include_pipe_p__config.h @@ -1,6 +1,6 @@ ---- src/gallium/include/pipe/p_config.h.orig 2017-10-02 15:49:02 UTC +--- src/gallium/include/pipe/p_config.h.orig 2019-06-26 20:14:08 UTC +++ src/gallium/include/pipe/p_config.h -@@ -77,6 +77,13 @@ +@@ -77,7 +77,14 @@ #define PIPE_CC_ICL #endif @@ -10,10 +10,11 @@ +#define PIPE_ARCH_SPARC_64 +#endif +#endif -+ ++ /* * Processor architecture + */ @@ -131,7 +138,7 @@ #if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) || defined(PIPE_ARCH_ARM) || defined(PIPE_ARCH_AARCH64) @@ -23,16 +24,16 @@ #define PIPE_ARCH_BIG_ENDIAN #endif -@@ -160,6 +167,12 @@ +@@ -158,6 +165,12 @@ + */ + #if defined(ANDROID) #define PIPE_OS_ANDROID - #endif - ++#endif ++ +#if defined(__DragonFly__) +#define PIPE_OS_DRAGONFLY +#define PIPE_OS_BSD +#define PIPE_OS_UNIX -+#endif -+ + #endif + #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) - #define PIPE_OS_FREEBSD - #define PIPE_OS_BSD Index: graphics/mesa-dri/files/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp =================================================================== --- graphics/mesa-dri/files/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp +++ graphics/mesa-dri/files/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp @@ -6,18 +6,18 @@ ic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5c_strEv' can not be used when making a shared object; recompile with -fPIC # /usr/bin/ld: final link failed: Bad value # ---- src/gallium/state_trackers/clover/llvm/invocation.cpp.orig 2017-04-01 15:33:37 UTC +--- src/gallium/state_trackers/clover/llvm/invocation.cpp.orig 2019-06-26 20:14:08 UTC +++ src/gallium/state_trackers/clover/llvm/invocation.cpp -@@ -93,6 +93,8 @@ namespace { - return ctx; +@@ -181,6 +181,8 @@ namespace { + return get_lang_standard_from_version_str(device_version); } + const char* cstr(const std::string& str) { return str.c_str(); } + std::unique_ptr - create_compiler_instance(const target &target, + create_compiler_instance(const device &dev, const std::vector &opts, -@@ -105,8 +107,8 @@ namespace { +@@ -193,8 +195,8 @@ namespace { // Parse the compiler options. A file name should be present at the end // and must have the .cl extension in order for the CompilerInvocation // class to recognize it as an OpenCL source file. @@ -26,5 +26,5 @@ + std::vector copts(opts.size()); + std::transform(opts.begin(), opts.end(), copts.begin(), cstr); - if (!clang::CompilerInvocation::CreateFromArgs( - c->getInvocation(), copts.data(), copts.data() + copts.size(), diag)) + const target &target = dev.ir_target(); + const std::string &device_clc_version = dev.device_clc_version(); Index: graphics/mesa-dri/files/patch-src_gallium_state__trackers_xvmc_Makefile.in =================================================================== --- graphics/mesa-dri/files/patch-src_gallium_state__trackers_xvmc_Makefile.in +++ /dev/null @@ -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 Index: graphics/mesa-dri/files/patch-src_gallium_state__trackers_xvmc_meson.build =================================================================== --- /dev/null +++ graphics/mesa-dri/files/patch-src_gallium_state__trackers_xvmc_meson.build @@ -0,0 +1,11 @@ +--- src/gallium/state_trackers/xvmc/meson.build.orig 2019-06-26 20:14:08 UTC ++++ src/gallium/state_trackers/xvmc/meson.build +@@ -23,7 +23,7 @@ libxvmc_st = static_library( + 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. Index: graphics/mesa-dri/files/patch-src_gallium_targets_xvmc_Makefile.in =================================================================== --- graphics/mesa-dri/files/patch-src_gallium_targets_xvmc_Makefile.in +++ /dev/null @@ -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) Index: graphics/mesa-dri/files/patch-src_intel_Makefile.in =================================================================== --- graphics/mesa-dri/files/patch-src_intel_Makefile.in +++ /dev/null @@ -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) \ Index: graphics/mesa-dri/files/patch-src_intel_compiler_brw__fs__bank__conflicts.cpp =================================================================== --- graphics/mesa-dri/files/patch-src_intel_compiler_brw__fs__bank__conflicts.cpp +++ graphics/mesa-dri/files/patch-src_intel_compiler_brw__fs__bank__conflicts.cpp @@ -5,9 +5,9 @@ vector_type s_p = {}, s_n = {}; ^~ ---- src/intel/compiler/brw_fs_bank_conflicts.cpp.orig 2018-01-23 18:08:50 UTC +--- src/intel/compiler/brw_fs_bank_conflicts.cpp.orig 2019-06-26 20:14:08 UTC +++ src/intel/compiler/brw_fs_bank_conflicts.cpp -@@ -716,7 +716,7 @@ namespace { +@@ -728,7 +728,7 @@ namespace { const weight_vector_type &conflicts) { const unsigned m = DIV_ROUND_UP(conflicts.size, vector_width); Index: graphics/mesa-dri/files/patch-src_intel_vulkan_anv__allocator.c =================================================================== --- graphics/mesa-dri/files/patch-src_intel_vulkan_anv__allocator.c +++ graphics/mesa-dri/files/patch-src_intel_vulkan_anv__allocator.c @@ -1,7 +1,7 @@ - Partially implement memfd_create() via mkostemp() - Ignore MAP_POPULATE if unsupported ---- src/intel/vulkan/anv_allocator.c.orig 2018-01-23 18:08:50 UTC +--- src/intel/vulkan/anv_allocator.c.orig 2019-06-26 20:14:08 UTC +++ src/intel/vulkan/anv_allocator.c @@ -25,9 +25,21 @@ #include @@ -25,7 +25,7 @@ #include "anv_private.h" #include "util/hash_table.h" -@@ -113,7 +125,29 @@ struct anv_mmap_cleanup { +@@ -115,7 +127,29 @@ struct anv_mmap_cleanup { static inline int memfd_create(const char *name, unsigned int flags) { Index: graphics/mesa-dri/files/patch-src_intel_vulkan_anv__device.c =================================================================== --- graphics/mesa-dri/files/patch-src_intel_vulkan_anv__device.c +++ graphics/mesa-dri/files/patch-src_intel_vulkan_anv__device.c @@ -2,7 +2,7 @@ - Define ETIME if missing - Define CLOCK_MONOTONIC_RAW if missing ---- src/intel/vulkan/anv_device.c.orig 2018-11-06 16:16:02 UTC +--- src/intel/vulkan/anv_device.c.orig 2019-06-26 20:14:08 UTC +++ src/intel/vulkan/anv_device.c @@ -25,7 +25,9 @@ #include @@ -32,8 +32,8 @@ static void compiler_debug_log(void *data, const char *fmt, ...) { } -@@ -64,10 +73,15 @@ static VkResult - anv_compute_heap_size(int fd, uint64_t gtt_size, uint64_t *heap_size) +@@ -64,10 +77,15 @@ static uint64_t + anv_compute_heap_size(int fd, uint64_t gtt_size) { /* Query the total ram from the system */ +#ifdef __GLIBC__ Index: graphics/mesa-dri/files/patch-src_mapi_glapi_gen_gl__gentable.py =================================================================== --- graphics/mesa-dri/files/patch-src_mapi_glapi_gen_gl__gentable.py +++ graphics/mesa-dri/files/patch-src_mapi_glapi_gen_gl__gentable.py @@ -1,6 +1,6 @@ ---- src/mapi/glapi/gen/gl_gentable.py.orig 2017-05-15 12:05:59 UTC +--- src/mapi/glapi/gen/gl_gentable.py.orig 2020-06-01 12:29:38 UTC +++ src/mapi/glapi/gen/gl_gentable.py -@@ -43,7 +43,7 @@ header = """/* GLXEXT is the define used +@@ -45,7 +45,7 @@ header = """/* GLXEXT is the define used in the xserve #endif #if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \\ Index: graphics/mesa-dri/files/patch-src_mesa_main_macros.h =================================================================== --- /dev/null +++ graphics/mesa-dri/files/patch-src_mesa_main_macros.h @@ -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) + { Index: graphics/mesa-dri/files/patch-src_util_futex.h =================================================================== --- graphics/mesa-dri/files/patch-src_util_futex.h +++ graphics/mesa-dri/files/patch-src_util_futex.h @@ -1,8 +1,13 @@ - 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 @@ -35,11 +40,13 @@ 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: graphics/mesa-dri/files/patch-src_util_u__thread.h =================================================================== --- graphics/mesa-dri/files/patch-src_util_u__thread.h +++ graphics/mesa-dri/files/patch-src_util_u__thread.h @@ -1,7 +1,7 @@ - Implement setting thread name - Use monotonic clock for timeouts ---- src/util/u_thread.h.orig 2018-11-09 11:03:00 UTC +--- src/util/u_thread.h.orig 2019-06-26 20:14:08 UTC +++ src/util/u_thread.h @@ -34,7 +34,14 @@ @@ -18,7 +18,7 @@ static inline thrd_t u_thread_create(int (*routine)(void *), void *param) { -@@ -64,6 +69,12 @@ static inline void u_thread_setname( const char *name +@@ -64,6 +71,12 @@ static inline void u_thread_setname( const char *name (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12)) && \ defined(__linux__) pthread_setname_np(pthread_self(), name); @@ -31,7 +31,7 @@ # endif #endif (void)name; -@@ -134,7 +145,7 @@ util_get_L3_for_pinned_thread(thrd_t thread, unsigned +@@ -134,7 +147,7 @@ util_get_L3_for_pinned_thread(thrd_t thread, unsigned static inline int64_t u_thread_get_time_nano(thrd_t thread) { Index: graphics/mesa-dri/pkg-plist =================================================================== --- graphics/mesa-dri/pkg-plist +++ graphics/mesa-dri/pkg-plist @@ -1,25 +1,8 @@ -@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 @@ -32,32 +15,12 @@ %%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 @@ -81,13 +44,9 @@ %%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: graphics/mesa-libs/Makefile =================================================================== --- graphics/mesa-libs/Makefile +++ graphics/mesa-libs/Makefile @@ -11,7 +11,7 @@ USES= xorg USE_XORG= xorgproto x11 xcb xdamage xext \ - xfixes xshmfence xxf86vm + xfixes xshmfence xxf86vm xrandr OPTIONS_DEFINE= WAYLAND OPTIONS_DEFAULT=WAYLAND @@ -24,25 +24,26 @@ .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 @@ -52,8 +53,4 @@ .include "${MASTERDIR}/Makefile.targets" -post-install: - @cd ${WRKSRC}/src && ${SETENV} DESTDIR=${STAGEDIR} \ - ${MAKE_CMD} install-pkgconfigDATA install-glHEADERS install-glxHEADERS - .include Index: graphics/mesa-libs/pkg-plist =================================================================== --- graphics/mesa-libs/pkg-plist +++ graphics/mesa-libs/pkg-plist @@ -1,4 +1,3 @@ -@comment etc/drirc include/EGL/egl.h include/EGL/eglext.h include/EGL/eglextchromium.h @@ -11,6 +10,7 @@ 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 @@ -21,6 +21,7 @@ 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 @@ -36,7 +37,9 @@ 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: lang/clover/Makefile =================================================================== --- lang/clover/Makefile +++ lang/clover/Makefile @@ -18,18 +18,31 @@ .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 -LDFLAGS_i386= -Wl,-znotext +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="" -#MESA_BUILD_WRKSRC= src/util src/compiler src/mesa src/gallium -MESA_INSTALL_WRKSRC= src/gallium/targets/opencl src/gallium/targets/pipe-loader +LDFLAGS_i386= -Wl,-znotext .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."; \ Index: lang/clover/pkg-plist =================================================================== --- lang/clover/pkg-plist +++ lang/clover/pkg-plist @@ -4,3 +4,4 @@ lib/libMesaOpenCL.so lib/libMesaOpenCL.so.1 lib/libMesaOpenCL.so.1.0.0 +@comment share/drirc.d/00-mesa-defaults.conf