1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-26 00:55:14 +00:00
freebsd-ports/graphics/dri/Makefile
Niclas Zeising 5a4c543c2b The FreeBSD graphics/x11 team proudly presents
a kwm, zeising production:

MESA 9.1.6

Starring:
Mesa 9.1.6, including libGL, libGLU and dri (new xorg only)
Addition of libEGL and libglesv2
KMS support for ATI graphics cards in 10-current (new xorg only)
Improved sparc64 support for new xorg. [1]
pixman 0.30.2, including shlib bump and portrevision bumps
libX11 1.6.2
Make absolute pointing devices work with x11-drivers/xf86-input-mouse
x11-drivers/xf86-video-ati 7.2.0 for 10-current (KMS aware ati driver)

Also starring:
Updates to drivers and other libraries and utilities

Additional notes:
When updating MESA related ports (libGL, dri) you need to remove old versions
first.  See UPDATING for details.

PR:		ports/181962 [2]
Submitted by:	marius [1]
		zeising [2]
Exp-run by:	bdrewery
Approved by:	portmgr (bdrewery)

Thanks to all who helped testing!
2013-09-29 17:01:41 +00:00

117 lines
3.1 KiB
Makefile

# Created by: Eric Anholt <anholt@FreeBSD.org>
# $FreeBSD$
PORTNAME= dri
PORTVERSION= ${MESAVERSION}
PORTREVISION= 3
PORTEPOCH= 2
CATEGORIES= graphics
COMMENT= OpenGL hardware acceleration drivers for the DRI
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)
ALL_DRI_DRIVERS+=I810 MACH64 MGA R128 R300 R600 SAVAGE SIS TDFX UNICHROME
.endif
NO_STAGE= yes
.include "${.CURDIR}/../../graphics/libGL/bsd.mesalib.mk"
PLIST_SUB+= VERSION=${MESADISTVERSION}
.if ${ARCH} == amd64 || ${ARCH} == i386
DRI_DRIVERS= ${ALL_DRI_DRIVERS}
.endif
.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)
.for _d in ${ALL_DRI_DRIVERS}
.if ${DRI_DRIVERS:M${_d}}
PLIST_SUB+= ${_d}_DRIVER=""
.else
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: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>