summaryrefslogtreecommitdiffstats
path: root/graphics/libGL/bsd.mesalib.mk
diff options
context:
space:
mode:
authormiwi <miwi@058c260c-8361-11dd-a0ac-aa2bafec7d09>2012-02-06 00:43:42 +0800
committermiwi <miwi@058c260c-8361-11dd-a0ac-aa2bafec7d09>2012-02-06 00:43:42 +0800
commiteb384524d18261e42f80deeb7cbe74523f1d49eb (patch)
tree0495ae031d15285d4795cdeb948cfc6df2c97f58 /graphics/libGL/bsd.mesalib.mk
parente8fa453ef65d0752f7b1379dc1726874936edf7d (diff)
downloadxorg-devel-ports-eb384524d18261e42f80deeb7cbe74523f1d49eb.tar
xorg-devel-ports-eb384524d18261e42f80deeb7cbe74523f1d49eb.tar.gz
xorg-devel-ports-eb384524d18261e42f80deeb7cbe74523f1d49eb.tar.bz2
xorg-devel-ports-eb384524d18261e42f80deeb7cbe74523f1d49eb.tar.lz
xorg-devel-ports-eb384524d18261e42f80deeb7cbe74523f1d49eb.tar.xz
xorg-devel-ports-eb384524d18261e42f80deeb7cbe74523f1d49eb.tar.zst
xorg-devel-ports-eb384524d18261e42f80deeb7cbe74523f1d49eb.zip
- Move ports/branches/xorg-dev to ports/trunk/
git-svn-id: https://trillian.chruetertee.ch/svn/ports/trunk@388 058c260c-8361-11dd-a0ac-aa2bafec7d09
Diffstat (limited to 'graphics/libGL/bsd.mesalib.mk')
-rw-r--r--graphics/libGL/bsd.mesalib.mk114
1 files changed, 114 insertions, 0 deletions
diff --git a/graphics/libGL/bsd.mesalib.mk b/graphics/libGL/bsd.mesalib.mk
new file mode 100644
index 0000000..c01d7f4
--- /dev/null
+++ b/graphics/libGL/bsd.mesalib.mk
@@ -0,0 +1,114 @@
+#-*- 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