diff --git a/U_Add-D-N-DEBUG-to-CFLAGS-dependent-on-enable-debug.patch b/U_Add-D-N-DEBUG-to-CFLAGS-dependent-on-enable-debug.patch new file mode 100644 index 0000000..966a7af --- /dev/null +++ b/U_Add-D-N-DEBUG-to-CFLAGS-dependent-on-enable-debug.patch @@ -0,0 +1,33 @@ +From: Matt Turner +Date: Thu Feb 21 20:40:31 2013 -0800 +Subject: [PATCH]Add -D(N)DEBUG to CFLAGS dependent on --enable-debug +Patch-mainline: to be upstreamed +Git-repo: git://anongit.freedesktop.org/git/mesa/glu +Git-commit: 069211570c32a8d5848e127975a2943e9d8fc6b9 +References: +Signed-off-by: Egbert Eich + +Tested-by: Blaž Hrastnik +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61003 +--- + configure.ac | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index cbfd047..45abf17 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -42,9 +42,10 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + AC_ARG_ENABLE(debug, + AS_HELP_STRING([--enable-debug], + [Enable debugging information]), +- [CFLAGS="$CFLAGS -g -O0" +- CXXFLAGS="$CXXFLAGS -g -O0"], +- []) ++ [CFLAGS="$CFLAGS -g -O0 -DDEBUG" ++ CXXFLAGS="$CXXFLAGS -g -O0 -DDEBUG"], ++ [CFLAGS="$CFLAGS -DNDEBUG" ++ CXXFLAGS="$CXXFLAGS -DNDEBUG"]) + + dnl Make sure the pkg-config macros are defined + m4_ifndef([PKG_PROG_PKG_CONFIG], diff --git a/glu.changes b/glu.changes index 068c93d..af68819 100644 --- a/glu.changes +++ b/glu.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jul 12 06:17:18 UTC 2016 - eich@suse.com + +- U_Add-D-N-DEBUG-to-CFLAGS-dependent-on-enable-debug.patch + u_autoconf-Don-t-modify-CFLAGS-in-configure-scripts.patch + Avoid debug messages being printed out at runtime (bsc#988411). + ------------------------------------------------------------------- Mon Oct 27 08:44:08 UTC 2014 - sndirsch@suse.com diff --git a/glu.spec b/glu.spec index 12b819c..8366d3a 100644 --- a/glu.spec +++ b/glu.spec @@ -1,7 +1,7 @@ # # spec file for package glu # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -29,6 +29,8 @@ Url: http://cgit.freedesktop.org/mesa/glu/ #Git-Web: http://cgit.freedesktop.org/mesa/glu/ Source: http://cgit.freedesktop.org/mesa/glu/snapshot/%{name}-%{version}.tar.gz Source1: baselibs.conf +Patch0: U_Add-D-N-DEBUG-to-CFLAGS-dependent-on-enable-debug.patch +Patch1: u_autoconf-Don-t-modify-CFLAGS-in-configure-scripts.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: gcc-c++ BuildRequires: libtool @@ -86,6 +88,8 @@ compiling programs with GLU. %prep %setup -q +%patch0 -p1 +%patch1 -p1 %build if [ ! -e configure ]; then diff --git a/u_autoconf-Don-t-modify-CFLAGS-in-configure-scripts.patch b/u_autoconf-Don-t-modify-CFLAGS-in-configure-scripts.patch new file mode 100644 index 0000000..8948f23 --- /dev/null +++ b/u_autoconf-Don-t-modify-CFLAGS-in-configure-scripts.patch @@ -0,0 +1,59 @@ +From: Egbert Eich +Date: Tue Jul 12 07:36:18 2016 +0200 +Subject: [PATCH]autoconf: Don't modify CFLAGS in configure scripts +Patch-mainline: to be upstreamed +Git-repo: git://anongit.freedesktop.org/git/mesa/glu +Git-commit: 2bc3b2f952c642445d32d7ae4422088d9d2e7619 +References: +Signed-off-by: Egbert Eich + +CFLAGS (and CXXFLAGS) may be overridden by the user at make time. +Therefore it is not advisable to set them explicitely in the +configure script. + +Signed-off-by: Egbert Eich +--- + Makefile.am | 4 ++-- + configure.ac | 14 ++++++++++---- + 2 files changed, 12 insertions(+), 6 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 3050df1..834c7e2 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -30,8 +30,8 @@ AM_CPPFLAGS = -DLIBRARYBUILD \ + -I$(top_srcdir)/src/libnurbs/internals \ + -I$(top_srcdir)/src/libnurbs/interface \ + -I$(top_srcdir)/src/libnurbs/nurbtess +-AM_CFLAGS = $(GL_CFLAGS) $(OSMESA_CFLAGS) $(WARNCFLAGS) $(VISIBILITY_CFLAGS) +-AM_CXXFLAGS = $(GL_CFLAGS) $(OSMESA_CFLAGS) $(WARNCXXFLAGS) $(VISIBILITY_CXXFLAGS) ++AM_CFLAGS = $(GL_CFLAGS) $(OSMESA_CFLAGS) $(WARNCFLAGS) $(VISIBILITY_CFLAGS) $(DEBUGCFLAGS) ++AM_CXXFLAGS = $(GL_CFLAGS) $(OSMESA_CFLAGS) $(WARNCXXFLAGS) $(VISIBILITY_CXXFLAGS) $(DEBUGCXXFLAGS) + + GL_includedir = $(includedir)/GL + GL_include_HEADERS = \ +diff --git a/configure.ac b/configure.ac +index 45abf17..ab93d8b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -42,10 +42,16 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + AC_ARG_ENABLE(debug, + AS_HELP_STRING([--enable-debug], + [Enable debugging information]), +- [CFLAGS="$CFLAGS -g -O0 -DDEBUG" +- CXXFLAGS="$CXXFLAGS -g -O0 -DDEBUG"], +- [CFLAGS="$CFLAGS -DNDEBUG" +- CXXFLAGS="$CXXFLAGS -DNDEBUG"]) ++ AS_IF([test "$enableval" = xyes], ++ [DEBUGCFLAGS="-g -O0 -DDEBUG" ++ DEBUGCXXFLAGS="-g -O0 -DDEBUG"], ++ [test "$enableval" = xno], ++ [DEBUGCFLAGS="-DNDEBUG" ++ DEBUGCXXFLAGS="-DNDEBUG"]), ++ [DEBUGCFLAGS="-DNDEBUG" ++ DEBUGCXXFLAGS="-DNDEBUG"]) ++AC_SUBST([DEBUGCFLAGS]) ++AC_SUBST([DEBUGCXXFLAGS]) + + dnl Make sure the pkg-config macros are defined + m4_ifndef([PKG_PROG_PKG_CONFIG],