Index: head/graphics/mesa-dri/Makefile =================================================================== --- head/graphics/mesa-dri/Makefile (revision 457263) +++ head/graphics/mesa-dri/Makefile (revision 457264) @@ -1,83 +1,84 @@ # Created by: Eric Anholt # $FreeBSD$ PORTNAME= mesa-dri PORTVERSION= ${MESAVERSION} CATEGORIES= graphics COMMENT= OpenGL hardware acceleration drivers for DRI2+ -USE_XORG= dri2proto dri3proto glproto presentproto x11 xcb xdamage xext \ - xfixes xshmfence xv xvmc xxf86vm +USE_XORG= dri2proto dri3proto glproto presentproto x11 xdamage xext \ + xfixes xshmfence xv xvmc OPTIONS_DEFINE= TEXTURE VAAPI VDPAU OPTIONS_DEFAULT=TEXTURE 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 .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 DRI_DRIVERS= SWRAST # classic swrast .if "${MESA_LLVM_VER}" != "" GALLIUM_DRIVERS= SWRAST # llvmpipe .else GALLIUM_DRIVERS= "" .endif .if ${ARCH} == amd64 || ${ARCH} == i386 \ || ${ARCH} == powerpc || ${ARCH} == powerpc64 DRI_DRIVERS+= RADEON R200 GALLIUM_DRIVERS+= R300 R600 . if "${MESA_LLVM_VER}" != "" # until PPC gets LLVM in base GALLIUM_DRIVERS+= RADEONSI . endif .endif .if ${ARCH} == amd64 || ${ARCH} == i386 DRI_DRIVERS+= I915 I965 GALLIUM_DRIVERS+= SVGA . if ${OPSYS} == FreeBSD && ${OSVERSION} < 1100000 EXTRA_PATCHES+= ${PATCHDIR}/extra-src_mesa_drivers_dri_i965_intel__screen.c . endif .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 CONFIGURE_ARGS+= --with-dri-drivers="${DRI_DRIVERS:tl}" \ --with-gallium-drivers="${GALLIUM_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 .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 457263) +++ head/graphics/mesa-dri/Makefile.common (revision 457264) @@ -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= 17.3.0 +MESABASEVERSION= 17.3.1 # 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,build shebangfix tar:xz + 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?= 40 +MESA_LLVM_VER?= 50 .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/Makefile.targets =================================================================== --- head/graphics/mesa-dri/Makefile.targets (revision 457263) +++ head/graphics/mesa-dri/Makefile.targets (revision 457264) @@ -1,53 +1,56 @@ # $FreeBSD$ # # this file holds common targets post-patch: -# Use --link-static until ports/223191 is fixed +# The LLVM docs say: "BUILD_SHARED_LIBS is only recommended for use by LLVM developers. +# If you want to build LLVM as a shared library, you should use the LLVM_BUILD_LLVM_DYLIB option." +# So, use the "old buggy" way, which is really the working way, whereas the SHARED_LIBS +# approach is actually the old (before LLVM 3.9) and buggy (according to LLVM devs) way @${REINPLACE_CMD} -e '/$$LLVM_VERSION_MAJOR -ge 4/s|test |false |' ${WRKSRC}/configure . if ${COMPONENT} == osmesa @${REINPLACE_CMD} -e '/$$LLVM_VERSION_MAJOR -ge 4/s|test |false |' ${WRKSRC}/configure.ac . endif .if ${OPSYS} == FreeBSD @${REINPLACE_CMD} -e 's|x86_64|amd64|' ${WRKSRC}/configure . if ${COMPONENT} == osmesa @${REINPLACE_CMD} -e 's|x86_64|amd64|' ${WRKSRC}/configure.ac . endif # Disable use of GCC_ATOMICs on i386 to avoid build failures # Clang in 10.3 fails with cannot compile this atomic library call yet 'p_atomic_add' # Clang in 11.0 fails with undefined reference to `__atomic_fetch_add_8` . if ${ARCH} == "i386" @${REINPLACE_CMD} -e 's|GCC_ATOMIC_BUILTINS_SUPPORTED||' ${WRKSRC}/configure . if ${COMPONENT} == osmesa @${REINPLACE_CMD} -e 's|GCC_ATOMIC_BUILTINS_SUPPORTED||' ${WRKSRC}/configure.ac . endif . endif .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/distinfo =================================================================== --- head/graphics/mesa-dri/distinfo (revision 457263) +++ head/graphics/mesa-dri/distinfo (revision 457264) @@ -1,3 +1,3 @@ -TIMESTAMP = 1512740951 -SHA256 (mesa-17.3.0.tar.xz) = 29a0a3a6c39990d491a1a58ed5c692e596b3bfc6c01d0b45e0b787116c50c6d9 -SIZE (mesa-17.3.0.tar.xz) = 10667896 +TIMESTAMP = 1513877589 +SHA256 (mesa-17.3.1.tar.xz) = 9ae607e0998a586fb2c866cfc8e45e6f52d1c56cb1b41288253ea83eada824c1 +SIZE (mesa-17.3.1.tar.xz) = 10669392 Index: head/graphics/mesa-dri/files/patch-src_mesa_main_compiler.h =================================================================== --- head/graphics/mesa-dri/files/patch-src_mesa_main_compiler.h (revision 457263) +++ head/graphics/mesa-dri/files/patch-src_mesa_main_compiler.h (nonexistent) @@ -1,12 +0,0 @@ ---- src/mesa/main/compiler.h.orig 2017-05-10 14:13:57 UTC -+++ src/mesa/main/compiler.h -@@ -51,6 +51,9 @@ - #if defined(__linux__) - #include - #define CPU_TO_LE32( x ) bswap_32( x ) -+#elif defined(__FreeBSD__) -+#include -+#define CPU_TO_LE32( x ) bswap32( x ) - #elif defined(__APPLE__) - #include - #define CPU_TO_LE32( x ) CFSwapInt32HostToLittle( x ) Property changes on: head/graphics/mesa-dri/files/patch-src_mesa_main_compiler.h ___________________________________________________________________ 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 457263) +++ head/graphics/mesa-dri/files/patch-configure (revision 457264) @@ -1,41 +1,41 @@ ---- configure.orig 2017-10-02 15:49:13 UTC +--- configure.orig 2017-12-21 17:31:27 UTC +++ configure -@@ -22846,7 +22846,7 @@ fi +@@ -23308,7 +23308,7 @@ fi case "$host_os" in -linux*) +linux* | freebsd*) dri3_default=yes ;; *) -@@ -26399,9 +26399,19 @@ if test "x$enable_opencl" = xyes; then +@@ -27028,9 +27028,19 @@ if test "x$enable_opencl" = xyes; then as_fn_error $? "cannot enable OpenCL without Gallium" "$LINENO" 5 fi + if test "x$acv_mesa_CLANG" = xno; then + + GCC_VERSION=`$CC -dumpversion` + if test $? -eq 0; then + GCC_VERSION_MAJOR=`echo $GCC_VERSION | cut -d. -f1` + GCC_VERSION_MINOR=`echo $GCC_VERSION | cut -d. -f2` + fi + if test $GCC_VERSION_MAJOR -lt 4 -o $GCC_VERSION_MAJOR -eq 4 -a $GCC_VERSION_MINOR -lt 7; then as_fn_error $? "gcc >= 4.7 is required to build clover" "$LINENO" 5 fi +# end of clang test. + fi if test "x$have_libclc" = xno; then as_fn_error $? "pkg-config cannot find libclc.pc which is required to build clover. -@@ -26464,9 +26474,6 @@ rm -f core conftest.err conftest.$ac_obj +@@ -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-include_GL_internal_dri__interface.h =================================================================== --- head/graphics/mesa-dri/files/patch-include_GL_internal_dri__interface.h (revision 457263) +++ head/graphics/mesa-dri/files/patch-include_GL_internal_dri__interface.h (revision 457264) @@ -1,19 +1,19 @@ GCC on 9.x doesn't allow types to be overwritten, these types are defined in drm.h also, which causes build issues in xorg-server. ---- include/GL/internal/dri_interface.h.orig 2016-11-10 22:05:17 UTC +--- include/GL/internal/dri_interface.h.orig 2017-12-21 17:31:21 UTC +++ include/GL/internal/dri_interface.h @@ -40,13 +40,7 @@ #ifndef DRI_INTERFACE_H #define DRI_INTERFACE_H -#ifdef HAVE_LIBDRM #include -#else -typedef unsigned int drm_context_t; -typedef unsigned int drm_drawable_t; -typedef struct drm_clip_rect drm_clip_rect_t; -#endif - /** - * \name DRI interface structures + #include + Index: head/graphics/mesa-dri/files/patch-src_egl_drivers_dri2_platform__x11.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_egl_drivers_dri2_platform__x11.c (revision 457263) +++ head/graphics/mesa-dri/files/patch-src_egl_drivers_dri2_platform__x11.c (revision 457264) @@ -1,14 +1,16 @@ # work-around for https://bugs.freedesktop.org/show_bug.cgi?id=100627 # ---- src/egl/drivers/dri2/platform_x11.c.orig 2017-10-23 13:21:18 UTC +--- src/egl/drivers/dri2/platform_x11.c.orig 2017-12-21 17:31:21 UTC +++ src/egl/drivers/dri2/platform_x11.c -@@ -1462,6 +1462,9 @@ dri2_initialize_x11(_EGLDriver *drv, _EGLDisplay *disp +@@ -1462,7 +1462,11 @@ dri2_initialize_x11(_EGLDriver *drv, _EG if (!disp->Options.UseFallback) { #ifdef HAVE_DRI3 +#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && !defined(__DRM_NEXT__) -+ if (env_var_as_boolean("LIBGL_DRI3_ENABLE", false)) -+#endif ++ if (env_var_as_boolean("LIBGL_DRI3_ENABLE", false) && !env_var_as_boolean("LIBGL_DRI3_DISABLE", false)) ++#else if (!env_var_as_boolean("LIBGL_DRI3_DISABLE", false)) ++#endif initialized = dri2_initialize_x11_dri3(drv, disp); #endif + Index: head/graphics/mesa-dri/files/patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c (revision 457263) +++ head/graphics/mesa-dri/files/patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c (revision 457264) @@ -1,118 +1,118 @@ Revert the following commit. FreeBSD and DragonFly don't have the required render nodes. ------- From 69a1b9959e59653da262185c4e2cf57d24939b19 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Mon, 29 Jun 2015 12:36:45 +0100 Subject: pipe-loader: drop support for non-render node devices Render nodes have been around for quite some time. Removing support via the master/primary node allows us to clean up the conditional compilation and simplify the build greatly. For example currently we the pipe-loader, which explicitly links against xcb and friends (for X auth) if found at compile-time. That would cause problems as one will be forced to use X/xcb, even if it's a headless system that is used for opencl. v2: Clarify the linking topic in the commit message. Cc: Tom Stellard Signed-off-by: Emil Velikov Reviewed-by: Francisco Jerez ---- src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c.orig 2017-10-02 15:49:02 UTC +--- 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 -@@ -214,6 +214,14 @@ pipe_loader_drm_probe_fd(struct pipe_loa +@@ -207,6 +207,14 @@ pipe_loader_drm_probe_fd(struct pipe_loa } static int +open_drm_minor(int minor) +{ + char path[PATH_MAX]; + snprintf(path, sizeof(path), DRM_DEV_NAME, DRM_DIR_NAME, minor); + return open(path, O_RDWR, 0); +} + +static int open_drm_render_node_minor(int minor) { char path[PATH_MAX]; -@@ -225,8 +233,15 @@ open_drm_render_node_minor(int minor) +@@ -218,8 +226,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; -@@ -240,6 +255,9 @@ pipe_loader_drm_probe(struct pipe_loader +@@ -233,6 +248,9 @@ pipe_loader_drm_probe(struct pipe_loader continue; } + render_node_devs[j].vendor_id = dev->u.pci.vendor_id; + render_node_devs[j].chip_id = dev->u.pci.chip_id; + if (j < ndev) { devs[j] = dev; } else { -@@ -249,6 +267,46 @@ pipe_loader_drm_probe(struct pipe_loader +@@ -242,6 +260,46 @@ pipe_loader_drm_probe(struct pipe_loader j++; } + num_render_node_devs = j; + + /* Next look for drm devices. */ + for (i = 0; i < DRM_MAX_MINOR; i++) { + struct pipe_loader_device *dev; + boolean duplicate = FALSE; + fd = open_drm_minor(i); + if (fd < 0) + continue; + + if (!pipe_loader_drm_probe_fd(&dev, fd)) { + close(fd); + continue; + } + + /* Check to make sure we aren't already accessing this device via + * render nodes. + */ + for (k = 0; k < num_render_node_devs; k++) { + if (dev->u.pci.vendor_id == render_node_devs[k].vendor_id && + dev->u.pci.chip_id == render_node_devs[k].chip_id) { + close(fd); + dev->ops->release(&dev); + duplicate = TRUE; + break; + } + } + + if (duplicate) + continue; + + if (j < ndev) { + devs[j] = dev; + } else { + dev->ops->release(&dev); + } + + j++; + } + return j; } Index: head/graphics/mesa-dri/files/patch-src_glx_glxext.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_glx_glxext.c (revision 457263) +++ head/graphics/mesa-dri/files/patch-src_glx_glxext.c (revision 457264) @@ -1,14 +1,16 @@ # work-around for https://bugs.freedesktop.org/show_bug.cgi?id=100627 # ---- src/glx/glxext.c.orig 2017-10-23 13:21:18 UTC +--- src/glx/glxext.c.orig 2017-12-21 17:31:21 UTC +++ src/glx/glxext.c -@@ -920,6 +920,9 @@ __glXInitialize(Display * dpy) +@@ -920,7 +920,11 @@ __glXInitialize(Display * dpy) #if defined(GLX_USE_DRM) if (glx_direct && glx_accel) { #if defined(HAVE_DRI3) +#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && !defined(__DRM_NEXT__) -+ if (env_var_as_boolean("LIBGL_DRI3_ENABLE", false)) -+#endif ++ if (env_var_as_boolean("LIBGL_DRI3_ENABLE", false) && !env_var_as_boolean("LIBGL_DRI3_DISABLE", false)) ++#else if (!env_var_as_boolean("LIBGL_DRI3_DISABLE", false)) ++#endif dpyPriv->dri3Display = dri3_create_display(dpy); #endif /* HAVE_DRI3 */ + dpyPriv->dri2Display = dri2CreateDisplay(dpy); Index: head/graphics/mesa-dri/files/patch-src_intel_Makefile.in =================================================================== --- head/graphics/mesa-dri/files/patch-src_intel_Makefile.in (revision 457263) +++ head/graphics/mesa-dri/files/patch-src_intel_Makefile.in (revision 457264) @@ -1,18 +1,18 @@ ../../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-10-23 13:21:32 UTC +--- src/intel/Makefile.in.orig 2017-12-24 10:29:12 UTC +++ src/intel/Makefile.in -@@ -1975,7 +1975,8 @@ tools_aubinator_error_decode_LDADD = \ +@@ -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: head/graphics/mesa-dri/files/patch-src_util_build__id.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_util_build__id.c (revision 457263) +++ head/graphics/mesa-dri/files/patch-src_util_build__id.c (revision 457264) @@ -1,17 +1,17 @@ # Elf_ doesn't exist, use Elf32_ or Elf64_ # ---- src/util/build_id.c.orig 2017-05-10 14:13:58 UTC +--- src/util/build_id.c.orig 2017-12-21 17:31:22 UTC +++ src/util/build_id.c -@@ -33,7 +33,11 @@ +@@ -34,7 +34,11 @@ #endif #ifndef ElfW -#define ElfW(type) Elf_##type +#ifdef __LP64__ +#define ElfW(type) Elf64_##type +#else +#define ElfW(type) Elf32_##type +#endif #endif #define ALIGN(val, align) (((val) + (align) - 1) & ~((align) - 1)) Index: head/lang/clover/Makefile =================================================================== --- head/lang/clover/Makefile (revision 457263) +++ head/lang/clover/Makefile (revision 457264) @@ -1,37 +1,38 @@ # $FreeBSD$ PORTNAME= clover PORTVERSION= ${MESAVERSION} CATEGORIES= lang COMMENT= Mesa "Clover" OpenCL library -BUILD_DEPENDS= libclc>=0.2.0.20160915:devel/libclc \ +BUILD_DEPENDS= libclc>=0.3.0:devel/libclc \ opencl>=0:devel/opencl LIB_DEPENDS= libOpenCL.so:devel/ocl-icd -RUN_DEPENDS= opencl>=0:devel/opencl +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 #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: @if [ -e ${LOCALBASE}/bin/llvm-config${MESA_LLVM_VER} ] && \ ! [ -e ${LOCALBASE}/bin/clang${MESA_LLVM_VER} ]; then \ ${ECHO_MSG} "Your llvm${MESA_LLVM_VER} is not built with clang support, which is required."; \ ${FALSE}; \ fi .include