Index: head/graphics/dri/Makefile =================================================================== --- head/graphics/dri/Makefile (revision 438197) +++ head/graphics/dri/Makefile (revision 438198) @@ -1,39 +1,46 @@ # Created by: Eric Anholt # $FreeBSD$ PORTNAME= dri PORTVERSION= ${MESAVERSION} PORTEPOCH= 2 CATEGORIES= graphics COMMENT= OpenGL hardware acceleration drivers for the DRI LIB_DEPENDS= libdrm.so:graphics/libdrm \ libexpat.so:textproc/expat2 -USES= ssl -USE_XORG= dri2proto dri3proto glproto presentproto x11 xext xdamage \ +USE_XORG= dri2proto dri3proto glproto presentproto x11 xdamage xext \ xfixes xshmfence xv xvmc xxf86vm -OPTIONS_DEFINE= TEXTURE +OPTIONS_DEFINE= TEXTURE VAAPI VDPAU OPTIONS_DEFAULT=TEXTURE +OPTIONS_SUB= yes TEXTURE_DESC= Enable texture-float support (patent encumbered) -VDPAU_DESC= VDPAU (GPU video acceleration) support (needs Gallium) +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 PKGHELP= ${.CURDIR}/pkg-help .include .include "${.CURDIR}/../../graphics/libGL/Makefile.common" #src/mesa/libmesagallium.la #MESA_BUILD_WRKSRC= src/util src/gallium #MESA_INSTALL_WRKSRC= src/gallium .include "${.CURDIR}/../../graphics/libGL/Makefile.targets" post-install: @${RM} -r ${STAGEDIR}/etc/OpenCL .include Index: head/graphics/dri/pkg-help =================================================================== --- head/graphics/dri/pkg-help (revision 438197) +++ head/graphics/dri/pkg-help (revision 438198) @@ -1,13 +1,15 @@ -The GALLIUM option enables gallium (llvm) backed drivers such as for example -the r600 and radeonsi driver. +VAAPI and VDPAU options enable building Gallium based VA-API and VDPAU +drivers to decode video on the GPU via libva and libvdpau, respectively. +Gallium based VAAPI and VDPAU drivers are only available for Radeon GPUs. -The VDPAU option enables VDPAU drivers to decode video on the GPU via the -VDPAU library. +Both GPU decode options require newer drm drivers than are currently present +in a released FreeBSD kernel. These are options for DRM-next and DragonFly. -The TEXTURE option enables texture-float support. However Silicon Graphics -owns the US Patent #6,650,327 [1]. Use at your own risk! +The TEXTURE option enables texture-float support, which SGI claims requires +US Patent #6,650,327 [1], filed Jun 16, 1998 thus expiring on Jun 16, 2018. +Use may require a license depending on jurisdiction, consult a lawyer. -See docs/patents.txt in the Mesa tarball or the follewing urls: +See docs/patents.txt in the Mesa tarball or the following URLs: -[1] http://www.google.com/patents/about?id=mIIOAAAAEBAJ&dq=6650327 +[1] https://www.google.com/patents/US6650327 [2] http://www.opengl.org/registry/specs/ARB/texture_float.txt Index: head/graphics/dri/pkg-plist =================================================================== --- head/graphics/dri/pkg-plist (revision 438197) +++ head/graphics/dri/pkg-plist (revision 438198) @@ -1,83 +1,89 @@ -%%I965_DRIVER%%etc/drirc +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 %%SWRAST_GDRIVER%%lib/dri/kms_swrast_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 %%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%%lib/vdpau/libvdpau_r300.so -%%VDPAU%%lib/vdpau/libvdpau_r300.so.1 -%%VDPAU%%lib/vdpau/libvdpau_r300.so.1.0 -%%VDPAU%%lib/vdpau/libvdpau_r300.so.1.0.0 -%%VDPAU%%lib/vdpau/libvdpau_r600.so -%%VDPAU%%lib/vdpau/libvdpau_r600.so.1 -%%VDPAU%%lib/vdpau/libvdpau_r600.so.1.0 -%%VDPAU%%lib/vdpau/libvdpau_r600.so.1.0.0 -%%VDPAU%%lib/vdpau/libvdpau_radeonsi.so -%%VDPAU%%lib/vdpau/libvdpau_radeonsi.so.1 -%%VDPAU%%lib/vdpau/libvdpau_radeonsi.so.1.0 -%%VDPAU%%lib/vdpau/libvdpau_radeonsi.so.1.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/libGL/Makefile.common =================================================================== --- head/graphics/libGL/Makefile.common (revision 438197) +++ head/graphics/libGL/Makefile.common (revision 438198) @@ -1,194 +1,173 @@ # 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/dri # - graphics/gbm # - graphics/libEGL # - graphics/libGL # - graphics/libglapi # - graphics/libglesv2 # - graphics/libosmesa # - lang/clover # # $FreeBSD$ MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/} MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/} -MESABASEVERSION= 13.0.6 +MESABASEVERSION= 17.0.3 # 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 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 GNU_CONFIGURE= yes PKGINSTALL= ${.CURDIR}/pkg-install PKGDEINSTALL= ${.CURDIR}/pkg-deinstall # only have one port to check with portscout. .if ${PORTNAME} != libGL PORTSCOUT= ignore:1 .endif python_OLD_CMD= "/usr/bin/env[[:space:]]python" python_CMD= ${LOCALBASE}/bin/python2 SHEBANG_FILES= src/gallium/*/*/*.py src/gallium/tools/trace/*.py \ src/gallium/drivers/svga/svgadump/svga_dump.py \ src/mapi/glapi/gen/*.py SHEBANG_FILES+= src/mapi/mapi_abi.py -MASTERDIR= ${.CURDIR}/../../graphics/libGL -PATCHDIR= ${MASTERDIR}/files -WRKSRC= ${WRKDIR}/mesa-${MESADISTVERSION} -DESCR= ${.CURDIR}/pkg-descr -PLIST= ${.CURDIR}/pkg-plist -INSTALL_TARGET= install-strip +MASTERDIR= ${.CURDIR}/../../graphics/libGL +PATCHDIR= ${MASTERDIR}/files +WRKSRC= ${WRKDIR}/mesa-${MESADISTVERSION} +DESCR= ${.CURDIR}/pkg-descr +PLIST= ${.CURDIR}/pkg-plist +INSTALL_TARGET= install-strip -COMPONENT= ${PORTNAME:tl:C/^lib//:C/mesa-//} +COMPONENT= ${PORTNAME:tl:C/^lib//:C/mesa-//} .if (${ARCH} != sparc64 && ${ARCH} != ia64) # no working LLVM -MESA_LLVM_VER?= 39 +MESA_LLVM_VER?= 40 LDFLAGS+= -Wl,-rpath=${LOCALBASE}/llvm${MESA_LLVM_VER}/lib .endif -CONFIGURE_ARGS+= --with-sha1=libcrypto - -CONFIGURE_ARGS+= --enable-gbm - # 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 # libEGL, dri and clover need gallium enabled. # the third option in --with-egl-platforms is wayland. .if (${MESA_LLVM_VER} != "") CONFIGURE_ARGS+= --enable-egl --with-egl-platforms=x11,drm .else CONFIGURE_ARGS+= --disable-egl .endif # we don't care about GLes v1 CONFIGURE_ARGS+= --disable-gles1 --enable-gles2 # Clover (OpenCL). .if ${OPSYS} == DragonFly || \ (${OPSYS} == FreeBSD && \ (${ARCH} == amd64 || ${ARCH} == i386)) BUILD_DEPENDS+= libclc>=0.2.0.20160915:devel/libclc # We need the clang port too even if it is not used to compile because # Clover needs some of the clang includes to build. .if ${COMPONENT:Mdri} != "" || ${COMPONENT:Mclover} != "" || ${COMPONENT:Mosmesa} != "" _USES_pre_configure+= 290:clover-pre-configure # .if !exists() evaluates too early before cairo has a chance to be installed clover-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 build with clang support, which is required."; \ ${FALSE}; \ fi .endif CONFIGURE_ARGS+= --enable-opencl --enable-opencl-icd .else CONFIGURE_ARGS+= --disable-opencl .endif CONFIGURE_ARGS+= --enable-osmesa --enable-xvmc # gallium .if (${MESA_LLVM_VER} != "") BUILD_DEPENDS+= llvm${MESA_LLVM_VER}>=3.9.0_4: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} .endif CONFIGURE_ENV+= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${MESA_LLVM_VER} CONFIGURE_ARGS+= --enable-gallium-llvm --enable-llvm-shared-libs .else CONFIGURE_ARGS+= --disable-gallium-llvm .endif - -.if ${PORT_OPTIONS:MTEXTURE} -CONFIGURE_ARGS+=--enable-texture-float -.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:multimedia/libvdpau -PLIST_SUB+= VDPAU="" -.else -CONFIGURE_ARGS+=--disable-vdpau -PLIST_SUB+= VDPAU="@comment " -.endif - -# VAAPI support? -CONFIGURE_ARGS+=--disable-va ALL_DRI_DRIVERS= I915 I965 RADEON R200 SWRAST ALL_GALLIUM_DRIVERS= R300 R600 RADEONSI SVGA SWRAST .if ${ARCH} == amd64 || ${ARCH} == i386 DRI_DRIVERS= I915 I965 RADEON R200 GALLIUM_DRIVERS= R300 R600 RADEONSI SVGA .endif .if ${ARCH} == powerpc || ${ARCH} == powerpc64 DRI_DRIVERS= RADEON R200 GALLIUM_DRIVERS= R300 R600 RADEONSI .endif # software rendering for all arches DRI_DRIVERS+= SWRAST GALLIUM_DRIVERS+= SWRAST .for _d in ${ALL_DRI_DRIVERS} . if ${DRI_DRIVERS:M${_d}} PLIST_SUB+= ${_d}_DRIVER="" . else PLIST_SUB+= ${_d}_DRIVER="@comment " . endif .endfor CONFIGURE_ARGS+=--with-dri-drivers="${DRI_DRIVERS:tl}" .for _gd in ${ALL_GALLIUM_DRIVERS} . if ${GALLIUM_DRIVERS:M${_gd}} PLIST_SUB+= ${_gd}_GDRIVER="" . else PLIST_SUB+= ${_gd}_GDRIVER="@comment " . endif .endfor .if (${MESA_LLVM_VER} != "") CONFIGURE_ARGS+=--with-gallium-drivers="${GALLIUM_DRIVERS:tl}" .endif .if ${OPSYS} == DragonFly LIB_DEPENDS+= libelf.so:devel/libelf .endif Index: head/graphics/libGL/Makefile.targets =================================================================== --- head/graphics/libGL/Makefile.targets (revision 438197) +++ head/graphics/libGL/Makefile.targets (revision 438198) @@ -1,55 +1,55 @@ # $FreeBSD$ # # this file holds common targets post-patch: .if ${OPSYS} == FreeBSD - @${REINPLACE_CMD} -e 's|x86_64|amd64|' -e 's|\\S\*//|[:space:]* //|' \ + @${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" @${REINPLACE_CMD} -e 's|-DUSE_GCC_ATOMIC_BUILTINS||' ${WRKSRC}/configure .endif .else # ${OPSYS} == DragonFly # Sed on dragonfly doesn't support \< or \> - @${REINPLACE_CMD} -e 's|\\>//|[[:>:]]//|' -e 's|\\S\*//|[:space:]* //|' \ + @${REINPLACE_CMD} -e 's|\\>//|[[:>:]]//|' \ ${WRKSRC}/configure .endif # ${OPSYS} @${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' \ ${WRKSRC}/src/mesa/drivers/dri/common/xmlpool/gen_xmlpool.py @${REINPLACE_CMD} -e 's|!/use/bin/python2|!${PYTHON_CMD}|g' \ ${WRKSRC}/src/mesa/main/get_hash_generator.py \ ${WRKSRC}/src/mapi/glapi/gen/gl_enums.py \ ${WRKSRC}/src/mapi/glapi/gen/gl_table.py pre-build: mesa-pre-build #custom targets so we can build parts of Mesa mesa-pre-build: # do propper gmake target. @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/libGL/distinfo =================================================================== --- head/graphics/libGL/distinfo (revision 438197) +++ head/graphics/libGL/distinfo (revision 438198) @@ -1,3 +1,3 @@ -TIMESTAMP = 1490202594 -SHA256 (mesa-13.0.6.tar.xz) = 29ef104a7fc082d352b1599bd6cb1d040be424ccd22f5e0eb7ee9b0e9acd3597 -SIZE (mesa-13.0.6.tar.xz) = 9179236 +TIMESTAMP = 1491068637 +SHA256 (mesa-17.0.3.tar.xz) = ca646f5075a002d60ef9123c8a4331cede155c01712ef945a65c59a5e69fe7ed +SIZE (mesa-17.0.3.tar.xz) = 9485792 Index: head/graphics/libGL/files/patch-src__gallium__winsys__svga__drm__vmw_screen_ioctl.c =================================================================== --- head/graphics/libGL/files/patch-src__gallium__winsys__svga__drm__vmw_screen_ioctl.c (revision 438197) +++ head/graphics/libGL/files/patch-src__gallium__winsys__svga__drm__vmw_screen_ioctl.c (nonexistent) @@ -1,14 +0,0 @@ ---- src/gallium/winsys/svga/drm/vmw_screen_ioctl.c.orig 2016-11-10 22:05:17 UTC -+++ src/gallium/winsys/svga/drm/vmw_screen_ioctl.c -@@ -70,6 +70,11 @@ vmw_region_size(struct vmw_region *regio - return region->size; - } - -+#if defined(__DragonFly__) || defined(__FreeBSD__) || \ -+ defined(__NetBSD__) || defined(__OpenBSD__) -+#define ERESTART EINTR -+#endif -+ - uint32 - vmw_ioctl_context_create(struct vmw_winsys_screen *vws) - { Property changes on: head/graphics/libGL/files/patch-src__gallium__winsys__svga__drm__vmw_screen_ioctl.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/graphics/libGL/files/patch-src__mesa__main__compiler.h =================================================================== --- head/graphics/libGL/files/patch-src__mesa__main__compiler.h (revision 438197) +++ head/graphics/libGL/files/patch-src__mesa__main__compiler.h (nonexistent) @@ -1,12 +0,0 @@ ---- src/mesa/main/compiler.h.orig 2016-11-10 22:05:17 UTC -+++ src/mesa/main/compiler.h -@@ -56,6 +56,9 @@ extern "C" { - #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 ) Property changes on: head/graphics/libGL/files/patch-src__mesa__main__compiler.h ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/graphics/libGL/files/patch-src__mapi__glapi__gen__gl_gentable.py =================================================================== --- head/graphics/libGL/files/patch-src__mapi__glapi__gen__gl_gentable.py (revision 438197) +++ head/graphics/libGL/files/patch-src__mapi__glapi__gen__gl_gentable.py (nonexistent) @@ -1,11 +0,0 @@ ---- src/mapi/glapi/gen/gl_gentable.py.orig 2017-01-06 02:14:06 UTC -+++ src/mapi/glapi/gen/gl_gentable.py -@@ -44,7 +44,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 - Property changes on: head/graphics/libGL/files/patch-src__mapi__glapi__gen__gl_gentable.py ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/graphics/libGL/files/patch-include__GL__internal__dri_interface.h =================================================================== --- head/graphics/libGL/files/patch-include__GL__internal__dri_interface.h (revision 438197) +++ head/graphics/libGL/files/patch-include__GL__internal__dri_interface.h (nonexistent) @@ -1,19 +0,0 @@ -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 -@@ -40,13 +40,7 @@ - #ifndef DRI_INTERFACE_H - #define DRI_INTERFACE_H - --#ifdef HAVE_LIBDRM - #include --#else --typedef unsigned int drm_context_t; --typedef unsigned int drm_drawable_t; --typedef struct drm_clip_rect drm_clip_rect_t; --#endif - - /** - * \name DRI interface structures Property changes on: head/graphics/libGL/files/patch-include__GL__internal__dri_interface.h ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/graphics/libGL/files/patch-src__gallium__include__pipe__p_config.h =================================================================== --- head/graphics/libGL/files/patch-src__gallium__include__pipe__p_config.h (revision 438197) +++ head/graphics/libGL/files/patch-src__gallium__include__pipe__p_config.h (nonexistent) @@ -1,38 +0,0 @@ ---- src/gallium/include/pipe/p_config.h.orig 2016-11-10 22:05:17 UTC -+++ src/gallium/include/pipe/p_config.h -@@ -76,6 +76,13 @@ - #define PIPE_CC_ICL - #endif - -+#if defined(__sparc__) || defined(__sparc64__) -+#define PIPE_ARCH_SPARC -+#if defined(__sparc64__) -+#define PIPE_ARCH_SPARC_64 -+#endif -+#endif -+ - - /* - * Processor architecture -@@ -130,7 +137,7 @@ - - #if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) || defined(PIPE_ARCH_ARM) || defined(PIPE_ARCH_AARCH64) - #define PIPE_ARCH_LITTLE_ENDIAN --#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64) || defined(PIPE_ARCH_S390) -+#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64) || defined(PIPE_ARCH_S390) || defined(PIPE_ARCH_SPARC) || defined(PIPE_ARCH_SPARC_64) - #define PIPE_ARCH_BIG_ENDIAN - #endif - -@@ -159,6 +166,12 @@ - #define PIPE_OS_ANDROID - #endif - -+#if defined(__DragonFly__) -+#define PIPE_OS_DRAGONFLY -+#define PIPE_OS_BSD -+#define PIPE_OS_UNIX -+#endif -+ - #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) - #define PIPE_OS_FREEBSD - #define PIPE_OS_BSD Property changes on: head/graphics/libGL/files/patch-src__gallium__include__pipe__p_config.h ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/graphics/libGL/files/patch-src__gallium__state_trackers__clover__util__range.hpp =================================================================== --- head/graphics/libGL/files/patch-src__gallium__state_trackers__clover__util__range.hpp (revision 438197) +++ head/graphics/libGL/files/patch-src__gallium__state_trackers__clover__util__range.hpp (nonexistent) @@ -1,31 +0,0 @@ -From b95533b981af9a6687b41418e7cc2a5652fc2bdb Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= -Date: Fri, 7 Mar 2014 15:16:08 +0100 -Subject: [PATCH 3/3] Work around for clang 3.4 which fails to build Clover - -See: - https://bugs.freedesktop.org/show_bug.cgi?id=74098#c3 ---- src/gallium/state_trackers/clover/util/range.hpp.orig 2016-11-10 22:05:17 UTC -+++ src/gallium/state_trackers/clover/util/range.hpp -@@ -362,6 +362,12 @@ namespace clover { - return { i, i + n }; - } - -+ namespace detail { -+ template -+ using fixup_function_type = -+ typename std::conditional::value, T &, T>::type; -+ } -+ - /// - /// Create a range by transforming the contents of a number of - /// source ranges \a rs element-wise using a provided functor \a f. -@@ -369,7 +375,7 @@ namespace clover { - /// \sa adaptor_range. - /// - template -- adaptor_range -+ adaptor_range, Rs...> - map(F &&f, Rs &&... rs) { - return { std::forward(f), std::forward(rs)... }; - } Property changes on: head/graphics/libGL/files/patch-src__gallium__state_trackers__clover__util__range.hpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/graphics/libGL/files/patch-src__gallium__auxiliary__pipe-loader__pipe_loader_drm.c =================================================================== --- head/graphics/libGL/files/patch-src__gallium__auxiliary__pipe-loader__pipe_loader_drm.c (revision 438197) +++ head/graphics/libGL/files/patch-src__gallium__auxiliary__pipe-loader__pipe_loader_drm.c (nonexistent) @@ -1,118 +0,0 @@ -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 2016-11-10 22:05:17 UTC -+++ src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c -@@ -215,6 +215,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]; -@@ -226,8 +234,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; -@@ -241,6 +256,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 { -@@ -250,6 +268,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; - } - Property changes on: head/graphics/libGL/files/patch-src__gallium__auxiliary__pipe-loader__pipe_loader_drm.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/graphics/libGL/files/configure.ac =================================================================== --- head/graphics/libGL/files/configure.ac (revision 438197) +++ head/graphics/libGL/files/configure.ac (revision 438198) @@ -1,73 +1,78 @@ ---- 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-04-01 15:33:36 UTC ++++ configure.ac +@@ -943,18 +943,19 @@ 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/-fno-exceptions\>//g' \ ++ -e 's/^[[[:space:]]]//' + } + llvm_set_environment_variables() { +@@ -1121,7 +1122,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 +1632,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 +2003,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 -+# end of clang test. -+ 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. -@@ -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 +@@ -2061,8 +2071,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/libGL/files/patch-configure =================================================================== --- head/graphics/libGL/files/patch-configure (revision 438197) +++ head/graphics/libGL/files/patch-configure (revision 438198) @@ -1,60 +1,80 @@ ---- configure.orig 2017-01-05 15:52:21 UTC +--- configure.orig 2017-04-01 15:33:50 UTC +++ configure -@@ -21955,7 +21955,7 @@ fi +@@ -22351,18 +22351,19 @@ 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/-fno-exceptions\>//g' \ ++ -e 's/^[[[:space:]]]//' + } + llvm_set_environment_variables() { +@@ -22560,7 +22561,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 +@@ -24099,7 +24100,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 +25852,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. -@@ -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 : +@@ -25916,9 +25927,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 - else - MESA_LLVM=0 + fi + if test "x$enable_opencl" = xyes; then + HAVE_CLOVER_TRUE= Index: head/graphics/libGL/files/patch-include_GL_internal_dri__interface.h =================================================================== --- head/graphics/libGL/files/patch-include_GL_internal_dri__interface.h (nonexistent) +++ head/graphics/libGL/files/patch-include_GL_internal_dri__interface.h (revision 438198) @@ -0,0 +1,19 @@ +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 +@@ -40,13 +40,7 @@ + #ifndef DRI_INTERFACE_H + #define DRI_INTERFACE_H + +-#ifdef HAVE_LIBDRM + #include +-#else +-typedef unsigned int drm_context_t; +-typedef unsigned int drm_drawable_t; +-typedef struct drm_clip_rect drm_clip_rect_t; +-#endif + + /** + * \name DRI interface structures Property changes on: head/graphics/libGL/files/patch-include_GL_internal_dri__interface.h ___________________________________________________________________ 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/libGL/files/patch-src_egl_drivers_dri2_platform__x11.c =================================================================== --- head/graphics/libGL/files/patch-src_egl_drivers_dri2_platform__x11.c (nonexistent) +++ head/graphics/libGL/files/patch-src_egl_drivers_dri2_platform__x11.c (revision 438198) @@ -0,0 +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 +@@ -1507,7 +1507,11 @@ + + 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 + Property changes on: head/graphics/libGL/files/patch-src_egl_drivers_dri2_platform__x11.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/libGL/files/patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c =================================================================== --- head/graphics/libGL/files/patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c (nonexistent) +++ head/graphics/libGL/files/patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c (revision 438198) @@ -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 +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 +@@ -225,6 +225,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) + 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 + 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 + 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; + } + Property changes on: head/graphics/libGL/files/patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.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/libGL/files/patch-src_gallium_include_pipe_p__config.h =================================================================== --- head/graphics/libGL/files/patch-src_gallium_include_pipe_p__config.h (nonexistent) +++ head/graphics/libGL/files/patch-src_gallium_include_pipe_p__config.h (revision 438198) @@ -0,0 +1,38 @@ +--- src/gallium/include/pipe/p_config.h.orig 2016-11-10 22:05:17 UTC ++++ src/gallium/include/pipe/p_config.h +@@ -76,6 +76,13 @@ + #define PIPE_CC_ICL + #endif + ++#if defined(__sparc__) || defined(__sparc64__) ++#define PIPE_ARCH_SPARC ++#if defined(__sparc64__) ++#define PIPE_ARCH_SPARC_64 ++#endif ++#endif ++ + + /* + * Processor architecture +@@ -130,7 +137,7 @@ + + #if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) || defined(PIPE_ARCH_ARM) || defined(PIPE_ARCH_AARCH64) + #define PIPE_ARCH_LITTLE_ENDIAN +-#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64) || defined(PIPE_ARCH_S390) ++#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64) || defined(PIPE_ARCH_S390) || defined(PIPE_ARCH_SPARC) || defined(PIPE_ARCH_SPARC_64) + #define PIPE_ARCH_BIG_ENDIAN + #endif + +@@ -159,6 +166,12 @@ + #define PIPE_OS_ANDROID + #endif + ++#if defined(__DragonFly__) ++#define PIPE_OS_DRAGONFLY ++#define PIPE_OS_BSD ++#define PIPE_OS_UNIX ++#endif ++ + #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) + #define PIPE_OS_FREEBSD + #define PIPE_OS_BSD Property changes on: head/graphics/libGL/files/patch-src_gallium_include_pipe_p__config.h ___________________________________________________________________ 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/libGL/files/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp =================================================================== --- head/graphics/libGL/files/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp (revision 438197) +++ head/graphics/libGL/files/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp (revision 438198) @@ -1,30 +1,30 @@ # fix errors like the following # # llvm/invocation.cpp:(.text+0x1275): undefined reference to `std::__1::basic_string, std::__1::allocator >::c_str() const' # /usr/bin/ld: ../../../../src/gallium/state_trackers/clover/.libs/libclover.a(libclllvm_la-invocation.o): relocation R_X86_64_PC32 against `_ZNKSt3__112bas ic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5c_strEv' can not be used when making a shared object; recompile with -fPIC # /usr/bin/ld: final link failed: Bad value # ---- src/gallium/state_trackers/clover/llvm/invocation.cpp.orig 2016-11-28 15:34:30 UTC +--- src/gallium/state_trackers/clover/llvm/invocation.cpp.orig 2017-04-01 15:33:37 UTC +++ src/gallium/state_trackers/clover/llvm/invocation.cpp @@ -93,6 +93,8 @@ namespace { return ctx; } + const char* cstr(const std::string& str) { return str.c_str(); } + std::unique_ptr create_compiler_instance(const target &target, const std::vector &opts, -@@ -104,8 +106,8 @@ namespace { +@@ -105,8 +107,8 @@ namespace { // Parse the compiler options. A file name should be present at the end // and must have the .cl extension in order for the CompilerInvocation // class to recognize it as an OpenCL source file. - const std::vector copts = - map(std::mem_fn(&std::string::c_str), opts); + std::vector copts; + std::transform(opts.begin(), opts.end(), copts.begin(), cstr); if (!clang::CompilerInvocation::CreateFromArgs( c->getInvocation(), copts.data(), copts.data() + copts.size(), diag)) Index: head/graphics/libGL/files/patch-src_gallium_state__trackers_clover_util_range.hpp =================================================================== --- head/graphics/libGL/files/patch-src_gallium_state__trackers_clover_util_range.hpp (nonexistent) +++ head/graphics/libGL/files/patch-src_gallium_state__trackers_clover_util_range.hpp (revision 438198) @@ -0,0 +1,31 @@ +From b95533b981af9a6687b41418e7cc2a5652fc2bdb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= +Date: Fri, 7 Mar 2014 15:16:08 +0100 +Subject: [PATCH 3/3] Work around for clang 3.4 which fails to build Clover + +See: + https://bugs.freedesktop.org/show_bug.cgi?id=74098#c3 +--- src/gallium/state_trackers/clover/util/range.hpp.orig 2016-11-10 22:05:17 UTC ++++ src/gallium/state_trackers/clover/util/range.hpp +@@ -362,6 +362,12 @@ namespace clover { + return { i, i + n }; + } + ++ namespace detail { ++ template ++ using fixup_function_type = ++ typename std::conditional::value, T &, T>::type; ++ } ++ + /// + /// Create a range by transforming the contents of a number of + /// source ranges \a rs element-wise using a provided functor \a f. +@@ -369,7 +375,7 @@ namespace clover { + /// \sa adaptor_range. + /// + template +- adaptor_range ++ adaptor_range, Rs...> + map(F &&f, Rs &&... rs) { + return { std::forward(f), std::forward(rs)... }; + } Property changes on: head/graphics/libGL/files/patch-src_gallium_state__trackers_clover_util_range.hpp ___________________________________________________________________ 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/libGL/files/patch-src_gallium_winsys_svga_drm_vmw__screen__ioctl.c =================================================================== --- head/graphics/libGL/files/patch-src_gallium_winsys_svga_drm_vmw__screen__ioctl.c (nonexistent) +++ head/graphics/libGL/files/patch-src_gallium_winsys_svga_drm_vmw__screen__ioctl.c (revision 438198) @@ -0,0 +1,14 @@ +--- src/gallium/winsys/svga/drm/vmw_screen_ioctl.c.orig 2016-11-10 22:05:17 UTC ++++ src/gallium/winsys/svga/drm/vmw_screen_ioctl.c +@@ -70,6 +70,11 @@ vmw_region_size(struct vmw_region *regio + return region->size; + } + ++#if defined(__DragonFly__) || defined(__FreeBSD__) || \ ++ defined(__NetBSD__) || defined(__OpenBSD__) ++#define ERESTART EINTR ++#endif ++ + uint32 + vmw_ioctl_context_create(struct vmw_winsys_screen *vws) + { Property changes on: head/graphics/libGL/files/patch-src_gallium_winsys_svga_drm_vmw__screen__ioctl.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/libGL/files/patch-src_glx_glxext.c =================================================================== --- head/graphics/libGL/files/patch-src_glx_glxext.c (nonexistent) +++ head/graphics/libGL/files/patch-src_glx_glxext.c (revision 438198) @@ -0,0 +1,16 @@ +# work-around for https://bugs.freedesktop.org/show_bug.cgi?id=100627 +# +--- src/glx/glxext.c.orig 2017-04-01 15:33:37 UTC ++++ src/glx/glxext.c +@@ -906,7 +906,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 (getenv("LIBGL_DRI3_ENABLE") && !getenv("LIBGL_DRI3_DISABLE")) ++#else + if (!getenv("LIBGL_DRI3_DISABLE")) ++#endif + dpyPriv->dri3Display = dri3_create_display(dpy); + #endif /* HAVE_DRI3 */ + dpyPriv->dri2Display = dri2CreateDisplay(dpy); Property changes on: head/graphics/libGL/files/patch-src_glx_glxext.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/libGL/files/patch-src_intel_tools_aubinator.c =================================================================== --- head/graphics/libGL/files/patch-src_intel_tools_aubinator.c (revision 438197) +++ head/graphics/libGL/files/patch-src_intel_tools_aubinator.c (revision 438198) @@ -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 2016-11-28 15:34:30 UTC +--- src/intel/tools/aubinator.c.orig 2017-04-01 15:33:37 UTC +++ src/intel/tools/aubinator.c -@@ -1226,7 +1226,7 @@ int main(int argc, char *argv[]) +@@ -1299,7 +1299,7 @@ int main(int argc, char *argv[]) /* mmap a terabyte for our gtt space. */ - gtt_size = 1ul << 40; + 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/libGL/files/patch-src_mapi_glapi_gen_gl__gentable.py =================================================================== --- head/graphics/libGL/files/patch-src_mapi_glapi_gen_gl__gentable.py (nonexistent) +++ head/graphics/libGL/files/patch-src_mapi_glapi_gen_gl__gentable.py (revision 438198) @@ -0,0 +1,11 @@ +--- src/mapi/glapi/gen/gl_gentable.py.orig 2017-01-06 02:14:06 UTC ++++ src/mapi/glapi/gen/gl_gentable.py +@@ -44,7 +44,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 + Property changes on: head/graphics/libGL/files/patch-src_mapi_glapi_gen_gl__gentable.py ___________________________________________________________________ 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/libGL/files/patch-src_mesa_main_compiler.h =================================================================== --- head/graphics/libGL/files/patch-src_mesa_main_compiler.h (nonexistent) +++ head/graphics/libGL/files/patch-src_mesa_main_compiler.h (revision 438198) @@ -0,0 +1,12 @@ +--- src/mesa/main/compiler.h.orig 2016-11-10 22:05:17 UTC ++++ src/mesa/main/compiler.h +@@ -56,6 +56,9 @@ extern "C" { + #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 ) Property changes on: head/graphics/libGL/files/patch-src_mesa_main_compiler.h ___________________________________________________________________ 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/libGL/files/patch-src_util_ralloc.c =================================================================== --- head/graphics/libGL/files/patch-src_util_ralloc.c (revision 438197) +++ head/graphics/libGL/files/patch-src_util_ralloc.c (revision 438198) @@ -1,18 +1,18 @@ ---- src/util/ralloc.c.orig 2016-11-28 15:34:30 UTC +--- src/util/ralloc.c.orig 2017-04-01 15:33:37 UTC +++ src/util/ralloc.c -@@ -315,6 +315,7 @@ ralloc_parent(const void *ptr) +@@ -338,6 +338,7 @@ ralloc_parent(const void *ptr) static void *autofree_context = NULL; +__attribute__((destructor)) static void autofree(void) { -@@ -326,7 +327,6 @@ ralloc_autofree_context(void) +@@ -349,7 +350,6 @@ ralloc_autofree_context(void) { if (unlikely(autofree_context == NULL)) { autofree_context = ralloc_context(NULL); - atexit(autofree); } return autofree_context; } Index: head/graphics/libosmesa/Makefile =================================================================== --- head/graphics/libosmesa/Makefile (revision 438197) +++ head/graphics/libosmesa/Makefile (revision 438198) @@ -1,34 +1,33 @@ # Created by: gahr # $FreeBSD$ PORTNAME= libosmesa PORTVERSION= ${MESAVERSION} PORTREVISION= 0 CATEGORIES= graphics COMMENT= Off-Screen Mesa implementation of the OpenGL API LIB_DEPENDS= libexpat.so:textproc/expat2 \ libglapi.so:graphics/libglapi -USES= ssl USE_XORG= dri2proto dri3proto glproto presentproto x11 xau xcb xdmcp xvmc # libosmesa doesn't link agains libGL but osmesa.h needs GL/gl.h # and both headers are intalled by libGL .... USE_GL= gl .include .include "${.CURDIR}/../../graphics/libGL/Makefile.common" #MESA_BUILD_WRKSRC= src/util src/glsl src/mesa #/drivers/osmesa MESA_INSTALL_WRKSRC= src/mesa/drivers/osmesa .include "${.CURDIR}/../../graphics/libGL/Makefile.targets" post-install: @${MKDIR} ${STAGEDIR}${PREFIX}/include/GL ${INSTALL_DATA} ${WRKSRC}/include/GL/osmesa.h \ ${STAGEDIR}${PREFIX}/include/GL .include Index: head/lang/clover/Makefile =================================================================== --- head/lang/clover/Makefile (revision 438197) +++ head/lang/clover/Makefile (revision 438198) @@ -1,34 +1,33 @@ # $FreeBSD$ PORTNAME= clover PORTVERSION= ${MESAVERSION} PORTREVISION= 0 CATEGORIES= lang COMMENT= Mesa "Clover" OpenCL library BUILD_DEPENDS= opencl>=0:devel/opencl LIB_DEPENDS= libdrm.so:graphics/libdrm \ libOpenCL.so:devel/ocl-icd \ libexpat.so:textproc/expat2 RUN_DEPENDS= opencl>=0:devel/opencl -USES= ssl USE_XORG= dri2proto dri3proto glproto presentproto x11 xdamage xext \ xfixes xshmfence xvmc xxf86vm ONLY_FOR_ARCHS= i386 amd64 ONLY_FOR_ARCHS_REASON= Clover needs a graphics driver supported by the Radeon KMS driver .include .include "${.CURDIR}/../../graphics/libGL/Makefile.common" #MESA_BUILD_WRKSRC= src/util src/glsl src/mesa src/gallium MESA_INSTALL_WRKSRC= src/gallium/targets/opencl src/gallium/targets/pipe-loader .include "${.CURDIR}/../../graphics/libGL/Makefile.targets" post-install: @${MV} ${STAGEDIR}/etc/OpenCL ${STAGEDIR}${PREFIX}/etc/ .include