Sat Aug 24 20:39:37 2019 UTC ()
MesaLib: strip out -Werror=return-type

Mesa has some switch statements that do assert(0) for the default case
and return on all the other cases. Some versions of GCC count these
functions as not terminating with the right return value and are erroring.

reported by wilbury.


(nia)
diff -r1.153 -r1.154 pkgsrc/graphics/MesaLib/Makefile

cvs diff -r1.153 -r1.154 pkgsrc/graphics/MesaLib/Makefile (expand / switch to unified diff)

--- pkgsrc/graphics/MesaLib/Makefile 2019/08/23 11:37:48 1.153
+++ pkgsrc/graphics/MesaLib/Makefile 2019/08/24 20:39:37 1.154
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.153 2019/08/23 11:37:48 nia Exp $ 1# $NetBSD: Makefile,v 1.154 2019/08/24 20:39:37 nia Exp $
2 2
3DISTNAME= mesa-19.1.4 3DISTNAME= mesa-19.1.4
4PKGNAME= ${DISTNAME:S/mesa/MesaLib/} 4PKGNAME= ${DISTNAME:S/mesa/MesaLib/}
5CATEGORIES= graphics x11 5CATEGORIES= graphics x11
6MASTER_SITES= https://mesa.freedesktop.org/archive/ 6MASTER_SITES= https://mesa.freedesktop.org/archive/
7EXTRACT_SUFX= .tar.xz 7EXTRACT_SUFX= .tar.xz
8 8
9MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
10HOMEPAGE= https://www.mesa3d.org/ 10HOMEPAGE= https://www.mesa3d.org/
11COMMENT= Open source OpenGL implementation 11COMMENT= Open source OpenGL implementation
12LICENSE= mit 12LICENSE= mit
13 13
14USE_TOOLS+= pkg-config 14USE_TOOLS+= pkg-config
@@ -46,26 +46,28 @@ LDFLAGS.SunOS+= -lsocket -lnsl @@ -46,26 +46,28 @@ LDFLAGS.SunOS+= -lsocket -lnsl
46 46
47.include "../../mk/bsd.prefs.mk" 47.include "../../mk/bsd.prefs.mk"
48.include "../../mk/compiler.mk" 48.include "../../mk/compiler.mk"
49.include "options.mk" 49.include "options.mk"
50 50
51.if ${MACHINE_ARCH} == "i386" 51.if ${MACHINE_ARCH} == "i386"
52MESON_ARGS+= -Dglx-read-only-text=true 52MESON_ARGS+= -Dglx-read-only-text=true
53.endif 53.endif
54 54
55MESON_ARGS+= -Dshared-glapi=true 55MESON_ARGS+= -Dshared-glapi=true
56 56
57CPPFLAGS+= -DHAVE_NOATEXIT 57CPPFLAGS+= -DHAVE_NOATEXIT
58 58
 59BUILDLINK_TRANSFORM+= rm:-Werror=return-type
 60
59# Work around Xorg segfaulting in radeon driver due to wrong alloca being used 61# Work around Xorg segfaulting in radeon driver due to wrong alloca being used
60CFLAGS.NetBSD+= -Dalloca=__builtin_alloca 62CFLAGS.NetBSD+= -Dalloca=__builtin_alloca
61CXXFLAGS.NetBSD+= -Dalloca=__builtin_alloca 63CXXFLAGS.NetBSD+= -Dalloca=__builtin_alloca
62 64
63PYTHON_FOR_BUILD_ONLY= yes 65PYTHON_FOR_BUILD_ONLY= yes
64BUILD_DEPENDS+= ${PYPKGPREFIX}-mako-[0-9]*:../../devel/py-mako 66BUILD_DEPENDS+= ${PYPKGPREFIX}-mako-[0-9]*:../../devel/py-mako
65# needed to build vulkan support 67# needed to build vulkan support
66BUILD_DEPENDS+= ${PYPKGPREFIX}-cElementTree-[0-9]*:../../textproc/py-cElementTree 68BUILD_DEPENDS+= ${PYPKGPREFIX}-cElementTree-[0-9]*:../../textproc/py-cElementTree
67 69
68pre-configure: 70pre-configure:
69 touch ${WRKSRC}/src/glx/apple_dummy.cpp 71 touch ${WRKSRC}/src/glx/apple_dummy.cpp
70 72
71DRIRC_DIR= ${PKG_SYSCONFDIR}/drirc.d 73DRIRC_DIR= ${PKG_SYSCONFDIR}/drirc.d