Index: head/graphics/libosmesa/Makefile =================================================================== --- head/graphics/libosmesa/Makefile (revision 441423) +++ head/graphics/libosmesa/Makefile (revision 441424) @@ -1,38 +1,35 @@ # Created by: gahr # $FreeBSD$ PORTNAME= libosmesa PORTVERSION= ${MESAVERSION} CATEGORIES= graphics COMMENT= Off-Screen Mesa implementation of the OpenGL API -LIB_DEPENDS= libexpat.so:textproc/expat2 \ - libglapi.so:graphics/mesa-libs - USE_XORG= glproto .include -.include "${.CURDIR}/../../graphics/mesa-dri/Makefile.common" +.include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" CONFIGURE_ARGS+= --disable-dri --disable-egl --disable-gbm \ - --with-gallium-drivers=swrast + --disable-gles2 --with-gallium-drivers=swrast MESA_BUILD_WRKSRC= src/util src/compiler src/mapi src/mesa .if "${MESA_LLVM_VER}" != "" -CONFGIURE_ARGS+= --enable-osmesa-gallium +CONFIGURE_ARGS+= --enable-osmesa-gallium MESA_BUILD_WRKSRC+= src/gallium MESA_INSTALL_WRKSRC= src/gallium/state_trackers/osmesa src/gallium/targets/osmesa .else CONFIGURE_ARGS+= --enable-osmesa MESA_INSTALL_WRKSRC= src/mesa/drivers/osmesa .endif -.include "${.CURDIR}/../../graphics/mesa-dri/Makefile.targets" +.include "${MASTERDIR}/Makefile.targets" post-install: @${MKDIR} ${STAGEDIR}${PREFIX}/include/GL ${INSTALL_DATA} ${WRKSRC}/include/GL/osmesa.h \ ${STAGEDIR}${PREFIX}/include/GL -.include +.include Index: head/graphics/mesa-dri/Makefile =================================================================== --- head/graphics/mesa-dri/Makefile (revision 441423) +++ head/graphics/mesa-dri/Makefile (revision 441424) @@ -1,76 +1,80 @@ # Created by: Eric Anholt # $FreeBSD$ PORTNAME= mesa-dri PORTVERSION= ${MESAVERSION} CATEGORIES= graphics COMMENT= OpenGL hardware acceleration drivers for DRI2+ -LIB_DEPENDS= libdrm.so:graphics/libdrm \ - libexpat.so:textproc/expat2 RUN_DEPENDS= ${LOCALBASE}/lib/libtxc_dxtn.so:graphics/s2tc USE_XORG= dri2proto dri3proto glproto presentproto x11 xdamage xext \ xfixes xshmfence xv xvmc OPTIONS_DEFINE= TEXTURE VAAPI VDPAU OPTIONS_DEFAULT=TEXTURE OPTIONS_SUB= yes -PKGHELP= ${.CURDIR}/pkg-help 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}/../../graphics/mesa-dri/Makefile.common" +.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 -GALLIUM_DRIVERS= SWRAST +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 RADEONSI -.elif ${ARCH} == armv6 || ${ARCH} == aarch64 -GALLIUM_DRIVERS+= FREEDRENO VC4 +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 +.elif ${ARCH} == armv6 || ${ARCH} == aarch64 +GALLIUM_DRIVERS+= FREEDRENO VC4 .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 "${.CURDIR}/../../graphics/mesa-dri/Makefile.targets" +.include "${MASTERDIR}/Makefile.targets" post-install: @${RM} -r ${STAGEDIR}/etc/OpenCL -.include +.include Index: head/graphics/mesa-dri/Makefile.common =================================================================== --- head/graphics/mesa-dri/Makefile.common (revision 441423) +++ head/graphics/mesa-dri/Makefile.common (revision 441424) @@ -1,90 +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.0.4 +MESABASEVERSION= 17.1.0 # 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 USE_LDCONFIG= yes GNU_CONFIGURE= yes -PKGINSTALL= ${.CURDIR}/pkg-install -PKGDEINSTALL= ${.CURDIR}/pkg-deinstall - # 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/gallium/drivers/freedreno/ir3/ir3_nir_trig.py \ src/mapi/glapi/gen/*.py src/mapi/mapi_abi.py \ src/mesa/drivers/dri/common/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}/../../graphics/mesa-dri +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 -COMPONENT= ${PORTNAME:tl:C/^lib//:C/mesa-//} +.include -.if (${ARCH} != sparc64 && ${ARCH} != ia64) # no working LLVM +# 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 .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 -# The gallium-llvm switch is the global llvm switch for historical reasons -CONFIGURE_ARGS+= --enable-gallium-llvm +CONFIGURE_ARGS+= --enable-llvm .else -CONFIGURE_ARGS+= --disable-gallium-llvm +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 - -.if ${OPSYS} == DragonFly -LIB_DEPENDS+= libelf.so:devel/libelf -.endif Index: head/graphics/mesa-dri/Makefile.targets =================================================================== --- head/graphics/mesa-dri/Makefile.targets (revision 441423) +++ head/graphics/mesa-dri/Makefile.targets (revision 441424) @@ -1,45 +1,42 @@ # $FreeBSD$ # # this file holds common targets post-patch: .if ${OPSYS} == FreeBSD @${REINPLACE_CMD} -e 's|x86_64|amd64|' ${WRKSRC}/configure -# Clang 3.4 in 10.x on i386 fails with the following error when using "GCC atomics" -# -# glsl/cache.c:613:4: error: cannot compile this atomic library call yet -# p_atomic_add(cache->size, size); note: expanded from macro 'p_atomic_add' -# define p_atomic_add(v, i) (void) __atomic_add_fetch((v), (i), __ATOMIC_ACQ_REL) -# -.if ${OSVERSION} < 1100000 && ${ARCH} == "i386" +# 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|-DUSE_GCC_ATOMIC_BUILTINS||' ${WRKSRC}/configure .endif .endif # ${OPSYS} @${REINPLACE_CMD} -e 's|/etc/|${PREFIX}/etc/|g' \ ${WRKSRC}/src/mesa/drivers/dri/common/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 441423) +++ head/graphics/mesa-dri/distinfo (revision 441424) @@ -1,3 +1,3 @@ -TIMESTAMP = 1492459376 -SHA256 (mesa-17.0.4.tar.xz) = 1269dc8545a193932a0779b2db5bce9be4a5f6813b98c38b93b372be8362a346 -SIZE (mesa-17.0.4.tar.xz) = 9454976 +TIMESTAMP = 1494841816 +SHA256 (mesa-17.1.0.tar.xz) = cf234a6ed4764673886b6661553b54675776ef0898f774716173cec890ac3b17 +SIZE (mesa-17.1.0.tar.xz) = 9849580 Index: head/graphics/mesa-dri/files/patch-src_util_ralloc.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_util_ralloc.c (revision 441423) +++ head/graphics/mesa-dri/files/patch-src_util_ralloc.c (nonexistent) @@ -1,18 +0,0 @@ ---- src/util/ralloc.c.orig 2017-04-01 15:33:37 UTC -+++ src/util/ralloc.c -@@ -338,6 +338,7 @@ ralloc_parent(const void *ptr) - - static void *autofree_context = NULL; - -+__attribute__((destructor)) - static void - autofree(void) - { -@@ -349,7 +350,6 @@ ralloc_autofree_context(void) - { - if (unlikely(autofree_context == NULL)) { - autofree_context = ralloc_context(NULL); -- atexit(autofree); - } - return autofree_context; - } Property changes on: head/graphics/mesa-dri/files/patch-src_util_ralloc.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -1 \ No newline at end of property Index: head/graphics/mesa-dri/files/configure.ac =================================================================== --- head/graphics/mesa-dri/files/configure.ac (revision 441423) +++ head/graphics/mesa-dri/files/configure.ac (revision 441424) @@ -1,81 +1,48 @@ --- configure.ac.orig 2017-04-01 15:33:36 UTC +++ configure.ac -@@ -942,19 +942,19 @@ llvm_add_target() { - # Call this inside ` ` to get the return value. - # $1 is the llvm-config command with arguments. - strip_unwanted_llvm_flags() { -- # Use \> (marks the end of the word) -- echo " `$1`" | sed \ -- -e 's/\s\+-m\S*//g' \ -- -e 's/\s\+-DNDEBUG\>//g' \ -- -e 's/\s\+-D_GNU_SOURCE\>//g' \ -- -e 's/\s\+-pedantic\>//g' \ -- -e 's/\s\+-W\S*//g' \ -- -e 's/\s\+-O\S*//g' \ -- -e 's/\s\+-g\S*//g' \ -- -e 's/-fno-rtti\>/-Fno-rtti/g' \ -- -e 's/\s\+-f\S*//g' \ -- -e 's/-Fno-rtti\>/-fno-rtti/g' \ -- -e 's/^ //' -+ echo " `$1` " | sed -E \ -+ -e 's/[[[:space:]]]+-m[[^[:space:]]]*//g' \ -+ -e 's/[[[:space:]]]+-DNDEBUG[[[:space:]]]/ /g' \ -+ -e 's/[[[:space:]]]+-D_GNU_SOURCE[[[:space:]]]/ /g' \ -+ -e 's/[[[:space:]]]+-pedantic[[[:space:]]]/ /g' \ -+ -e 's/[[[:space:]]]+-W[[^[:space:]]]*//g' \ -+ -e 's/[[[:space:]]]+-O[[^[:space:]]]*//g' \ -+ -e 's/[[[:space:]]]+-g[[^[:space:]]]*//g' \ -+ -e 's/-fno-rtti[[[:space:]]]/-Fno-rtti /g' \ -+ -e 's/[[[:space:]]]+-f[[^[:space:]]]*//g' \ -+ -e 's/-Fno-rtti[[[:space:]]]/-fno-rtti /g' \ -+ -e 's/^[[[:space:]]]//' \ -+ -e 's/[[[:space:]]]$//' - } - - llvm_set_environment_variables() { @@ -1121,7 +1121,7 @@ fi AC_SUBST(LIBSENSORS_LIBS) case "$host_os" in -linux*) +linux* | freebsd*) dri3_default=yes ;; *) @@ -1631,7 +1631,7 @@ dnl platform checks. Set DEFINES and LIB if test "x$enable_dri" = xyes; then # Platform specific settings and drivers to build case "$host_os" in - linux*) + linux* | freebsd*) if test "x$enable_dri3" = xyes; then DEFINES="$DEFINES -DHAVE_DRI3" fi @@ -2002,9 +2002,18 @@ if test "x$enable_opencl" = xyes; then AC_MSG_ERROR([cannot enable OpenCL without Gallium]) 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 AC_MSG_ERROR([gcc >= 4.7 is required to build clover]) fi + fi # end of clang test if test "x$have_libclc" = xno; then AC_MSG_ERROR([pkg-config cannot find libclc.pc which is required to build clover. @@ -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 441423) +++ head/graphics/mesa-dri/files/patch-configure (revision 441424) @@ -1,83 +1,50 @@ ---- configure.orig 2017-04-01 15:33:50 UTC +--- configure.orig 2017-05-10 14:14:06 UTC +++ configure -@@ -22350,19 +22350,19 @@ llvm_add_target() { - # Call this inside ` ` to get the return value. - # $1 is the llvm-config command with arguments. - strip_unwanted_llvm_flags() { -- # Use \> (marks the end of the word) -- echo " `$1`" | sed \ -- -e 's/\s\+-m\S*//g' \ -- -e 's/\s\+-DNDEBUG\>//g' \ -- -e 's/\s\+-D_GNU_SOURCE\>//g' \ -- -e 's/\s\+-pedantic\>//g' \ -- -e 's/\s\+-W\S*//g' \ -- -e 's/\s\+-O\S*//g' \ -- -e 's/\s\+-g\S*//g' \ -- -e 's/-fno-rtti\>/-Fno-rtti/g' \ -- -e 's/\s\+-f\S*//g' \ -- -e 's/-Fno-rtti\>/-fno-rtti/g' \ -- -e 's/^ //' -+ echo " `$1` " | sed -E \ -+ -e 's/[[:space:]]+-m[^[:space:]]*//g' \ -+ -e 's/[[:space:]]+-DNDEBUG[[:space:]]/ /g' \ -+ -e 's/[[:space:]]+-D_GNU_SOURCE[[:space:]]/ /g' \ -+ -e 's/[[:space:]]+-pedantic[[:space:]]/ /g' \ -+ -e 's/[[:space:]]+-W[^[:space:]]*//g' \ -+ -e 's/[[:space:]]+-O[^[:space:]]*//g' \ -+ -e 's/[[:space:]]+-g[^[:space:]]*//g' \ -+ -e 's/-fno-rtti[[:space:]]/-Fno-rtti /g' \ -+ -e 's/[[:space:]]+-f[^[:space:]]*//g' \ -+ -e 's/-Fno-rtti[[:space:]]/-fno-rtti /g' \ -+ -e 's/^[[:space:]]//' \ -+ -e 's/[[:space:]]$//' - } +@@ -22709,7 +22709,7 @@ fi - llvm_set_environment_variables() { -@@ -22560,7 +22560,7 @@ fi - case "$host_os" in -linux*) +linux* | freebsd*) dri3_default=yes ;; *) -@@ -24099,7 +24099,7 @@ fi +@@ -24108,7 +24108,7 @@ fi if test "x$enable_dri" = xyes; then # Platform specific settings and drivers to build case "$host_os" in - linux*) + linux* | freebsd*) if test "x$enable_dri3" = xyes; then DEFINES="$DEFINES -DHAVE_DRI3" fi -@@ -25851,9 +25851,19 @@ if test "x$enable_opencl" = xyes; then +@@ -25972,9 +25972,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. -@@ -25916,9 +25926,6 @@ rm -f core conftest.err conftest.$ac_obj +@@ -26037,9 +26047,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_egl_drivers_dri2_platform__x11.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_egl_drivers_dri2_platform__x11.c (revision 441423) +++ head/graphics/mesa-dri/files/patch-src_egl_drivers_dri2_platform__x11.c (revision 441424) @@ -1,16 +1,16 @@ # work-around for https://bugs.freedesktop.org/show_bug.cgi?id=100627 # ---- src/egl/drivers/dri2/platform_x11.c.orig 2017-04-01 15:33:36 UTC +--- src/egl/drivers/dri2/platform_x11.c.orig 2017-05-10 14:13:57 UTC +++ src/egl/drivers/dri2/platform_x11.c -@@ -1507,7 +1507,11 @@ +@@ -1509,7 +1509,11 @@ dri2_initialize_x11(_EGLDriver *drv, _EG if (!getenv("LIBGL_ALWAYS_SOFTWARE")) { #ifdef HAVE_DRI3 +#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && !defined (__DRM_NEXT__) + if (getenv("LIBGL_DRI3_ENABLE") && !getenv("LIBGL_DRI3_DISABLE")) +#else if (!getenv("LIBGL_DRI3_DISABLE")) +#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 441423) +++ head/graphics/mesa-dri/files/patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c (revision 441424) @@ -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-04-01 15:33:37 UTC +--- src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c.orig 2017-05-10 14:13:57 UTC +++ src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c -@@ -225,6 +225,14 @@ pipe_loader_drm_probe_fd(struct pipe_loa +@@ -209,6 +209,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]; -@@ -236,8 +244,15 @@ open_drm_render_node_minor(int minor) +@@ -220,8 +228,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; -@@ -251,6 +266,9 @@ pipe_loader_drm_probe(struct pipe_loader +@@ -235,6 +250,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 { -@@ -260,6 +278,46 @@ pipe_loader_drm_probe(struct pipe_loader +@@ -244,6 +262,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_gallium_drivers_vc4_Makefile.in =================================================================== --- head/graphics/mesa-dri/files/patch-src_gallium_drivers_vc4_Makefile.in (nonexistent) +++ head/graphics/mesa-dri/files/patch-src_gallium_drivers_vc4_Makefile.in (revision 441424) @@ -0,0 +1,13 @@ +# enable NEON instructions in the compiler when building the NEON codepath +# +--- src/gallium/drivers/vc4/Makefile.in.orig 2017-05-16 13:55:49 UTC ++++ src/gallium/drivers/vc4/Makefile.in +@@ -669,7 +669,7 @@ libvc4_la_SOURCES = $(C_SOURCES) + libvc4_la_LIBADD = $(SIM_LIB) $(VC4_LIBS) libvc4_neon.la + libvc4_la_LDFLAGS = $(SIM_LDFLAGS) + libvc4_neon_la_SOURCES = vc4_tiling_lt.c +-libvc4_neon_la_CFLAGS = $(AM_CFLAGS) -DVC4_BUILD_NEON ++libvc4_neon_la_CFLAGS = $(AM_CFLAGS) -DVC4_BUILD_NEON -march=armv7-a -mfpu=neon + EXTRA_DIST = kernel/README + all: all-am + Property changes on: head/graphics/mesa-dri/files/patch-src_gallium_drivers_vc4_Makefile.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/mesa-dri/files/patch-src_gallium_drivers_vc4_vc4__bufmgr.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_gallium_drivers_vc4_vc4__bufmgr.c (nonexistent) +++ head/graphics/mesa-dri/files/patch-src_gallium_drivers_vc4_vc4__bufmgr.c (revision 441424) @@ -0,0 +1,14 @@ +# define ETIME as ETIMEOUT same as in intel driver +# +--- src/gallium/drivers/vc4/vc4_bufmgr.c.orig 2017-05-10 14:13:57 UTC ++++ src/gallium/drivers/vc4/vc4_bufmgr.c +@@ -27,6 +27,9 @@ + #include + #include + #include ++#ifndef ETIME ++#define ETIME ETIMEDOUT ++#endif + + #include "util/u_hash_table.h" + #include "util/u_memory.h" Property changes on: head/graphics/mesa-dri/files/patch-src_gallium_drivers_vc4_vc4__bufmgr.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_intel_tools_aubinator.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_intel_tools_aubinator.c (revision 441423) +++ head/graphics/mesa-dri/files/patch-src_intel_tools_aubinator.c (revision 441424) @@ -1,14 +1,14 @@ # 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-04-01 15:33:37 UTC +--- src/intel/tools/aubinator.c.orig 2017-05-10 14:13:57 UTC +++ src/intel/tools/aubinator.c -@@ -1299,7 +1299,7 @@ int main(int argc, char *argv[]) +@@ -1221,7 +1221,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); 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 (nonexistent) +++ head/graphics/mesa-dri/files/patch-src_intel_tools_aubinator__error__decode.c (revision 441424) @@ -0,0 +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__ ++#define _WITH_GETLINE ++#endif + #include + #include + #include Property changes on: head/graphics/mesa-dri/files/patch-src_intel_tools_aubinator__error__decode.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_mapi_glapi_gen_gl__gentable.py =================================================================== --- head/graphics/mesa-dri/files/patch-src_mapi_glapi_gen_gl__gentable.py (revision 441423) +++ head/graphics/mesa-dri/files/patch-src_mapi_glapi_gen_gl__gentable.py (revision 441424) @@ -1,11 +1,11 @@ ---- src/mapi/glapi/gen/gl_gentable.py.orig 2017-01-06 02:14:06 UTC +--- src/mapi/glapi/gen/gl_gentable.py.orig 2017-05-15 12:05:59 UTC +++ src/mapi/glapi/gen/gl_gentable.py -@@ -44,7 +44,7 @@ header = """/* GLXEXT is the define used +@@ -43,7 +43,7 @@ header = """/* GLXEXT is the define used #endif #if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \\ - || (!defined(GLXEXT) && defined(DEBUG) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__)) + || (!defined(GLXEXT) && defined(DEBUG) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__)) #define USE_BACKTRACE #endif Index: head/graphics/mesa-dri/files/patch-src_mesa_main_compiler.h =================================================================== --- head/graphics/mesa-dri/files/patch-src_mesa_main_compiler.h (revision 441423) +++ head/graphics/mesa-dri/files/patch-src_mesa_main_compiler.h (revision 441424) @@ -1,12 +1,12 @@ ---- src/mesa/main/compiler.h.orig 2016-11-10 22:05:17 UTC +--- src/mesa/main/compiler.h.orig 2017-05-10 14:13:57 UTC +++ src/mesa/main/compiler.h -@@ -56,6 +56,9 @@ extern "C" { +@@ -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 ) Index: head/graphics/mesa-dri/files/patch-src_util_build__id.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_util_build__id.c (nonexistent) +++ head/graphics/mesa-dri/files/patch-src_util_build__id.c (revision 441424) @@ -0,0 +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 +@@ -33,7 +33,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)) Property changes on: head/graphics/mesa-dri/files/patch-src_util_build__id.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/pkg-plist =================================================================== --- head/graphics/mesa-dri/pkg-plist (revision 441423) +++ head/graphics/mesa-dri/pkg-plist (revision 441424) @@ -1,89 +1,92 @@ 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 %%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 @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 Index: head/graphics/mesa-libs/Makefile =================================================================== --- head/graphics/mesa-libs/Makefile (revision 441423) +++ head/graphics/mesa-libs/Makefile (revision 441424) @@ -1,67 +1,63 @@ # Created by: Eric Anholt # $FreeBSD$ PORTNAME= mesa-libs PORTVERSION= ${MESAVERSION} CATEGORIES= graphics COMMENT= OpenGL libraries that support GLX and EGL clients -BUILD_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/pthread-stubs.pc:devel/libpthread-stubs -LIB_DEPENDS+= libdrm.so:graphics/libdrm \ - libexpat.so:textproc/expat2 - USE_XORG= dri2proto dri3proto glproto presentproto x11 xcb xdamage xext \ xfixes xshmfence xxf86vm OPTIONS_DEFINE= WAYLAND OPTIONS_SUB= yes WAYLAND_DESC= Enable support for the Wayland platform in EGL WAYLAND_LIB_DEPENDS= libwayland-client.so:graphics/wayland \ libwayland-server.so:graphics/wayland .include -.include "${.CURDIR}/../../graphics/mesa-dri/Makefile.common" +.include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" -CONFIGURE_ARGS+= --with-dri-drivers=swrast --with-gallium-drivers=swrast +CONFIGURE_ARGS+= --with-dri-drivers="" --with-gallium-drivers="" # libEGL needs gallium enabled which depends on llvm .if "${MESA_LLVM_VER}" != "" .if ${PORT_OPTIONS:MWAYLAND} -CONFIGURE_ARGS+= --with-egl-platforms=x11,drm,wayland +CONFIGURE_ARGS+= --with-platforms=x11,drm,wayland .else -CONFIGURE_ARGS+= --with-egl-platforms=x11,drm +CONFIGURE_ARGS+= --with-platforms=x11,drm .endif -PLIST_SUB+= EGL="" +PLIST_SUB+= EGL="" .else -CONFIGURE_ARGS+= --disable-egl +CONFIGURE_ARGS+= --disable-egl PLIST_SUB+= EGL="@comment " .if ${PORT_OPTIONS:MWAYLAND} -IGNORE= WAYLAND is an option for EGL and thus only valid on platforms with LLVM +IGNORE= option WAYLAND is only valid on platforms with LLVM .endif -.endif +.endif MESA_BUILD_WRKSRC= src/mapi 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 .endif MESA_BUILD_WRKSRC+= src/gbm src/glx MESA_INSTALL_WRKSRC+= src/gbm src/glx .if "${MESA_LLVM_VER}" != "" MESA_BUILD_WRKSRC+= src/egl MESA_INSTALL_WRKSRC+= src/egl .endif -.include "${.CURDIR}/../../graphics/mesa-dri/Makefile.targets" +.include "${MASTERDIR}/Makefile.targets" post-install: @cd ${WRKSRC}/src && ${SETENV} DESTDIR=${STAGEDIR} \ ${MAKE_CMD} install-pkgconfigDATA install-glHEADERS install-glxHEADERS -.include +.include Index: head/lang/clover/Makefile =================================================================== --- head/lang/clover/Makefile (revision 441423) +++ head/lang/clover/Makefile (revision 441424) @@ -1,43 +1,40 @@ # $FreeBSD$ PORTNAME= clover PORTVERSION= ${MESAVERSION} CATEGORIES= lang COMMENT= Mesa "Clover" OpenCL library BUILD_DEPENDS= libclc>=0.2.0.20160915:devel/libclc \ - opencl>=0:devel/opencl \ - ${LOCALBASE}/libdata/pkgconfig/pthread-stubs.pc:devel/libpthread-stubs -LIB_DEPENDS= libdrm.so:graphics/libdrm \ - libexpat.so:textproc/expat2 \ - libOpenCL.so:devel/ocl-icd + opencl>=0:devel/opencl +LIB_DEPENDS= libOpenCL.so:devel/ocl-icd RUN_DEPENDS= 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}/../../graphics/mesa-dri/Makefile.common" +.include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" CONFIGURE_ARGS+= --enable-opencl --enable-opencl-icd --disable-dri \ - --disable-egl --disable-gbm --disable-glx \ + --disable-egl --disable-gbm --disable-gles2 --disable-glx \ --disable-va --disable-vdpau --disable-xvmc \ - --with-gallium-drivers=r600,radeonsi + --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 "${.CURDIR}/../../graphics/mesa-dri/Makefile.targets" +.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 post-install: @${MV} ${STAGEDIR}/etc/OpenCL ${STAGEDIR}${PREFIX}/etc/ -.include +.include