summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorbjs <bjs@pkgsrc.org>2008-09-18 21:10:28 +0000
committerbjs <bjs@pkgsrc.org>2008-09-18 21:10:28 +0000
commit4a50c11a27509d5aa8ec90912379e10a1181154e (patch)
treeb5242a61e5c2dc0359ea300c9d0f0ace72b210f6 /graphics
parenteb9052882b340a7c1f80b96cc8eb4ee7fc2cdc8d (diff)
downloadpkgsrc-4a50c11a27509d5aa8ec90912379e10a1181154e.tar.gz
Add Makefile.version and glx-config.mk so that x11/modular-xorg-server
can share this information in lieu of us duplicating it by hand.
Diffstat (limited to 'graphics')
-rw-r--r--graphics/Mesa/Makefile.common18
-rw-r--r--graphics/Mesa/Makefile.version22
-rw-r--r--graphics/MesaLib/Makefile55
-rw-r--r--graphics/MesaLib/glx-config.mk59
4 files changed, 88 insertions, 66 deletions
diff --git a/graphics/Mesa/Makefile.common b/graphics/Mesa/Makefile.common
index a23d12c9831..a62d5a48b18 100644
--- a/graphics/Mesa/Makefile.common
+++ b/graphics/Mesa/Makefile.common
@@ -1,15 +1,16 @@
-# $NetBSD: Makefile.common,v 1.69 2008/08/23 02:51:19 dsainty Exp $
+# $NetBSD: Makefile.common,v 1.70 2008/09/18 21:10:28 bjs Exp $
#
# This Makefile fragment is included either directly or indirectly (through
# Makefile.lib) by all packages that are built from the Mesa sources.
#
# used by graphics/Mesa/Makefile.lib
-DISTNAME?= MesaLib-${MESA_VERSION}
+.include "../../graphics/Mesa/Makefile.version"
+
+DISTNAME?= ${MESA_DISTNAME}
EXTRACT_SUFX= .tar.bz2
CATEGORIES= graphics
-#MASTER_SITES= ${MASTER_SITE_LOCAL:=Mesa-${MESA_VERSION}/}
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=mesa3d/}
+MASTER_SITES= ${MESA_SITES}
# When changing this version, please run "make distinfo" in the following
# package directories:
@@ -17,15 +18,6 @@ MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=mesa3d/}
# graphics/MesaLib
# graphics/glx-utils
#
-MESA_VERSION= 7.0.4
-MESA_PKGVERSION= ${MESA_VERSION}${MESA_PATCHLEVEL}
-#MESA_PATCHFILES= 001 002 003
-MESA_PATCHLEVEL= .1
-
-#PATCHFILES= ${MESA_PATCHFILES:@.p.@Mesa-${MESA_VERSION}-${.p.}@}
-#PATCH_SITES= ftp://ftp.NetBSD.org/pub/NetBSD/misc/bjs/patchfiles/
-#PATCH_DIST_STRIP= -p1
-
MAINTAINER= bjs@NetBSD.org
HOMEPAGE= http://www.mesa3d.org/
diff --git a/graphics/Mesa/Makefile.version b/graphics/Mesa/Makefile.version
new file mode 100644
index 00000000000..f41cb8355c0
--- /dev/null
+++ b/graphics/Mesa/Makefile.version
@@ -0,0 +1,22 @@
+# $NetBSD: Makefile.version,v 1.1 2008/09/18 21:10:28 bjs Exp $
+#
+# When changing this version, please run "make distinfo" in the following
+# package directories:
+#
+# graphics/MesaLib
+# graphics/glx-utils
+#
+# used by graphics/Mesa/Makefile.common
+# used by x11/modular-xorg-server/options.mk
+
+MESA_DISTNAME= MesaLib-${MESA_VERSION}
+MESA_SITES= ${MASTER_SITE_SOURCEFORGE:=mesa3d/}
+
+MESA_VERSION= 7.0.4
+MESA_PKGVERSION= ${MESA_VERSION}${MESA_PATCHLEVEL}
+#MESA_PATCHFILES= 001 002 003
+MESA_PATCHLEVEL= .1
+
+#PATCHFILES= ${MESA_PATCHFILES:@.p.@Mesa-${MESA_VERSION}-${.p.}@}
+#PATCH_SITES= ftp://ftp.NetBSD.org/pub/NetBSD/misc/bjs/patchfiles/
+#PATCH_DIST_STRIP= -p1
diff --git a/graphics/MesaLib/Makefile b/graphics/MesaLib/Makefile
index 90d65ebf9db..b31505aa9c3 100644
--- a/graphics/MesaLib/Makefile
+++ b/graphics/MesaLib/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.72 2008/09/06 13:00:31 wiz Exp $
+# $NetBSD: Makefile,v 1.73 2008/09/18 21:10:28 bjs Exp $
PKGNAME= MesaLib-${MESA_PKGVERSION}
COMMENT= Graphics library similar to SGI's OpenGL
@@ -13,60 +13,9 @@ MESA_HEADERS+= internal/dri_interface.h internal/sarea.h
PKG_DESTDIR_SUPPORT= user-destdir
BUILD_DEFS+= MESA_HZ
-###
-### XXX Older versions of xf86driproto installed dri_interface.h, which
-### is now installed by Mesa.
-###
-BUILDLINK_API_DEPENDS.driproto+= xf86driproto>=2.0.4
-
-.include "../../mk/bsd.prefs.mk"
-
-CFLAGS.NetBSD+= -D_NETBSD_SOURCE
-CFLAGS.NetBSD+= ${ATOMIC_OPS_CHECK}HAVE_NETBSD_ATOMIC_OPS
-
-.if ${OPSYS} == "NetBSD" && !target(netbsd-atomic-ops-check)
-netbsd-atomic-ops-check:
-ATOMIC_OPS_CHECK!=\
- if ( ${NM} /usr/lib/libc.so | ${GREP} -q atomic_cas_uint ); then \
- ${ECHO} "-D"; \
- else \
- ${ECHO} "-U"; \
- fi
-.endif
-
-.if (${MACHINE_ARCH} == "x86_64" || \
- ${MACHINE_ARCH} == "sparc64" || \
- ${MACHINE_ARCH} == "alpha")
-CFLAGS+= -D__GLX_ALIGN64
-.endif
-
-.if !empty(MACHINE_ARCH:Mi386) || !empty(MACHINE_ARCH:Mx86_64)
-###
-### This is taken from <sys/arch/i386/include/npx.h>. If we don't override
-### it, the FPU control word will be restored to 0x037f.
-###
-### Also, see patch-aq about the libm functions required (float functions
-### such as floorf). Proper configuration of this should be a goal of
-### the Mesa developers; alas, it obviously is not.
-###
-### XXX We need a reliable check for these functions.
-###
-#/* NetBSD uses IEEE double precision. */
-CFLAGS.NetBSD+= -DDEFAULT_X86_FPU=0x127f
-###
-###
-#/* FreeBSD leaves some exceptions unmasked as well. */
-###
-CFLAGS.FreeBSD+= -DDEFAULT_x86_FPU=0x1272
-.endif
-
-CFLAGS.FreeBSD+= -DUSE_NATIVE_LIBM_FUNCS
-CFLAGS.Linux+= -DUSE_NATIVE_LIBM_FUNCS
-CFLAGS.NetBSD+= -DUSE_NATIVE_LIBM_FUNCS
-CFLAGS.DragonFly+= -DUSE_NATIVE_LIBM_FUNCS
-
PLIST_VARS= dri nodri
+.include "glx-config.mk"
.include "../../graphics/Mesa/Makefile.lib"
.include "options.mk"
diff --git a/graphics/MesaLib/glx-config.mk b/graphics/MesaLib/glx-config.mk
new file mode 100644
index 00000000000..d260f9cc3e0
--- /dev/null
+++ b/graphics/MesaLib/glx-config.mk
@@ -0,0 +1,59 @@
+# $NetBSD: glx-config.mk,v 1.1 2008/09/18 21:10:28 bjs Exp $
+#
+# used by x11/modular-xorg-server/options.mk
+
+.if !defined(GLX_CONFIG_MK)
+GLX_CONFIG_MK= # empty
+
+### XXX Older versions of xf86driproto installed dri_interface.h, which
+### is now installed by Mesa.
+###
+BUILDLINK_API_DEPENDS.driproto+= xf86driproto>=2.0.4
+
+. include "../../mk/bsd.fast.prefs.mk"
+
+CFLAGS.NetBSD+= -D_NETBSD_SOURCE
+CFLAGS.NetBSD+= ${ATOMIC_OPS_CHECK}HAVE_NETBSD_ATOMIC_OPS
+
+. if ${OPSYS} == "NetBSD" && !target(netbsd-atomic-ops-check)
+. PHONY: netbsd-atomic-opts-check
+netbsd-atomic-ops-check:
+ATOMIC_OPS_CHECK!=\
+ if ( ${NM} /usr/lib/libc.so | ${GREP} -q atomic_cas_uint ); then \
+ ${ECHO} "-D"; \
+ else \
+ ${ECHO} "-U"; \
+ fi
+.endif
+
+.if (${MACHINE_ARCH} == "x86_64" || \
+ ${MACHINE_ARCH} == "sparc64" || \
+ ${MACHINE_ARCH} == "alpha")
+CFLAGS+= -D__GLX_ALIGN64
+.endif
+
+.if !empty(MACHINE_ARCH:Mi386) || !empty(MACHINE_ARCH:Mx86_64)
+###
+### This is taken from <sys/arch/i386/include/npx.h>. If we don't override
+### it, the FPU control word will be restored to 0x037f.
+###
+### Also, see patch-aq about the libm functions required (float functions
+### such as floorf). Proper configuration of this should be a goal of
+### the Mesa developers; alas, it obviously is not.
+###
+### XXX We need a reliable check for these functions.
+###
+#/* NetBSD uses IEEE double precision. */
+CFLAGS.NetBSD+= -DDEFAULT_X86_FPU=0x127f
+###
+#/* FreeBSD leaves some exceptions unmasked as well. */
+###
+CFLAGS.FreeBSD+= -DDEFAULT_x86_FPU=0x1272
+. endif
+
+CFLAGS.FreeBSD+= -DUSE_NATIVE_LIBM_FUNCS
+CFLAGS.Linux+= -DUSE_NATIVE_LIBM_FUNCS
+CFLAGS.NetBSD+= -DUSE_NATIVE_LIBM_FUNCS
+CFLAGS.DragonFly+= -DUSE_NATIVE_LIBM_FUNCS
+
+.endif # GLX_CONFIG_MK