svn commit: r404412 - in head/graphics: dri libGL libGL/files
Koop Mast
kwm at FreeBSD.org
Fri Dec 25 11:30:59 UTC 2015
Author: kwm
Date: Fri Dec 25 11:30:57 2015
New Revision: 404412
URL: https://svnweb.freebsd.org/changeset/ports/404412
Log:
Update mesa to 11.0.8.
* Depend on libelf on DragonFly
* Rework the vdpau support code and enable vdpau for DragonFly, FreeBSD
doesn't support it just yet.
* Revert commit that removed support for non-render nodes. Neither
FreeBSD nor DragonFly supports render nodes at this time.
* Fix LDFLAGS to work with GCC5, which DragonFly uses by default.
* Update Makefile.targets: ffast-math isn't used since 8.0.3, don't
replace x86_64 with amd64 on Dragonfly. Drop obsolete python disable
replace.
Added:
head/graphics/libGL/files/patch-src__gallium__auxiliary__pipe-loader__pipe_loader_drm.c (contents, props changed)
Modified:
head/graphics/dri/Makefile
head/graphics/libGL/Makefile.common
head/graphics/libGL/Makefile.targets
head/graphics/libGL/distinfo
head/graphics/libGL/files/configure.ac
head/graphics/libGL/files/patch-configure
Modified: head/graphics/dri/Makefile
==============================================================================
--- head/graphics/dri/Makefile Fri Dec 25 10:15:19 2015 (r404411)
+++ head/graphics/dri/Makefile Fri Dec 25 11:30:57 2015 (r404412)
@@ -3,7 +3,6 @@
PORTNAME= dri
PORTVERSION= ${MESAVERSION}
-PORTREVISION= 1
PORTEPOCH= 2
CATEGORIES= graphics
Modified: head/graphics/libGL/Makefile.common
==============================================================================
--- head/graphics/libGL/Makefile.common Fri Dec 25 10:15:19 2015 (r404411)
+++ head/graphics/libGL/Makefile.common Fri Dec 25 11:30:57 2015 (r404412)
@@ -18,7 +18,7 @@
MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/}
MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/}
-MESABASEVERSION= 11.0.7
+MESABASEVERSION= 11.0.8
# if there is a subversion, don't include the '-' between 7.11-rc2.
MESASUBVERSION=
@@ -36,7 +36,7 @@ USES+= compiler:c++11-lib gettext-tools
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
CPPFLAGS+= -isystem${LOCALBASE}/include
-LDFLAGS+= -Wl,-Y${LOCALBASE}/lib
+LDFLAGS+= -Wl,-Y/usr/lib:${LOCALBASE}/lib
PKGINSTALL= ${.CURDIR}/pkg-install
PKGDEINSTALL= ${.CURDIR}/pkg-deinstall
@@ -118,12 +118,8 @@ CONFIGURE_ARGS+=--enable-gallium-llvm \
CONFIGURE_ARGS+=--enable-texture-float
.endif
-# this is disabled because our kernel driver is too old
-# merge this and the one below when support does land.
-.if 0 #${PORT_OPTIONS:MVDPAU}
-.if ${PORT_OPTIONS:MGALLIUM} == ""
-IGNORE= VDPAU option requires GALLIUM support to be enabled
-.endif
+# only support on DragonFly. FreeBSD's drm doesn't support it.
+.if ${OPSYS} == DragonFly && ${COMPONENT:Mdri} != ""
CONFIGURE_ARGS+=--enable-vdpau
LIB_DEPENDS+= libvdpau.so:${PORTSDIR}/multimedia/libvdpau
PLIST_SUB+= VDPAU=""
@@ -132,13 +128,6 @@ CONFIGURE_ARGS+=--disable-vdpau
PLIST_SUB+= VDPAU="@comment "
.endif
-# what to do with this one? Currently disabled in dri.
-.if ${COMPONENT:Mvdpau} == ""
-CONFIGURE_ARGS+=--disable-vdpau
-.else
-CONFIGURE_ARGS+=--enable-vdpau
-.endif
-
# VAAPI support?
CONFIGURE_ARGS+=--disable-va
@@ -184,3 +173,7 @@ PLIST_SUB+= ${_gd}_GDRIVER="@comment "
CONFIGURE_ARGS+=--with-gallium-drivers="${GALLIUM_DRIVERS:tl}"
+.if ${OPSYS} == DragonFly
+LIB_DEPENDS+= libelf.so:${PORTSDIR}/devel/libelf
+.endif
+
Modified: head/graphics/libGL/Makefile.targets
==============================================================================
--- head/graphics/libGL/Makefile.targets Fri Dec 25 10:15:19 2015 (r404411)
+++ head/graphics/libGL/Makefile.targets Fri Dec 25 11:30:57 2015 (r404412)
@@ -3,10 +3,12 @@
# this file holds common targets
post-patch:
+.if ${OPSYS} == FreeBSD
+ @${REINPLACE_CMD} -e 's|x86_64|amd64|' \
+ ${WRKSRC}/configure
+.endif
# Sed on 9.x and dragonfly don't support \< or \>
- @${REINPLACE_CMD} -e 's|-ffast-math|${FAST_MATH}|' -e 's|x86_64|amd64|' \
- -e 's|\\>//|[[:>:]]//|' \
- -e 's|python2 python|python2disabled pythondisabled|g' \
+ @${REINPLACE_CMD} -e 's|\\>//|[[:>:]]//|' \
${WRKSRC}/configure
@${REINPLACE_CMD} -e 's|/etc/|${PREFIX}/etc/|g' \
${WRKSRC}/src/mesa/drivers/dri/common/xmlconfig.c
Modified: head/graphics/libGL/distinfo
==============================================================================
--- head/graphics/libGL/distinfo Fri Dec 25 10:15:19 2015 (r404411)
+++ head/graphics/libGL/distinfo Fri Dec 25 11:30:57 2015 (r404412)
@@ -1,2 +1,2 @@
-SHA256 (mesa-11.0.7.tar.xz) = e7e90a332ede6c8fd08eff90786a3fd1605a4e62ebf3a9b514047838194538cb
-SIZE (mesa-11.0.7.tar.xz) = 7279276
+SHA256 (mesa-11.0.8.tar.xz) = 5696e4730518b6805d2ed5def393c4293f425a2c2c01bd5ed4bdd7ad62f7ad75
+SIZE (mesa-11.0.8.tar.xz) = 7282812
Modified: head/graphics/libGL/files/configure.ac
==============================================================================
--- head/graphics/libGL/files/configure.ac Fri Dec 25 10:15:19 2015 (r404411)
+++ head/graphics/libGL/files/configure.ac Fri Dec 25 11:30:57 2015 (r404412)
@@ -1,6 +1,6 @@
---- configure.ac.orig 2015-03-28 19:20:39.000000000 +0100
-+++ configure.ac 2015-03-29 12:20:43.817681000 +0200
-@@ -68,6 +68,7 @@
+--- configure.ac.orig 2015-12-21 10:05:52.000000000 +0100
++++ configure.ac 2015-12-22 17:04:25.728359000 +0100
+@@ -78,6 +78,7 @@
DRI3PROTO_REQUIRED=1.0
PRESENTPROTO_REQUIRED=1.0
LIBUDEV_REQUIRED=151
@@ -8,16 +8,7 @@
GLPROTO_REQUIRED=1.4.14
LIBOMXIL_BELLAGIO_REQUIRED=0.0
LIBVA_REQUIRED=0.35.0
-@@ -87,7 +88,7 @@
- AM_PROG_CC_C_O
- AM_PROG_AS
- AX_CHECK_GNU_MAKE
--AC_CHECK_PROGS([PYTHON2], [python2 python])
-+AC_CHECK_PROGS([PYTHON2], [python2.7 python2 python])
- AC_PROG_SED
- AC_PROG_MKDIR_P
-
-@@ -689,7 +690,7 @@
+@@ -743,7 +744,7 @@
[enable_dri=yes])
case "$host_os" in
@@ -26,7 +17,7 @@
dri3_default=yes
;;
*)
-@@ -955,6 +956,9 @@
+@@ -1000,6 +1001,9 @@
PKG_CHECK_MODULES([LIBUDEV], [libudev >= $LIBUDEV_REQUIRED],
have_libudev=yes, have_libudev=no)
@@ -36,7 +27,7 @@
AC_ARG_ENABLE([sysfs],
[AS_HELP_STRING([--enable-sysfs],
[enable /sys PCI identification @<:@default=disabled@:>@])],
-@@ -1051,6 +1055,10 @@
+@@ -1096,6 +1100,10 @@
DEFINES="$DEFINES -DHAVE_LIBUDEV"
have_pci_id=yes
fi
@@ -47,7 +38,7 @@
if test "$have_sysfs" = yes; then
DEFINES="$DEFINES -DHAVE_SYSFS"
-@@ -1173,6 +1181,23 @@
+@@ -1228,6 +1236,23 @@
;;
gnu*)
DEFINES="$DEFINES -DHAVE_ALIAS"
@@ -71,7 +62,7 @@
;;
cygwin*)
if test "x$with_dri_drivers" = "xyes"; then
-@@ -1350,6 +1375,8 @@
+@@ -1384,6 +1409,8 @@
AM_CONDITIONAL(HAVE_GBM, test "x$enable_gbm" = xyes)
if test "x$need_pci_id$have_libudev" = xyesyes; then
GBM_PC_REQ_PRIV="libudev >= $LIBUDEV_REQUIRED"
@@ -80,7 +71,7 @@
else
GBM_PC_REQ_PRIV=""
fi
-@@ -1528,9 +1555,19 @@
+@@ -1545,9 +1572,19 @@
AC_MSG_ERROR([cannot enable OpenCL without Gallium])
fi
@@ -100,7 +91,7 @@
if test "x$have_libclc" = xno; then
AC_MSG_ERROR([pkg-config cannot find libclc.pc which is required to build clover.
-@@ -1819,8 +1856,6 @@
+@@ -1815,8 +1852,6 @@
CLANG_LIBDIR=${LLVM_LIBDIR}
fi
CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}
Modified: head/graphics/libGL/files/patch-configure
==============================================================================
--- head/graphics/libGL/files/patch-configure Fri Dec 25 10:15:19 2015 (r404411)
+++ head/graphics/libGL/files/patch-configure Fri Dec 25 11:30:57 2015 (r404412)
@@ -1,6 +1,6 @@
---- configure.orig 2015-03-29 12:20:36.346485000 +0200
-+++ configure 2015-03-29 12:21:17.768637000 +0200
-@@ -863,6 +863,8 @@
+--- configure.orig 2015-12-22 17:04:20.271630000 +0100
++++ configure 2015-12-22 17:05:17.669976000 +0100
+@@ -858,6 +858,8 @@
GLPROTO_CFLAGS
XLIBGL_LIBS
XLIBGL_CFLAGS
@@ -8,8 +8,8 @@
+LIBDEVQ_CFLAGS
LIBUDEV_LIBS
LIBUDEV_CFLAGS
- LIBDRM_LIBS
-@@ -1158,6 +1160,8 @@
+ MESA_LLVM
+@@ -1156,6 +1158,8 @@
LIBDRM_LIBS
LIBUDEV_CFLAGS
LIBUDEV_LIBS
@@ -29,7 +29,7 @@
XLIBGL_CFLAGS
C compiler flags for XLIBGL, overriding pkg-config
XLIBGL_LIBS linker flags for XLIBGL, overriding pkg-config
-@@ -5232,6 +5240,7 @@
+@@ -5246,6 +5254,7 @@
DRI3PROTO_REQUIRED=1.0
PRESENTPROTO_REQUIRED=1.0
LIBUDEV_REQUIRED=151
@@ -37,16 +37,7 @@
GLPROTO_REQUIRED=1.4.14
LIBOMXIL_BELLAGIO_REQUIRED=0.0
LIBVA_REQUIRED=0.35.0
-@@ -6675,7 +6686,7 @@
- fi
-
-
--for ac_prog in python2 python
-+for ac_prog in python2.7 python2 python
- do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
- set dummy $ac_prog; ac_word=$2
-@@ -20709,7 +20718,7 @@
+@@ -21035,7 +21044,7 @@
case "$host_os" in
@@ -55,7 +46,7 @@
dri3_default=yes
;;
*)
-@@ -21227,6 +21236,78 @@
+@@ -21543,6 +21552,78 @@
have_libudev=yes
fi
@@ -134,7 +125,7 @@
# Check whether --enable-sysfs was given.
if test "${enable_sysfs+set}" = set; then :
enableval=$enable_sysfs; have_sysfs="$enableval"
-@@ -21942,6 +22023,10 @@
+@@ -22258,6 +22339,10 @@
DEFINES="$DEFINES -DHAVE_LIBUDEV"
have_pci_id=yes
fi
@@ -145,7 +136,7 @@
if test "$have_sysfs" = yes; then
DEFINES="$DEFINES -DHAVE_SYSFS"
-@@ -22069,6 +22154,22 @@
+@@ -22396,6 +22481,22 @@
;;
gnu*)
DEFINES="$DEFINES -DHAVE_ALIAS"
@@ -168,7 +159,7 @@
;;
cygwin*)
if test "x$with_dri_drivers" = "xyes"; then
-@@ -22889,6 +22990,8 @@
+@@ -23195,6 +23296,8 @@
if test "x$need_pci_id$have_libudev" = xyesyes; then
GBM_PC_REQ_PRIV="libudev >= $LIBUDEV_REQUIRED"
@@ -177,7 +168,7 @@
else
GBM_PC_REQ_PRIV=""
fi
-@@ -23664,9 +23767,19 @@
+@@ -24018,9 +24121,19 @@
as_fn_error $? "cannot enable OpenCL without Gallium" "$LINENO" 5
fi
@@ -197,7 +188,7 @@
if test "x$have_libclc" = xno; then
as_fn_error $? "pkg-config cannot find libclc.pc which is required to build clover.
-@@ -24510,9 +24623,6 @@
+@@ -24835,9 +24948,6 @@
CLANG_LIBDIR=${LLVM_LIBDIR}
fi
CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}
Added: head/graphics/libGL/files/patch-src__gallium__auxiliary__pipe-loader__pipe_loader_drm.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/graphics/libGL/files/patch-src__gallium__auxiliary__pipe-loader__pipe_loader_drm.c Fri Dec 25 11:30:57 2015 (r404412)
@@ -0,0 +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 <emil.l.velikov at gmail.com>
+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 <thomas.stellard at amd.com>
+Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
+Reviewed-by: Francisco Jerez <currojerez at riseup.net>
+
+
+--- src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c.orig 2015-12-21 10:05:52.000000000 +0100
++++ src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c 2015-12-22 20:18:18.734280000 +0100
+@@ -90,6 +90,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];
+@@ -101,8 +109,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++) {
+ fd = open_drm_render_node_minor(i);
+@@ -115,6 +130,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 {
+@@ -124,6 +142,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;
+ }
+
More information about the svn-ports-all
mailing list