diff options
author | bjs <bjs@pkgsrc.org> | 2008-09-18 21:10:28 +0000 |
---|---|---|
committer | bjs <bjs@pkgsrc.org> | 2008-09-18 21:10:28 +0000 |
commit | 4a50c11a27509d5aa8ec90912379e10a1181154e (patch) | |
tree | b5242a61e5c2dc0359ea300c9d0f0ace72b210f6 /graphics/MesaLib | |
parent | eb9052882b340a7c1f80b96cc8eb4ee7fc2cdc8d (diff) | |
download | pkgsrc-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/MesaLib')
-rw-r--r-- | graphics/MesaLib/Makefile | 55 | ||||
-rw-r--r-- | graphics/MesaLib/glx-config.mk | 59 |
2 files changed, 61 insertions, 53 deletions
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 |