From eb4c66740cbbbda5daf169d90cb3273b0cac7b1bbd066c51e7ba8541fdce4ded Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 23 Apr 2018 08:00:35 +0000 Subject: [PATCH 1/4] - Add no-override-cflags.diff OBS-URL: https://build.opensuse.org/package/show/server:mail/libvmime?expand=0&rev=22 --- libvmime.changes | 6 ++++++ libvmime.spec | 8 ++++---- no-override-cflags.diff | 28 ++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 no-override-cflags.diff diff --git a/libvmime.changes b/libvmime.changes index 43b6ddf..4bf0c39 100644 --- a/libvmime.changes +++ b/libvmime.changes @@ -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 diff --git a/libvmime.spec b/libvmime.spec index bad2526..eee0353 100644 --- a/libvmime.spec +++ b/libvmime.spec @@ -1,7 +1,7 @@ # # 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 # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ Name: libvmime %define lname libvmime1 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++ Version: 0.9.2 Release: 0 @@ -27,6 +27,7 @@ Url: http://vmime.org/ Source: https://github.com/kisli/vmime/archive/v%version.tar.gz Patch1: libvmime-nodatetime.diff +Patch2: no-override-cflags.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: ImageMagick %if 0%{?suse_version} < 1310 @@ -93,7 +94,7 @@ This subpackage contains the headers for the library's API. %prep %setup -qn vmime-%version -%patch -P 1 -p1 +%patch -P 1 -P 2 -p1 %build %if 0%{?with_pdf} @@ -113,7 +114,6 @@ cmake . \ -DVMIME_BUILD_STATIC_LIBRARY:BOOL=OFF \ -DCMAKE_BUILD_TYPE:STRING="RelWithDebInfo" \ -DCMAKE_INSTALL_PREFIX:PATH="%_prefix" \ - -DCMAKE_CXX_FLAGS_DEBUG:STRING="-g" \ %if 0%{?suse_version} >= 1310 -DCMAKE_CXX_FLAGS:STRING="$cf -std=gnu++11" \ %else diff --git a/no-override-cflags.diff b/no-override-cflags.diff new file mode 100644 index 0000000..1d08279 --- /dev/null +++ b/no-override-cflags.diff @@ -0,0 +1,28 @@ +From: Jan Engelhardt +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") + From 97dc3e0d8745a2819fd3d5281b96b39729e123a8efed447bbd6cc1d7221b6abd Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 25 Jun 2018 12:27:33 +0000 Subject: [PATCH 2/4] - Update to new git snapshot v0.9.2-50-ga9b8221 OBS-URL: https://build.opensuse.org/package/show/server:mail/libvmime?expand=0&rev=23 --- _service | 14 ++++++++++++++ libvmime.changes | 11 +++++++++++ libvmime.spec | 27 +++++++++++++++------------ no-override-cflags.diff | 28 ---------------------------- v0.9.2.tar.gz | 3 --- vmime-0.9.2.50.tar.xz | 3 +++ 6 files changed, 43 insertions(+), 43 deletions(-) create mode 100644 _service delete mode 100644 no-override-cflags.diff delete mode 100644 v0.9.2.tar.gz create mode 100644 vmime-0.9.2.50.tar.xz diff --git a/_service b/_service new file mode 100644 index 0000000..f982a3e --- /dev/null +++ b/_service @@ -0,0 +1,14 @@ + + + git + https://github.com/kisli/vmime + a9b822140bf8926620fd21b880893d4c214dd8c0 + v0.9.2 + 0.9.2.@TAG_OFFSET@ + + + *.tar + xz + + + diff --git a/libvmime.changes b/libvmime.changes index 4bf0c39..6bcd7c4 100644 --- a/libvmime.changes +++ b/libvmime.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Mon Jun 25 12:21:09 UTC 2018 - jengelh@inai.de + +- Update to new git snapshot v0.9.2-50-ga9b8221 + * Dropped support for boost::shared_ptr<>, enabled exclusive + C++11 use of std::shared_ptr. + * Handle parsing of (RFC-nonconforming) address lines containing + bare at signs, like "a@b.c " or + "=?UTF-8?Q?a=c2=a0recipient_=28foo@bar.com=29?= ". + * Add SMTPS with AUTH PLAIN without SASL. + ------------------------------------------------------------------- Mon Apr 23 07:58:00 UTC 2018 - jengelh@inai.de diff --git a/libvmime.spec b/libvmime.spec index eee0353..47878b9 100644 --- a/libvmime.spec +++ b/libvmime.spec @@ -21,13 +21,13 @@ Name: libvmime Summary: Library for working with RFC 2822, MIME messages and IMAP/POP/SMTP License: GPL-3.0-or-later Group: Development/Libraries/C and C++ -Version: 0.9.2 +Version: 0.9.2.50 Release: 0 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 +Source: vmime-%version.tar.xz Patch1: libvmime-nodatetime.diff -Patch2: no-override-cflags.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: ImageMagick %if 0%{?suse_version} < 1310 @@ -94,7 +94,7 @@ This subpackage contains the headers for the library's API. %prep %setup -qn vmime-%version -%patch -P 1 -P 2 -p1 +%patch -P 1 -p1 %build %if 0%{?with_pdf} @@ -104,7 +104,7 @@ popd %endif cf="%optflags -DVMIME_ALWAYS_GENERATE_7BIT_PARAMETER=1" -cmake . \ +%cmake \ -DVMIME_SENDMAIL_PATH:STRING="%_sbindir/sendmail" \ -DVMIME_BUILD_SAMPLES:BOOL=OFF \ %if 0%{?sle_version} @@ -113,12 +113,7 @@ cmake . \ -DVMIME_HAVE_TLS_SUPPORT:BOOL=ON \ -DVMIME_BUILD_STATIC_LIBRARY:BOOL=OFF \ -DCMAKE_BUILD_TYPE:STRING="RelWithDebInfo" \ - -DCMAKE_INSTALL_PREFIX:PATH="%_prefix" \ -%if 0%{?suse_version} >= 1310 - -DCMAKE_CXX_FLAGS:STRING="$cf -std=gnu++11" \ -%else - -DCMAKE_CXX_FLAGS:STRING="$cf -std=gnu++0x" \ -%endif + -DCMAKE_CXX_FLAGS:STRING="$cf" \ -DCMAKE_C_FLAGS:STRING="$cf" make %{?_smp_mflags} VERBOSE=1 @@ -128,8 +123,15 @@ b="%buildroot" mkdir -p "$b/%_docdir/%name" cp -a doc/book/book.pdf "$b/%_docdir/%name/" %endif -make install DESTDIR="$b" +%cmake_install + +# https://github.com/kisli/vmime/issues/200 +mv "$b/usr/%_libdir" "$b/usr/" +mv "$b/usr/cmake" "$b/%_datadir/" + find "$b" -type f -name "*.la" -delete +# Bump number a bit, for Kopano Core +perl -i -pe 's{Version:.*}{Version: %version}' "$b/%_libdir/pkgconfig/vmime.pc" %post -n %lname -p /sbin/ldconfig %postun -n %lname -p /sbin/ldconfig @@ -144,6 +146,7 @@ find "$b" -type f -name "*.la" -delete %_includedir/vmime %_libdir/libvmime.so %_libdir/pkgconfig/*.pc +%_datadir/cmake/ %if 0%{?with_pdf} %_docdir/%name %endif diff --git a/no-override-cflags.diff b/no-override-cflags.diff deleted file mode 100644 index 1d08279..0000000 --- a/no-override-cflags.diff +++ /dev/null @@ -1,28 +0,0 @@ -From: Jan Engelhardt -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") - diff --git a/v0.9.2.tar.gz b/v0.9.2.tar.gz deleted file mode 100644 index b8148b9..0000000 --- a/v0.9.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9874bf911a7dbc257297ab00f7541875da221ee8251a4218cc65abff6e362399 -size 528830 diff --git a/vmime-0.9.2.50.tar.xz b/vmime-0.9.2.50.tar.xz new file mode 100644 index 0000000..d45820a --- /dev/null +++ b/vmime-0.9.2.50.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:067a281760b5172e79ea42961650555684ad88afaf5cfe2fe2c58618b025a774 +size 379376 From 473c7b12bd109841766912a486824ec0a9e80ca5b7e6d3e7c2cd390120bd644b Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 25 Jun 2018 13:16:01 +0000 Subject: [PATCH 3/4] fix duplicate cflag emission OBS-URL: https://build.opensuse.org/package/show/server:mail/libvmime?expand=0&rev=24 --- libvmime.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libvmime.spec b/libvmime.spec index 47878b9..8421eef 100644 --- a/libvmime.spec +++ b/libvmime.spec @@ -113,8 +113,10 @@ cf="%optflags -DVMIME_ALWAYS_GENERATE_7BIT_PARAMETER=1" -DVMIME_HAVE_TLS_SUPPORT:BOOL=ON \ -DVMIME_BUILD_STATIC_LIBRARY:BOOL=OFF \ -DCMAKE_BUILD_TYPE:STRING="RelWithDebInfo" \ - -DCMAKE_CXX_FLAGS:STRING="$cf" \ - -DCMAKE_C_FLAGS:STRING="$cf" + -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="$cf" \ + -DCMAKE_CXX_FLAGS:STRING=" " \ + -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING="$cf" \ + -DCMAKE_C_FLAGS:STRING=" " make %{?_smp_mflags} VERBOSE=1 %install From 83f079356561b17024846bae4090aa463f01f682c5552f7721a94eb2d418d1eb Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 27 Jun 2018 13:07:48 +0000 Subject: [PATCH 4/4] don't need bumping, KC uses a runtime check now OBS-URL: https://build.opensuse.org/package/show/server:mail/libvmime?expand=0&rev=25 --- libvmime.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/libvmime.spec b/libvmime.spec index 8421eef..8a0b278 100644 --- a/libvmime.spec +++ b/libvmime.spec @@ -132,8 +132,6 @@ mv "$b/usr/%_libdir" "$b/usr/" mv "$b/usr/cmake" "$b/%_datadir/" find "$b" -type f -name "*.la" -delete -# Bump number a bit, for Kopano Core -perl -i -pe 's{Version:.*}{Version: %version}' "$b/%_libdir/pkgconfig/vmime.pc" %post -n %lname -p /sbin/ldconfig %postun -n %lname -p /sbin/ldconfig