1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

Update Mesa port to 10.6.6 and add Clover.

Add beignet 1.1.0.
Add clinfo, clblas, clfft and clrng.

The major change is that all Mesa ports are now configured the same way.
This fixes several problems and enables new features.  The details
are described in this blog post:
http://blogs.freebsdish.org/graphics/2015/03/18/unifying-mesa-ports-configure/

The second important change is the OpenCL support.  Mesa's
implementation, Clover, is enabled as well as Beignet.  Clover
targets all Gallium drivers, only Radeon GPUs in our case.  Beignet
is for Intel GPUs starting with Ivy Bridge.  Thanks to Johannes
Dieterich, O. Hartman, and Koop Mast for their work on OpenCL!  As a
bonus, there are several OpenCL-based math ports added (clblas,
clfft and clrng). For more information and known issues, please see
https://wiki.freebsd.org/Graphics/OpenCL

The third change is the removal of Mesa 9.1.7 which was installed on
FreeBSD 9.3-RELEASE.  There is now only one version of Mesa in the Ports
tree (10.6.6) for all supported versions of FreeBSD.

Other, smaller changes:

* Include libosmesa into the Mesa framework; this changes libOSMesa
  shlib version.

* bsd.mesalib.mk was renamed and split up in two files namely
  Makefile.common and Makefile.targets.  So ports can overwrite variables
  set by Makefile.common and are used by Makefile.targets.

* Some text in the pkg-descr files was wrong, clean it up.  While here,
  update the WWW to the main mesa3d.org upstream page.

* devel/clinfo was added, a glxinfo like program but for OpenCL.

Non-x86 hardware reports are very welcome since we changed the framework
quite a bit.

Obtained from:	Graphics team development repo.
This commit is contained in:
Koop Mast 2015-09-17 18:07:25 +00:00
parent 7bc4660db0
commit 05360ec71e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=397198
106 changed files with 1194 additions and 1770 deletions

View File

@ -252,6 +252,7 @@
SUBDIR += cld2
SUBDIR += clewn
SUBDIR += clig
SUBDIR += clinfo
SUBDIR += clisp-hyperspec
SUBDIR += clojure-cider
SUBDIR += cloudabi-binutils

33
devel/clinfo/Makefile Normal file
View File

@ -0,0 +1,33 @@
# Created by: Koop Mast <kwm@FreeBSD.org>
# $FreeBSD$
PORTNAME= clinfo
PORTVERSION= 2.0.15.04.28
CATEGORIES= devel
MAINTAINER= kwm@FreeBSD.org
COMMENT= OpenCL info program like glxinfo is for libGL
BUILD_DEPENDS= ${LOCALBASE}/include/CL/opencl.h:${PORTSDIR}/devel/opencl
LIB_DEPENDS= libOpenCL.so:${PORTSDIR}/devel/ocl-icd
USE_GITHUB= yes
GH_ACCOUNT= Oblomov
GH_TAGNAME= b953d226b7
USES= gmake
NO_CONFIGURE= yes
ALL_TARGET= #
PLIST_FILES= bin/clinfo \
man/man1/clinfo.1.gz
post-patch:
@${REINPLACE_CMD} -e 's|-Wall|-Wall -I${LOCALBASE}/include|g; \
s|-lOpenCL|-lOpenCL -L${LOCALBASE}/lib|g' \
${WRKSRC}/Makefile
do-install:
@${INSTALL_PROGRAM} ${WRKSRC}/clinfo ${STAGEDIR}${PREFIX}/bin/
@${INSTALL_MAN} ${WRKSRC}/man/clinfo.1 ${STAGEDIR}${PREFIX}/man/man1/
.include <bsd.port.mk>

2
devel/clinfo/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (Oblomov-clinfo-2.0.15.04.28-b953d226b7_GH0.tar.gz) = 547cd53e656a787bffaab7308a4ac5f6bbd9dab23aaf723a820b86ff3f8122d4
SIZE (Oblomov-clinfo-2.0.15.04.28-b953d226b7_GH0.tar.gz) = 25230

8
devel/clinfo/pkg-descr Normal file
View File

@ -0,0 +1,8 @@
A simple OpenCL application that enumerates all possible platform and
device properties. Inspired by AMD's program of the same name, it is
coded in pure C99 and it tries to output all possible information,
including that provided by platform-specific extensions, and not to
crash on platform-unsupported properties (e.g. 1.2 properties on 1.1
platforms).
WWW: https://github.com/Oblomov/clinfo

View File

@ -3,7 +3,7 @@
PORTNAME= dri
PORTVERSION= ${MESAVERSION}
PORTREVISION= ${DRIREVISION}
PORTREVISION= 0
PORTEPOCH= 2
CATEGORIES= graphics
@ -18,12 +18,6 @@ USE_XORG= glproto x11 xext xxf86vm xdamage xfixes dri2proto \
OPTIONS_DEFINE= TEXTURE
OPTIONS_DEFAULT=TEXTURE
OPTIONS_DEFINE_i386= GALLIUM
OPTIONS_DEFAULT_i386= GALLIUM
OPTIONS_DEFINE_amd64= GALLIUM
OPTIONS_DEFAULT_amd64= GALLIUM
GALLIUM_DESC= Gallium (llvm backed) dri drivers
TEXTURE_DESC= Enable texture-float support (patent encumbered)
VDPAU_DESC= VDPAU (GPU video acceleration) support (needs Gallium)
@ -31,20 +25,13 @@ PKGHELP= ${.CURDIR}/pkg-help
.include <bsd.port.options.mk>
# gcc from base can't handle some code in mesa 9.1+
# We only care for 9.x and 8.x. clang in 10.x is new enough.
# This is for 0b0000 binary which gcc 4.3+ understands and is in the i965 driver.
. if (${OSVERSION} >= 901500 && ${OSVERSION} < 1000000)
CC=clang
CXX=clang++
CPP=clang-cpp
. elif ${OSVERSION} < 901500
USE_GCC=yes
. endif
ALL_DRI_DRIVERS=I915 I965 R200 RADEON SWRAST
.include "${.CURDIR}/../../graphics/libGL/bsd.mesalib.mk"
.include "${.CURDIR}/../../graphics/libGL/Makefile.common"
#src/mesa/libmesagallium.la
#MESA_BUILD_WRKSRC= src/util src/gallium
#MESA_INSTALL_WRKSRC= src/gallium
PLIST_SUB+= VERSION=${MESADISTVERSION}
@ -52,29 +39,6 @@ PLIST_SUB+= VERSION=${MESADISTVERSION}
DRI_DRIVERS= ${ALL_DRI_DRIVERS}
.endif
.if defined(WITH_NEW_MESA)
DRIREVISION= 0
PLIST= ${.CURDIR}/pkg-plist
.else
DRIREVISION= 6
PLIST= ${.CURDIR}/pkg-plist-old
.endif
.if ${PORT_OPTIONS:MGALLIUM}
BUILD_DEPENDS+= llvm${MESA_LLVM_VER}>=0:${PORTSDIR}/devel/llvm${MESA_LLVM_VER}
RUN_DEPENDS+= llvm${MESA_LLVM_VER}>=0:${PORTSDIR}/devel/llvm${MESA_LLVM_VER}
CONFIGURE_ENV+= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${MESA_LLVM_VER}
CONFIGURE_ARGS+=--enable-gallium-llvm \
--enable-xvmc \
--with-gallium-drivers=r300,r600,radeonsi,svga,swrast
PLIST_SUB+= GALLIUM=""
.else
CONFIGURE_ARGS+=--enable-gallium-llvm=no --without-gallium-drivers \
--disable-gallium-egl
PLIST_SUB+= GALLIUM="@comment "
.endif
.if ${PORT_OPTIONS:MTEXTURE}
CONFIGURE_ARGS+=--enable-texture-float
.endif
@ -109,9 +73,11 @@ PLIST_SUB+= ${_d}_DRIVER="@comment "
. endif
.endfor
.if !(${ARCH} == amd64 || ${ARCH} == i386)
CONFIGURE_ARGS+=--disable-gallium-intel
.endif
CONFIGURE_ARGS+=--with-dri-drivers="${DRI_DRIVERS:tl}"
.include "${.CURDIR}/../../graphics/libGL/Makefile.targets"
post-install:
@${RM} -rf ${STAGEDIR}/etc/OpenCL
.include <bsd.port.mk>

View File

@ -4,7 +4,6 @@
@comment include/EGL/eglextchromium.h
@comment include/EGL/eglmesaext.h
@comment include/EGL/eglplatform.h
include/GL/internal/dri_interface.h
@comment include/GL/gl.h
@comment include/GL/gl_mangle.h
@comment include/GL/glcorearb.h
@ -12,31 +11,53 @@ include/GL/internal/dri_interface.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/GL/wglext.h
@comment include/GL/wmesa.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/gl3ext.h
@comment include/GLES3/gl3platform.h
@comment include/KHR/khrplatform.h
@comment include/gbm.h
%%GALLIUM%%lib/dri/kms_swrast_dri.so
%%I915_DRIVER%%lib/dri/i915_dri.so
%%I965_DRIVER%%lib/dri/i965_dri.so
lib/dri/kms_swrast_dri.so
%%R200_DRIVER%%lib/dri/r200_dri.so
%%GALLIUM%%lib/dri/r300_dri.so
%%GALLIUM%%lib/dri/r600_dri.so
lib/dri/r300_dri.so
lib/dri/r600_dri.so
%%RADEON_DRIVER%%lib/dri/radeon_dri.so
%%GALLIUM%%lib/dri/radeonsi_dri.so
lib/dri/radeonsi_dri.so
%%SWRAST_DRIVER%%lib/dri/swrast_dri.so
%%GALLIUM%%lib/dri/vmwgfx_dri.so
%%GALLIUM%%lib/libXvMCr600.so
%%GALLIUM%%lib/libXvMCr600.so.1
%%GALLIUM%%lib/libXvMCr600.so.1.0
%%GALLIUM%%lib/libXvMCr600.so.1.0.0
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
lib/libXvMCr600.so
lib/libXvMCr600.so.1
lib/libXvMCr600.so.1.0
lib/libXvMCr600.so.1.0.0
@comment lib/libgbm.so
@comment lib/libgbm.so.1
@comment lib/libgbm.so.1.0.0
@ -55,7 +76,9 @@ include/GL/internal/dri_interface.h
%%VDPAU%%lib/vdpau/libvdpau_radeonsi.so.1
%%VDPAU%%lib/vdpau/libvdpau_radeonsi.so.1.0
%%VDPAU%%lib/vdpau/libvdpau_radeonsi.so.1.0.0
@comment libdata/pkgconfig/egl.pc
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

View File

@ -1,67 +0,0 @@
%%I965_DRIVER%%etc/drirc
@comment include/EGL/egl.h
@comment include/EGL/eglext.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/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/GL/wglext.h
@comment include/GL/wmesa.h
@comment include/KHR/khrplatform.h
@comment include/gbm.h
%%I915_DRIVER%%lib/dri/i915_dri.so
%%I965_DRIVER%%lib/dri/i965_dri.so
%%R200_DRIVER%%lib/dri/r200_dri.so
%%GALLIUM%%lib/dri/r300_dri.so
%%GALLIUM%%lib/dri/r600_dri.so
%%RADEON_DRIVER%%lib/dri/radeon_dri.so
%%GALLIUM%%lib/dri/radeonsi_dri.so
%%SWRAST_DRIVER%%lib/dri/swrast_dri.so
%%GALLIUM%%lib/dri/vmwgfx_dri.so
%%GALLIUM%%lib/libXvMCr300.so
%%GALLIUM%%lib/libXvMCr300.so.1
%%GALLIUM%%lib/libXvMCr300.so.1.0.0
%%GALLIUM%%lib/libXvMCr600.so
%%GALLIUM%%lib/libXvMCr600.so.1
%%GALLIUM%%lib/libXvMCr600.so.1.0.0
%%GALLIUM%%lib/libXvMCsoftpipe.so
%%GALLIUM%%lib/libXvMCsoftpipe.so.1
%%GALLIUM%%lib/libXvMCsoftpipe.so.1.0.0
@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
lib/libdricore9.1.7.so
lib/libdricore9.1.7.so.1
lib/libdricore9.1.7.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
%%GALLIUM%%lib/libllvmradeon%%VERSION%%.so
%%GALLIUM%%%%VDPAU%%lib/vdpau/libvdpau_r300.so
%%GALLIUM%%%%VDPAU%%lib/vdpau/libvdpau_r300.so.1
%%GALLIUM%%%%VDPAU%%lib/vdpau/libvdpau_r300.so.1.0.0
%%GALLIUM%%%%VDPAU%%lib/vdpau/libvdpau_r600.so
%%GALLIUM%%%%VDPAU%%lib/vdpau/libvdpau_r600.so.1
%%GALLIUM%%%%VDPAU%%lib/vdpau/libvdpau_r600.so.1.0.0
%%GALLIUM%%%%VDPAU%%lib/vdpau/libvdpau_radeonsi.so
%%GALLIUM%%%%VDPAU%%lib/vdpau/libvdpau_radeonsi.so.1
%%GALLIUM%%%%VDPAU%%lib/vdpau/libvdpau_radeonsi.so.1.0.0
%%GALLIUM%%%%VDPAU%%lib/vdpau/libvdpau_softpipe.so
%%GALLIUM%%%%VDPAU%%lib/vdpau/libvdpau_softpipe.so.1
%%GALLIUM%%%%VDPAU%%lib/vdpau/libvdpau_softpipe.so.1.0.0
libdata/pkgconfig/dri.pc
@comment libdata/pkgconfig/egl.pc
@comment libdata/pkgconfig/gbm.pc
@comment libdata/pkgconfig/gl.pc

View File

@ -3,7 +3,7 @@
PORTNAME= gbm
PORTVERSION= ${MESAVERSION}
PORTREVISION= ${GBM_REVISION}
PORTREVISION= 0
CATEGORIES= graphics
COMMENT= gbm library
@ -19,23 +19,12 @@ USE_XORG= x11 xau xcb xdmcp
USE_XORG+= glproto dri2proto xext xdamage xfixes presentproto \
xshmfence
BUILD_WRKSRC= ${WRKSRC}/src/gbm
INSTALL_WRKSRC= ${WRKSRC}/src/gbm
.include <bsd.port.options.mk>
.include "${.CURDIR}/../../graphics/libGL/bsd.mesalib.mk"
.include "${.CURDIR}/../../graphics/libGL/Makefile.common"
.if defined(WITH_NEW_MESA)
GBM_REVISION= 0
.else
GBM_REVISION= 0
.endif
MESA_BUILD_WRKSRC= src/mapi src/gbm
MESA_INSTALL_WRKSRC= src/gbm
pre-build:
.if defined(WITH_NEW_MESA)
@cd ${WRKSRC}/src/mapi/ && ${MAKE_CMD} ${_MAKE_JOBS}
.else
@cd ${WRKSRC}/src/mapi/shared-glapi && ${MAKE_CMD} ${_MAKE_JOBS}
.endif
.include "${.CURDIR}/../../graphics/libGL/Makefile.targets"
.include <bsd.port.mk>

View File

@ -1,3 +1,3 @@
This package contains the EGL utility library.
This package contains the gbm utility library.
WWW: http://www.freedesktop.org/Software/xorg
WWW: http://mesa3d.org/

View File

@ -3,7 +3,7 @@
PORTNAME= libEGL
PORTVERSION= ${MESAVERSION}
PORTREVISION= ${LIBEGL_REVISION}
PORTREVISION= 0
CATEGORIES= graphics
COMMENT= OpenEGL library
@ -11,7 +11,8 @@ COMMENT= OpenEGL library
LIB_DEPENDS+= libpthread-stubs.so:${PORTSDIR}/devel/libpthread-stubs \
libexpat.so:${PORTSDIR}/textproc/expat2 \
libdevq.so:${PORTSDIR}/devel/libdevq \
libdrm.so:${PORTSDIR}/graphics/libdrm
libdrm.so:${PORTSDIR}/graphics/libdrm \
libgbm.so:${PORTSDIR}/graphics/gbm
USE_XORG= x11 xau xcb xdmcp
@ -20,38 +21,12 @@ USE_XORG+= glproto dri2proto xext xdamage xfixes presentproto \
xshmfence
.include <bsd.port.options.mk>
.include "${.CURDIR}/../../graphics/libGL/bsd.mesalib.mk"
.include "${.CURDIR}/../../graphics/libGL/Makefile.common"
.if defined(WITH_NEW_MESA)
BUILD_WRKSRC= src/egl/drivers/dri2 src/egl/main
INSTALL_WRKSRC= src/egl/drivers/dri2 src/egl/main
.else
BUILD_WRKSRC= ${WRKSRC}/src/egl
INSTALL_WRKSRC= ${WRKSRC}/src/egl
.endif
MESA_BUILD_WRKSRC= src/mapi src/gbm src/egl/drivers/dri2 src/egl/main
MESA_INSTALL_WRKSRC= src/egl/drivers/dri2 src/egl/main
.if defined(WITH_NEW_MESA)
LIBEGL_REVISION= 0
.else
LIBEGL_REVISION= 5
.endif
.if defined(WITH_NEW_MESA)
do-build: egl-do-build
do-install: egl-do-install
egl-do-build:
. for dir in ${BUILD_WRKSRC}
@(cd ${WRKSRC}/${dir}; ${DO_MAKE_BUILD} ${ALL_TARGET};)
. endfor
egl-do-install:
. for dir in ${INSTALL_WRKSRC}
@(cd ${WRKSRC}/${dir} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \
${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET})
. endfor
.endif
.include "${.CURDIR}/../../graphics/libGL/Makefile.targets"
post-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/.mesa

View File

@ -1,3 +1,3 @@
This package contains the EGL utility library.
WWW: http://www.freedesktop.org/Software/xorg
WWW: http://mesa3d.org/

View File

@ -1,6 +1,6 @@
include/EGL/egl.h
include/EGL/eglext.h
%%NEW%%include/EGL/eglextchromium.h
include/EGL/eglextchromium.h
include/EGL/eglmesaext.h
include/EGL/eglplatform.h
include/KHR/khrplatform.h

View File

@ -3,7 +3,7 @@
PORTNAME= libGL
PORTVERSION= ${MESAVERSION}
PORTREVISION= ${LIBGLREVISION}
PORTREVISION= 0
CATEGORIES= graphics
COMMENT= OpenGL library that renders using GLX or DRI
@ -16,21 +16,18 @@ USE_XORG= glproto x11 xext xxf86vm xdamage xfixes dri2proto:both \
presentproto xshmfence
.include <bsd.port.options.mk>
.include "${.CURDIR}/bsd.mesalib.mk"
.include "${.CURDIR}/Makefile.common"
.if defined(WITH_NEW_MESA)
LIBGLREVISION= 0
.else
LIBGLREVISION= 4
.endif
MESA_BUILD_WRKSRC= src/mapi src/glx
MESA_INSTALL_WRKSRC= src/glx
.if !(${ARCH} == "amd64" || ${ARCH} == "i386")
CONFIGURE_ARGS+=--disable-gallium-intel
.endif
.include "${.CURDIR}/Makefile.targets"
post-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/.mesa
@${MV} ${STAGEDIR}${PREFIX}/lib/libGL* \
${STAGEDIR}${PREFIX}/lib/.mesa/
@cd ${WRKSRC}/src/mesa && ${SETENV} DESTDIR=${STAGEDIR} \
${MAKE_CMD} install-pkgconfigDATA install-glHEADERS
.include <bsd.port.mk>

View File

@ -0,0 +1,121 @@
# 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= 10.6.6
# 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 shebangfix tar:xz
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
CPPFLAGS+= -isystem${LOCALBASE}/include
LDFLAGS+= -Wl,-Y${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
CONFIGURE_ARGS+= --enable-gles2
# Clover (OpenCL).
.if ${OPSYS} == DragonFly || (${OPSYS} == FreeBSD && ${OSVERSION} >= 1000000)
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 \
--with-gallium-drivers=r300,r600,radeonsi,svga,swrast
.if !(${ARCH} == amd64 || ${ARCH} == i386)
CONFIGURE_ARGS+=--disable-gallium-intel
.endif
# what to do with this one? Currently disabled in dri.
.if ${COMPONENT:Mvdpau} == ""
CONFIGURE_ARGS+=--disable-vdpau
.else
CONFIGURE_ARGS+=--enable-vdpau
.endif

View File

@ -0,0 +1,41 @@
# $FreeBSD$
#
# this file holds common targets
post-patch:
@${REINPLACE_CMD} -e 's|-ffast-math|${FAST_MATH}|' -e 's|x86_64|amd64|' \
-e 's|python2 python|python2disabled pythondisabled|g' \
${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

View File

@ -1,165 +0,0 @@
# bsd.mesalib.mk - 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$
# hw context support in the i915kms driver
.if ${OPSYS} == FreeBSD && \
(${OSVERSION} >= 1000717 && ${OSVERSION} < 1100000 || \
${OSVERSION} >= 1100035)
WITH_NEW_MESA=1
.endif
.if ${OPSYS} == DragonFly && ${DFLYVERSION} >= 300901
WITH_NEW_MESA=1
.endif
MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/}
MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/}
.if defined(WITH_NEW_MESA)
MESABASEVERSION= 10.4.6
# if there is a subversion, don't include the '-' between 7.11-rc2.
MESASUBVERSION=
MASTER_SITES= ftp://ftp.freedesktop.org/pub/mesa/${MESABASEVERSION}/
PLIST_SUB+= OLD="@comment " NEW=""
# work around libarchive bug?
EXTRACT_CMD= ${LOCALBASE}/bin/gtar
EXTRACT_DEPENDS+= gtar:${PORTSDIR}/archivers/gtar
.else
MESABASEVERSION= 9.1.7
MESASUBVERSION=
MASTER_SITES= ftp://ftp.freedesktop.org/pub/mesa/older-versions/${MESABASEVERSION:R:R}.x/${MESABASEVERSION}/
PLIST_SUB+= OLD="" NEW="@comment "
.endif
DISTFILES= MesaLib-${MESADISTVERSION}${EXTRACT_SUFX}
MAINTAINER= x11@FreeBSD.org
BUILD_DEPENDS+= makedepend:${PORTSDIR}/devel/makedepend \
${PYTHON_SITELIBDIR}/libxml2.py:${PORTSDIR}/textproc/py-libxml2
LIB_DEPENDS+= libdevq.so:${PORTSDIR}/devel/libdevq
USES+= bison gettext-tools gmake libtool pathfix pkgconfig \
python:2,build shebangfix tar:bzip2
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
CPPFLAGS+= -isystem${LOCALBASE}/include
LDFLAGS+= -Wl,-Y${LOCALBASE}/lib
PKGINSTALL= ${.CURDIR}/pkg-install
PKGDEINSTALL= ${.CURDIR}/pkg-deinstall
.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
.if defined(WITH_NEW_MESA)
SHEBANG_FILES+= src/mapi/mapi_abi.py
.endif
MASTERDIR= ${.CURDIR}/../../graphics/libGL
.if defined(WITH_NEW_MESA)
PATCHDIR= ${MASTERDIR}/files
CONFIGURE_ARGS+= --disable-dri3
.else
PATCHDIR= ${MASTERDIR}/files-old
.endif
DESCR= ${.CURDIR}/pkg-descr
PLIST= ${.CURDIR}/pkg-plist
WRKSRC= ${WRKDIR}/Mesa-${MESADISTVERSION}
INSTALL_TARGET= install-strip
COMPONENT= ${PORTNAME:tl:C/^lib//:C/mesa-//}
.if defined(WITH_NEW_MESA)
MESA_LLVM_VER=35
.else
MESA_LLVM_VER=33
.endif
.if ${COMPONENT:Mglesv2} == ""
CONFIGURE_ARGS+= --disable-gles2
.else
CONFIGURE_ARGS+= --enable-gles2
.endif
.if ${COMPONENT:Megl} == ""
CONFIGURE_ARGS+= --disable-egl
.else
CONFIGURE_ARGS+= --enable-egl
.endif
.if ${COMPONENT:Mclover} == ""
CONFIGURE_ARGS+= --disable-opencl
.else
CONFIGURE_ARGS+= --enable-opencl
.endif
.if ${COMPONENT:Mdri} == "" && ${COMPONENT:Mclover} == ""
CONFIGURE_ARGS+=--with-dri-drivers=no
CONFIGURE_ARGS+=--enable-gallium-llvm=no --without-gallium-drivers
.else
# done in the dri port
# need to enable this globaly because it also used in dri ..
# the third possible option is wayland.
CONFIGURE_ARGS+= --enable-egl --with-egl-platforms=x11,drm
.endif
.if ${COMPONENT:Mvdpau} == ""
CONFIGURE_ARGS+=--disable-vdpau
.else
CONFIGURE_ARGS+=--enable-vdpau
.endif
post-patch:
@${REINPLACE_CMD} -e 's|-ffast-math|${FAST_MATH}|' -e 's|x86_64|amd64|' \
${WRKSRC}/configure
@${REINPLACE_CMD} -e 's|/etc/|${PREFIX}/etc/|g' \
${WRKSRC}/src/mesa/drivers/dri/common/xmlconfig.c
.if !defined(WITH_NEW_MESA)
@${REINPLACE_CMD} -e 's|#!/usr/bin/python|#!${PYTHON_CMD}|g' \
${WRKSRC}/src/mesa/drivers/dri/common/xmlpool/gen_xmlpool.py \
${WRKSRC}/src/glsl/builtins/tools/*.py
.else
@${REINPLACE_CMD} -e 's|#!/use/bin/python|#!${PYTHON_CMD}|g' \
${WRKSRC}/src/mesa/drivers/dri/common/xmlpool/gen_xmlpool.py
.endif
@${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: pre-mesa-build
pre-mesa-build:
.if defined(WITH_NEW_MESA)
# do propper gmake target.
@cd ${WRKSRC}/src/mesa/drivers/dri/common/xmlpool && ${MAKE_CMD}
@cd ${WRKSRC}/src/loader && ${MAKE_CMD} libloader.la
.endif

View File

@ -1,4 +1,2 @@
SHA256 (MesaLib-9.1.7.tar.bz2) = 30e6b878b457c716221a9730b179b2846c38cfd5aa1b02d54aff685f50b844a0
SIZE (MesaLib-9.1.7.tar.bz2) = 6134393
SHA256 (MesaLib-10.4.6.tar.bz2) = d8baedd20e79ccd98a5a7b05e23d59a30892e68de1fcc057ca6873dafca02735
SIZE (MesaLib-10.4.6.tar.bz2) = 7520024
SHA256 (mesa-10.6.6.tar.xz) = 570f2154b7340ff5db61ff103bc6e85165b8958798b78a50fa2df488e98e5778
SIZE (mesa-10.6.6.tar.xz) = 7040744

View File

@ -1,13 +0,0 @@
--- Makefile.in.orig 2014-05-11 21:01:42.000000000 +0200
+++ Makefile.in 2014-05-11 21:02:12.000000000 +0200
@@ -87,9 +87,7 @@
$(top_srcdir)/m4/ax_prog_flex.m4 \
$(top_srcdir)/m4/ax_pthread.m4 \
$(top_srcdir)/m4/ax_python_module.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
- $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \

View File

@ -1,424 +0,0 @@
--- configure.orig 2014-03-14 20:50:56.000000000 +0100
+++ configure 2014-03-14 20:51:25.000000000 +0100
@@ -779,6 +779,8 @@
GBM_PC_REQ_PRIV
LIBUDEV_LIBS
LIBUDEV_CFLAGS
+LIBDEVQ_LIBS
+LIBDEVQ_CFLAGS
OSMESA_PC_LIB_PRIV
OSMESA_PC_REQ
OSMESA_MESA_DEPS
@@ -1126,6 +1128,8 @@
NOUVEAU_LIBS
RADEON_CFLAGS
RADEON_LIBS
+LIBDEVQ_CFLAGS
+LIBDEVQ_LIBS
LIBUDEV_CFLAGS
LIBUDEV_LIBS
XORG_CFLAGS
@@ -1930,6 +1934,10 @@
RADEON_CFLAGS
C compiler flags for RADEON, overriding pkg-config
RADEON_LIBS linker flags for RADEON, overriding pkg-config
+ LIBDEVQ_CFLAGS
+ C compiler flags for LIBDEVQ, overriding pkg-config
+ LIBDEVQ_LIBS
+ linker flags for LIBDEVQ, overriding pkg-config
LIBUDEV_CFLAGS
C compiler flags for LIBUDEV, overriding pkg-config
LIBUDEV_LIBS
@@ -21184,9 +21192,34 @@
DEFINES="$DEFINES -DHAVE_PTHREAD -DUSE_EXTERNAL_DXTN_LIB=1"
DEFINES="$DEFINES -DIN_DRI_DRIVER -DHAVE_ALIAS"
- if test "x$DRI_DIRS" = "xyes"; then
- DRI_DIRS="i915 i965 nouveau r200 radeon swrast"
- fi
+ case "$host_cpu" in
+ x86_64|ia64)
+ # i810 is missing because there is no x86-64 system where it
+ # could *ever* be used.
+ if test "x$DRI_DIRS" = "xyes"; then
+ DRI_DIRS="i915 i965 nouveau r200 radeon swrast"
+ fi
+ ;;
+ i*86)
+ if test "x$DRI_DIRS" = "xyes"; then
+ DRI_DIRS="i915 i965 nouveau r200 radeon swrast"
+ fi
+ ;;
+ powerpc*)
+ # Build only the drivers for cards that exist on PowerPC.
+ # At some point MGA will be added, but not yet.
+ if test "x$DRI_DIRS" = "xyes"; then
+ DRI_DIRS="r200 radeon swrast"
+ fi
+ ;;
+ sparc*)
+ # Build only the drivers for cards that exist on SPARC.
+ if test "x$DRI_DIRS" = "xyes"; then
+ DRI_DIRS="r200 radeon swrast"
+ fi
+ ;;
+ esac
+
;;
gnu*)
DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
@@ -21684,6 +21717,81 @@
if test "x$enable_gbm" = xyes; then
SRC_DIRS="$SRC_DIRS gbm"
+ case "$host_os" in
+ *freebsd*)
+
+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\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libdevq-1.0") 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" 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\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libdevq-1.0") 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" 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" 2>&1`
+ else
+ LIBDEVQ_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdevq-1.0" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LIBDEVQ_PKG_ERRORS" >&5
+
+ as_fn_error $? "gbm needs libdevq" "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ as_fn_error $? "gbm needs libdevq" "$LINENO" 5
+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; }
+
+fi
+ ;;
+ *)
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBUDEV" >&5
@@ -21755,6 +21863,8 @@
$as_echo "yes" >&6; }
fi
+ ;;
+ esac
if test "x$enable_dri" = xyes; then
GBM_BACKEND_DIRS="$GBM_BACKEND_DIRS dri"
@@ -21763,7 +21873,14 @@
fi
fi
fi
-GBM_PC_REQ_PRIV="libudev"
+case "$host_os" in
+*freebsd*)
+ GBM_PC_REQ_PRIV="libdevq-1.0"
+ ;;
+*)
+ GBM_PC_REQ_PRIV="libudev"
+ ;;
+esac
GBM_PC_LIB_PRIV="$DLOPEN_LIBS"
@@ -21782,6 +21899,81 @@
if test "$enable_static" != yes; then
# build egl_glx when libGL is built
+ case "$host_os" in
+ *freebsd*)
+
+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\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libdevq-1.0") 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" 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\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libdevq-1.0") 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" 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" 2>&1`
+ else
+ LIBDEVQ_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdevq-1.0" 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
+ ;;
+ *)
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBUDEV" >&5
@@ -21853,8 +22045,12 @@
$as_echo "yes" >&6; }
have_libudev=yes
fi
+ ;;
+ esac
if test "$have_libudev" = yes; then
DEFINES="$DEFINES -DHAVE_LIBUDEV"
+ elif test "$have_libdevq" = yes; then
+ DEFINES="$DEFINES -DHAVE_LIBDEVQ"
fi
if test "x$enable_dri" = xyes; then
@@ -23053,9 +23249,19 @@
;;
esac
- case "$plat$have_libudev" in
- waylandno|drmno)
- as_fn_error $? "cannot build $plat platfrom without udev" "$LINENO" 5 ;;
+ case "$host_os" in
+ *freebsd*)
+ case "$plat$have_libdevq" in
+ waylandno|drmno)
+ as_fn_error $? "cannot build $plat platfrom without libdevq" "$LINENO" 5 ;;
+ esac
+ ;;
+ *)
+ case "$plat$have_libudev" in
+ waylandno|drmno)
+ as_fn_error $? "cannot build $plat platfrom without udev" "$LINENO" 5 ;;
+ esac
+ ;;
esac
done
@@ -23348,29 +23554,6 @@
CLANG_LIBDIR=${LLVM_LIBDIR}
fi
CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}
- as_ac_File=`$as_echo "ac_cv_file_"$CLANG_RESOURCE_DIR/include/stddef.h"" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"$CLANG_RESOURCE_DIR/include/stddef.h\"" >&5
-$as_echo_n "checking for \"$CLANG_RESOURCE_DIR/include/stddef.h\"... " >&6; }
-if eval \${$as_ac_File+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- test "$cross_compiling" = yes &&
- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
-if test -r ""$CLANG_RESOURCE_DIR/include/stddef.h""; then
- eval "$as_ac_File=yes"
-else
- eval "$as_ac_File=no"
-fi
-fi
-eval ac_res=\$$as_ac_File
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
-
-else
- 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
@@ -23453,6 +23636,81 @@
gallium_require_drm_loader() {
if test "x$enable_gallium_loader" = xyes; then
+ case "$host_os" in
+ *freebsd*)
+
+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\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libdevq-1.0") 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" 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\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libdevq-1.0") 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" 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" 2>&1`
+ else
+ LIBDEVQ_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdevq-1.0" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LIBDEVQ_PKG_ERRORS" >&5
+
+ as_fn_error $? "Gallium drm loader requires libdevq" "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ as_fn_error $? "Gallium drm loader requires libdevq" "$LINENO" 5
+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; }
+
+fi
+ ;;
+ *)
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBUDEV" >&5
@@ -23524,6 +23782,8 @@
$as_echo "yes" >&6; }
fi
+ ;;
+ esac
if test "x$have_libdrm" != xyes; then
as_fn_error $? "Gallium drm loader requires libdrm >= $LIBDRM_REQUIRED" "$LINENO" 5
fi
@@ -23534,7 +23794,7 @@
radeon_llvm_check() {
LLVM_REQUIRED_VERSION_MAJOR="3"
LLVM_REQUIRED_VERSION_MINOR="2"
- if test "$LLVM_VERSION_INT" -ne "${LLVM_REQUIRED_VERSION_MAJOR}0${LLVM_REQUIRED_VERSION_MINOR}"; then
+ if test "$LLVM_VERSION_INT" -lt "${LLVM_REQUIRED_VERSION_MAJOR}0${LLVM_REQUIRED_VERSION_MINOR}"; then
as_fn_error $? "LLVM $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR with R600 target enabled is required.
To use the r600/radeonsi LLVM backend, you need to fetch the LLVM source from:
git://people.freedesktop.org/~tstellar/llvm master

View File

@ -1,14 +0,0 @@
--- src/glsl/ir_constant_expression.cpp.orig 2011-07-23 15:08:44.000000000 +0200
+++ src/glsl/ir_constant_expression.cpp 2011-07-23 15:09:03.000000000 +0200
@@ -39,6 +39,11 @@
#include "ir_visitor.h"
#include "glsl_types.h"
+#include <sys/param.h>
+#if __FreeBSD_version <= 704100 || (__FreeBSD_version >= 800000 && __FreeBSD_version < 802502) || (__FreeBSD_version >= 900000 && __FreeBSD_version < 900027)
+#define log2(x) (log(x) / log(2))
+#endif
+
static float
dot(ir_constant *op0, ir_constant *op1)
{

View File

@ -1,21 +0,0 @@
--- src/egl/drivers/dri2/Makefile.in.orig 2014-05-20 21:03:39.000000000 +0200
+++ src/egl/drivers/dri2/Makefile.in 2014-05-20 21:14:20.000000000 +0200
@@ -289,6 +289,8 @@
LIBTOOL = @LIBTOOL@
LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@
LIBUDEV_LIBS = @LIBUDEV_LIBS@
+LIBDEVQ_CFLAGS= @LIBDEVQ_CFLAGS@
+LIBDEVQ_LIBS = @LIBDEVQ_LIBS@
LIB_DIR = @LIB_DIR@
LIPO = @LIPO@
LLVM_BINDIR = @LLVM_BINDIR@
@@ -455,7 +457,8 @@
-I$(top_srcdir)/src/egl/wayland/wayland-egl \
-I$(top_srcdir)/src/egl/wayland/wayland-drm \
-I$(top_builddir)/src/egl/wayland/wayland-drm $(DEFINES) \
- $(LIBDRM_CFLAGS) $(LIBUDEV_CFLAGS) $(LIBKMS_CFLAGS) \
+ $(LIBDRM_CFLAGS) $(LIBUDEV_CFLAGS) $(LIBDEVQ_CFLAGS) \
+ $(LIBKMS_CFLAGS) \
-DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \
$(am__append_1) $(am__append_3) $(am__append_5) \
$(am__append_7)

View File

@ -1,87 +0,0 @@
--- src/egl/drivers/dri2/common.c.orig 2012-11-24 18:57:41.000000000 +0100
+++ src/egl/drivers/dri2/common.c 2014-03-02 11:36:35.000000000 +0100
@@ -35,11 +35,11 @@
#include "egl_dri2.h"
-#ifdef HAVE_LIBUDEV
-
#define DRIVER_MAP_DRI2_ONLY
#include "pci_ids/pci_id_driver_map.h"
+#ifdef HAVE_LIBUDEV
+
#include <libudev.h>
static struct udev_device *
@@ -141,4 +141,70 @@
return driver;
}
+#elif defined(HAVE_LIBDEVQ)
+
+#include <libdevq.h>
+#include <stdlib.h>
+
+char *
+dri2_get_device_name_for_fd(int fd)
+{
+ int ret;
+ char *device_name = NULL;
+ size_t device_name_len;
+
+ ret = devq_device_get_devpath_from_fd(fd,
+ NULL, &device_name_len);
+ if (ret < 0)
+ return (NULL);
+
+ device_name = malloc(device_name_len + 1);
+ ret = devq_device_get_devpath_from_fd(fd,
+ device_name, &device_name_len);
+ if (ret < 0) {
+ free(device_name);
+ return (NULL);
+ }
+
+ device_name[device_name_len] = '\0';
+
+ return device_name;
+}
+
+char *
+dri2_get_driver_for_fd(int fd)
+{
+ int ret;
+ char *driver = NULL;
+ int vendor_id, chip_id, i, j;
+
+ ret = devq_device_get_pciid_from_fd(fd, &vendor_id, &chip_id);
+ if (ret < 0) {
+ _eglLog(_EGL_WARNING, "EGL-DRI2: malformed or no PCI ID");
+ goto out;
+ }
+
+ for (i = 0; driver_map[i].driver; i++) {
+ if (vendor_id != driver_map[i].vendor_id)
+ continue;
+ if (driver_map[i].num_chips_ids == -1) {
+ driver = strdup(driver_map[i].driver);
+ _eglLog(_EGL_DEBUG, "pci id for %d: %04x:%04x, driver %s",
+ fd, vendor_id, chip_id, driver);
+ goto out;
+ }
+
+ for (j = 0; j < driver_map[i].num_chips_ids; j++)
+ if (driver_map[i].chip_ids[j] == chip_id) {
+ driver = strdup(driver_map[i].driver);
+ _eglLog(_EGL_DEBUG, "pci id for %d: %04x:%04x, driver %s",
+ fd, vendor_id, chip_id, driver);
+ goto out;
+ }
+ }
+
+out:
+ return driver;
+}
+
#endif /* HAVE_LIBUDEV */

View File

@ -1,19 +0,0 @@
--- src/egl/drivers/glx/Makefile.in.orig 2014-05-20 21:15:30.000000000 +0200
+++ src/egl/drivers/glx/Makefile.in 2014-05-20 21:16:33.000000000 +0200
@@ -273,6 +273,8 @@
LIBTOOL = @LIBTOOL@
LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@
LIBUDEV_LIBS = @LIBUDEV_LIBS@
+LIBDEVQ_CFLAGS = @LIBDEVQ_CFLAGS@
+LIBDEVQ_LIBS = @LIBDEVQ_LIBS@
LIB_DIR = @LIB_DIR@
LIPO = @LIPO@
LLVM_BINDIR = @LLVM_BINDIR@
@@ -442,6 +444,7 @@
noinst_LTLIBRARIES = libegl_glx.la
libegl_glx_la_SOURCES = egl_glx.c
libegl_glx_la_LIBADD = \
+ $(LIBDEVQ_LIBS) \
$(EGL_LIB_DEPS)
all: all-am

View File

@ -1,43 +0,0 @@
--- ./src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c.orig 2014-02-03 18:42:39.000000000 +0100
+++ ./src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c 2014-02-15 21:11:55.000000000 +0100
@@ -32,7 +32,14 @@
#include <fcntl.h>
#include <stdio.h>
+
+#if defined(HAVE_LIBUDEV)
#include <libudev.h>
+#elif defined(HAVE_LIBDEVQ)
+#include <libdevq.h>
+#include <stdlib.h>
+#endif
+
#include <xf86drm.h>
#ifdef HAVE_PIPE_LOADER_XCB
@@ -62,6 +69,7 @@
static boolean
find_drm_pci_id(struct pipe_loader_drm_device *ddev)
{
+#if defined(HAVE_LIBUDEV)
struct udev *udev = NULL;
struct udev_device *parent, *device = NULL;
struct stat stat;
@@ -100,6 +108,17 @@
udev_unref(udev);
return FALSE;
+#elif defined(HAVE_LIBDEVQ)
+ int ret;
+
+ ret = devq_device_get_pciid_from_fd(ddev->fd,
+ &ddev->base.u.pci.vendor_id,
+ &ddev->base.u.pci.chip_id);
+ if (ret < 0)
+ return FALSE;
+
+ return TRUE;
+#endif
}
static boolean

View File

@ -1,16 +0,0 @@
--- ./src/gallium/include/pipe/p_config.h.orig 2014-02-03 18:42:39.000000000 +0100
+++ ./src/gallium/include/pipe/p_config.h 2014-02-15 21:11:34.000000000 +0100
@@ -81,6 +81,13 @@
#define PIPE_CC_SUNPRO
#endif
+#if defined(__sparc__) || defined(__sparc64__)
+#define PIPE_ARCH_SPARC
+#if defined(__sparc64__)
+#define PIPE_ARCH_SPARC_64
+#endif
+#endif
+
/*
* Processor architecture

View File

@ -1,42 +0,0 @@
--- ./src/gallium/state_trackers/egl/drm/native_drm.c.orig 2014-02-03 18:42:39.000000000 +0100
+++ ./src/gallium/state_trackers/egl/drm/native_drm.c 2014-02-15 21:11:55.000000000 +0100
@@ -35,8 +35,11 @@
#include "gbm_gallium_drmint.h"
-#ifdef HAVE_LIBUDEV
+#if defined(HAVE_LIBUDEV)
#include <libudev.h>
+#elif defined(HAVE_LIBDEVQ)
+#include <libdevq.h>
+#include <stdlib.h>
#endif
static boolean
@@ -183,8 +186,26 @@
udev_device_unref(device);
outudev:
udev_unref(udev);
+#elif defined(HAVE_LIBDEVQ)
+ int ret;
+ size_t device_name_len;
+ ret = devq_device_get_devpath_from_fd(fd,
+ NULL, &device_name_len);
+ if (ret < 0)
+ return (NULL);
+
+ device_name = malloc(device_name_len + 1);
+ ret = devq_device_get_devpath_from_fd(fd,
+ device_name, &device_name_len);
+ if (ret < 0) {
+ free(device_name);
+ return (NULL);
+ }
+
+ device_name[device_name_len] = '\0';
#endif
+
return device_name;
}

View File

@ -1,52 +0,0 @@
--- src/gallium/state_trackers/xvmc/tests/xvmc_bench.c.orig 2013-10-05 03:59:22.000000000 +0000
+++ src/gallium/state_trackers/xvmc/tests/xvmc_bench.c 2014-10-16 13:46:30.000000000 +0000
@@ -27,9 +27,10 @@
#include <assert.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
-#include <error.h>
#include <sys/time.h>
+#include <unistd.h>
#include "testlib.h"
#define MACROBLOCK_WIDTH 16
@@ -144,23 +145,10 @@
}
if (fail)
- error
- (
- 1, 0,
- "Bad argument.\n"
- "\n"
- "Usage: %s [options]\n"
- "\t-iw <width>\tInput width\n"
- "\t-ih <height>\tInput height\n"
- "\t-ow <width>\tOutput width\n"
- "\t-oh <height>\tOutput height\n"
- "\t-p <pipeline>\tPipeline to test\n"
- "\t-mb <mb type>\tMacroBlock types to use\n"
- "\t-r <reps>\tRepetitions\n\n"
- "\tPipeline steps: mc,csc,swap\n"
- "\tMB types: i,p,b\n",
- argv[0]
- );
+ {
+ printf ("error happened\n");
+ exit(1);
+ }
if (config->output_width == 0)
config->output_width = config->input_width;
@@ -214,7 +202,8 @@
))
{
XCloseDisplay(display);
- error(1, 0, "Error, unable to find a good port.\n");
+ printf("Error, unable to find a good port.\n");
+ exit(1);
}
if (is_overlay)

View File

@ -1,37 +0,0 @@
--- ./src/gallium/targets/egl-static/egl.c.orig 2014-02-03 18:42:39.000000000 +0100
+++ ./src/gallium/targets/egl-static/egl.c 2014-02-15 21:11:55.000000000 +0100
@@ -29,9 +29,12 @@
#include "egldriver.h"
#include "egllog.h"
-#ifdef HAVE_LIBUDEV
+#if defined(HAVE_LIBUDEV)
#include <stdio.h> /* for sscanf */
#include <libudev.h>
+#elif defined(HAVE_LIBDEVQ)
+#include <libdevq.h>
+#include <stdlib.h>
#endif
#define DRIVER_MAP_GALLIUM_ONLY
@@ -108,6 +111,20 @@
return (*chip_id >= 0);
}
+#elif defined(HAVE_LIBDEVQ)
+
+static boolean
+drm_fd_get_pci_id(int fd, int *vendor_id, int *chip_id)
+{
+ int ret;
+
+ ret = devq_device_get_pciid_from_fd(fd, vendor_id, chip_id);
+ if (ret < 0)
+ return FALSE;
+
+ return TRUE;
+}
+
#elif defined(PIPE_OS_ANDROID) && !defined(_EGL_NO_DRM)
#include <xf86drm.h>

View File

@ -1,29 +0,0 @@
--- src/gallium/targets/gbm/Makefile.in.orig 2014-03-02 12:23:28.000000000 +0100
+++ src/gallium/targets/gbm/Makefile.in 2014-03-02 12:23:59.000000000 +0100
@@ -157,7 +157,7 @@
$(top_builddir)/src/gallium/state_trackers/gbm/libgbm.la \
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_2)
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
am_gbm_gallium_drm_la_OBJECTS = gbm.lo
gbm_gallium_drm_la_OBJECTS = $(am_gbm_gallium_drm_la_OBJECTS)
AM_V_P = $(am__v_P_@AM_V@)
@@ -554,6 +554,7 @@
AM_CFLAGS = \
$(GALLIUM_CFLAGS) \
$(LIBUDEV_CFLAGS) \
+ $(LIBDEVQ_CFLAGS) \
$(LIBDRM_CFLAGS)
gbm_LTLIBRARIES = gbm_gallium_drm.la
@@ -561,7 +562,8 @@
gbm_gallium_drm_la_LIBADD = $(GALLIUM_PIPE_LOADER_LIBS) \
$(top_builddir)/src/gallium/state_trackers/gbm/libgbm.la \
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
- $(LIBUDEV_LIBS) $(LIBDRM_LIBS) -lm $(am__append_1)
+ $(LIBUDEV_LIBS) $(LIBDEVQ_LIBS) $(LIBDRM_LIBS) -lm \
+ $(am__append_1)
gbm_gallium_drm_la_LDFLAGS = -no-undefined -avoid-version -module \
$(am__append_2)
@HAVE_MESA_LLVM_FALSE@gbm_gallium_drm_la_LINK = $(CXXLINK) $(gbm_gallium_drm_la_LDFLAGS)

View File

@ -1,42 +0,0 @@
--- src/gbm/Makefile.in.orig 2014-05-20 21:18:10.000000000 +0200
+++ src/gbm/Makefile.in 2014-05-20 21:19:09.000000000 +0200
@@ -107,7 +107,7 @@
LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
am__DEPENDENCIES_1 =
libgbm_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- $(am__append_2)
+ $(am__DEPENDENCIES_1) $(am__append_2)
am_libgbm_la_OBJECTS = gbm.lo backend.lo common.lo
libgbm_la_OBJECTS = $(am_libgbm_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
@@ -303,6 +303,8 @@
LIBTOOL = @LIBTOOL@
LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@
LIBUDEV_LIBS = @LIBUDEV_LIBS@
+LIBDEVQ_CFLAGS = @LIBDEVQ_CFLAGS@
+LIBDEVQ_LIBS = @LIBDEVQ_LIBS@
LIB_DIR = @LIB_DIR@
LIPO = @LIPO@
LLVM_BINDIR = @LLVM_BINDIR@
@@ -467,8 +469,8 @@
pkgconfig_DATA = main/gbm.pc
AM_CFLAGS = -D_OS_UNIX=1 -DMODULEDIR='"$(libdir)/gbm"' \
-I$(top_srcdir)/include -I$(top_srcdir)/src/gbm/main \
- $(LIBUDEV_CFLAGS) $(LIBKMS_CFLAGS) $(DLOPEN_CFLAGS) $(DEFINES) \
- $(am__append_1)
+ $(LIBUDEV_CFLAGS) $(LIBDEVQ_CFLAGS) $(LIBKMS_CFLAGS) \
+ $(DLOPEN_CFLAGS) $(DEFINES) $(am__append_1)
lib_LTLIBRARIES = libgbm.la
include_HEADERS = main/gbm.h
libgbm_la_SOURCES = \
@@ -477,8 +479,8 @@
main/common.c
libgbm_la_LDFLAGS = -version-info 1:0
-libgbm_la_LIBADD = $(LIBUDEV_LIBS) $(LIBKMS_LIBS) $(DLOPEN_LIBS) \
- $(am__append_2)
+libgbm_la_LIBADD = $(LIBUDEV_LIBS) $(LIBDEVQ_LIBS) $(LIBKMS_LIBS) \
+ $(DLOPEN_LIBS) $(am__append_2)
@HAVE_EGL_PLATFORM_WAYLAND_TRUE@AM_CPPFLAGS = -DHAVE_WAYLAND_PLATFORM
@HAVE_DRI_TRUE@noinst_LTLIBRARIES = libgbm_dri.la
@HAVE_DRI_TRUE@libgbm_dri_la_SOURCES = \

View File

@ -1,53 +0,0 @@
--- ./src/gbm/backends/dri/driver_name.c.orig 2014-02-03 18:42:39.000000000 +0100
+++ ./src/gbm/backends/dri/driver_name.c 2014-02-15 21:11:55.000000000 +0100
@@ -29,7 +29,12 @@
#include <stdio.h>
#include <string.h>
+#if defined(HAVE_LIBUDEV)
#include <libudev.h>
+#elif defined(HAVE_LIBDEVQ)
+#include <libdevq.h>
+#include <stdlib.h>
+#endif
#include "gbm_driint.h"
#define DRIVER_MAP_DRI2_ONLY
@@ -38,10 +43,12 @@
char *
dri_fd_get_driver_name(int fd)
{
+ char *driver = NULL;
+
+#if defined(HAVE_LIBUDEV)
struct udev *udev;
struct udev_device *device, *parent;
const char *pci_id;
- char *driver = NULL;
int vendor_id, chip_id, i, j;
udev = udev_new();
@@ -84,6 +91,23 @@
out:
udev_device_unref(device);
udev_unref(udev);
+#elif defined(HAVE_LIBDEVQ)
+ int ret;
+ size_t driver_len;
+
+ ret = devq_device_drm_get_drvname_from_fd(fd, NULL, &driver_len);
+ if (ret < 0)
+ return (NULL);
+
+ driver = malloc(driver_len + 1);
+ ret = devq_device_drm_get_drvname_from_fd(fd, driver, &driver_len);
+ if (ret < 0) {
+ free(driver);
+ return (NULL);
+ }
+
+ driver[driver_len] = '\0';
+#endif
return driver;
}

View File

@ -1,69 +0,0 @@
--- ./src/gbm/main/common.c.orig 2014-02-03 18:42:39.000000000 +0100
+++ ./src/gbm/main/common.c 2014-02-15 21:11:55.000000000 +0100
@@ -28,7 +28,13 @@
#include <stdio.h>
#include <string.h>
+#if defined(HAVE_LIBUDEV)
#include <libudev.h>
+#elif defined(HAVE_LIBDEVQ)
+#include <libdevq.h>
+#include <stdlib.h>
+#endif
+
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
@@ -36,6 +42,7 @@
#include "common.h"
#include "gbmint.h"
+#if defined(HAVE_LIBUDEV)
GBM_EXPORT struct udev_device *
_gbm_udev_device_new_from_fd(struct udev *udev, int fd)
{
@@ -56,14 +63,17 @@
return device;
}
+#endif /* defined(HAVE_LIBUDEV) */
GBM_EXPORT char *
_gbm_fd_get_device_name(int fd)
{
+ char *device_name = NULL;
+
+#if defined(HAVE_LIBUDEV)
struct udev *udev;
struct udev_device *device;
const char *const_device_name;
- char *device_name = NULL;
udev = udev_new();
device = _gbm_udev_device_new_from_fd(udev, fd);
@@ -78,6 +88,25 @@
out:
udev_device_unref(device);
udev_unref(udev);
+#elif defined(HAVE_LIBDEVQ)
+ int ret;
+ size_t device_name_len;
+
+ ret = devq_device_get_devpath_from_fd(fd,
+ NULL, &device_name_len);
+ if (ret < 0)
+ return (NULL);
+
+ device_name = malloc(device_name_len + 1);
+ ret = devq_device_get_devpath_from_fd(fd,
+ device_name, &device_name_len);
+ if (ret < 0) {
+ free(device_name);
+ return (NULL);
+ }
+
+ device_name[device_name_len] = '\0';
+#endif
return device_name;
}

View File

@ -1,15 +0,0 @@
--- ./src/gbm/main/common.h.orig 2014-02-03 18:42:39.000000000 +0100
+++ ./src/gbm/main/common.h 2014-02-15 21:11:55.000000000 +0100
@@ -28,10 +28,12 @@
#ifndef _COMMON_H_
#define _COMMON_H_
+#if defined(HAVE_LIBUDEV)
#include <libudev.h>
struct udev_device *
_gbm_udev_device_new_from_fd(struct udev *udev, int fd);
+#endif
char *
_gbm_fd_get_device_name(int fd);

View File

@ -1,26 +0,0 @@
diff --git a/src/gallium/drivers/r300/r300_chipset.c b/src/gallium/drivers/r300/r300_chipset.c
index 11061ed..daf990e 100644
--- src/gallium/drivers/r300/r300_chipset.c
+++ src/gallium/drivers/r300/r300_chipset.c
@@ -48,6 +48,21 @@ static void r300_apply_hyperz_blacklist(struct r300_capabilities* caps)
};
int i;
+#if defined(__DragonFly__) || \
+ defined(__FreeBSD__) || \
+ defined(__NetBSD__) || \
+ defined(__OpenBSD__)
+ const char *progname, *program_invocation_short_name;
+
+ progname = getprogname();
+ program_invocation_short_name = strrchr(progname, '/');
+ if (program_invocation_short_name) {
+ program_invocation_short_name++;
+ } else {
+ program_invocation_short_name = progname;
+ }
+#endif
+
for (i = 0; i < Elements(list); i++) {
if (strcmp(list[i], program_invocation_short_name) == 0) {
caps->zmask_ram = 0;

View File

@ -1,15 +0,0 @@
--- src/gallium/drivers/r600/r600_asm.c.orig 2013-03-20 00:28:25.000000000 +0100
+++ src/gallium/drivers/r600/r600_asm.c 2013-06-26 23:29:14.000000000 +0200
@@ -27,7 +27,12 @@
#include "r600d.h"
#include <errno.h>
+#if defined(__linux__)
#include <byteswap.h>
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
+#include <sys/endian.h>
+#define bswap_32(x) bswap32((x))
+#endif
#include "util/u_memory.h"
#include "pipe/p_shader_tokens.h"

View File

@ -1,15 +0,0 @@
--- src/gallium/drivers/r600/r600_shader.c.orig 2013-05-16 19:38:54.000000000 +0200
+++ src/gallium/drivers/r600/r600_shader.c 2013-06-26 23:26:02.000000000 +0200
@@ -35,7 +35,12 @@
#include "util/u_memory.h"
#include <stdio.h>
#include <errno.h>
+#if defined(__linux__)
#include <byteswap.h>
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
+#include <sys/endian.h>
+#define bswap_32(x) bswap32((x))
+#endif
/* CAYMAN notes
Why CAYMAN got loops for lots of instructions is explained here.

View File

@ -1,15 +0,0 @@
--- src/gallium/drivers/r600/r600_state_common.c.orig 2013-03-06 00:25:39.000000000 +0100
+++ src/gallium/drivers/r600/r600_state_common.c 2013-06-26 23:26:02.000000000 +0200
@@ -33,7 +33,12 @@
#include "util/u_memory.h"
#include "util/u_upload_mgr.h"
#include "tgsi/tgsi_parse.h"
+#if defined(__linux__)
#include <byteswap.h>
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
+#include <sys/endian.h>
+#define bswap_32(x) bswap32((x))
+#endif
#define R600_PRIM_RECTANGLE_LIST PIPE_PRIM_MAX

View File

@ -1,28 +0,0 @@
--- src/gallium/drivers/radeon/radeon_llvm_emit.cpp.orig 2013-08-19 21:23:06.000000000 +0200
+++ src/gallium/drivers/radeon/radeon_llvm_emit.cpp 2013-08-19 21:30:58.000000000 +0200
@@ -25,13 +25,13 @@
*/
#include "radeon_llvm_emit.h"
-#include <llvm/LLVMContext.h>
-#include <llvm/Module.h>
+#include <llvm/IR/LLVMContext.h>
+#include <llvm/IR/Module.h>
#include <llvm/PassManager.h>
#include <llvm/ADT/Triple.h>
#include <llvm/Support/FormattedStream.h>
#include <llvm/Support/Host.h>
-#include <llvm/Support/IRReader.h>
+#include <llvm/IRReader/IRReader.h>
#include <llvm/Support/SourceMgr.h>
#include <llvm/Support/TargetRegistry.h>
#include <llvm/Support/TargetSelect.h>
@@ -39,7 +39,7 @@
#include <llvm/Target/TargetMachine.h>
#include <llvm/Transforms/Scalar.h>
#include <llvm-c/Target.h>
-#include <llvm/DataLayout.h>
+#include <llvm/IR/DataLayout.h>
#include <iostream>
#include <stdlib.h>

View File

@ -1,16 +0,0 @@
--- src/gallium/drivers/radeonsi/r600_buffer.c.orig 2013-08-01 00:56:45.000000000 +0200
+++ src/gallium/drivers/radeonsi/r600_buffer.c 2013-08-19 21:36:02.000000000 +0200
@@ -24,7 +24,13 @@
* Jerome Glisse
* Corbin Simpson <MostAwesomeDude@gmail.com>
*/
+
+#if defined(__linux__)
#include <byteswap.h>
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
+#include <sys/endian.h>
+#define bswap_32(x) bswap32((x))
+#endif
#include "pipe/p_screen.h"
#include "util/u_format.h"

View File

@ -1,18 +0,0 @@
diff --git a/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c b/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c
index 36888dc..62a6e6a 100644
--- src/gallium/winsys/svga/drm/vmw_screen_ioctl.c
+++ src/gallium/winsys/svga/drm/vmw_screen_ioctl.c
@@ -66,6 +66,13 @@ struct vmw_region
*/
#define SVGA3D_SURFACE_HINT_SCANOUT (1 << 9)
+#if defined(__DragonFly__) || \
+ defined(__FreeBSD__) || \
+ defined(__NetBSD__) || \
+ defined(__OpenBSD__)
+#define ERESTART EINTR
+#endif
+
uint32
vmw_ioctl_context_create(struct vmw_winsys_screen *vws)
{

View File

@ -1,11 +0,0 @@
--- src/mapi/glapi/gen/gl_gentable.py.orig 2013-07-17 15:41:13.000000000 +0200
+++ src/mapi/glapi/gen/gl_gentable.py 2013-07-17 15:41:55.000000000 +0200
@@ -42,7 +42,7 @@
#endif
#if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \\
- || (!defined(GLXEXT) && defined(DEBUG) && !defined(_WIN32_WCE) && !defined(__CYGWIN__))
+ || (!defined(GLXEXT) && defined(DEBUG) && !defined(_WIN32_WCE) && !defined(__CYGWIN__) && !defined(__OpenBSD__) && !defined(__FreeBSD__))
#define USE_BACKTRACE
#endif

View File

@ -1,13 +0,0 @@
--- src/mapi/mapi/entry_x86-64_tls.h.orig 2013-10-05 05:59:22.000000000 +0200
+++ src/mapi/mapi/entry_x86-64_tls.h 2014-07-29 20:28:05.000000000 +0200
@@ -63,8 +63,8 @@ entry_patch_public(void)
{
}
-static char
-x86_64_entry_start[];
+extern char
+x86_64_entry_start[] __attribute__((visibility("hidden")));
mapi_func
entry_get_public(int slot)

View File

@ -1,13 +0,0 @@
--- src/mapi/mapi/entry_x86_tls.h.orig 2013-10-05 05:59:22.000000000 +0200
+++ src/mapi/mapi/entry_x86_tls.h 2014-07-29 20:28:05.000000000 +0200
@@ -73,8 +73,8 @@ __asm__(".text");
extern unsigned long
x86_current_tls();
-static char x86_entry_start[];
-static char x86_entry_end[];
+extern char x86_entry_start[] __attribute__((visibility("hidden")));
+extern char x86_entry_end[] __attribute__((visibility("hidden")));
void
entry_patch_public(void)

View File

@ -1,13 +0,0 @@
--- src/mapi/mapi/entry_x86_tsd.h.orig 2013-10-05 05:59:22.000000000 +0200
+++ src/mapi/mapi/entry_x86_tsd.h 2014-07-29 20:28:05.000000000 +0200
@@ -60,8 +60,8 @@ __asm__(".balign 32\n"
#include <string.h>
#include "u_execmem.h"
-static const char x86_entry_start[];
-static const char x86_entry_end[];
+extern const char x86_entry_start[] __attribute__((visibility("hidden")));
+extern const char x86_entry_end[] __attribute__((visibility("hidden")));
void
entry_patch_public(void)

View File

@ -1,17 +0,0 @@
--- src/mesa/drivers/dri/common/Makefile.in.orig 2013-04-20 14:50:15.000000000 +0000
+++ src/mesa/drivers/dri/common/Makefile.in 2013-04-20 15:02:05.000000000 +0000
@@ -123,11 +123,11 @@
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+ $(AM_CFLAGS) $(CPPFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(AM_CFLAGS) $(CPPFLAGS) \
+ $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@;

View File

@ -1,11 +0,0 @@
--- src/mesa/drivers/dri/common/xmlpool/Makefile.in.orig 2013-07-02 22:42:09.000000000 +0200
+++ src/mesa/drivers/dri/common/xmlpool/Makefile.in 2013-07-02 22:53:30.000000000 +0200
@@ -639,7 +639,7 @@
# Update .mo files from the corresponding .po files.
%/LC_MESSAGES/options.mo: %.po
@mo="$@"; \
- lang=$${mo%%/*}; \
+ lang=$*; \
echo "Updating ($$lang) $@ from $?."; \
mkdir -p $$lang/LC_MESSAGES; \
msgfmt -o $@ $?

View File

@ -1,12 +0,0 @@
--- src/mesa/main/compiler.h.orig 2013-04-06 04:01:09.000000000 +0200
+++ src/mesa/main/compiler.h 2013-06-26 23:26:02.000000000 +0200
@@ -171,6 +171,9 @@
#if defined(__linux__)
#include <byteswap.h>
#define CPU_TO_LE32( x ) bswap_32( x )
+#elif defined(__FreeBSD__)
+#include <sys/endian.h>
+#define CPU_TO_LE32( x ) bswap32( x )
#elif defined(__APPLE__)
#include <CoreFoundation/CFByteOrder.h>
#define CPU_TO_LE32( x ) CFSwapInt32HostToLittle( x )

View File

@ -1,10 +0,0 @@
--- src/mesa/main/imports.c.orig 2013-10-05 03:59:22.000000000 +0000
+++ src/mesa/main/imports.c
@@ -566,6 +566,7 @@ float
_mesa_strtof( const char *s, char **end )
{
#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && \
+ !defined(__DragonFly__) && \
!defined(ANDROID) && !defined(__HAIKU__) && !defined(__UCLIBC__)
static locale_t loc = NULL;
if (!loc) {

View File

@ -1,14 +1,14 @@
--- configure.ac.orig 2014-11-18 03:23:13.000000000 +0100
+++ configure.ac 2014-11-21 12:50:56.104986267 +0100
@@ -37,6 +37,7 @@
--- 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 @@
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
VDPAU_REQUIRED=0.4.1
@@ -54,7 +55,7 @@
LIBVA_REQUIRED=0.35.0
@@ -87,7 +88,7 @@
AM_PROG_CC_C_O
AM_PROG_AS
AX_CHECK_GNU_MAKE
@ -17,7 +17,7 @@
AC_PROG_SED
AC_PROG_MKDIR_P
@@ -617,7 +618,7 @@
@@ -689,7 +690,7 @@
[enable_dri=yes])
case "$host_os" in
@ -26,7 +26,7 @@
dri3_default=yes
;;
*)
@@ -883,6 +884,9 @@
@@ -955,6 +956,9 @@
PKG_CHECK_MODULES([LIBUDEV], [libudev >= $LIBUDEV_REQUIRED],
have_libudev=yes, have_libudev=no)
@ -36,7 +36,7 @@
AC_ARG_ENABLE([sysfs],
[AS_HELP_STRING([--enable-sysfs],
[enable /sys PCI identification @<:@default=disabled@:>@])],
@@ -979,6 +983,10 @@
@@ -1051,6 +1055,10 @@
DEFINES="$DEFINES -DHAVE_LIBUDEV"
have_pci_id=yes
fi
@ -47,7 +47,7 @@
if test "$have_sysfs" = yes; then
DEFINES="$DEFINES -DHAVE_SYSFS"
@@ -1101,6 +1109,23 @@
@@ -1173,6 +1181,23 @@
;;
gnu*)
DEFINES="$DEFINES -DHAVE_ALIAS"
@ -71,7 +71,7 @@
;;
cygwin*)
if test "x$with_dri_drivers" = "xyes"; then
@@ -1278,6 +1303,8 @@
@@ -1350,6 +1375,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 +80,27 @@
else
GBM_PC_REQ_PRIV=""
fi
@@ -1724,8 +1751,6 @@
@@ -1528,9 +1555,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 @@
CLANG_LIBDIR=${LLVM_LIBDIR}
fi
CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}

View File

@ -1,15 +0,0 @@
--- Makefile.in.orig 2014-05-18 10:37:51.000000000 +0200
+++ Makefile.in 2014-05-18 10:38:21.000000000 +0200
@@ -85,10 +85,8 @@
$(top_srcdir)/m4/ax_gcc_builtin.m4 \
$(top_srcdir)/m4/ax_prog_bison.m4 \
$(top_srcdir)/m4/ax_prog_flex.m4 \
- $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/VERSION $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/ax_pthread.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \

View File

@ -1,6 +1,6 @@
--- configure.orig 2014-11-21 12:54:55.273970976 +0100
+++ configure 2014-11-21 12:55:25.070967392 +0100
@@ -853,6 +853,8 @@
--- configure.orig 2015-03-29 12:20:36.346485000 +0200
+++ configure 2015-03-29 12:21:17.768637000 +0200
@@ -863,6 +863,8 @@
GLPROTO_CFLAGS
XLIBGL_LIBS
XLIBGL_CFLAGS
@ -9,7 +9,7 @@
LIBUDEV_LIBS
LIBUDEV_CFLAGS
LIBDRM_LIBS
@@ -1143,6 +1145,8 @@
@@ -1158,6 +1160,8 @@
LIBDRM_LIBS
LIBUDEV_CFLAGS
LIBUDEV_LIBS
@ -18,7 +18,7 @@
XLIBGL_CFLAGS
XLIBGL_LIBS
GLPROTO_CFLAGS
@@ -1942,6 +1946,10 @@
@@ -1966,6 +1970,10 @@
C compiler flags for LIBUDEV, overriding pkg-config
LIBUDEV_LIBS
linker flags for LIBUDEV, overriding pkg-config
@ -29,24 +29,24 @@
XLIBGL_CFLAGS
C compiler flags for XLIBGL, overriding pkg-config
XLIBGL_LIBS linker flags for XLIBGL, overriding pkg-config
@@ -5085,6 +5093,7 @@
@@ -5232,6 +5240,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
VDPAU_REQUIRED=0.4.1
@@ -6503,7 +6512,7 @@
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
@@ -20025,7 +20034,7 @@
@@ -20709,7 +20718,7 @@
case "$host_os" in
@ -55,7 +55,7 @@
dri3_default=yes
;;
*)
@@ -20543,6 +20552,78 @@
@@ -21227,6 +21236,78 @@
have_libudev=yes
fi
@ -134,7 +134,7 @@
# Check whether --enable-sysfs was given.
if test "${enable_sysfs+set}" = set; then :
enableval=$enable_sysfs; have_sysfs="$enableval"
@@ -21258,6 +21339,10 @@
@@ -21942,6 +22023,10 @@
DEFINES="$DEFINES -DHAVE_LIBUDEV"
have_pci_id=yes
fi
@ -145,7 +145,7 @@
if test "$have_sysfs" = yes; then
DEFINES="$DEFINES -DHAVE_SYSFS"
@@ -21385,6 +21470,22 @@
@@ -22069,6 +22154,22 @@
;;
gnu*)
DEFINES="$DEFINES -DHAVE_ALIAS"
@ -168,7 +168,7 @@
;;
cygwin*)
if test "x$with_dri_drivers" = "xyes"; then
@@ -22205,6 +22306,8 @@
@@ -22889,6 +22990,8 @@
if test "x$need_pci_id$have_libudev" = xyesyes; then
GBM_PC_REQ_PRIV="libudev >= $LIBUDEV_REQUIRED"
@ -177,7 +177,27 @@
else
GBM_PC_REQ_PRIV=""
fi
@@ -23628,9 +23731,6 @@
@@ -23664,9 +23767,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 @@
CLANG_LIBDIR=${LLVM_LIBDIR}
fi
CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}

View File

@ -1,14 +0,0 @@
--- ./src/glsl/ir_constant_expression.cpp.orig 2014-02-05 21:59:10.000000000 +0100
+++ ./src/glsl/ir_constant_expression.cpp 2014-02-23 22:01:50.000000000 +0100
@@ -60,6 +60,11 @@
}
#endif
+#include <sys/param.h>
+#if __FreeBSD_version <= 704100 || (__FreeBSD_version >= 800000 && __FreeBSD_version < 802502) || (__FreeBSD_version >= 900000 && __FreeBSD_version < 900027)
+#define log2(x) (log(x) / log(2))
+#endif
+
static float
dot(ir_constant *op0, ir_constant *op1)
{

View File

@ -1,20 +1,12 @@
--- src/loader/Makefile.in.orig 2014-08-29 13:44:57.595529080 +0200
+++ src/loader/Makefile.in 2014-08-29 13:46:36.674521667 +0200
@@ -315,6 +315,8 @@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LIBCLC_INCLUDEDIR = @LIBCLC_INCLUDEDIR@
LIBCLC_LIBEXECDIR = @LIBCLC_LIBEXECDIR@
+LIBDEVQ_CFLAGS = @LIBDEVQ_CFLAGS@
+LIBDEVQ_LIBS = @LIBDEVQ_LIBS@
LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
LIBDRM_LIBS = @LIBDRM_LIBS@
LIBOBJS = @LIBOBJS@
@@ -485,7 +487,7 @@
--- src/loader/Makefile.in.orig 2015-06-16 04:57:13.615972000 -0400
+++ src/loader/Makefile.in 2015-06-16 04:59:22.244911000 -0400
@@ -514,7 +514,8 @@
noinst_LTLIBRARIES = libloader.la
libloader_la_CPPFLAGS = $(DEFINES) -I$(top_srcdir)/include \
-I$(top_srcdir)/src $(VISIBILITY_CFLAGS) $(LIBUDEV_CFLAGS) \
- $(am__append_1) $(am__append_4) $(am__append_5)
+ $(LIBDEVQ_CFLAGS) $(am__append_1) $(am__append_4) $(am__append_5)
libloader_la_SOURCES = $(LOADER_C_FILES) $(am__append_2)
libloader_la_LIBADD = $(am__append_3) $(am__append_6)
- $(am__append_1) $(am__append_3) $(am__append_4)
+ $(LIBDEVQ_CFLAGS) $(am__append_1) $(am__append_3) \
+ $(am__append_4)
libloader_la_SOURCES = $(LOADER_C_FILES)
libloader_la_LIBADD = $(am__append_2) $(am__append_5)
all: all-am

View File

@ -1,6 +1,6 @@
--- ./src/mesa/main/compiler.h.orig 2014-01-23 18:02:42.000000000 +0100
+++ ./src/mesa/main/compiler.h 2014-02-23 22:01:50.000000000 +0100
@@ -162,6 +162,9 @@
--- src/mesa/main/compiler.h.orig 2015-06-07 06:45:48.000000000 -0400
+++ src/mesa/main/compiler.h 2015-06-16 05:04:53.967546000 -0400
@@ -70,6 +70,9 @@
#if defined(__linux__)
#include <byteswap.h>
#define CPU_TO_LE32( x ) bswap_32( x )

View File

@ -0,0 +1,10 @@
--- src/gallium/targets/opencl/Makefile.in.orig 2015-01-02 13:38:24.794802548 +0100
+++ src/gallium/targets/opencl/Makefile.in 2015-01-02 13:38:40.047801585 +0100
@@ -553,7 +553,6 @@
$(GALLIUM_PIPE_LOADER_WINSYS_LIBS) \
$(GALLIUM_PIPE_LOADER_CLIENT_LIBS) \
$(ELF_LIB) \
- -ldl \
-lclangCodeGen \
-lclangFrontendTool \
-lclangFrontend \

View File

@ -0,0 +1,18 @@
--- src/util/ralloc.c.orig 2015-08-07 17:36:03 UTC
+++ src/util/ralloc.c
@@ -311,6 +311,7 @@ ralloc_parent(const void *ptr)
static void *autofree_context = NULL;
+__attribute__((destructor))
static void
autofree(void)
{
@@ -322,7 +323,6 @@ ralloc_autofree_context(void)
{
if (unlikely(autofree_context == NULL)) {
autofree_context = ralloc_context(NULL);
- atexit(autofree);
}
return autofree_context;
}

View File

@ -1,12 +1,12 @@
--- ./src/loader/Makefile.am.orig 2014-02-05 21:59:10.000000000 +0100
+++ ./src/loader/Makefile.am 2014-02-23 22:01:50.000000000 +0100
@@ -27,7 +27,8 @@
$(DEFINES) \
--- src/loader/Makefile.am.orig 2015-02-13 11:41:50.497483000 +0100
+++ src/loader/Makefile.am 2015-02-13 11:42:02.748812000 +0100
@@ -30,7 +30,8 @@
-I$(top_srcdir)/include \
-I$(top_srcdir)/src \
$(VISIBILITY_CFLAGS) \
- $(LIBUDEV_CFLAGS)
+ $(LIBUDEV_CFLAGS) \
+ $(LIBDEVQ_CFLAGS)
if !HAVE_LIBDRM
libloader_la_CPPFLAGS += \
libloader_la_SOURCES = $(LOADER_C_FILES)
libloader_la_LIBADD =

View File

@ -1,20 +1,13 @@
@comment etc/drirc
@comment include/GL/internal/dri_interface.h
include/GL/gl.h
include/GL/gl_mangle.h
%%NEW%%include/GL/glcorearb.h
include/GL/glcorearb.h
include/GL/glext.h
include/GL/glx.h
include/GL/glx_mangle.h
include/GL/glxext.h
include/GL/osmesa.h
@comment include/GL/osmesa.h
include/GL/wglext.h
include/GL/wmesa.h
lib/.mesa/libGL.so
lib/.mesa/libGL.so.1
lib/.mesa/libGL.so.1.2.0
@comment lib/libglapi.so
@comment lib/libglapi.so.0
@comment lib/libglapi.so.0.0.0
@comment libdata/pkgconfig/dri.pc
libdata/pkgconfig/gl.pc

View File

@ -3,14 +3,14 @@
PORTNAME= libglapi
PORTVERSION= ${MESAVERSION}
PORTREVISION= ${LIBGLAPI_REVISION}
PORTREVISION= 0
CATEGORIES= graphics
COMMENT= Common GL api library used by Mesa based ports
LIB_DEPENDS+= libpthread-stubs.so:${PORTSDIR}/devel/libpthread-stubs
USE_XORG= x11 xau xcb xdmcp
USE_XORG= x11 xau xcb xdmcp xvmc
# stuff not needed by libglapi but configure wants it
USE_XORG+= glproto dri2proto xext xdamage xfixes presentproto \
@ -19,20 +19,16 @@ LIB_DEPENDS+= libexpat.so:${PORTSDIR}/textproc/expat2 \
libdrm.so:${PORTSDIR}/graphics/libdrm
.include <bsd.port.options.mk>
.include "${.CURDIR}/../../graphics/libGL/bsd.mesalib.mk"
.include "${.CURDIR}/../../graphics/libGL/Makefile.common"
.if defined (WITH_NEW_MESA)
LIBGLAPI_REVISION= 0
.else
LIBGLAPI_REVISION= 2
.endif
MESA_BUILD_WRKSRC= src/mapi
MESA_INSTALL_WRKSRC= src/mapi
.if defined (WITH_NEW_MESA)
BUILD_WRKSRC= ${WRKSRC}/src/mapi
INSTALL_WRKSRC= ${WRKSRC}/src/mapi
.else
BUILD_WRKSRC= ${WRKSRC}/src/mapi/shared-glapi
INSTALL_WRKSRC= ${WRKSRC}/src/mapi/shared-glapi
.endif
.include "${.CURDIR}/../../graphics/libGL/Makefile.targets"
post-install:
@${RM} -rf ${STAGEDIR}${PREFIX}/include/GLES*
@${RM} -f ${STAGEDIR}${PREFIX}/lib/libGLESv2.so*
@${RM} -f ${STAGEDIR}${PREFIX}/libdata/pkgconfig/glesv2.pc
.include <bsd.port.mk>

View File

@ -1,3 +1,3 @@
This package contains the EGL utility library.
This package contains the GL API utility library.
WWW: http://www.freedesktop.org/Software/xorg
WWW: http://mesa3d.org/

View File

@ -3,7 +3,7 @@
PORTNAME= libglesv2
PORTVERSION= ${MESAVERSION}
PORTREVISION= ${LIBGLES_REVISION}
PORTREVISION= 0
CATEGORIES= graphics
COMMENT= OpenGL ES v2 library
@ -17,28 +17,12 @@ USE_XORG+= glproto dri2proto xext xdamage xfixes presentproto \
xshmfence
.include <bsd.port.options.mk>
.include "${.CURDIR}/../../graphics/libGL/bsd.mesalib.mk"
.include "${.CURDIR}/../../graphics/libGL/Makefile.common"
.if defined(WITH_NEW_MESA)
LIBGLES_REVISION= 0
.else
LIBGLES_REVISION= 4
.endif
.if defined(WITH_NEW_MESA)
BUILD_WRKSRC= ${WRKSRC}/src/mapi
INSTALL_WRKSRC= ${WRKSRC}/src/mapi
.else
BUILD_WRKSRC= ${WRKSRC}/src/mapi/es2api
INSTALL_WRKSRC= ${WRKSRC}/src/mapi/es2api
.endif
.if !defined(WITH_NEW_MESA)
pre-build:
@cd ${WRKSRC}/src/mapi/shared-glapi && ${MAKE_CMD} ${_MAKE_JOBS}
.endif
post-install:
.include "${.CURDIR}/../../graphics/libGL/Makefile.targets"
post-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/.mesa

View File

@ -1,3 +1,3 @@
This package contains the GL ES v2 utility library.
WWW: http://www.freedesktop.org/Software/xorg
WWW: http://mesa3d.org/

View File

@ -2,7 +2,7 @@ include/GLES2/gl2.h
include/GLES2/gl2ext.h
include/GLES2/gl2platform.h
include/GLES3/gl3.h
%%NEW%%include/GLES3/gl31.h
include/GLES3/gl31.h
include/GLES3/gl3ext.h
include/GLES3/gl3platform.h
lib/.mesa/libGLESv2.so

View File

@ -2,59 +2,32 @@
# $FreeBSD$
PORTNAME= libosmesa
PORTVERSION= 10.2.7
PORTREVISION= 1
PORTVERSION= ${MESAVERSION}
PORTREVISION= 0
CATEGORIES= graphics
MASTER_SITES= ftp://ftp.freedesktop.org/pub/mesa/${PORTVERSION}/
DISTNAME= MesaLib-${PORTVERSION}
MAINTAINER= x11@FreeBSD.org
COMMENT= Off-Screen Mesa implementation of the OpenGL API
LIB_DEPENDS= libexpat.so:${PORTSDIR}/textproc/expat2
BUILD_DEPENDS= ${PYTHON_SITELIBDIR}/libxml2mod.so:${PORTSDIR}/textproc/py-libxml2 \
${LOCALBASE}/bin/flex:${PORTSDIR}/textproc/flex
LIB_DEPENDS= libexpat.so:${PORTSDIR}/textproc/expat2 \
libglapi.so:${PORTSDIR}/graphics/libglapi
USES= bison gmake pkgconfig tar:bzip2 libtool python:2
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
CONFIGURE_ENV+= ac_cv_prog_YACC=${LOCALBASE}/bin/bison \
ac_cv_prog_LEX=${LOCALBASE}/bin/flex
CONFIGURE_ARGS+=--enable-osmesa \
--disable-driglx-direct \
--disable-gallium-llvm \
--disable-glx \
--disable-dri \
--disable-egl \
--with-gallium-drivers=swrast
CFLAGS+= -I${LOCALBASE}/include
USE_XORG= 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
WRKSRC= ${WRKDIR}/Mesa-${PORTVERSION}
MAKE_JOBS_UNSAFE=yes
.include <bsd.port.options.mk>
INCLUDES= gl.h gl_mangle.h glext.h glx.h glx_mangle.h \
glxext.h osmesa.h wglext.h wmesa.h
.include "${.CURDIR}/../../graphics/libGL/Makefile.common"
.include <bsd.port.pre.mk>
#MESA_BUILD_WRKSRC= src/util src/glsl src/mesa #/drivers/osmesa
MESA_INSTALL_WRKSRC= src/mesa/drivers/osmesa
.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1100000 && ${ARCH} == i386
BROKEN= Doesn't build
.endif
.include "${.CURDIR}/../../graphics/libGL/Makefile.targets"
post-patch:
${REINPLACE_CMD} \
-e '/^OSMESA_VERSION=/s|8|9|' \
-e 's|-fno-builtin-memcmp||g' \
${WRKSRC}/configure
post-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/include/GL
${INSTALL_DATA} ${WRKSRC}/include/GL/osmesa.h \
${STAGEDIR}${PREFIX}/include/GL
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/include/Mesa/GL
.for inc in ${INCLUDES}
${INSTALL_DATA} ${WRKSRC}/include/GL/${inc} ${STAGEDIR}${PREFIX}/include/Mesa/GL/
.endfor
${INSTALL_LIB} ${WRKSRC}/src/mesa/drivers/osmesa/.libs/libOSMesa.so.9.0.0 ${STAGEDIR}${PREFIX}/lib
${LN} -s libOSMesa.so.9.0.0 ${STAGEDIR}${PREFIX}/lib/libOSMesa.so.9
${LN} -s libOSMesa.so.9.0.0 ${STAGEDIR}${PREFIX}/lib/libOSMesa.so
${INSTALL_DATA} ${WRKSRC}/src/mesa/drivers/osmesa/osmesa.pc ${STAGEDIR}${PREFIX}/libdata/pkgconfig/osmesa.pc
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View File

@ -1,13 +0,0 @@
--- Makefile.in.orig 2014-06-10 10:07:40.000000000 +0200
+++ Makefile.in 2014-06-10 10:08:27.000000000 +0200
@@ -85,9 +85,7 @@
$(top_srcdir)/m4/ax_gcc_builtin.m4 \
$(top_srcdir)/m4/ax_prog_bison.m4 \
$(top_srcdir)/m4/ax_prog_flex.m4 \
- $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/ax_pthread.m4 \
$(top_srcdir)/VERSION $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)

View File

@ -1,10 +0,0 @@
--- src/mesa/main/macros.h.orig 2010-10-19 08:03:53.000000000 +0000
+++ src/mesa/main/macros.h 2010-10-19 08:05:32.000000000 +0000
@@ -33,6 +33,7 @@
#include "imports.h"
+#define log2(x) (log(x) / log(2))
/**
* \name Integer / float conversion for colors, normals, etc.

View File

@ -1,13 +1,5 @@
include/Mesa/GL/gl.h
include/Mesa/GL/gl_mangle.h
include/Mesa/GL/glext.h
include/Mesa/GL/glx.h
include/Mesa/GL/glx_mangle.h
include/Mesa/GL/glxext.h
include/Mesa/GL/osmesa.h
include/Mesa/GL/wglext.h
include/Mesa/GL/wmesa.h
include/GL/osmesa.h
lib/libOSMesa.so
lib/libOSMesa.so.9
lib/libOSMesa.so.9.0.0
lib/libOSMesa.so.8
lib/libOSMesa.so.8.0.0
libdata/pkgconfig/osmesa.pc

View File

@ -19,6 +19,7 @@
SUBDIR += awka
SUBDIR += bas2tap
SUBDIR += basic256
SUBDIR += beignet
SUBDIR += bf2c
SUBDIR += bigloo
SUBDIR += bsh
@ -42,6 +43,7 @@
SUBDIR += clojure
SUBDIR += clojure-mode.el
SUBDIR += cloudabi-clang
SUBDIR += clover
SUBDIR += cmucl
SUBDIR += cmucl-extra
SUBDIR += cocor

55
lang/beignet/Makefile Normal file
View File

@ -0,0 +1,55 @@
# Created by: Koop Mast <kwm@FreeBSD.org>
# $FreeBSD$
PORTNAME= beignet
PORTVERSION= 1.1.0
CATEGORIES= lang
MASTER_SITES= https://01.org/sites/default/files/
DISTVERSIONSUFFIX= -source
MAINTAINER= kwm@FreeBSD.org
COMMENT= OpenCL library for Intel GPUs
BUILD_DEPENDS= clang${LLVMVER}:${PORTSDIR}/lang/clang${LLVMVER} \
opencl>=0:${PORTSDIR}/devel/opencl
LIB_DEPENDS= libOpenCL.so:${PORTSDIR}/devel/ocl-icd \
libdrm.so:${PORTSDIR}/graphics/libdrm
RUN_DEPENDS= opencl>=0:${PORTSDIR}/devel/opencl
WRKSRC= ${WRKDIR}/Beignet-${PORTVERSION}-Source
USES= cmake gmake pkgconfig shebangfix
USE_XORG= sm ice x11 xext xfixes
USE_GL= gl
SHEBANG_FILES= src/git_sha1.sh backend/kernels/compile.sh
LLVMVER= 36
CMAKE_ARGS+= -DLLVM_CONFIG_EXECUTABLE=${LOCALBASE}/bin/llvm-config${LLVMVER}
ONLY_FOR_ARCHS= i386 amd64
ONLY_FOR_ARCHS_REASON= Beignet needs a graphics driver supported by the Intel KMS driver
BROKEN_FreeBSD_10= Does not build. Help appreciated
BROKEN_FreeBSD_9= Beignet is only supported on FreeBSD 10.1 and newer
# running tests from makefile doesn't work quite yet, so comment them out for now.
#OPTIONS_DEFINE= TESTS
#TESTS_DESC= Build and run the test suite
.include <bsd.port.options.mk>
post-patch:
@${REINPLACE_CMD} -e 's|llvm-dis|llvm-dis${LLVMVER}|g; \
s|clang |clang${LLVMVER} |g' \
${WRKSRC}/backend/kernels/compile.sh
#post-patch-TESTS-off:
@${REINPLACE_CMD} -e 's|ADD_SUBDIRECTORY(utests)||g' \
${WRKSRC}/CMakeLists.txt
post-install:
@${RM} -rf ${STAGEDIR}${PREFIX}/include/CL
#post-install-TESTS-on:
# @cd ${WRKSRC}/utests && sh ./setenv.sh && ./utest_run
.include <bsd.port.mk>

2
lang/beignet/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (beignet-1.1.0-source.tar.gz) = 4afe09ea13cd7f8475b9f6534e97cb4dcd307c602095c6968b0ed22290753386
SIZE (beignet-1.1.0-source.tar.gz) = 938923

View File

@ -0,0 +1,20 @@
--- CMakeLists.txt.orig 2015-03-16 05:39:34.000000000 +0100
+++ CMakeLists.txt 2015-03-27 20:29:34.695731000 +0100
@@ -101,7 +101,7 @@
ENDIF (USE_STANDALONE_GBE_COMPILER STREQUAL "true")
-set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-Bsymbolic -Wl,--no-undefined ${LLVM_LDFLAGS}")
+set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-Bsymbolic ${LLVM_LDFLAGS}")
# XLib
Find_Package(X11)
@@ -190,7 +190,7 @@
"intel-beignet.icd.in"
"${ICD_FILE_NAME}"
)
- install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${ICD_FILE_NAME} DESTINATION /etc/OpenCL/vendors)
+ install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${ICD_FILE_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/etc/OpenCL/vendors)
ELSE(OCLIcd_FOUND)
MESSAGE(STATUS "Looking for OCL ICD header file - not found")
ENDIF(OCLIcd_FOUND)

View File

@ -0,0 +1,30 @@
--- CMake/FindLLVM.cmake.orig 2015-04-17 03:59:38.000000000 +0200
+++ CMake/FindLLVM.cmake 2015-05-09 00:27:01.012701000 +0200
@@ -52,21 +52,21 @@
if (LLVM_INSTALL_DIR)
find_program(CLANG_EXECUTABLE
- NAMES clang-${LLVM_VERSION_NODOT} clang-${LLVM_VERSION_NOPATCH} clang
+ NAMES clang${LLVM_VERSION_NODOT} clang-${LLVM_VERSION_NODOT} clang-${LLVM_VERSION_NOPATCH} clang
PATHS ${LLVM_INSTALL_DIR} NO_DEFAULT_PATH)
find_program(LLVM_AS_EXECUTABLE
- NAMES llvm-as-${LLVM_VERSION_NODOT} llvm-as-${LLVM_VERSION_NOPATCH} llvm-as
+ NAMES llvm-as${LLVM_VERSION_NODOT} llvm-as-${LLVM_VERSION_NODOT} llvm-as-${LLVM_VERSION_NOPATCH} llvm-as
PATHS ${LLVM_INSTALL_DIR} NO_DEFAULT_PATH)
find_program(LLVM_LINK_EXECUTABLE
- NAMES llvm-link-${LLVM_VERSION_NODOT} llvm-link-${LLVM_VERSION_NOPATCH} llvm-link
+ NAMES llvm-link${LLVM_VERSION_NODOT} llvm-link-${LLVM_VERSION_NODOT} llvm-link-${LLVM_VERSION_NOPATCH} llvm-link
PATHS ${LLVM_INSTALL_DIR} NO_DEFAULT_PATH)
else (LLVM_INSTALL_DIR)
find_program(CLANG_EXECUTABLE
- NAMES clang-${LLVM_VERSION_NODOT} clang-${LLVM_VERSION_NOPATCH} clang)
+ NAMES clang${LLVM_VERSION_NODOT} clang-${LLVM_VERSION_NODOT} clang-${LLVM_VERSION_NOPATCH} clang)
find_program(LLVM_AS_EXECUTABLE
- NAMES llvm-as-${LLVM_VERSION_NODOT} llvm-as-${LLVM_VERSION_NOPATCH} llvm-as)
+ NAMES llvm-as${LLVM_VERSION_NODOT} llvm-as-${LLVM_VERSION_NODOT} llvm-as-${LLVM_VERSION_NOPATCH} llvm-as)
find_program(LLVM_LINK_EXECUTABLE
- NAMES llvm-link-${LLVM_VERSION_NODOT} llvm-link-${LLVM_VERSION_NOPATCH} llvm-link)
+ NAMES llvm-link${LLVM_VERSION_NODOT} llvm-link-${LLVM_VERSION_NODOT} llvm-link-${LLVM_VERSION_NOPATCH} llvm-link)
endif (LLVM_INSTALL_DIR)
execute_process(

View File

@ -0,0 +1,15 @@
--- backend/src/backend/gen_insn_selection.cpp.orig 2015-08-26 11:57:48.961363000 +0200
+++ backend/src/backend/gen_insn_selection.cpp 2015-08-26 11:58:15.326657000 +0200
@@ -1752,11 +1752,11 @@ namespace gbe
// Boiler plate to initialize the selection library at c++ pre-main
static SelectionLibrary *selLib = NULL;
+ __attribute__((destructor))
static void destroySelectionLibrary(void) { GBE_DELETE(selLib); }
static struct SelectionLibraryInitializer {
SelectionLibraryInitializer(void) {
selLib = GBE_NEW_NO_ARG(SelectionLibrary);
- atexit(destroySelectionLibrary);
}
} selectionLibraryInitializer;

View File

@ -0,0 +1,10 @@
--- backend/src/backend/gen_reg_allocation.cpp.orig 2015-01-30 00:57:16.930955286 +0100
+++ backend/src/backend/gen_reg_allocation.cpp 2015-01-30 00:57:53.886912927 +0100
@@ -33,6 +33,7 @@
#include <climits>
#include <iostream>
#include <iomanip>
+#include <sys/types.h>
namespace gbe

View File

@ -0,0 +1,10 @@
--- backend/src/ir/immediate.hpp.orig 2015-01-30 01:06:19.873878476 +0100
+++ backend/src/ir/immediate.hpp 2015-01-30 01:06:29.286877660 +0100
@@ -25,6 +25,7 @@
#ifndef __GBE_IR_IMMEDIATE_HPP__
#define __GBE_IR_IMMEDIATE_HPP__
+#include <cmath>
#include <string.h>
#include "ir/type.hpp"
#include "sys/platform.hpp"

View File

@ -0,0 +1,68 @@
--- backend/src/sys/alloc.cpp.orig 2015-07-02 09:39:05.000000000 +0200
+++ backend/src/sys/alloc.cpp 2015-08-26 11:57:00.901815000 +0200
@@ -69,7 +69,7 @@ namespace gbe
/*! Total number of allocations done */
volatile intptr_t allocNum;
/*! Sorts the file name and function name strings */
- std::tr1::unordered_map<const char*, int> staticStringMap;
+ std::unordered_map<const char*, int> staticStringMap;
/*! Each element contains the actual string */
std::vector<const char*> staticStringVector;
std::map<uintptr_t, AllocData> allocMap;
@@ -140,16 +140,17 @@ namespace gbe
static bool isMutexInitializing = true;
static size_t memDebuggerCurrSize(0u);
static size_t memDebuggerMaxSize(0u);
+ __attribute__((destructor))
static void SizeMutexDeallocate(void) { if (sizeMutex) delete sizeMutex; }
static void SizeMutexAllocate(void) {
if (sizeMutex == NULL && isMutexInitializing == false) {
isMutexInitializing = true;
sizeMutex = new MutexSys;
- atexit(SizeMutexDeallocate);
}
}
/*! Stop the memory debugger */
+ __attribute__((destructor))
static void MemDebuggerEnd(void) {
MemDebugger *_debug = memDebugger;
memDebugger = NULL;
@@ -172,7 +173,6 @@ namespace gbe
/*! Start the memory debugger */
static void MemDebuggerStart(void) {
if (memDebugger == NULL) {
- atexit(MemDebuggerEnd);
memDebugger = new MemDebugger;
}
}
@@ -291,6 +291,29 @@ namespace gbe
void alignedFree(void *ptr) { if (ptr) std::free(ptr); }
} /* namespace gbe */
+#elif defined(__FreeBSD__)
+
+#include <unistd.h>
+#include <sys/mman.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <malloc_np.h>
+#include <iostream>
+
+namespace gbe
+{
+ void* alignedMalloc(size_t size, size_t align) {
+ void* ptr;
+ const int err = posix_memalign(&ptr,align,size);
+ FATAL_IF ((err != 0), "memory allocation failed");
+ MemDebuggerInitializeMem(ptr, size);
+ return ptr;
+ }
+
+ void alignedFree(void *ptr) { if (ptr) std::free(ptr); }
+} /* namespace gbe */
+
+
#else
#error "Unsupported platform"
#endif /* __LINUX__ */

View File

@ -0,0 +1,25 @@
--- src/cl_alloc.c.orig 2015-01-16 11:24:13.000000000 +0100
+++ src/cl_alloc.c 2015-02-03 15:31:13.983452000 +0100
@@ -22,7 +22,7 @@
#include <stdlib.h>
#include <assert.h>
-#include <malloc.h>
+#include <sys/types.h>
static volatile int32_t cl_alloc_n = 0;
@@ -41,8 +41,13 @@
{
void * p = NULL;
atomic_inc(&cl_alloc_n);
+#ifndef __FreeBSD__
p = memalign(align, sz);
assert(p);
+#else
+ const int err = posix_memalign(&p,align,sz);
+ assert(err==0);
+#endif
return p;
}

View File

@ -0,0 +1,11 @@
--- src/cl_api.c.orig 2015-02-03 14:58:29.071589000 +0100
+++ src/cl_api.c 2015-02-03 14:58:39.124158000 +0100
@@ -64,7 +64,7 @@
return RET; \
} while(0)
-inline cl_int
+static inline cl_int
handle_events(cl_command_queue queue, cl_int num, const cl_event *wait_list,
cl_event* event, enqueue_data* data, cl_command_type type)
{

View File

@ -0,0 +1,67 @@
diff --git a/src/cl_device_id.c b/src/cl_device_id.c
index e9e2c16..5f35248 100644
--- src/cl_device_id.c
+++ src/cl_device_id.c
@@ -34,7 +34,12 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+#if defined(__linux__)
#include <sys/sysinfo.h>
+#elif defined(__FreeBSD__)
+#include <sys/types.h>
+#include <sys/sysctl.h>
+#endif
#ifndef CL_VERSION_1_2
#define CL_DEVICE_BUILT_IN_KERNELS 0x103F
@@ -202,6 +207,7 @@ LOCAL cl_device_id
cl_get_gt_device(void)
{
cl_device_id ret = NULL;
+/* FIXME check cl_driver_get_device_id() */
const int device_id = cl_driver_get_device_id();
cl_device_id device = NULL;
@@ -526,7 +532,7 @@ skl_gt4_break:
case PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS:
case PCI_CHIP_SANDYBRIDGE_BRIDGE_S:
case PCI_CHIP_SANDYBRIDGE_S_GT:
- // Intel(R) HD Graphics SandyBridge not supported yet
+ printf("Intel(R) HD Graphics SandyBridge not supported yet\n");
ret = NULL;
break;
default:
@@ -546,6 +552,7 @@ skl_gt4_break:
/* Apply any driver-dependent updates to the device info */
cl_driver_update_device_info(ret);
+#if defined(__linux__)
struct sysinfo info;
if (sysinfo(&info) == 0) {
uint64_t two_gb = 2 * 1024 * 1024 * 1024ul;
@@ -554,6 +561,24 @@ skl_gt4_break:
two_gb : info.totalram;
ret->max_mem_alloc_size = ret->global_mem_size / 2;
}
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
+ int mib[2];
+
+ mib[0] = CTL_HW;
+ mib[1] = HW_USERMEM;
+
+ uint64_t totalram;
+ size_t len;
+ len = sizeof(totalram);
+ sysctl(mib, 2, &totalram, &len, NULL, 0);
+
+ uint64_t two_gb = 2 * 1024 * 1024 * 1024ul;
+ ret->global_mem_size = (totalram > two_gb) ?
+ two_gb : totalram;
+ ret->max_mem_alloc_size = ret->global_mem_size / 2;
+#else
+#error "not implimentend on this OS"
+#endif
return ret;
}

View File

@ -0,0 +1,11 @@
--- src/cl_event.c.orig 2015-02-03 15:00:21.865295000 +0100
+++ src/cl_event.c 2015-02-03 15:00:30.759495000 +0100
@@ -28,7 +28,7 @@
#include <assert.h>
#include <stdio.h>
-inline cl_bool
+static inline cl_bool
cl_event_is_gpu_command_type(cl_command_type type)
{
switch(type) {

View File

@ -0,0 +1,22 @@
--- src/cl_program.c.orig 2015-02-03 14:59:12.541061000 +0100
+++ src/cl_program.c 2015-02-03 15:00:05.989743000 +0100
@@ -166,7 +166,8 @@
return err;
}
-inline cl_bool isBitcodeWrapper(const unsigned char *BufPtr, const unsigned char *BufEnd)
+static inline cl_bool
+isBitcodeWrapper(const unsigned char *BufPtr, const unsigned char *BufEnd)
{
// See if you can find the hidden message in the magic bytes :-).
// (Hint: it's a little-endian encoding.)
@@ -177,7 +178,8 @@
BufPtr[3] == 0x0B;
}
-inline cl_bool isRawBitcode(const unsigned char *BufPtr, const unsigned char *BufEnd)
+static inline cl_bool
+isRawBitcode(const unsigned char *BufPtr, const unsigned char *BufEnd)
{
// These bytes sort of have a hidden message, but it's not in
// little-endian this time, and it's a little redundant.

View File

@ -0,0 +1,8 @@
--- src/git_sha1.sh.orig 2015-01-16 10:24:13 UTC
+++ src/git_sha1.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
SOURCE_DIR=$1
FILE=$2

View File

@ -0,0 +1,30 @@
--- src/performance.c.orig 2015-08-26 11:58:45.989699000 +0200
+++ src/performance.c 2015-08-26 11:59:40.117247000 +0200
@@ -37,7 +37,6 @@ typedef struct storage
static storage record;
-static int atexit_registered = 0;
static context_storage_node * prev_context_pointer = NULL;
@@ -170,6 +169,7 @@ static int cmp(const void *a, const void
return 0;
}
+__attribute__((destructor))
static void print_time_info()
{
context_storage_node *p_context = record.context_storage;
@@ -273,11 +273,6 @@ static void print_time_info()
static void insert(cl_context context, const char *kernel_name, const char *build_opt, float time)
{
- if(!atexit_registered)
- {
- atexit_registered = 1;
- atexit(print_time_info);
- }
context_storage_node *p_context = find_context(context);
kernel_storage_node *p_kernel = find_kernel(p_context, kernel_name, build_opt);
prev_context_pointer = p_context;

View File

@ -0,0 +1,17 @@
--- utests/CMakeLists.txt.orig 2015-02-02 21:01:26.000000000 +0100
+++ utests/CMakeLists.txt 2015-02-02 22:19:04.185677000 +0100
@@ -230,12 +230,12 @@
if(GEN_PCI_ID)
ADD_CUSTOM_COMMAND(
OUTPUT ${kernel_bin}.bin
- COMMAND ${GBE_BIN_GENERATER} ${kernel_bin}.cl -o${kernel_bin}.bin -t${GEN_PCI_ID}
+ COMMAND ${GBE_BIN_GENERATER} -o${kernel_bin}.bin -t${GEN_PCI_ID} ${kernel_bin}.cl
DEPENDS ${GBE_BIN_FILE} ${kernel_bin}.cl)
else(GEN_PCI_ID)
ADD_CUSTOM_COMMAND(
OUTPUT ${kernel_bin}.bin
- COMMAND ${GBE_BIN_GENERATER} ${kernel_bin}.cl -o${kernel_bin}.bin
+ COMMAND ${GBE_BIN_GENERATER} -o${kernel_bin}.bin ${kernel_bin}.cl
DEPENDS ${GBE_BIN_FILE} ${kernel_bin}.cl)
endif(GEN_PCI_ID)

View File

@ -0,0 +1,14 @@
--- utests/builtin_exp.cpp.orig 2015-01-16 10:24:13 UTC
+++ utests/builtin_exp.cpp
@@ -25,7 +25,11 @@ static void cpu_compiler_math(float *dst
dst[0] = exp(x);
dst[1] = exp2(x);
+#ifndef __FreeBSD__
dst[2] = exp10(x);
+#else
+ dst[2] = powf(10,x);
+#endif
dst[3] = expm1(x);
dst[4] = x;
}

View File

@ -0,0 +1,18 @@
--- utests/utest.cpp.orig 2015-08-26 12:00:07.664830000 +0200
+++ utests/utest.cpp 2015-08-26 12:00:37.039946000 +0200
@@ -44,6 +44,7 @@
RStatistics UTest::retStatistics;
void releaseUTestList(void) { delete UTest::utestList; }
+__attribute__((destructor))
void runSummaryAtExit(void) {
// If case crashes, count it as fail, and accumulate finishrun
if(UTest::retStatistics.finishrun != UTest::utestList->size()) {
@@ -113,7 +114,6 @@
utestList = new vector<UTest>;
catch_signal();
- atexit(runSummaryAtExit);
}
utestList->push_back(*this);
}

View File

@ -0,0 +1,18 @@
--- utests/utest_math_gen.py.orig 2015-02-02 20:01:26 UTC
+++ utests/utest_math_gen.py
@@ -241,10 +241,11 @@ static float atan2pi(float y, float x){
exp2Utests = func('exp2','exp2',[exp2_input_type],exp2_output_type,[exp2_input_values],'4 * FLT_ULP')
##### gentype exp10(gentype)
- exp10_input_values = base_input_values
- exp10_input_type = ['float','float2','float4','float8','float16']
- exp10_output_type = ['float','float2','float4','float8','float16']
- exp10Utests = func('exp10','exp10',[exp10_input_type],exp10_output_type,[exp10_input_values],'4 * FLT_ULP')
+# exp10_input_values = base_input_values
+# exp10_input_type = ['float','float2','float4','float8','float16']
+# exp10_output_type = ['float','float2','float4','float8','float16']
+# exp10Utests = func('exp10','exp10',[exp10_input_type],exp10_output_type,[exp10_input_values],'4 * FLT_ULP')
+# FreeBSD does not have a exp10() function
##### gentype expm1(gentype x)
expm1_input_values = base_input_values

6
lang/beignet/pkg-descr Normal file
View File

@ -0,0 +1,6 @@
Beignet contains the code to run OpenCL programs on Intel GPUs, which
defines and implements host functions required to initialize the device,
create the command queues, the kernels, and the programs and run them on
the GPU. It also contains the compiler part of the stack.
WWW: https://01.org/beignet/

26
lang/beignet/pkg-plist Normal file
View File

@ -0,0 +1,26 @@
etc/OpenCL/vendors/intel-beignet.icd
lib/beignet/beignet.bc
lib/beignet/beignet.pch
lib/beignet/include/ocl.h
lib/beignet/include/ocl_as.h
lib/beignet/include/ocl_async.h
lib/beignet/include/ocl_atom.h
lib/beignet/include/ocl_common.h
lib/beignet/include/ocl_convert.h
lib/beignet/include/ocl_defines.h
lib/beignet/include/ocl_float.h
lib/beignet/include/ocl_geometric.h
lib/beignet/include/ocl_image.h
lib/beignet/include/ocl_integer.h
lib/beignet/include/ocl_math.h
lib/beignet/include/ocl_misc.h
lib/beignet/include/ocl_printf.h
lib/beignet/include/ocl_relational.h
lib/beignet/include/ocl_simd.h
lib/beignet/include/ocl_sync.h
lib/beignet/include/ocl_types.h
lib/beignet/include/ocl_vload.h
lib/beignet/include/ocl_workitem.h
lib/beignet/libcl.so
lib/beignet/libgbe.so
lib/beignet/libgbeinterp.so

39
lang/clover/Makefile Normal file
View File

@ -0,0 +1,39 @@
# $FreeBSD$
PORTNAME= clover
PORTVERSION= ${MESAVERSION}
PORTREVISION= 0
CATEGORIES= lang
COMMENT= Mesa "Clover" OpenCL library
BUILD_DEPENDS= opencl>=0:${PORTSDIR}/devel/opencl
LIB_DEPENDS= libdrm.so:${PORTSDIR}/graphics/libdrm \
libOpenCL.so:${PORTSDIR}/devel/ocl-icd \
libexpat.so:${PORTSDIR}/textproc/expat2
RUN_DEPENDS= opencl>=0:${PORTSDIR}/devel/opencl
USE_XORG= glproto x11 xext xxf86vm xdamage xfixes dri2proto \
presentproto xvmc xshmfence
ONLY_FOR_ARCHS= i386 amd64 powerpc64
ONLY_FOR_ARCHS_REASON= Clover needs a graphics driver supported by the Radeon KMS driver
.include <bsd.port.options.mk>
.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
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1001514 && ${ARCH} == powerpc64
IGNORE= Clover is only support on powerpc64 in FreeBSD 10.2
.elif ${OPSYS} == FreeBSD && ${OSVERSION} < 1000000 && ${ARCH} != powerpc64
IGNORE= Clover is only supported on FreeBSD 10.1 and newer
.endif
.include "${.CURDIR}/../../graphics/libGL/Makefile.targets"
post-install:
@${MV} ${STAGEDIR}/etc/OpenCL ${STAGEDIR}${PREFIX}/etc/
.include <bsd.port.mk>

5
lang/clover/pkg-descr Normal file
View File

@ -0,0 +1,5 @@
This package contains the Mesa "Clover" libOpenCL implementation. This
implementation is build onto GALLIUM and as such can only be used on Radeon
cards.
WWW: http://dri.freedesktop.org/wiki/GalliumCompute/

9
lang/clover/pkg-plist Normal file
View File

@ -0,0 +1,9 @@
etc/OpenCL/vendors/mesa.icd
lib/gallium-pipe/pipe_r300.so
lib/gallium-pipe/pipe_r600.so
lib/gallium-pipe/pipe_radeonsi.so
lib/gallium-pipe/pipe_swrast.so
lib/gallium-pipe/pipe_vmwgfx.so
lib/libMesaOpenCL.so
lib/libMesaOpenCL.so.1
lib/libMesaOpenCL.so.1.0.0

View File

@ -88,10 +88,13 @@
SUBDIR += chryzodus
SUBDIR += clarence
SUBDIR += clasp
SUBDIR += clblas
SUBDIR += clfft
SUBDIR += clipper
SUBDIR += cln
SUBDIR += cloog
SUBDIR += clp
SUBDIR += clrng
SUBDIR += cminpack
SUBDIR += cmlib
SUBDIR += coinmp

34
math/clblas/Makefile Normal file
View File

@ -0,0 +1,34 @@
# Created by: Johannes Dieterich <dieterich@ogolem.org>
# $FreeBSD$
PORTNAME= clblas
PORTVERSION= 2.6
DISTVERSIONPREFIX= v
CATEGORIES= math
MAINTAINER= dieterich@ogolem.org
COMMENT= Software library containing BLAS functions written in OpenCL
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= opencl>=0:${PORTSDIR}/devel/opencl
LIB_DEPENDS= libOpenCL.so:${PORTSDIR}/devel/ocl-icd
RUN_DEPENDS= opencl>=0:${PORTSDIR}/devel/opencl
ONLY_FOR_ARCHS= amd64
USE_GITHUB= yes
GH_ACCOUNT= clMathLibraries
GH_PROJECT= clBLAS
USE_LDCONFIG= yes
USES= cmake
CMAKE_ARGS+= -DBUILD_TEST=OFF \
-DBUILD_KTEST=OFF \
-DSUFFIX_LIB=""
CMAKE_SOURCE_PATH= ${WRKSRC}/src
.include <bsd.port.mk>

2
math/clblas/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (clMathLibraries-clBLAS-v2.6_GH0.tar.gz) = 4607561a648949709bc7c368be4aaf7346174406e678454b643e31cfe861830c
SIZE (clMathLibraries-clBLAS-v2.6_GH0.tar.gz) = 954586

13
math/clblas/pkg-descr Normal file
View File

@ -0,0 +1,13 @@
clBLAS
a software library containing BLAS functions written in OpenCL
The primary goal of clBLAS is to make it easier for developers to utilize the
inherent performance and power efficiency benefits of heterogeneous computing.
clBLAS interfaces do not hide nor wrap OpenCL interfaces, but rather leaves
OpenCL state management to the control of the user to allow for maximum
performance and flexibility. The clBLAS library does generate and enqueue
optimized OpenCL kernels, relieving the user from the task of writing,
optimizing and maintaining kernel code themselves.
WWW: https://github.com/clMathLibraries/clBLAS

13
math/clblas/pkg-plist Normal file
View File

@ -0,0 +1,13 @@
bin/clBLAS-tune
include/clAmdBlas.h
include/clAmdBlas.version.h
include/clBLAS-complex.h
include/clBLAS.h
include/clBLAS.version.h
lib/cmake/clBLAS/clBLASConfig.cmake
lib/cmake/clBLAS/clBLASConfigVersion.cmake
lib/cmake/clBLAS/clBLASTargets-%%CMAKE_BUILD_TYPE%%.cmake
lib/cmake/clBLAS/clBLASTargets.cmake
lib/libclBLAS.so
lib/libclBLAS.so.2
lib/libclBLAS.so.2.6.0

34
math/clfft/Makefile Normal file
View File

@ -0,0 +1,34 @@
# Created by: Johannes Dieterich <dieterich@ogolem.org>
# $FreeBSD$
PORTNAME= clfft
PORTVERSION= 2.6.1
DISTVERSIONPREFIX= v
CATEGORIES= math
MAINTAINER= dieterich@ogolem.org
COMMENT= Software library containing FFT functions written in OpenCL
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= opencl>=0:${PORTSDIR}/devel/opencl
LIB_DEPENDS= libOpenCL.so:${PORTSDIR}/devel/ocl-icd
RUN_DEPENDS= opencl>=0:${PORTSDIR}/devel/opencl
ONLY_FOR_ARCHS= amd64
USE_GITHUB= yes
GH_ACCOUNT= clMathLibraries
GH_PROJECT= clFFT
USE_LDCONFIG= yes
USES= cmake
CMAKE_ARGS+= -DBUILD_CLIENT=OFF \
-DBUILD_TEST=OFF \
-DSUFFIX_LIB=""
CMAKE_SOURCE_PATH= ${WRKSRC}/src
.include <bsd.port.mk>

2
math/clfft/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (clMathLibraries-clFFT-v2.6.1_GH0.tar.gz) = 2b5b15b903baeef4dcea6bb8efbe6aba284510148c04d20f9b151a94ae71c050
SIZE (clMathLibraries-clFFT-v2.6.1_GH0.tar.gz) = 893794

View File

@ -0,0 +1,17 @@
--- src/include/sharedLibrary.h.orig 2015-08-07 18:40:37.855840000 -0400
+++ src/include/sharedLibrary.h 2015-08-07 18:40:42.675578000 -0400
@@ -52,6 +52,14 @@
{
std::cerr << ::dlerror( ) << std::endl;
}
+#elif defined(__FreeBSD__)
+ tstring freebsdName = unixPrefix;
+ freebsdName += libraryName += ".so";
+ void* fileHandle = ::dlopen( freebsdName.c_str( ), RTLD_NOW );
+ if( !quiet && !fileHandle )
+ {
+ std::cerr << ::dlerror( ) << std::endl;
+ }
#else
#error "unsupported platform"
#endif

Some files were not shown because too many files have changed in this diff Show More