From dd0f0d5385dbe26994a5de8a229f2150378c7171daa40be87049183f9c665339 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Thu, 10 May 2012 12:33:25 +0000 Subject: [PATCH] Accepting request 120555 from devel:libraries:c_c++ - Use RPM_OPT_FLAGS - Do not use -ansi gcc flag. (forwarded request 120535 from elvigia) OBS-URL: https://build.opensuse.org/request/show/120555 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libvmime?expand=0&rev=3 --- libvmime.changes | 6 +++++ libvmime.spec | 4 ++++ vmime-noansiflag.patch | 51 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+) create mode 100644 vmime-noansiflag.patch diff --git a/libvmime.changes b/libvmime.changes index bfd7172..9b079a3 100644 --- a/libvmime.changes +++ b/libvmime.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu May 10 00:13:33 UTC 2012 - crrodriguez@opensuse.org + +- Use RPM_OPT_FLAGS +- Do not use -ansi gcc flag. + ------------------------------------------------------------------- Fri Mar 16 12:33:11 UTC 2012 - jengelh@medozas.de diff --git a/libvmime.spec b/libvmime.spec index f00d0e0..7392cd3 100644 --- a/libvmime.spec +++ b/libvmime.spec @@ -37,6 +37,7 @@ Patch3: vmime-0.8.1-charset-catch.diff Patch4: vmime-0.9.2-header-value-on-next-line.diff Patch5: vmime-mixed-qp-in-parameter.diff Patch6: vmime-0.9.2-qp-in-buffers.diff +Patch7: vmime-noansiflag.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake @@ -101,8 +102,11 @@ complete mail client. %prep %setup -qn vmime %patch -P 1 -P 2 -P 3 -P 4 -P 5 -P 6 -p1 +%patch7 %build +export CXXFLAGS="%optflags" +export CFLAGS="%optflags" # sendmail's awesome location. export PATH="$PATH:/usr/sbin"; %if 0%{?suse_version} >= 1100 diff --git a/vmime-noansiflag.patch b/vmime-noansiflag.patch new file mode 100644 index 0000000..e78b27c --- /dev/null +++ b/vmime-noansiflag.patch @@ -0,0 +1,51 @@ +--- SConstruct.orig ++++ SConstruct +@@ -595,8 +595,6 @@ env.Append(CPPDEFINES = ['_REENTRANT=1'] + + env.Append(CXXFLAGS = ['-W']) + env.Append(CXXFLAGS = ['-Wall']) +-env.Append(CXXFLAGS = ['-ansi']) +-env.Append(CXXFLAGS = ['-pedantic']) + env.Append(CXXFLAGS = ['-Wpointer-arith']) + env.Append(CXXFLAGS = ['-Wold-style-cast']) + env.Append(CXXFLAGS = ['-Wconversion']) +@@ -609,8 +607,6 @@ env.Append(TARFLAGS = ['--bzip2']) + if env['debug'] == 'yes': + env.Append(CXXFLAGS = ['-g']) + env.Append(CXXFLAGS = ['-O0']) +-else: +- env.Append(CXXFLAGS = ['-O2']) + #-fomit-frame-pointer -fmove-all-movables -fstrict-aliasing + + #env.Append(LIBS = ['additional-lib-here']) +@@ -1299,7 +1295,9 @@ VMIME_ADDITIONAL_PC_LIBS="" + # Check compilers, processors, etc + # + +-AC_PROG_CC ++AC_PROG_CC_STDC ++AC_USE_SYSTEM_EXTENSIONS ++AC_SYS_LARGEFILE + AC_PROG_CXX + AC_PROG_CPP + AC_C_CONST +@@ -1839,8 +1837,8 @@ AC_SUBST(PKGCONFIG_LIBS) + EXTRA_CFLAGS="$EXTRA_CFLAGS -D_REENTRANT=1 -D_THREAD_SAFE=1 $LIBGNUTLS_CFLAGS" + EXTRA_LIBS="$GSASL_LIBS $LIBGNUTLS_LIBS" + +-CFLAGS="" +-CXXFLAGS="" ++CFLAGS+="" ++CXXFLAGS+="" + + # -- Debug + if test x$VMIME_DEBUG = x1 ; then +@@ -1868,7 +1866,7 @@ EXTRA_CFLAGS="$EXTRA_CFLAGS $lt_prog_com + + """) + +- compilerFlags = [ '-ansi', '-pedantic', '-W', '-Wall', '-Wpointer-arith', '-Wold-style-cast', '-Wconversion' ] ++ compilerFlags = [ '-W', '-Wall', '-Wpointer-arith', '-Wold-style-cast', '-Wconversion' ] + + for f in compilerFlags: + configure_in.write('# ' + f + '\n')