aboutsummaryrefslogtreecommitdiff
path: root/graphics/dri
diff options
context:
space:
mode:
authorNiclas Zeising <zeising@FreeBSD.org>2013-09-29 17:01:41 +0000
committerNiclas Zeising <zeising@FreeBSD.org>2013-09-29 17:01:41 +0000
commit5a4c543c2b0f538631aea8379ce384d5defee89d (patch)
tree108a55d148b3bc801facab0fb03b8666659c1136 /graphics/dri
parent7231ff2710fcc89472994d2e2d235e74e9c8704c (diff)
downloadports-5a4c543c2b0f538631aea8379ce384d5defee89d.tar.gz
ports-5a4c543c2b0f538631aea8379ce384d5defee89d.zip
Notes
Diffstat (limited to 'graphics/dri')
-rw-r--r--graphics/dri/Makefile112
-rw-r--r--graphics/dri/pkg-plist19
2 files changed, 93 insertions, 38 deletions
diff --git a/graphics/dri/Makefile b/graphics/dri/Makefile
index 875907c1cc31..c3b67b99447d 100644
--- a/graphics/dri/Makefile
+++ b/graphics/dri/Makefile
@@ -9,72 +9,108 @@ CATEGORIES= graphics
COMMENT= OpenGL hardware acceleration drivers for the DRI
-LIB_DEPENDS= drm:${PORTSDIR}/graphics/libdrm \
- expat:${PORTSDIR}/textproc/expat2
+LIB_DEPENDS= libdrm.so:${PORTSDIR}/graphics/libdrm \
+ libexpat.so:${PORTSDIR}/textproc/expat2
USES= pkgconfig
USE_XORG= glproto x11 xext xxf86vm xdamage xfixes dri2proto
+.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, not for old pre-clang default current.
+# This is for 0b0000 binary which gcc 4.3+ understands and is in the i965 driver.
+.if defined(WITH_NEW_XORG)
+. if ${OSVERSION} >= 901000 && ${OSVERSION} < 902502 \
+ && (${ARCH} == i386 || ${ARCH} == amd64)
+CC=clang
+CXX=clang++
+CPP=clang-cpp
+. elif ${OSVERSION} < 901500
+USE_GCC=yes
+. endif
+.endif
+
+.if ${ARCH} == ia64
+#BROKEN= does not install on ia64
+.endif
+
ALL_DRI_DRIVERS=I915 I965 R200 RADEON SWRAST
-.if ! defined(WITH_NEW_XORG)
+.if !defined(WITH_NEW_XORG)
ALL_DRI_DRIVERS+=I810 MACH64 MGA R128 R300 R600 SAVAGE SIS TDFX UNICHROME
.endif
NO_STAGE= yes
.include "${.CURDIR}/../../graphics/libGL/bsd.mesalib.mk"
-OPTIONS_DEFINE_i386= ${ALL_DRI_DRIVERS}
-OPTIONS_DEFINE_amd64= ${OPTIONS_DEFINE_i386}
+PLIST_SUB+= VERSION=${MESADISTVERSION}
-.if defined(WITH_NEW_XORG)
-OPTIONS_DEFINE_powerpc= RADEON SWRAST
-OPTIONS_DEFINE_sparc64= RADEON SWRAST
-.else
-OPTIONS_DEFINE_powerpc= MACH64 RADEON SWRAST TDFX
-OPTIONS_DEFINE_sparc64= MACH64 RADEON SWRAST
+.if ${ARCH} == amd64 || ${ARCH} == i386
+DRI_DRIVERS= ${ALL_DRI_DRIVERS}
.endif
-OPTIONS_DEFAULT=${OPTIONS_DEFINE}
-
-I810_DESC= Include DRI support for Intel i810
-I915_DESC= Include DRI support for Intel i915
-I965_DESC= Include DRI support for Intel i965
-MACH64_DESC= Include DRI support for AMD/ATI Mach64
-MGA_DESC= Include DRI support for Matrox
-R128_DESC= Include DRI support for AMD/ATI R128
-R200_DESC= Include DRI support for AMD/ATI R200
-R300_DESC= Include DRI support for AMD/ATI R300
-R600_DESC= Include DRI support for AMD/ATI R600
-RADEON_DESC= Include DRI support for AMD/ATI RADEON
-SAVAGE_DESC= Include DRI support for S3/Via Savage
-SIS_DESC= Include DRI support for SiS 300 and 6326
-SWRAST_DESC= Include generic software DRI support
-TDFX_DESC= Include DRI support for 3dfx Voodoo
-UNICHROME_DESC= Include DRI support for S3/Via Unichrome
-
-.include <bsd.port.options.mk>
+.if defined(WITH_NEW_XORG)
+. if defined(WITH_GALLIUM) && (${ARCH} == i386 || ${ARCH} == amd64)
+BUILD_DEPENDS+= llvm-config33:${PORTSDIR}/devel/llvm33
+RUN_DEPENDS+= llvm-config33:${PORTSDIR}/devel/llvm33
+CONFIGURE_ENV+= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config33
+
+CONFIGURE_ARGS+=--enable-gallium-llvm --disable-gallium-egl
+
+CONFIGURE_ARGS+=--with-gallium-drivers=r300,r600,radeonsi,svga,swrast
+PLIST_SUB+= GALLIUM=""
+. else
+CONFIGURE_ARGS+=--enable-gallium-llvm=no --without-gallium-drivers
+PLIST_SUB+= GALLIUM="@comment "
+. endif
+. if ${ARCH} == powerpc || ${ARCH} == ia64
+DRI_DRIVERS= RADEON SWRAST
+. endif
+. if ${ARCH} == sparc64
+DRI_DRIVERS= SWRAST
+. endif
+.else # !defined(WITH_NEW_XORG)
+. if ${ARCH} == powerpc
+DRI_DRIVERS= MACH64 RADEON SWRAST TDFX
+. elif ${ARCH} == sparc64
+DRI_DRIVERS= MACH64 RADEON SWRAST
+. endif
+.endif # defined(WITH_NEW_XORG)
-DRI_DRIVERS=
.for _d in ${ALL_DRI_DRIVERS}
-.if ${PORT_OPTIONS:M${_d}}
-DRI_DRIVERS+= ${_d}
+.if ${DRI_DRIVERS:M${_d}}
PLIST_SUB+= ${_d}_DRIVER=""
.else
PLIST_SUB+= ${_d}_DRIVER="@comment "
.endif
.endfor
-.if ${ARCH} == "ia64"
-BROKEN= does not install on ia64
-.endif
-
-.if !(${ARCH} == "amd64" || ${ARCH} == "i386")
+.if !(${ARCH} == amd64 || ${ARCH} == i386)
CONFIGURE_ARGS+=--disable-gallium-intel
.endif
CONFIGURE_ARGS+=--with-dri-drivers="${DRI_DRIVERS:L}"
+.if defined(WITH_NEW_XORG) && !defined(WITH_GALLIUM) \
+ && (${ARCH} == i386 || ${ARCH} == amd64)
+pre-everything::
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "For r300, r600, radeonsi and swrast gallium based drivers."
+ @${ECHO_MSG} "Please define WITH_GALLIUM in /etc/make.conf"
+ @${ECHO_MSG} "Note that gallium support is highly experimental."
+ @${ECHO_MSG} ""
+.endif
+
do-install:
+.if !defined(WITH_NEW_XORG)
cd ${WRKSRC}/src/mesa; ${GMAKE} install-dri
+.else
+ cd ${WRKSRC}/src/mesa/libdricore; ${GMAKE} install
+ cd ${WRKSRC}/src/mesa/drivers/dri; ${GMAKE} install
+. if defined(WITH_GALLIUM) && (${ARCH} == i386 || ${ARCH} == amd64)
+ cd ${WRKSRC}/src/gallium/drivers/radeon; ${GMAKE} install
+ cd ${WRKSRC}/src/gallium/targets; ${GMAKE} install
+. endif
+.endif
.include <bsd.port.mk>
diff --git a/graphics/dri/pkg-plist b/graphics/dri/pkg-plist
index 43e5ab1a8ade..d80890bb33d4 100644
--- a/graphics/dri/pkg-plist
+++ b/graphics/dri/pkg-plist
@@ -1,19 +1,38 @@
+%%NEW%%%%I965_DRIVER%%etc/drirc
include/GL/internal/dri_interface.h
%%OLD%%%%I810_DRIVER%%lib/dri/i810_dri.so
+%%NEW%%%%I915_DRIVER%%lib/dri/i915_dri.la
%%I915_DRIVER%%lib/dri/i915_dri.so
+%%NEW%%%%I965_DRIVER%%lib/dri/i965_dri.la
%%I965_DRIVER%%lib/dri/i965_dri.so
%%OLD%%%%MACH64_DRIVER%%lib/dri/mach64_dri.so
%%OLD%%%%MGA_DRIVER%%lib/dri/mga_dri.so
%%OLD%%%%R128_DRIVER%%lib/dri/r128_dri.so
+%%NEW%%%%R200_DRIVER%%lib/dri/r200_dri.la
%%R200_DRIVER%%lib/dri/r200_dri.so
%%OLD%%%%R300_DRIVER%%lib/dri/r300_dri.so
+%%NEW%%%%GALLIUM%%lib/dri/r300_dri.la
+%%NEW%%%%GALLIUM%%lib/dri/r300_dri.so
%%OLD%%%%R600_DRIVER%%lib/dri/r600_dri.so
+%%NEW%%%%GALLIUM%%lib/dri/r600_dri.la
+%%NEW%%%%GALLIUM%%lib/dri/r600_dri.so
+%%NEW%%%%RADEON_DRIVER%%lib/dri/radeon_dri.la
%%RADEON_DRIVER%%lib/dri/radeon_dri.so
+%%NEW%%%%GALLIUM%%lib/dri/radeonsi_dri.la
+%%NEW%%%%GALLIUM%%lib/dri/radeonsi_dri.so
%%OLD%%%%SAVAGE_DRIVER%%lib/dri/savage_dri.so
%%OLD%%%%SIS_DRIVER%%lib/dri/sis_dri.so
+%%NEW%%%%SWRAST_DRIVER%%lib/dri/swrast_dri.la
%%SWRAST_DRIVER%%lib/dri/swrast_dri.so
%%OLD%%%%TDFX_DRIVER%%lib/dri/tdfx_dri.so
%%OLD%%%%UNICHROME_DRIVER%%lib/dri/unichrome_dri.so
+%%NEW%%%%GALLIUM%%lib/dri/vmwgfx_dri.la
+%%NEW%%%%GALLIUM%%lib/dri/vmwgfx_dri.so
+%%NEW%%lib/libdricore%%VERSION%%.la
+%%NEW%%lib/libdricore%%VERSION%%.so
+%%NEW%%lib/libdricore%%VERSION%%.so.1
+%%NEW%%%%GALLIUM%%lib/libllvmradeon%%VERSION%%.la
+%%NEW%%%%GALLIUM%%lib/libllvmradeon%%VERSION%%.so
libdata/pkgconfig/dri.pc
@dirrm lib/dri
@dirrmtry include/GL/internal