Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / graphics / MesaLib / Makefile
blob49393f8fd20099879ac930efbb333dd735fd3c05
1 # $NetBSD: Makefile,v 1.89 2012/09/12 14:12:28 dsainty Exp $
3 PKGNAME= MesaLib-${MESA_PKGVERSION}
4 PKGREVISION= 6
5 COMMENT= Graphics library similar to SGI's OpenGL
7 CONFLICTS+= xf86driproto<2.0.4
9 MESA_HEADERS= gl.h gl_mangle.h glext.h glx.h glxext.h \
10 glx_mangle.h osmesa.h xmesa.h xmesa_x.h \
11 xmesa_xf86.h
13 MESA_HEADERS+= internal/dri_interface.h internal/sarea.h
15 BUILD_DEFS+= MESA_HZ
16 PLIST_VARS= dri nodri
18 PKGCONFIG_OVERRIDE+= src/mesa/drivers/dri/dri.pc.in
19 PKGCONFIG_OVERRIDE+= src/mesa/gl.pc.in
20 PKGCONFIG_OVERRIDE+= src/mesa/osmesa.pc.in
21 PKGCONFIG_OVERRIDE+= src/glw/glw.pc.in
22 # no configure stage
23 PKGCONFIG_OVERRIDE_STAGE= pre-build
25 .include "glx-config.mk"
26 .include "../../graphics/Mesa/Makefile.lib"
27 .include "options.mk"
29 .if !empty(MACHINE_PLATFORM:MNetBSD-[12].*)
31 ## NetBSD 2.x and earlier require pthread stubs
33 . include "../../devel/pthread-stublib/buildlink3.mk"
34 PTHREAD_STUBLIB= -L${PREFIX}/lib -Wl,-R${PREFIX}/lib -lpthstub
35 .elif !empty(MACHINE_PLATFORM:MNetBSD-*)
37 ## NetBSD 3.x and later have pthread stubs in libc
39 PTHREAD_STUBLIB=
40 .else
42 ## Other platforms may or may not have stubs provided by libc, but pulling in
43 ## threading support via the pthread.buildlink3.mk definitions will provide
44 ## all the necessary interfaces. This matches the standard configuration for
45 ## most platforms as they appear in "${WRKSRC}/configs", and is necessary
46 ## for successful linking with libGL under many platforms.
48 .include "../../mk/pthread.buildlink3.mk"
49 PTHREAD_STUBLIB= ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}
50 .endif
51 PKGSRC_MAKE_ENV+= PTHREAD_STUBLIB=${PTHREAD_STUBLIB:Q}
52 MAKE_ENV+= PTHREAD_STUBLIB=${PTHREAD_STUBLIB:Q}
54 .if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
55 MAKE_ENV+= CROSS_COMPILING=yes
56 .endif
58 RM_PATCH_BACKUP_DIRS= docs src/mesa src/glut/glx \
59 progs/demos progs/xdemos progs/glsl
60 post-extract:
61 ${CP} ${FILESDIR}/gen_matypes.awk ${WRKSRC}/src/mesa/x86
62 ${CP} ${FILESDIR}/gen_matypes.sh ${WRKSRC}/src/mesa/x86
63 ${CHMOD} a+x ${WRKSRC}/src/mesa/x86/gen_matypes.sh
64 for fn in ${RM_PATCH_BACKUP_DIRS}; do \
65 ${RM} -f ${WRKSRC}/$${fn}/*.orig; \
66 done
68 pre-install:
69 ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/include/GL/internal
71 pre-build:
72 cd ${WRKSRC} && ${RM} -fr src/glu src/glut progs
74 .include "../../mk/compiler.mk"
76 .if !empty(PKGSRC_COMPILER:Mclang)
77 CFLAGS+= -no-integrated-as -fvisibility=hidden
78 .endif
80 # no configure phase
81 .include "../../mk/configure/pkg-config-override.mk"
82 .include "../../mk/bsd.pkg.mk"