freebsd-ports/graphics/libGL/bsd.mesalib.mk
Martin Wilke 29e347e197 - Please welcome Xorg 7.5.2
The Xorg Team is pleased to announce the next round of Xorg updates.
       The team created a new flag called WITH_NEW_XORG that users can include
       in /etc/make.conf. This was created for the intel KMS work being done
       althouthough It probably works for other chips. Unfortunately, the intel
       KMS driver will only work on FreeBSD 9(RELENG|STABLE) or 10/HEAD users.
       Older version of FreeBSD will not be supported. Intel users will need
       to patch their source manually with Konstantin?s KMS kernel patch to get
       the newer chips to work. Please carefully read UPDATING entry.

Changes:

        - libdrm 2.4.31 (including KMS support)
        - mesa 7.11.2
        - xorg-server 1.10.6
        - a lot of new Graphic Drivers.

    I would like to thank:

         Koop Mast
         Eitan Adler
         Niclas Zeising
         and all helpers and testers from x11@.
2012-04-21 17:03:32 +00:00

114 lines
3 KiB
Makefile

#-*- mode: Fundamental; tab-width: 4; -*-
# ex:ts=4
#
# bsd.mesa.mk - an attempt to refactor MesaLib ports.
#
# Created by: Florent Thoumie <flz@FreeBSD.org>
#
# !!! Here be dragons !!! (they seem to be everywhere these days)
#
# Remember to upgrade the following ports everytime you bump MESAVERSION:
#
# - graphics/libGL
# - graphics/libGLU
# - graphics/libGLw
# - graphics/libglut
# - graphics/dri
#
# $FreeBSD$
#
MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/}
MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/}
.if defined(WITH_NEW_XORG)
MESABASEVERSION= 7.11.2
# if there is a subversion, include the '-' between 7.11-rc2 for example.
MESASUBVERSION=
PLIST_SUB+= OLD="@comment " NEW=""
.else
MESABASEVERSION= 7.6.1
MESASUBVERSION=
PLIST_SUB+= OLD="" NEW="@comment "
.endif
MASTER_SITES= ftp://ftp.freedesktop.org/pub/mesa/${MESABASEVERSION}/:mesa,glut
DISTFILES= MesaLib-${MESADISTVERSION}${EXTRACT_SUFX}:mesa
MAINTAINER?= x11@FreeBSD.org
BUILD_DEPENDS+= makedepend:${PORTSDIR}/devel/makedepend \
${PYTHON_SITELIBDIR}/libxml2.py:${PORTSDIR}/textproc/py-libxml2
USE_BISON= build
USE_PYTHON_BUILD=yes
USE_BZIP2= yes
USE_GMAKE= yes
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
MAKE_JOBS_SAFE= yes
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
CONFIGURE_ARGS+=--enable-gallium-llvm=no --without-gallium-drivers \
--disable-egl
.if defined(WITH_NEW_XORG)
EXTRA_PATCHES+= ${PATCHDIR}/extra-mach64_context.h \
${PATCHDIR}/extra-sis_context.h \
${PATCHDIR}/extra-src-glsl_ir_constant_expression.cpp
.else
EXTRA_PATCHES+= ${PATCHDIR}/extra-src__mesa__x86-64__glapi_x86-64.S \
${PATCHDIR}/extra-src__mesa__x86-64__xform4.S \
${PATCHDIR}/extra-src__mesa__x86__glapi_x86.S \
${PATCHDIR}/extra-src__mesa__x86__read_rgba_span_x86.S
.endif
ALL_TARGET= default
PATCHDIR= ${.CURDIR}/../../graphics/libGL/files
WRKSRC= ${WRKDIR}/Mesa-${MESABASEVERSION}${MESASUBVERSION}
.if !defined(ARCH)
ARCH!= uname -p
.endif
COMPONENT= ${PORTNAME:L:C/^lib//:C/mesa-//}
.if ${COMPONENT:Mglut} == ""
. if ${COMPONENT:Mglu} == ""
CONFIGURE_ARGS+= --disable-glu --disable-glut
. else
CONFIGURE_ARGS+= --disable-glut
. endif
.else
DISTFILES+= MesaGLUT-${MESADISTVERSION}${EXTRACT_SUFX}:glut
.endif
.if ${COMPONENT:Mglw} == ""
CONFIGURE_ARGS+= --disable-glw
.else
CONFIGURE_ARGS+= --enable-motif
.endif
.if ${COMPONENT:Mdri} == ""
CONFIGURE_ARGS+= --with-dri-drivers=no
.endif
.if defined(WITHOUT_XCB)
CONFIGURE_ARGS+= --disable-xcb
.else
CONFIGURE_ARGS+= --enable-xcb
.endif
post-patch:
@${REINPLACE_CMD} -e 's|-ffast-math|${FAST_MATH}|' -e 's|x86_64|amd64|' \
${WRKSRC}/configure
@${REINPLACE_CMD} -e 's|[$$](INSTALL_LIB_DIR)/pkgconfig|${PREFIX}/libdata/pkgconfig|' \
${WRKSRC}/src/glu/Makefile \
${WRKSRC}/src/glw/Makefile \
${WRKSRC}/src/mesa/Makefile \
${WRKSRC}/src/mesa/drivers/dri/Makefile
.if ${COMPONENT:Mglut} != ""
@${REINPLACE_CMD} -e 's|[$$](INSTALL_LIB_DIR)/pkgconfig|${PREFIX}/libdata/pkgconfig|' \
${WRKSRC}/src/glut/glx/Makefile
.endif