Sat Feb 14 06:54:14 2015 UTC ()
Partial fixes for cross-compilation.

- Python is a tool, not build, dependency.
- Incomplete workaround for mesa's own tools.


(riastradh)
diff -r1.19 -r1.20 pkgsrc/graphics/Mesa/Makefile.lib

cvs diff -r1.19 -r1.20 pkgsrc/graphics/Mesa/Attic/Makefile.lib (expand / switch to unified diff)

--- pkgsrc/graphics/Mesa/Attic/Makefile.lib 2014/10/09 14:06:34 1.19
+++ pkgsrc/graphics/Mesa/Attic/Makefile.lib 2015/02/14 06:54:14 1.20
@@ -1,48 +1,64 @@ @@ -1,48 +1,64 @@
1# $NetBSD: Makefile.lib,v 1.19 2014/10/09 14:06:34 wiz Exp $ 1# $NetBSD: Makefile.lib,v 1.20 2015/02/14 06:54:14 riastradh Exp $
2# 2#
3# This Makefile fragment is included by all packages that build libraries 3# This Makefile fragment is included by all packages that build libraries
4# from the Mesa sources. 4# from the Mesa sources.
5# 5#
6# used by graphics/glu/Makefile 6# used by graphics/glu/Makefile
7# used by graphics/glut/Makefile 7# used by graphics/glut/Makefile
8# used by graphics/MesaDemos/Makefile 8# used by graphics/MesaDemos/Makefile
9# used by graphics/MesaLib/Makefile 9# used by graphics/MesaLib/Makefile
10 10
11.include "../../graphics/Mesa/Makefile.common" 11.include "../../graphics/Mesa/Makefile.common"
12 12
13DISTFILES+= MesaLib-${MESA_VERSION}${EXTRACT_SUFX} 13DISTFILES+= MesaLib-${MESA_VERSION}${EXTRACT_SUFX}
14DISTFILES+= MesaGLUT-${MESA_VERSION}${EXTRACT_SUFX} 14DISTFILES+= MesaGLUT-${MESA_VERSION}${EXTRACT_SUFX}
15#DISTFILES+= MesaDemos-${MESA_VERSION}${EXTRACT_SUFX} 15#DISTFILES+= MesaDemos-${MESA_VERSION}${EXTRACT_SUFX}
16 16
17GNU_CONFIGURE= yes 17GNU_CONFIGURE= yes
18USE_LANGUAGES= c99 c++ 18USE_LANGUAGES= c99 c++
19USE_TOOLS+= automake bison flex gmake pkg-config makedepend 19USE_TOOLS+= automake bison flex gmake pkg-config makedepend
20 20
21PYTHON_FOR_BUILD_ONLY= yes 21PYTHON_FOR_BUILD_ONLY= tool
22PYTHON_VERSIONS_INCOMPATIBLE= 33 34 # not yet ported as of 7.11.2 22PYTHON_VERSIONS_INCOMPATIBLE= 33 34 # not yet ported as of 7.11.2
23.include "../../lang/python/tool.mk" 23.include "../../lang/python/tool.mk"
24BUILDLINK_DEPMETHOD.libxml2?= build 24BUILDLINK_DEPMETHOD.libxml2?= build
25.include "../../textproc/libxml2/buildlink3.mk" 25.include "../../textproc/libxml2/buildlink3.mk"
26 26
27PATCHDIR= ${.CURDIR}/../MesaLib/patches 27PATCHDIR= ${.CURDIR}/../MesaLib/patches
28DISTINFO_FILE= ${.CURDIR}/../MesaLib/distinfo 28DISTINFO_FILE= ${.CURDIR}/../MesaLib/distinfo
29 29
30MAKE_ENV+= MAKE=${GMAKE:Q} 30MAKE_ENV+= MAKE=${GMAKE:Q}
31 31
32CONFIGURE_ARGS+= --with-gallium-drivers="" 32CONFIGURE_ARGS+= --with-gallium-drivers=""
33CONFIGURE_ARGS+= --disable-gallium-llvm 33CONFIGURE_ARGS+= --disable-gallium-llvm
34CONFIGURE_ARGS+= --disable-egl 34CONFIGURE_ARGS+= --disable-egl
35 35
36.include "../../mk/compiler.mk" 36.include "../../mk/compiler.mk"
37 37
38.if !empty(PKGSRC_COMPILER:Mccc) 38.if !empty(PKGSRC_COMPILER:Mccc)
39CFLAGS+= -D__FUNCTION__=__FILE__ 39CFLAGS+= -D__FUNCTION__=__FILE__
40.endif 40.endif
41 41
42.include "../../mk/bsd.prefs.mk" 42.include "../../mk/bsd.prefs.mk"
43.if ${OPSYS} == "MirBSD" 43.if ${OPSYS} == "MirBSD"
44BUILDLINK_TRANSFORM+= rm:-fvisibility=hidden 44BUILDLINK_TRANSFORM+= rm:-fvisibility=hidden
45.endif 45.endif
46 46
 47.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
 48# XXX This is not quite enough: we will need to patch the makefile
 49# because it bogusly tries to reuse objects for native tools and target
 50# libraries, and for cross-compiling the objects need to be built
 51# separately. Alternatively, we could just update Mesa to something
 52# less prehistoric...
 53SUBST_CLASSES+= nativecc
 54SUBST_STAGE.nativecc= pre-configure
 55SUBST_MESSAGE.nativecc= Fix makefiles to compile tools with native cc.
 56SUBST_FILES.nativecc+= src/glsl/Makefile
 57SUBST_SED.nativecc+= -e 's,$$(CC),$$(APP_CC),g'
 58SUBST_SED.nativecc+= -e 's,$$(CXX),$$(APP_CXX),g'
 59MAKE_FLAGS+= APP_CC=${NATIVE_CC:Q}
 60MAKE_FLAGS+= APP_CXX=${NATIVE_CXX:Q}
 61.endif
 62
47pre-configure: 63pre-configure:
48 cd ${WRKSRC} && ${MAKE} configure 64 cd ${WRKSRC} && ${MAKE} configure