Index: graphics/libGL/Makefile.common =================================================================== --- graphics/libGL/Makefile.common (revision 436545) +++ graphics/libGL/Makefile.common (working copy) @@ -18,18 +18,19 @@ MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/} MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/} -MESABASEVERSION= 13.0.5 +MESABASEVERSION= 17.0.2 # if there is a subversion, don't include the '-' between 7.11-rc2. MESASUBVERSION= -MASTER_SITES= ftp://ftp.freedesktop.org/pub/mesa/${MESABASEVERSION}/ +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 -BUILD_DEPENDS+= makedepend:devel/makedepend - USES+= compiler:c++11-lib bison gettext-tools gmake libtool \ localbase pathfix pkgconfig python:2,build shebangfix tar:xz USE_LDCONFIG= yes @@ -60,7 +61,7 @@ INSTALL_TARGET= install-strip COMPONENT= ${PORTNAME:tl:C/^lib//:C/mesa-//} -MESA_LLVM_VER=39 +MESA_LLVM_VER?= 40 CONFIGURE_ARGS+= --with-sha1=libcrypto @@ -72,7 +73,7 @@ CONFIGURE_ARGS+= --enable-gbm # 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+= --enable-glx-tls +CONFIGURE_ARGS+= --disable-glx-tls # libEGL, dri and clover need gallium enabled. # the third option in --with-egl-platforms is wayland. @@ -110,9 +111,9 @@ CONFIGURE_ARGS+= --disable-opencl CONFIGURE_ARGS+= --enable-osmesa # gallium -BUILD_DEPENDS+= llvm${MESA_LLVM_VER}>=3.9.0_4:devel/llvm${MESA_LLVM_VER} +BUILD_DEPENDS+= llvm${MESA_LLVM_VER}>=3.6:devel/llvm${MESA_LLVM_VER} .if ${COMPONENT:Mdri} != "" || ${COMPONENT:Mclover} != "" || ${COMPONENT:Megl} != "" -RUN_DEPENDS+= llvm${MESA_LLVM_VER}>=3.9.0_4:devel/llvm${MESA_LLVM_VER} +RUN_DEPENDS+= llvm${MESA_LLVM_VER}>=3.6:devel/llvm${MESA_LLVM_VER} .endif CONFIGURE_ENV+= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${MESA_LLVM_VER} Index: graphics/libGL/Makefile.targets =================================================================== --- graphics/libGL/Makefile.targets (revision 436545) +++ graphics/libGL/Makefile.targets (working copy) @@ -15,10 +15,11 @@ post-patch: .if ${OSVERSION} < 1100000 && ${ARCH} == "i386" @${REINPLACE_CMD} -e 's|-DUSE_GCC_ATOMIC_BUILTINS||' ${WRKSRC}/configure .endif -.endif -# Sed on 9.x and dragonfly don't support \< or \> - @${REINPLACE_CMD} -e 's|\\>//|[[:>:]]//|' -e 's|\\S\*//|[:graph:]* //|' \ +.else # OPSYS == FreeBSD +# DragonFly's sed lacks \< or \> while GNU sed lacks [[:<:]] or [[:>:]] + @${REINPLACE_CMD} -e 's|\\>//|[[:>:]]//|' \ ${WRKSRC}/configure +.endif # OPSYS == FreeBSD @${REINPLACE_CMD} -e 's|/etc/|${PREFIX}/etc/|g' \ ${WRKSRC}/src/mesa/drivers/dri/common/xmlconfig.c @${REINPLACE_CMD} -e 's|#!/use/bin/python|#!${PYTHON_CMD}|g' \ Index: graphics/libGL/distinfo =================================================================== --- graphics/libGL/distinfo (revision 436545) +++ graphics/libGL/distinfo (working copy) @@ -1,3 +1,3 @@ -TIMESTAMP = 1487852413 -SHA256 (mesa-13.0.5.tar.xz) = bfcea7e2c801525a60895c8aff11aa68457ee9aa35d01a4638e1f310a3f5ef87 -SIZE (mesa-13.0.5.tar.xz) = 9171480 +TIMESTAMP = 1490018937 +SHA256 (mesa-17.0.2.tar.xz) = f8f191f909e01e65de38d5bdea5fb057f21649a3aed20948be02348e77a689d4 +SIZE (mesa-17.0.2.tar.xz) = 9451056 Index: graphics/libGL/files/configure.ac =================================================================== --- graphics/libGL/files/configure.ac (revision 436545) +++ graphics/libGL/files/configure.ac (working copy) @@ -1,35 +1,53 @@ ---- configure.ac.orig 2016-06-21 14:31:09.000000000 +0200 -+++ configure.ac 2016-07-08 13:05:53.236433000 +0200 -@@ -871,7 +872,7 @@ - [enable_dri=yes]) +--- configure.ac.orig 2017-03-04 15:46:53 UTC ++++ configure.ac +@@ -943,18 +943,18 @@ llvm_add_target() { + # $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' \ ++ echo " `$1`" | sed -E \ ++ -e 's/[[[:space:]]]+-m[[^[:space:]]]*//g' \ ++ -e 's/[[[:space:]]]+-DNDEBUG\>//g' \ ++ -e 's/[[[:space:]]]+-D_GNU_SOURCE\>//g' \ ++ -e 's/[[[:space:]]]+-pedantic\>//g' \ ++ -e 's/[[[:space:]]]+-W[[^[:space:]]]*//g' \ ++ -e 's/[[[:space:]]]+-O[[^[:space:]]]*//g' \ ++ -e 's/[[[:space:]]]+-g[[^[:space:]]]*//g' \ + -e 's/-fno-rtti\>/-Fno-rtti/g' \ +- -e 's/\s\+-f\S*//g' \ ++ -e 's/[[[:space:]]]+-f[[^[:space:]]]*//g' \ + -e 's/-Fno-rtti\>/-fno-rtti/g' \ +- -e 's/^ //' ++ -e 's/^[[[:space:]]]//' + } + llvm_set_environment_variables() { +@@ -1121,7 +1121,7 @@ fi + AC_SUBST(LIBSENSORS_LIBS) + case "$host_os" in -linux*) -+linux*|freebsd*) ++linux* | freebsd*) dri3_default=yes ;; *) -@@ -1540,6 +1548,19 @@ - ;; - gnu*) - DEFINES="$DEFINES -DHAVE_ALIAS" -+dnl not sure about dri3 support, just enable it for now. -+ if test "x$enable_dri3" = xyes; then -+ DEFINES="$DEFINES -DHAVE_DRI3" -+ fi -+ -+ case "$host_cpu" in -+ powerpc* | sparc*) -+ # Build only the drivers for cards that exist on PowerPC/sparc -+ if test "x$with_dri_drivers" = "xyes"; then -+ with_dri_drivers="r200 radeon swrast" -+ fi -+ ;; -+ esac - ;; - cygwin*) - if test "x$with_dri_drivers" = "xyes"; then -@@ -1921,9 +1948,19 @@ +@@ -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* | dragonfly* | *netbsd* | openbsd*) + if test "x$enable_dri3" = xyes; then + DEFINES="$DEFINES -DHAVE_DRI3" + fi +@@ -2002,9 +2002,19 @@ if test "x$enable_opencl" = xyes; then AC_MSG_ERROR([cannot enable OpenCL without Gallium]) fi @@ -49,25 +67,12 @@ if test "x$have_libclc" = xno; then AC_MSG_ERROR([pkg-config cannot find libclc.pc which is required to build clover. -@@ -2102,9 +2139,9 @@ - strip_unwanted_llvm_flags() { - # Use \> (marks the end of the word) - echo `$1` | sed \ -- -e 's/-march=\S*//g' \ -- -e 's/-mtune=\S*//g' \ -- -e 's/-mcpu=\S*//g' \ -+ -e 's/-march=[[:graph:]]* //g' \ -+ -e 's/-mtune=[[:graph:]]* //g' \ -+ -e 's/-mcpu=[[:graph:]]* //g' \ - -e 's/-DNDEBUG\>//g' \ - -e 's/-D_GNU_SOURCE\>//g' \ - -e 's/-pedantic\>//g' \ -@@ -2196,8 +2233,6 @@ - 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 - else - MESA_LLVM=0 +@@ -2047,8 +2057,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/libGL/files/patch-configure =================================================================== --- graphics/libGL/files/patch-configure (revision 436545) +++ graphics/libGL/files/patch-configure (working copy) @@ -1,34 +1,55 @@ ---- configure.orig 2017-01-05 15:52:21 UTC +Don't forget to keep files/configure.ac in sync + +--- configure.orig 2017-03-04 15:47:01 UTC +++ configure -@@ -21955,7 +21955,7 @@ fi +@@ -22307,18 +22307,18 @@ llvm_add_target() { + # $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' \ ++ echo " `$1`" | sed -E \ ++ -e 's/[[:space:]]+-m[^[:space:]]*//g' \ ++ -e 's/[[:space:]]+-DNDEBUG\>//g' \ ++ -e 's/[[:space:]]+-D_GNU_SOURCE\>//g' \ ++ -e 's/[[:space:]]+-pedantic\>//g' \ ++ -e 's/[[:space:]]+-W[^[:space:]]*//g' \ ++ -e 's/[[:space:]]+-O[^[:space:]]*//g' \ ++ -e 's/[[:space:]]+-g[^[:space:]]*//g' \ + -e 's/-fno-rtti\>/-Fno-rtti/g' \ +- -e 's/\s\+-f\S*//g' \ ++ -e 's/[[:space:]]+-f[^[:space:]]*//g' \ + -e 's/-Fno-rtti\>/-fno-rtti/g' \ +- -e 's/^ //' ++ -e 's/^[[:space:]]//' + } + llvm_set_environment_variables() { +@@ -22516,7 +22516,7 @@ fi + case "$host_os" in -linux*) -+linux*|freebsd*) ++linux* | freebsd*) dri3_default=yes ;; *) -@@ -23968,6 +23968,18 @@ if test "x$enable_dri" = xyes; then - ;; - *freebsd* | dragonfly* | *netbsd* | openbsd*) - DEFINES="$DEFINES -DHAVE_ALIAS" -+ if test "x$enable_dri3" = xyes; then -+ DEFINES="$DEFINES -DHAVE_DRI3" -+ fi -+ -+ case "$host_cpu" in -+ powerpc* | sparc*) -+ # Build only the drivers for cards that exist on PowerPC/sparc -+ if test "x$with_dri_drivers" = "xyes"; then -+ with_dri_drivers="r200 radeon swrast" -+ fi -+ ;; -+ esac - ;; - gnu*) - DEFINES="$DEFINES -DHAVE_ALIAS" -@@ -25849,9 +25861,19 @@ if test "x$enable_opencl" = xyes; then +@@ -24055,7 +24055,7 @@ fi + if test "x$enable_dri" = xyes; then + # Platform specific settings and drivers to build + case "$host_os" in +- linux*) ++ linux* | *freebsd* | dragonfly* | *netbsd* | openbsd*) + if test "x$enable_dri3" = xyes; then + DEFINES="$DEFINES -DHAVE_DRI3" + fi +@@ -25807,9 +25807,19 @@ if test "x$enable_opencl" = xyes; then as_fn_error $? "cannot enable OpenCL without Gallium" "$LINENO" 5 fi @@ -48,13 +69,13 @@ if test "x$have_libclc" = xno; then as_fn_error $? "pkg-config cannot find libclc.pc which is required to build clover. -@@ -26670,9 +26692,6 @@ fi - CLANG_LIBDIR=${LLVM_LIBDIR} - fi - CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION} -- if test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"; then : +@@ -25851,9 +25861,6 @@ if test "x$enable_opencl" = xyes; then + 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 - else - MESA_LLVM=0 + fi + if test "x$enable_opencl" = xyes; then + HAVE_CLOVER_TRUE= Index: graphics/libGL/files/patch-src_amd_common_ac__llvm__util.c =================================================================== --- graphics/libGL/files/patch-src_amd_common_ac__llvm__util.c (nonexistent) +++ graphics/libGL/files/patch-src_amd_common_ac__llvm__util.c (working copy) @@ -0,0 +1,48 @@ +commit 7372e3cf5f2d +Author: Dave Airlie +Date: Wed Mar 15 07:15:50 2017 +1000 + + radv/ac: workaround regression in llvm 4.0 release + + LLVM 4.0 released with a pretty messy regression, that hopefully + get fixed in the future. + + This work around was proposed by Tom, and it fixes the CTS regressions + here at least, I'm not sure if this will cause any major side effects, + but correctness over speed and all that. + + radeonsi should possibly consider the same workaround until an llvm + fix can be found. + + Acked-by: Bas Nieuwenhuizen + Signed-off-by: Dave Airlie + +--- src/amd/common/ac_llvm_util.c.orig 2017-03-20 14:08:50 UTC ++++ src/amd/common/ac_llvm_util.c +@@ -26,7 +26,7 @@ + #include "ac_llvm_util.h" + + #include +- ++#include + #include "c11/threads.h" + + #include +@@ -47,6 +47,17 @@ static void ac_init_llvm_target() + LLVMInitializeAMDGPUTarget(); + LLVMInitializeAMDGPUTargetMC(); + LLVMInitializeAMDGPUAsmPrinter(); ++ ++ /* ++ * Workaround for bug in llvm 4.0 that causes image intrinsics ++ * to disappear. ++ * https://reviews.llvm.org/D26348 ++ */ ++#if HAVE_LLVM >= 0x0400 ++ const char *argv[2] = {"mesa", "-simplifycfg-sink-common=false"}; ++ LLVMParseCommandLineOptions(2, argv, NULL); ++#endif ++ + #endif + } + Property changes on: graphics/libGL/files/patch-src_amd_common_ac__llvm__util.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