pkgsrc/graphics/MesaLib/Makefile

118 lines
3.4 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.72 2008/09/06 13:00:31 wiz Exp $
PKGNAME= MesaLib-${MESA_PKGVERSION}
COMMENT= Graphics library similar to SGI's OpenGL
PKGREVISION= 2
2004-01-05 12:42:20 +01:00
MESA_HEADERS= gl.h gl_mangle.h glext.h glx.h glxext.h \
glx_mangle.h osmesa.h xmesa.h xmesa_x.h \
xmesa_xf86.h
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
2008-04-30 09:00:14 +02:00
CFLAGS.DragonFly+= -DUSE_NATIVE_LIBM_FUNCS
PLIST_VARS= dri nodri
.include "../../graphics/Mesa/Makefile.lib"
.include "options.mk"
.if !empty(MACHINE_PLATFORM:MNetBSD-[12].*)
##
## NetBSD 2.x and earlier require pthread stubs
##
. include "../../devel/pthread-stublib/buildlink3.mk"
PTHREAD_STUBLIB= -L${PREFIX}/lib -Wl,-R${PREFIX}/lib -lpthstub
.elif !empty(MACHINE_PLATFORM:MNetBSD-*)
##
## NetBSD 3.x and later have pthread stubs in libc
##
PTHREAD_STUBLIB=
.else
##
## Other platforms may or may not have stubs provided by libc, but pulling in
## threading support via the pthread.buildlink3.mk definitions will provide
## all the necessary interfaces. This matches the standard configuration for
## most platforms as they appear in "${WRKSRC}/configs", and is necessary
## for successful linking with libGL under many platforms.
##
.include "../../mk/pthread.buildlink3.mk"
PTHREAD_STUBLIB= ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}
.endif
PKGSRC_MAKE_ENV+= PTHREAD_STUBLIB=${PTHREAD_STUBLIB:Q}
.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
MAKE_ENV+= CROSS_COMPILING=yes
.endif
RM_PATCH_BACKUP_DIRS= docs src/mesa src/glut/glx \
progs/demos progs/xdemos progs/glsl
post-extract:
${CP} ${FILESDIR}/gen_matypes.awk ${WRKSRC}/src/mesa/x86
${CP} ${FILESDIR}/gen_matypes.sh ${WRKSRC}/src/mesa/x86
${CHMOD} a+x ${WRKSRC}/src/mesa/x86/gen_matypes.sh
for fn in ${RM_PATCH_BACKUP_DIRS}; do \
${RM} -f ${WRKSRC}/$${fn}/*.orig; \
done
pre-install:
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/include/GL/internal
Update Mesa and friends to version 6.0: Changes since 5.2: New: - full OpenGL 1.5 support - updated GL/glext.h file to version 21 Changes: - changed max framebuffer size to 4Kx4K (MAX_WIDTH/HEIGHT in config.h) Bug fixes: - fixed bug in UNCLAMPED_FLOAT_TO_UBYTE macro; solves a color clamping issue - updated suno5-gcc configs - glColor3 functions sometimes resulted in undefined alpha values - fixed FP divide by zero error seen on VMS with xlockmore, others - fixed vertex/fragment program debug problem (bug 873011) - building on AIX with gcc works now - glDeleteProgramsARB failed for ARB fragment programs (bug 876160) - glDrawRangeElements tried to modify potentially read-only storage - updated files for building on Windows Changes since 5.0.2: New features: - reorganized directory tree - GL_ARB_vertex/fragment_program extensions (Michal Krol & Karl Rasche) - GL_ATI_texture_env_combine3 extension (Ian Romanick) - GL_SGI_texture_color_table extension (Eric Plante) - GL_NV_fragment_program extension - GL_NV_light_max_exponent extension - GL_EXT_texture_rectangle (identical to GL_NV_texture_rectangle) - GL_ARB_occlusion_query extension - GL_ARB_point_sprite extension - GL_ARB_texture_non_power_of_two extension - GL_IBM_multimode_draw_arrays extension - GL_EXT_texture_mirror_clamp extension (Ian Romanick) - GL_ARB_vertex_buffer_object extension - new X86 feature detection code (Petr Sebor) - less memory used for display lists and vertex buffers - demo of per-pixel lighting with a fragment program (demos/fplight.c) - new version (18) of glext.h header - new spriteblast.c demo of GL_ARB_point_sprite - faster glDrawPixels in X11 driver in some cases (see RELNOTES-5.1) - faster glCopyPixels in X11 driver in some cases (see RELNOTES-5.1) Bug fixes: - really enable OpenGL 1.4 features in DOS driver. - fixed issues in glDrawPixels and glCopyPixels for very wide images - glPixelMapf/ui/usv()'s size parameter is GLsizei, not GLint - fixed some texgen bugs reported by Daniel Borca - fixed wglMakeCurrent(NULL, NULL) bug (#835861) - fixed glTexSubImage3D z-offset bug (Cedric Gautier) - fixed RGBA blend enable bug (Ville Syrjala) - glAccum is supposed to be a no-op in selection/feedback mode - fixed texgen bug #597589 (John Popplewell) Changes: - dropped API trace feature (src/Trace/) - documentation overhaul. merged with website content. more html. - glxgears.c demo updated to use GLX swap rate extensions - glTexImage1/2/3D now allows width/height/depth = 0 - disable SPARC asm code on Linux (bug 852204)
2004-01-20 03:48:33 +01:00
pre-build:
cd ${WRKSRC} && ${RM} -fr src/glu src/glut progs
Update Mesa and friends to version 6.0: Changes since 5.2: New: - full OpenGL 1.5 support - updated GL/glext.h file to version 21 Changes: - changed max framebuffer size to 4Kx4K (MAX_WIDTH/HEIGHT in config.h) Bug fixes: - fixed bug in UNCLAMPED_FLOAT_TO_UBYTE macro; solves a color clamping issue - updated suno5-gcc configs - glColor3 functions sometimes resulted in undefined alpha values - fixed FP divide by zero error seen on VMS with xlockmore, others - fixed vertex/fragment program debug problem (bug 873011) - building on AIX with gcc works now - glDeleteProgramsARB failed for ARB fragment programs (bug 876160) - glDrawRangeElements tried to modify potentially read-only storage - updated files for building on Windows Changes since 5.0.2: New features: - reorganized directory tree - GL_ARB_vertex/fragment_program extensions (Michal Krol & Karl Rasche) - GL_ATI_texture_env_combine3 extension (Ian Romanick) - GL_SGI_texture_color_table extension (Eric Plante) - GL_NV_fragment_program extension - GL_NV_light_max_exponent extension - GL_EXT_texture_rectangle (identical to GL_NV_texture_rectangle) - GL_ARB_occlusion_query extension - GL_ARB_point_sprite extension - GL_ARB_texture_non_power_of_two extension - GL_IBM_multimode_draw_arrays extension - GL_EXT_texture_mirror_clamp extension (Ian Romanick) - GL_ARB_vertex_buffer_object extension - new X86 feature detection code (Petr Sebor) - less memory used for display lists and vertex buffers - demo of per-pixel lighting with a fragment program (demos/fplight.c) - new version (18) of glext.h header - new spriteblast.c demo of GL_ARB_point_sprite - faster glDrawPixels in X11 driver in some cases (see RELNOTES-5.1) - faster glCopyPixels in X11 driver in some cases (see RELNOTES-5.1) Bug fixes: - really enable OpenGL 1.4 features in DOS driver. - fixed issues in glDrawPixels and glCopyPixels for very wide images - glPixelMapf/ui/usv()'s size parameter is GLsizei, not GLint - fixed some texgen bugs reported by Daniel Borca - fixed wglMakeCurrent(NULL, NULL) bug (#835861) - fixed glTexSubImage3D z-offset bug (Cedric Gautier) - fixed RGBA blend enable bug (Ville Syrjala) - glAccum is supposed to be a no-op in selection/feedback mode - fixed texgen bug #597589 (John Popplewell) Changes: - dropped API trace feature (src/Trace/) - documentation overhaul. merged with website content. more html. - glxgears.c demo updated to use GLX swap rate extensions - glTexImage1/2/3D now allows width/height/depth = 0 - disable SPARC asm code on Linux (bug 852204)
2004-01-20 03:48:33 +01:00
.include "../../mk/bsd.pkg.mk"