1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-20 00:21:35 +00:00

Update the Mesa ports to 17.3.1 and switch to LLVM5 by default

Correct dependencies: remove the cruft added to mesa-dri in the previous
commit (those are mesa-libs deps), add a RUN_DEPENDS for libclc to clover

Clean up patches, remove one stale patch
This commit is contained in:
Matthew Rezny 2017-12-25 23:30:54 +00:00
parent 1211d5f1a0
commit 410afd0d3b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=457264
13 changed files with 44 additions and 47 deletions

View File

@ -7,8 +7,8 @@ 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
@ -19,6 +19,7 @@ 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

View File

@ -14,7 +14,7 @@
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=
@ -45,7 +45,7 @@ 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
@ -77,7 +77,7 @@ INSTALL_TARGET= install-strip
# 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}" != ""

View File

@ -3,7 +3,10 @@
# 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

View File

@ -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

View File

@ -1,6 +1,6 @@
--- 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
@ -9,7 +9,7 @@
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
@ -29,7 +29,7 @@
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}

View File

@ -1,7 +1,7 @@
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
@ -15,5 +15,5 @@ in drm.h also, which causes build issues in xorg-server.
-typedef struct drm_clip_rect drm_clip_rect_t;
-#endif
/**
* \name DRI interface structures
#include <stdint.h>

View File

@ -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

View File

@ -25,9 +25,9 @@ Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
--- 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
@ -42,7 +42,7 @@ Reviewed-by: Francisco Jerez <currojerez@riseup.net>
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)
{
@ -59,7 +59,7 @@ Reviewed-by: Francisco Jerez <currojerez@riseup.net>
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;
}
@ -69,7 +69,7 @@ Reviewed-by: Francisco Jerez <currojerez@riseup.net>
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++;
}

View File

@ -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);

View File

@ -4,9 +4,9 @@ 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) \

View File

@ -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 <byteswap.h>
#define CPU_TO_LE32( x ) bswap_32( x )
+#elif defined(__FreeBSD__)
+#include <sys/endian.h>
+#define CPU_TO_LE32( x ) bswap32( x )
#elif defined(__APPLE__)
#include <CoreFoundation/CFByteOrder.h>
#define CPU_TO_LE32( x ) CFSwapInt32HostToLittle( x )

View File

@ -1,8 +1,8 @@
# 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

View File

@ -6,10 +6,11 @@ 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