SHA256
1
0
forked from pool/libvmime

- Add no-override-cflags.diff

OBS-URL: https://build.opensuse.org/package/show/server:mail/libvmime?expand=0&rev=22
This commit is contained in:
Jan Engelhardt 2018-04-23 08:00:35 +00:00 committed by Git OBS Bridge
parent e6d2787379
commit eb4c66740c
3 changed files with 38 additions and 4 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Apr 23 07:58:00 UTC 2018 - jengelh@inai.de
- Add no-override-cflags.diff so that vmime becomes externally
buildable with other -O/-g levels.
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jul 13 14:11:54 UTC 2017 - jengelh@inai.de Thu Jul 13 14:11:54 UTC 2017 - jengelh@inai.de

View File

@ -1,7 +1,7 @@
# #
# spec file for package libvmime # spec file for package libvmime
# #
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -19,7 +19,7 @@
Name: libvmime Name: libvmime
%define lname libvmime1 %define lname libvmime1
Summary: Library for working with RFC 2822, MIME messages and IMAP/POP/SMTP Summary: Library for working with RFC 2822, MIME messages and IMAP/POP/SMTP
License: GPL-3.0+ License: GPL-3.0-or-later
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Version: 0.9.2 Version: 0.9.2
Release: 0 Release: 0
@ -27,6 +27,7 @@ Url: http://vmime.org/
Source: https://github.com/kisli/vmime/archive/v%version.tar.gz Source: https://github.com/kisli/vmime/archive/v%version.tar.gz
Patch1: libvmime-nodatetime.diff Patch1: libvmime-nodatetime.diff
Patch2: no-override-cflags.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: ImageMagick BuildRequires: ImageMagick
%if 0%{?suse_version} < 1310 %if 0%{?suse_version} < 1310
@ -93,7 +94,7 @@ This subpackage contains the headers for the library's API.
%prep %prep
%setup -qn vmime-%version %setup -qn vmime-%version
%patch -P 1 -p1 %patch -P 1 -P 2 -p1
%build %build
%if 0%{?with_pdf} %if 0%{?with_pdf}
@ -113,7 +114,6 @@ cmake . \
-DVMIME_BUILD_STATIC_LIBRARY:BOOL=OFF \ -DVMIME_BUILD_STATIC_LIBRARY:BOOL=OFF \
-DCMAKE_BUILD_TYPE:STRING="RelWithDebInfo" \ -DCMAKE_BUILD_TYPE:STRING="RelWithDebInfo" \
-DCMAKE_INSTALL_PREFIX:PATH="%_prefix" \ -DCMAKE_INSTALL_PREFIX:PATH="%_prefix" \
-DCMAKE_CXX_FLAGS_DEBUG:STRING="-g" \
%if 0%{?suse_version} >= 1310 %if 0%{?suse_version} >= 1310
-DCMAKE_CXX_FLAGS:STRING="$cf -std=gnu++11" \ -DCMAKE_CXX_FLAGS:STRING="$cf -std=gnu++11" \
%else %else

28
no-override-cflags.diff Normal file
View File

@ -0,0 +1,28 @@
From: Jan Engelhardt <jengelh@inai.de>
Date: 2018-04-23 09:57:31.270364598 +0200
References: https://github.com/kisli/vmime/issues/196
Do not tack on any -O/-g flags at the end of the command line,
as that negates any that we got from %optflags.
---
CMakeLists.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: vmime-0.9.2/CMakeLists.txt
===================================================================
--- vmime-0.9.2.orig/CMakeLists.txt
+++ vmime-0.9.2/CMakeLists.txt
@@ -1050,9 +1050,9 @@ ELSE()
"${CMAKE_CXX_FLAGS} -D_REENTRANT=1 -W -Wall -pedantic -Wpointer-arith -Wold-style-cast -Wconversion -Wcast-align -Wno-long-long"
)
- SET(CMAKE_CXX_FLAGS_RELEASE "-O2")
- SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
- SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
+ SET(CMAKE_CXX_FLAGS_RELEASE "")
+ SET(CMAKE_CXX_FLAGS_DEBUG "")
+ SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "")
#SET(CMAKE_EXE_LINKER_FLAGS "-s")