commit aa26830cff6f97993fb325fa33677d7f29859795108dfa00281537f0d519e9a6 Author: Stephan Kulow Date: Tue Mar 6 12:38:49 2012 +0000 Accepting request 105595 from devel:libraries:c_c++ MIME message parser OBS-URL: https://build.opensuse.org/request/show/105595 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libvmime?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/libvmime-0.9.1+.tar.bz2 b/libvmime-0.9.1+.tar.bz2 new file mode 100644 index 0000000..21347a0 --- /dev/null +++ b/libvmime-0.9.1+.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2e9c6b31400ac044575a50865893977a46b77415bb9ea45fded7751f9fb34d26 +size 632052 diff --git a/libvmime-libgnutls28.diff b/libvmime-libgnutls28.diff new file mode 100644 index 0000000..e98edd0 --- /dev/null +++ b/libvmime-libgnutls28.diff @@ -0,0 +1,37 @@ +From: Jan Engelhardt +Date: 2011-10-07 00:06:10.890341952 +0200 +Upstream: tbd + +build: resolve build error with libgnutls-3.x + +The gnutls/extra.h include is gone in libgnutls 3.x, and it +does not seem like we need it for libgnutls 2.x anyway, +so just remove it. + +GNUTLS_E_LZO_INIT_FAILED was removed too.. can probably live +without in gnutls2. + +--- + src/net/tls/TLSSession.cpp | 2 -- + 1 file changed, 2 deletions(-) + +Index: vmime/src/net/tls/TLSSession.cpp +=================================================================== +--- vmime.orig/src/net/tls/TLSSession.cpp ++++ vmime/src/net/tls/TLSSession.cpp +@@ -22,7 +22,6 @@ + // + + #include +-#include + + #include "vmime/config.hpp" + +@@ -318,7 +317,6 @@ void TLSSession::throwTLSException(const + ERROR(GNUTLS_E_INIT_LIBEXTRA) + ERROR(GNUTLS_E_LIBRARY_VERSION_MISMATCH) + ERROR(GNUTLS_E_NO_TEMPORARY_RSA_PARAMS) +- ERROR(GNUTLS_E_LZO_INIT_FAILED) + ERROR(GNUTLS_E_NO_COMPRESSION_ALGORITHMS) + ERROR(GNUTLS_E_NO_CIPHER_SUITES) + ERROR(GNUTLS_E_OPENPGP_GETKEY_FAILED) diff --git a/libvmime-nodatetime.diff b/libvmime-nodatetime.diff new file mode 100644 index 0000000..3d2bc92 --- /dev/null +++ b/libvmime-nodatetime.diff @@ -0,0 +1,17 @@ +--- + src/base.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: libvmime-0.9.1/src/base.cpp +=================================================================== +--- libvmime-0.9.1.orig/src/base.cpp ++++ libvmime-0.9.1/src/base.cpp +@@ -74,7 +74,7 @@ const string libname() { return (VMIME_P + * + * @return library version + */ +-const string libversion() { return (VMIME_VERSION " (" __DATE__ " " __TIME__ ")"); } ++const string libversion() { return (VMIME_VERSION " (_""_DATE_""_ causes unnecessary rebuilds - avoid)"); } + + /** Return the library API version (eg: "6:1:6"). + * diff --git a/libvmime-sotag.diff b/libvmime-sotag.diff new file mode 100644 index 0000000..0a303cc --- /dev/null +++ b/libvmime-sotag.diff @@ -0,0 +1,43 @@ +From: Jan Engelhardt +Date: 2011-06-25 23:04 +0200 + +AFAICS, VMIME broke its API between 0.4.x and 0.8.x without updating +soversions, hence no trust that it's right now. Add -release suffix +unconditionally. + +--- + SConstruct | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +Index: vmime/SConstruct +=================================================================== +--- vmime.orig/SConstruct ++++ vmime/SConstruct +@@ -1017,7 +1017,7 @@ vmime_pc.write("Name: " + packageRealNam + vmime_pc.write("Description: " + packageDescription + "\n") + vmime_pc.write("Version: " + packageVersion + "\n") + vmime_pc.write("Requires: " + vmime_pc_requires + "\n") +-vmime_pc.write("Libs: -L${libdir} -l" + packageVersionedGenericName + " " + vmime_pc_libs + "\n") ++vmime_pc.write("Libs: -L${libdir} -l" + packageVersionedGenericName + "-" + str(packageVersion) + " " + vmime_pc_libs + "\n") + #vmime_pc.write("Cflags: -I${includedir}/" + packageVersionedGenericName + "\n") + vmime_pc.write("Cflags: -I${includedir}/" + "\n") + +@@ -1090,7 +1090,7 @@ def generateAutotools(target, source, en + vmime_pc_in.write("Description: " + packageDescription + "\n") + vmime_pc_in.write("Version: @VERSION@\n") + vmime_pc_in.write("Requires: @GSASL_REQUIRED@\n") +- vmime_pc_in.write("Libs: -L${libdir} -l@GENERIC_VERSIONED_LIBRARY_NAME@ @GSASL_LIBS@ @LIBGNUTLS_LIBS@ @LIBICONV@ @PTHREAD_LIBS@ @LIBICONV@ @PTHREAD_LIBS@ @VMIME_ADDITIONAL_PC_LIBS@\n") ++ vmime_pc_in.write("Libs: -L${libdir} -l@GENERIC_VERSIONED_LIBRARY_NAME@-@PACKAGE_VERSION@ @GSASL_LIBS@ @LIBGNUTLS_LIBS@ @LIBICONV@ @PTHREAD_LIBS@ @LIBICONV@ @PTHREAD_LIBS@ @VMIME_ADDITIONAL_PC_LIBS@\n") + #vmime_pc_in.write("Cflags: -I${includedir}/@GENERIC_VERSIONED_LIBRARY_NAME@\n") + vmime_pc_in.write("Cflags: -I${includedir}/ @LIBGNUTLS_CFLAGS@\n") + vmime_pc_in.close() +@@ -1162,8 +1162,7 @@ INCLUDES = -I$(prefix)/include -I$(top_s + + Makefile_am.write('lib_LTLIBRARIES = ' + packageVersionedName + '.la\n') + Makefile_am.write(packageVersionedName + '_la_LDFLAGS = -export-dynamic -version-info ' +-# + '@LIBRARY_VERSION@ -release @LIBRARY_RELEASE@ @PKGCONFIG_LIBS@ @EXTRA_LIBS@\n') +- + '@LIBRARY_VERSION@ @PKGCONFIG_LIBS@ @EXTRA_LIBS@\n') ++ + '@LIBRARY_VERSION@ -release @PACKAGE_VERSION@ @PKGCONFIG_LIBS@ @EXTRA_LIBS@\n') + + sourceFiles = [] # for conversion: subpath/file.cpp --> subpath_file.cpp + # used to avoid collision when two files have the same name if different dirs diff --git a/libvmime.changes b/libvmime.changes new file mode 100644 index 0000000..86b0005 --- /dev/null +++ b/libvmime.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Thu Jun 30 14:59:15 UTC 2011 - jengelh@medozas.de + +- Initial package for build.opensuse.org diff --git a/libvmime.spec b/libvmime.spec new file mode 100644 index 0000000..a0ce03c --- /dev/null +++ b/libvmime.spec @@ -0,0 +1,125 @@ +# +# spec file for package libvmime +# +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +Name: libvmime +%define lname libvmime-0_9_2-0 +Summary: Library for working with MIME messages and IMAP/POP/SMTP +Version: 0.9.2 +Release: 0 +Group: Development/Libraries/C and C++ +URL: http://vmime.sf.net/ +License: GPL-3.0+ + +#Source: http://downloads.sf.net/vmime/%name-%version.tar.bz2 +Source: %name-0.9.1+.tar.bz2 +Source2: spice_source.sh +#Svn-Clone: https://vmime.svn.sourceforge.net/svnroot/vmime +Patch1: libvmime-nodatetime.diff +# PATCH-WORKAROUND-UPSTREAM libvmime-sotag.diff +Patch2: libvmime-sotag.diff +# PATCH-FEATURE-UPSTREAM vmime-0.8.1-charset-catch.diff x -- ZCP team will deal with this in time +Patch3: vmime-0.8.1-charset-catch.diff +# PATCH-FIX-UPSTREAM libvmime-libgnutls28.diff +Patch4: libvmime-libgnutls28.diff +BuildRoot: %_tmppath/%name-%version-build +BuildRequires: autoconf, automake, gcc-c++, libgsasl-devel, libtool +BuildRequires: libgcrypt-devel, pkgconfig, postfix, scons, xz +%if 0%{?suse_version} >= 1100 +BuildRequires: gettext-tools, libgnutls-devel, libselinux-devel +%else +%if 0%{?suse_version} > 0 +BuildRequires: gnutls-devel +%endif +%endif +%if 0%{?fedora_version} > 0 +BuildRequires: gettext, gnutls-devel +%endif + +%description +VMime is a powerful C++ class library for working with MIME messages +and Internet messaging services like IMAP, POP or SMTP. + +With VMime you can parse, generate and modify messages, and also +connect to store and transport services to receive or send messages +over the Internet. The library offers all the features to build a +complete mail client. + +%package -n %lname +Summary: Library for working with MIME messages and IMAP/POP/SMTP +Group: System/Libraries + +%description -n %lname +VMime is a powerful C++ class library for working with MIME messages +and Internet messaging services like IMAP, POP or SMTP. + +With VMime you can parse, generate and modify messages, and also +connect to store and transport services to receive or send messages +over the Internet. The library offers all the features to build a +complete mail client. + +%package devel +Summary: Library for working with MIME messages and IMAP/POP/SMTP +Group: Development/Libraries/C and C++ +Requires: %lname = %version + +%description devel +VMime is a powerful C++ class library for working with MIME messages +and Internet messaging services like IMAP, POP or SMTP. + +With VMime you can parse, generate and modify messages, and also +connect to store and transport services to receive or send messages +over the Internet. The library offers all the features to build a +complete mail client. + +%prep +%setup -qn vmime +%patch -P 1 -P 2 -P 3 -P 4 -p1 + +%build +# sendmail's awesome location. +export PATH="$PATH:/usr/sbin"; +%if 0%{?suse_version} >= 1100 +scons autotools; +# SL10: Rely on scons already having been run before the tarball was made. +%endif +%configure --disable-static +make %{?_smp_mflags}; + +%install +b="%buildroot"; +make install DESTDIR="$b" docdir="%_docdir/%name"; +find "$b" -type f -name "*.la" -delete; + +%check +make check; + +%post -n %lname -p /sbin/ldconfig + +%postun -n %lname -p /sbin/ldconfig + +%files -n %lname +%defattr(-,root,root) +%_libdir/%{name}*.so.* + +%files devel +%defattr(-,root,root) +%doc %_docdir/%name +%_includedir/* +%_libdir/%{name}*.so +%_libdir/pkgconfig/*.pc + +%changelog diff --git a/spice_source.sh b/spice_source.sh new file mode 100644 index 0000000..97d145a --- /dev/null +++ b/spice_source.sh @@ -0,0 +1,11 @@ +#!/bin/sh -ex +# Take an SVN snapshot and produce necessary files to ease +# compilation on irresponsibly old systems. + +pushd vmime/; +scons autotools; +rm -Rf autom4te.cache; +popd; +find vmime -print0 | sort -z | \ + tar -T- --null --no-rec --owner=root --group=root \ + -cjf libvmime-0.9.1+.tar.bz2; diff --git a/vmime-0.8.1-charset-catch.diff b/vmime-0.8.1-charset-catch.diff new file mode 100644 index 0000000..e927b73 --- /dev/null +++ b/vmime-0.8.1-charset-catch.diff @@ -0,0 +1,17 @@ +diff -Nurb libvmime-0.8.1.orig/src/word.cpp libvmime-0.8.1.patched/src/word.cpp +--- libvmime-0.8.1.orig/src/word.cpp 2006-10-02 15:44:00.000000000 +0200 ++++ libvmime-0.8.1.patched/src/word.cpp 2007-12-12 20:26:55.267497149 +0100 +@@ -616,7 +616,13 @@ + { + string out; + ++ try { + charset::convert(m_buffer, out, m_charset, dest); ++ } ++ catch (vmime::exception &e) { ++ // copy 'word' as text ++ out = m_buffer; ++ } + + return (out); + }