Index: head/graphics/mesa-dri/Makefile =================================================================== --- head/graphics/mesa-dri/Makefile (revision 490568) +++ head/graphics/mesa-dri/Makefile (revision 490569) @@ -1,124 +1,121 @@ # Created by: Eric Anholt # $FreeBSD$ PORTNAME= mesa-dri PORTVERSION= ${MESAVERSION} -PORTREVISION= 3 CATEGORIES= graphics COMMENT= OpenGL hardware acceleration drivers for DRI2+ USE_XORG= xorgproto x11 xdamage xext xfixes xshmfence xv xvmc -OPTIONS_DEFINE= TEXTURE VAAPI VDPAU WAYLAND -OPTIONS_DEFAULT=TEXTURE WAYLAND +OPTIONS_DEFINE= VAAPI VDPAU WAYLAND +OPTIONS_DEFAULT=WAYLAND OPTIONS_SUB= yes -TEXTURE_DESC= Enable texture-float support (patent encumbered) -TEXTURE_CONFIGURE_ENABLE= texture-float - VAAPI_CONFIGURE_ENABLE= va VAAPI_LIB_DEPENDS= libva.so:multimedia/libva VAAPI_USE= XORG=xcb VDPAU_CONFIGURE_ENABLE= vdpau 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_GALLIUM_DRIVERS= FREEDRENO R300 R600 RADEONSI SVGA SWRAST VC4 ALL_VULKAN_DRIVERS= INTEL RADEON DRI_DRIVERS= SWRAST # classic swrast .if "${MESA_LLVM_VER}" != "" GALLIUM_DRIVERS= SWRAST # llvmpipe .else GALLIUM_DRIVERS= "" .endif VULKAN_DRIVERS= # .if ${ARCH} == amd64 || ${ARCH} == i386 \ || ${ARCH} == powerpc || ${ARCH} == powerpc64 DRI_DRIVERS+= RADEON R200 GALLIUM_DRIVERS+= R600 . if "${MESA_LLVM_VER}" != "" && (${ARCH} == amd64 || ${ARCH} == i386) # https://cgit.freedesktop.org/mesa/mesa/commit/?id=58952675f6d4 GALLIUM_DRIVERS+= R300 . endif . if "${MESA_LLVM_VER}" != "" # until PPC gets LLVM in base GALLIUM_DRIVERS+= RADEONSI VULKAN_DRIVERS+= RADEON . endif .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 .endif CONFIGURE_ARGS+= --with-dri-drivers="${DRI_DRIVERS:tl}" \ --with-gallium-drivers="${GALLIUM_DRIVERS:tl}" \ --with-vulkan-drivers="${VULKAN_DRIVERS:tl}" .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 .for _vd in ${ALL_VULKAN_DRIVERS} . if ${VULKAN_DRIVERS:M${_vd}} PLIST_SUB+= ${_vd}_VDRIVER="" ARCH="${ARCH}" . 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 490568) +++ head/graphics/mesa-dri/Makefile.common (revision 490569) @@ -1,105 +1,105 @@ # 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= 18.1.9 +MESABASEVERSION= 18.2.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 LIB_DEPENDS+= libexpat.so:textproc/expat2 .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 USE_LDCONFIG= yes GNU_CONFIGURE= yes # 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 # need LLVM for libEGL wherever possible, but mixing GCC and LLVM breaks Gallium .if ${CHOSEN_COMPILER_TYPE} == clang \ || (${COMPONENT} == libs && ${ARCH} != sparc64) # no working LLVM MESA_LLVM_VER?= 60 .endif .if "${MESA_LLVM_VER}" != "" BUILD_DEPENDS+= llvm${MESA_LLVM_VER}>=3.9.0_4:devel/llvm${MESA_LLVM_VER} .if ${COMPONENT} != libs RUN_DEPENDS+= llvm${MESA_LLVM_VER}>=3.9.0_4:devel/llvm${MESA_LLVM_VER} .endif CONFIGURE_ENV+= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${MESA_LLVM_VER} LDFLAGS+= -Wl,-rpath=${LOCALBASE}/llvm${MESA_LLVM_VER}/lib CONFIGURE_ARGS+= --enable-llvm .else CONFIGURE_ARGS+= --disable-llvm .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 Index: head/graphics/mesa-dri/distinfo =================================================================== --- head/graphics/mesa-dri/distinfo (revision 490568) +++ head/graphics/mesa-dri/distinfo (revision 490569) @@ -1,3 +1,3 @@ -TIMESTAMP = 1538226082 -SHA256 (mesa-18.1.9.tar.xz) = 55f5778d58a710a63d6635f000535768faf7db9e8144dc0f4fd1989f936c1a83 -SIZE (mesa-18.1.9.tar.xz) = 11146188 +TIMESTAMP = 1545926521 +SHA256 (mesa-18.2.8.tar.xz) = 1d2ed9fd435d86d95b7215b287258d3e6b1180293a36f688e5a2efc18298d863 +SIZE (mesa-18.2.8.tar.xz) = 11385224 Index: head/graphics/mesa-dri/files/patch-llvm7 =================================================================== --- head/graphics/mesa-dri/files/patch-llvm7 (revision 490568) +++ head/graphics/mesa-dri/files/patch-llvm7 (nonexistent) @@ -1,52 +0,0 @@ -commit d424be0feda5 -Author: Jan Vesely -Date: Tue May 22 17:52:30 2018 -0400 - - clover: Fix build after llvm r332881. - - v2: fix whitespace and indentation - - r332881 added an extra parameter to the emit function. - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106619 - Signed-off-by: Jan Vesely - Reviewed-By: Aaron Watry - Tested-By: Aaron Watry - Tested-by: Kai Wasserbäch - ---- src/gallium/state_trackers/clover/llvm/codegen/native.cpp.orig 2018-07-27 13:52:17 UTC -+++ src/gallium/state_trackers/clover/llvm/codegen/native.cpp -@@ -126,13 +126,12 @@ namespace { - { - compat::pass_manager pm; - ::llvm::raw_svector_ostream os { data }; -- compat::raw_ostream_to_emit_file fos(os); - - mod.setDataLayout(compat::get_data_layout(*tm)); - tm->Options.MCOptions.AsmVerbose = - (ft == TargetMachine::CGFT_AssemblyFile); - -- if (tm->addPassesToEmitFile(pm, fos, ft)) -+ if (compat::add_passes_to_emit_file(*tm, pm, os, ft)) - fail(r_log, build_error(), "TargetMachine can't emit this file"); - - pm.run(mod); ---- src/gallium/state_trackers/clover/llvm/compat.hpp.orig 2018-07-27 13:52:17 UTC -+++ src/gallium/state_trackers/clover/llvm/compat.hpp -@@ -247,6 +247,17 @@ namespace clover { - ::llvm::WriteBitcodeToFile(&mod, os); - #endif - } -+ -+ template -+ bool add_passes_to_emit_file(TM &tm, PM &pm, OS &os, FT &ft) -+ { -+ compat::raw_ostream_to_emit_file fos(os); -+#if HAVE_LLVM >= 0x0700 -+ return tm.addPassesToEmitFile(pm, fos, nullptr, ft); -+#else -+ return tm.addPassesToEmitFile(pm, fos, ft); -+#endif -+ } - } - } - } Property changes on: head/graphics/mesa-dri/files/patch-llvm7 ___________________________________________________________________ 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 490568) +++ head/graphics/mesa-dri/files/configure.ac (revision 490569) @@ -1,41 +1,53 @@ --- configure.ac.orig 2017-04-01 15:33:36 UTC +++ configure.ac @@ -894,7 +894,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]) @@ -942,7 +942,10 @@ if test "x$pthread_stubs_possible" = xyes; then fi 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], @@ -1121,7 +1121,7 @@ fi AC_SUBST(LIBSENSORS_LIBS) case "$host_os" in -linux*) +linux* | freebsd*) dri3_default=yes ;; *) +@@ -1884,9 +1884,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') @@ -2061,8 +2070,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: head/graphics/mesa-dri/files/patch-configure =================================================================== --- head/graphics/mesa-dri/files/patch-configure (revision 490568) +++ head/graphics/mesa-dri/files/patch-configure (revision 490569) @@ -1,63 +1,131 @@ --- configure.orig 2018-01-23 18:08:55 UTC +++ configure @@ -21895,12 +21895,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 @@ -22559,11 +22559,20 @@ $as_echo "yes" >&6; } fi fi -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. @@ -23308,7 +23308,7 @@ fi case "$host_os" in -linux*) +linux* | freebsd*) dri3_default=yes ;; *) +@@ -26000,31 +26000,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 +@@ -26092,31 +26072,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 @@ -27096,9 +27106,6 @@ rm -f core conftest.err conftest.$ac_obj 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: head/graphics/mesa-dri/files/patch-src_intel_tools_aubinator.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_intel_tools_aubinator.c (revision 490568) +++ head/graphics/mesa-dri/files/patch-src_intel_tools_aubinator.c (revision 490569) @@ -1,14 +1,34 @@ -# We don't have MAP_NORESERVE so use MAP_NOSYNC | MAP_NOCORE and -# hope for the best (this alloc is too big but it's only a test) -# ---- src/intel/tools/aubinator.c.orig 2017-10-02 15:49:02 UTC +- Partially implement memfd_create() via mkostemp() + +--- src/intel/tools/aubinator.c.orig 2018-08-02 15:41:20 UTC +++ src/intel/tools/aubinator.c -@@ -637,7 +637,7 @@ int main(int argc, char *argv[]) - /* mmap a terabyte for our gtt space. */ - gtt_size = 1ull << 40; - gtt = mmap(NULL, gtt_size, PROT_READ | PROT_WRITE, -- MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE, -1, 0); -+ MAP_PRIVATE | MAP_ANONYMOUS | MAP_NOSYNC | MAP_NOCORE, -1, 0); - if (gtt == MAP_FAILED) { - fprintf(stderr, "failed to alloc gtt space: %s\n", strerror(errno)); - exit(EXIT_FAILURE); +@@ -52,7 +52,29 @@ + static inline int + memfd_create(const char *name, unsigned int flags) + { ++#if defined(__linux__) + return syscall(SYS_memfd_create, name, flags); ++#elif defined(__FreeBSD__) ++ return shm_open(SHM_ANON, flags | O_RDWR | O_CREAT, 0600); ++#else /* DragonFly, NetBSD, OpenBSD, Solaris */ ++ char template[] = "/tmp/shmfd-XXXXXX"; ++#ifdef HAVE_MKOSTEMP ++ int fd = mkostemp(template, flags); ++#else ++ int fd = mkstemp(template); ++ if (flags & O_CLOEXEC) { ++ int flags = fcntl(fd, F_GETFD); ++ if (flags != -1) { ++ flags |= FD_CLOEXEC; ++ (void) fcntl(fd, F_SETFD, &flags); ++ } ++ } ++#endif /* HAVE_MKOSTEMP */ ++ if (fd >= 0) ++ unlink(template); ++ ++ return fd; ++#endif /* __linux__ */ + } + #endif + Index: head/graphics/mesa-dri/files/patch-src_intel_tools_aubinator__error__decode.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_intel_tools_aubinator__error__decode.c (revision 490568) +++ head/graphics/mesa-dri/files/patch-src_intel_tools_aubinator__error__decode.c (revision 490569) @@ -1,14 +1,14 @@ # expose getline in FreeBSD's stdio.h # --- src/intel/tools/aubinator_error_decode.c.orig 2017-05-10 14:13:57 UTC +++ src/intel/tools/aubinator_error_decode.c @@ -22,6 +22,9 @@ * */ -+#ifdef __FreeBSD__ ++#if defined(__FreeBSD__) && __FreeBSD__ < 12 +#define _WITH_GETLINE +#endif #include #include #include Index: head/graphics/mesa-dri/files/patch-src_intel_tools_error2aub.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_intel_tools_error2aub.c (nonexistent) +++ head/graphics/mesa-dri/files/patch-src_intel_tools_error2aub.c (revision 490569) @@ -0,0 +1,14 @@ +# expose getline in FreeBSD's stdio.h +# +--- src/intel/tools/error2aub.c.orig 2018-08-09 00:34:30 UTC ++++ src/intel/tools/error2aub.c +@@ -26,6 +26,9 @@ + #include + #include + #include ++#if defined(__FreeBSD__) && __FreeBSD__ < 12 ++#define _WITH_GETLINE ++#endif + #include + #include + #include Property changes on: head/graphics/mesa-dri/files/patch-src_intel_tools_error2aub.c ___________________________________________________________________ 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_build__id.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_util_build__id.c (revision 490568) +++ head/graphics/mesa-dri/files/patch-src_util_build__id.c (revision 490569) @@ -1,17 +1,15 @@ # Elf_ doesn't exist, use Elf32_ or Elf64_ # --- src/util/build_id.c.orig 2017-12-21 17:31:22 UTC +++ src/util/build_id.c -@@ -34,7 +34,11 @@ +@@ -38,6 +38,10 @@ + #define ElfW(type) Elf_##type #endif - #ifndef ElfW --#define ElfW(type) Elf_##type -+#ifdef __LP64__ -+#define ElfW(type) Elf64_##type -+#else -+#define ElfW(type) Elf32_##type ++#if defined(__FreeBSD__) && __FreeBSD__ < 12 ++typedef Elf_Note Elf_Nhdr; +#endif - #endif ++ + struct build_id_note { + ElfW(Nhdr) nhdr; - #define ALIGN(val, align) (((val) + (align) - 1) & ~((align) - 1)) Index: head/graphics/mesa-dri/pkg-help =================================================================== --- head/graphics/mesa-dri/pkg-help (revision 490568) +++ head/graphics/mesa-dri/pkg-help (revision 490569) @@ -1,15 +1,5 @@ VAAPI and VDPAU options enable building Gallium based VA-API and VDPAU drivers to decode video on the GPU via libva and libvdpau, respectively. Gallium based VAAPI and VDPAU drivers are only available for Radeon GPUs. -Both GPU decode options require newer drm drivers than are currently present -in a released FreeBSD kernel. These are options for DRM-next and DragonFly. - -The TEXTURE option enables texture-float support, which SGI claims requires -US Patent #6,650,327 [1], filed Jun 16, 1998 thus expiring on Jun 16, 2018. -Use may require a license depending on jurisdiction, consult a lawyer. - -See docs/patents.txt in the Mesa tarball or the following URLs: - -[1] https://www.google.com/patents/US6650327 -[2] http://www.opengl.org/registry/specs/ARB/texture_float.txt +VAAPI and VDPAU require graphics/drm-stable-kmod or newer on FreeBSD. Index: head/graphics/mesa-dri/pkg-plist =================================================================== --- head/graphics/mesa-dri/pkg-plist (revision 490568) +++ head/graphics/mesa-dri/pkg-plist (revision 490569) @@ -1,97 +1,93 @@ etc/drirc @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 %%RADEONSI_GDRIVER%%lib/dri/radeonsi_dri.so %%VAAPI%%%%RADEONSI_GDRIVER%%lib/dri/radeonsi_drv_video.so %%SWRAST_DRIVER%%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 -@comment lib/libwayland-egl.so -@comment lib/libwayland-egl.so.1 -@comment lib/libwayland-egl.so.1.0.0 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 -@comment libdata/pkgconfig/wayland-egl.pc %%INTEL_VDRIVER%%share/vulkan/icd.d/intel_icd.%%ARCH%%.json %%RADEON_VDRIVER%%share/vulkan/icd.d/radeon_icd.%%ARCH%%.json Index: head/graphics/mesa-libs/Makefile =================================================================== --- head/graphics/mesa-libs/Makefile (revision 490568) +++ head/graphics/mesa-libs/Makefile (revision 490569) @@ -1,57 +1,54 @@ # Created by: Eric Anholt # $FreeBSD$ PORTNAME= mesa-libs PORTVERSION= ${MESAVERSION} -PORTREVISION= 4 CATEGORIES= graphics COMMENT= OpenGL libraries that support GLX and EGL clients USE_XORG= xorgproto x11 xcb xdamage xext \ xfixes xshmfence xxf86vm 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-client.so:graphics/wayland \ - libwayland-server.so:graphics/wayland +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="" .if ${PORT_OPTIONS:MWAYLAND} CONFIGURE_ARGS+= --with-platforms=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 src/egl/wayland/wayland-egl -MESA_INSTALL_WRKSRC+= src/egl/wayland/wayland-egl +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 .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 490568) +++ head/graphics/mesa-libs/pkg-plist (revision 490569) @@ -1,46 +1,42 @@ @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 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 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 %%WAYLAND%%lib/libwayland-egl.so -@comment %%WAYLAND%%lib/libwayland-egl.so.1 -@comment %%WAYLAND%%lib/libwayland-egl.so.1.0.0 libdata/pkgconfig/egl.pc libdata/pkgconfig/gbm.pc libdata/pkgconfig/gl.pc libdata/pkgconfig/glesv2.pc -@comment %%WAYLAND%%libdata/pkgconfig/wayland-egl.pc