Index: graphics/libosmesa/Makefile =================================================================== --- graphics/libosmesa/Makefile +++ graphics/libosmesa/Makefile @@ -9,6 +9,12 @@ USE_XORG= glproto +# As of version 17.0.5 / 17.1.2, the Gallium variant fails to build due to +# incorrectly ordered linker flags. Fortunately, autoreconf fixes the problem. +# Unfortunately, we must reconf before we know if we're doing a Gallium build. +USES= autoreconf +EXTRA_PATCHES= ${PATCHDIR}/configure.ac + .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" Index: graphics/mesa-dri/Makefile.common =================================================================== --- graphics/mesa-dri/Makefile.common +++ graphics/mesa-dri/Makefile.common @@ -14,7 +14,7 @@ MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/} MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/} -MESABASEVERSION= 17.1.1 +MESABASEVERSION= 17.1.2 # if there is a subversion, don't include the '-' between 7.11-rc2. MESASUBVERSION= Index: graphics/mesa-dri/Makefile.targets =================================================================== --- graphics/mesa-dri/Makefile.targets +++ graphics/mesa-dri/Makefile.targets @@ -5,13 +5,19 @@ post-patch: .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" +. if ${ARCH} == "i386" @${REINPLACE_CMD} -e 's|-DUSE_GCC_ATOMIC_BUILTINS||' ${WRKSRC}/configure +. if ${COMPONENT} == osmesa + @${REINPLACE_CMD} -e 's|-DUSE_GCC_ATOMIC_BUILTINS||' ${WRKSRC}/configure.ac +. endif +. endif .endif -.endif # ${OPSYS} @${REINPLACE_CMD} -e 's|/etc/|${PREFIX}/etc/|g' \ ${WRKSRC}/src/mesa/drivers/dri/common/xmlconfig.c Index: graphics/mesa-dri/distinfo =================================================================== --- graphics/mesa-dri/distinfo +++ graphics/mesa-dri/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1495896958 -SHA256 (mesa-17.1.1.tar.xz) = aed503f94c0c1630a162a3e276f4ee12a86764cee4cb92338ea2dea99a04e7ef -SIZE (mesa-17.1.1.tar.xz) = 9854480 +TIMESTAMP = 1496724371 +SHA256 (mesa-17.1.2.tar.xz) = 0937804f43746339b1f9540d8f9c8b4a1bb3d3eec0e4020eac283b8799798239 +SIZE (mesa-17.1.2.tar.xz) = 9837516 Index: graphics/mesa-dri/files/configure.ac =================================================================== --- graphics/mesa-dri/files/configure.ac +++ graphics/mesa-dri/files/configure.ac @@ -9,15 +9,6 @@ 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 Index: graphics/mesa-dri/files/patch-configure =================================================================== --- graphics/mesa-dri/files/patch-configure +++ graphics/mesa-dri/files/patch-configure @@ -9,15 +9,6 @@ dri3_default=yes ;; *) -@@ -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 @@ -25972,9 +25972,19 @@ if test "x$enable_opencl" = xyes; then as_fn_error $? "cannot enable OpenCL without Gallium" "$LINENO" 5 fi