Index: head/graphics/dri/Makefile =================================================================== --- head/graphics/dri/Makefile (revision 404411) +++ head/graphics/dri/Makefile (revision 404412) @@ -1,39 +1,38 @@ # Created by: Eric Anholt # $FreeBSD$ PORTNAME= dri PORTVERSION= ${MESAVERSION} -PORTREVISION= 1 PORTEPOCH= 2 CATEGORIES= graphics COMMENT= OpenGL hardware acceleration drivers for the DRI LIB_DEPENDS= libdrm.so:${PORTSDIR}/graphics/libdrm \ libexpat.so:${PORTSDIR}/textproc/expat2 USE_XORG= glproto x11 xext xxf86vm xdamage xfixes dri2proto \ presentproto xvmc xshmfence OPTIONS_DEFINE= TEXTURE OPTIONS_DEFAULT=TEXTURE TEXTURE_DESC= Enable texture-float support (patent encumbered) VDPAU_DESC= VDPAU (GPU video acceleration) support (needs Gallium) 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} -rf ${STAGEDIR}/etc/OpenCL .include Index: head/graphics/libGL/Makefile.common =================================================================== --- head/graphics/libGL/Makefile.common (revision 404411) +++ head/graphics/libGL/Makefile.common (revision 404412) @@ -1,186 +1,179 @@ # 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= 11.0.7 +MESABASEVERSION= 11.0.8 # if there is a subversion, don't include the '-' between 7.11-rc2. MESASUBVERSION= MASTER_SITES= ftp://ftp.freedesktop.org/pub/mesa/${MESABASEVERSION}/ DISTFILES= mesa-${MESADISTVERSION}${EXTRACT_SUFX} MAINTAINER= x11@FreeBSD.org BUILD_DEPENDS+= makedepend:${PORTSDIR}/devel/makedepend LIB_DEPENDS+= libdevq.so:${PORTSDIR}/devel/libdevq USES+= compiler:c++11-lib gettext-tools gmake libtool \ pathfix pkgconfig python:2,build shebangfix tar:xz 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 # only have one port to check with portscout. .if ${PORTNAME} != libGL PORTSCOUT= ignore:1 .endif .if ${OSVERSION} < 1000033 BUILD_DEPENDS+= ${LOCALBASE}/bin/flex:${PORTSDIR}/textproc/flex CONFIGURE_ENV+= ac_cv_prog_LEX=${LOCALBASE}/bin/flex .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/glsl/tests/compare_ir 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 COMPONENT= ${PORTNAME:tl:C/^lib//:C/mesa-//} MESA_LLVM_VER=36 # DRI3 needs PRIME support in the kernel to work CONFIGURE_ARGS+= --disable-dri3 CONFIGURE_ARGS+= --enable-gbm # libEGL, dri and clover need gallium enabled. # the third option in --with-egl-platforms is wayland. CONFIGURE_ARGS+= --enable-egl --with-egl-platforms=x11,drm # we don't care about GLes v1 CONFIGURE_ARGS+= --disable-gles1 CONFIGURE_ARGS+= --enable-gles2 # Clover (OpenCL). .if ${OPSYS} == DragonFly || \ (${OPSYS} == FreeBSD && ${OSVERSION} >= 1000000 && \ (${ARCH} == i386 || ${ARCH} == amd64)) BUILD_DEPENDS+= libclc>=0.0.r222830:${PORTSDIR}/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} != "" BUILD_DEPENDS+= clang${MESA_LLVM_VER}>=0:${PORTSDIR}/lang/clang${MESA_LLVM_VER} .endif CONFIGURE_ARGS+= --enable-opencl \ --enable-opencl-icd .else CONFIGURE_ARGS+= --disable-opencl .endif CONFIGURE_ARGS+= --enable-osmesa # gallium BUILD_DEPENDS+= llvm${MESA_LLVM_VER}>=0:${PORTSDIR}/devel/llvm${MESA_LLVM_VER} .if ${COMPONENT:Mdri} != "" || ${COMPONENT:Mclover} != "" || ${COMPONENT:Megl} != "" RUN_DEPENDS+= llvm${MESA_LLVM_VER}>=0:${PORTSDIR}/devel/llvm${MESA_LLVM_VER} .endif CONFIGURE_ENV+= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${MESA_LLVM_VER} CONFIGURE_ARGS+=--enable-gallium-llvm \ --enable-xvmc .if ${PORT_OPTIONS:MTEXTURE} 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="" .else 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 ALL_DRI_DRIVERS=I915 I965 R200 RADEON SWRAST ALL_GALLIUM_DRIVERS=R300 R600 RADEONSI SVGA SWRAST .if ${ARCH} == amd64 || ${ARCH} == i386 || ${ARCH} == ia64 DRI_DRIVERS= ${ALL_DRI_DRIVERS} GALLIUM_DRIVERS= ${ALL_GALLIUM_DRIVERS} .endif .if ${ARCH} == powerpc || ${ARCH} == powerpc64 DRI_DRIVERS= RADEON SWRAST GALLIUM_DRIVERS= RADEONSI SWRAST .endif .if ${ARCH} == sparc64 || ${ARCH} == armv6 DRI_DRIVERS= SWRAST GALLIUM_DRIVERS= SWRAST .endif # empty for unsupported arches DRI_DRIVERS+= GALLIUM_DRIVERS+= .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 CONFIGURE_ARGS+=--with-gallium-drivers="${GALLIUM_DRIVERS:tl}" + +.if ${OPSYS} == DragonFly +LIB_DEPENDS+= libelf.so:${PORTSDIR}/devel/libelf +.endif Index: head/graphics/libGL/Makefile.targets =================================================================== --- head/graphics/libGL/Makefile.targets (revision 404411) +++ head/graphics/libGL/Makefile.targets (revision 404412) @@ -1,43 +1,45 @@ # $FreeBSD$ # # 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 @${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 404411) +++ head/graphics/libGL/distinfo (revision 404412) @@ -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 Index: head/graphics/libGL/files/configure.ac =================================================================== --- head/graphics/libGL/files/configure.ac (revision 404411) +++ head/graphics/libGL/files/configure.ac (revision 404412) @@ -1,111 +1,102 @@ ---- 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 +LIBDEVQ_REQUIRED=0.0.2 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 -linux*) +linux*|freebsd*) dri3_default=yes ;; *) -@@ -955,6 +956,9 @@ +@@ -1000,6 +1001,9 @@ PKG_CHECK_MODULES([LIBUDEV], [libudev >= $LIBUDEV_REQUIRED], have_libudev=yes, have_libudev=no) +PKG_CHECK_MODULES([LIBDEVQ], [libdevq-1.0 >= $LIBDEVQ_REQUIRED], + have_libdevq=yes, have_libdevq=no) + 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 +if test "$have_libdevq" = yes; then + DEFINES="$DEFINES -DHAVE_LIBDEVQ" + have_pci_id=yes +fi if test "$have_sysfs" = yes; then DEFINES="$DEFINES -DHAVE_SYSFS" -@@ -1173,6 +1181,23 @@ +@@ -1228,6 +1236,23 @@ ;; 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 + + if test "x$have_libdevq" != xyes; then + AC_MSG_ERROR([libdevq required for building DRI]) + 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 -@@ -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" +elif test "x$need_libdevq" = xyes; then + GBM_PC_REQ_PRIV="libdevq-1.0 >= $LIBDEVQ_REQUIRED" else GBM_PC_REQ_PRIV="" fi -@@ -1528,9 +1555,19 @@ +@@ -1545,9 +1572,19 @@ 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 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} - 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 Index: head/graphics/libGL/files/patch-configure =================================================================== --- head/graphics/libGL/files/patch-configure (revision 404411) +++ head/graphics/libGL/files/patch-configure (revision 404412) @@ -1,209 +1,200 @@ ---- 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 +LIBDEVQ_LIBS +LIBDEVQ_CFLAGS LIBUDEV_LIBS LIBUDEV_CFLAGS + MESA_LLVM +@@ -1156,6 +1158,8 @@ LIBDRM_LIBS -@@ -1158,6 +1160,8 @@ - LIBDRM_LIBS LIBUDEV_CFLAGS LIBUDEV_LIBS +LIBDEVQ_CFLAGS +LIBDEVQ_LIBS XLIBGL_CFLAGS XLIBGL_LIBS GLPROTO_CFLAGS @@ -1966,6 +1970,10 @@ C compiler flags for LIBUDEV, overriding pkg-config LIBUDEV_LIBS linker flags for LIBUDEV, overriding pkg-config + LIBDEVQ_CFLAGS + C compiler flags for LIBDEVQ, overriding pkg-config + LIBDEVQ_LIBS + linker flags for LIBDEVQ, overriding pkg-config 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 +LIBDEVQ_REQUIRED=0.0.2 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 -linux*) +linux*|freebsd*) dri3_default=yes ;; *) -@@ -21227,6 +21236,78 @@ +@@ -21543,6 +21552,78 @@ have_libudev=yes fi + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBDEVQ" >&5 +$as_echo_n "checking for LIBDEVQ... " >&6; } + +if test -n "$LIBDEVQ_CFLAGS"; then + pkg_cv_LIBDEVQ_CFLAGS="$LIBDEVQ_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdevq-1.0 >= \$LIBDEVQ_REQUIRED\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libdevq-1.0 >= $LIBDEVQ_REQUIRED") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBDEVQ_CFLAGS=`$PKG_CONFIG --cflags "libdevq-1.0 >= $LIBDEVQ_REQUIRED" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LIBDEVQ_LIBS"; then + pkg_cv_LIBDEVQ_LIBS="$LIBDEVQ_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdevq-1.0 >= \$LIBDEVQ_REQUIRED\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libdevq-1.0 >= $LIBDEVQ_REQUIRED") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBDEVQ_LIBS=`$PKG_CONFIG --libs "libdevq-1.0 >= $LIBDEVQ_REQUIRED" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LIBDEVQ_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdevq-1.0 >= $LIBDEVQ_REQUIRED" 2>&1` + else + LIBDEVQ_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdevq-1.0 >= $LIBDEVQ_REQUIRED" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBDEVQ_PKG_ERRORS" >&5 + + have_libdevq=no +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_libdevq=no +else + LIBDEVQ_CFLAGS=$pkg_cv_LIBDEVQ_CFLAGS + LIBDEVQ_LIBS=$pkg_cv_LIBDEVQ_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_libdevq=yes +fi + # 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 +if test "$have_libdevq" = yes; then + DEFINES="$DEFINES -DHAVE_LIBDEVQ" + have_pci_id=yes +fi if test "$have_sysfs" = yes; then DEFINES="$DEFINES -DHAVE_SYSFS" -@@ -22069,6 +22154,22 @@ +@@ -22396,6 +22481,22 @@ ;; gnu*) DEFINES="$DEFINES -DHAVE_ALIAS" + if test "x$enable_dri3" = xyes; then + DEFINES="$DEFINES -DHAVE_DRI3" + fi + + if test "x$have_libdevq" != xyes; then + as_fn_error $? "libdevq required for building DRI" "$LINENO" 5 + 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 -@@ -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" +elif test "x$need_libdevq" = xyes; then + GBM_PC_REQ_PRIV="libdevq-1.0 >= $LIBDEVQ_REQUIRED" 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 + 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. -@@ -24510,9 +24623,6 @@ +@@ -24835,9 +24948,6 @@ 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 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 404412) @@ -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 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; + } + 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