SHA256
1
0
forked from pool/libvmime

Accepting request 162613 from devel:libraries:c_c++

Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/162613
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libvmime?expand=0&rev=8
This commit is contained in:
Stephan Kulow 2013-04-08 12:53:19 +00:00 committed by Git OBS Bridge
parent f1380c6756
commit ca87dda8f3
13 changed files with 126 additions and 272 deletions

BIN
libvmime-0.9.1+git175.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

BIN
libvmime-0.9.1+svn603.tar.bz2 (Stored with Git LFS)

Binary file not shown.

View File

@ -1,12 +1,17 @@
From 6908ad636e59339b9042205e6fd22444f45a7529 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Wed, 27 Mar 2013 17:52:26 +0100
Subject: [PATCH] src: avoid __DATE__ and __TIME__
--- ---
src/base.cpp | 2 +- src/base.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
Index: libvmime-0.9.1/src/base.cpp diff --git a/src/base.cpp b/src/base.cpp
=================================================================== index d5f3e78..74bbba7 100644
--- libvmime-0.9.1.orig/src/base.cpp --- a/src/base.cpp
+++ libvmime-0.9.1/src/base.cpp +++ b/src/base.cpp
@@ -74,7 +74,7 @@ const string libname() { return (VMIME_P @@ -75,7 +75,7 @@ const string libname() { return (VMIME_PACKAGE); }
* *
* @return library version * @return library version
*/ */
@ -15,3 +20,6 @@ Index: libvmime-0.9.1/src/base.cpp
/** Return the library API version (eg: "6:1:6"). /** Return the library API version (eg: "6:1:6").
* *
--
1.8.1.4

View File

@ -1,43 +1,38 @@
From: Jan Engelhardt <jengelh@medozas.de> From 24449ea8c7eca61c08b955c95ea7c5295a2a2bde Mon Sep 17 00:00:00 2001
Date: 2011-06-25 23:04 +0200 From: Jan Engelhardt <jengelh@inai.de>
Date: Wed, 27 Mar 2013 17:50:08 +0100
Subject: [PATCH] build:
AFAICS, VMIME broke its API between 0.4.x and 0.8.x without updating 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 soversions, hence no trust that it is correct now. Add some suffix
unconditionally. that is unique within our distro and distinguishes itself from
upstream.
--- ---
SConstruct | 7 +++---- CMakeLists.txt | 4 ++--
1 file changed, 3 insertions(+), 4 deletions(-) 1 file changed, 2 insertions(+), 2 deletions(-)
Index: vmime/SConstruct diff --git a/CMakeLists.txt b/CMakeLists.txt
=================================================================== index 1c45d89..9760e13 100644
--- vmime.orig/SConstruct --- a/CMakeLists.txt
+++ vmime/SConstruct +++ b/CMakeLists.txt
@@ -1017,7 +1017,7 @@ vmime_pc.write("Name: " + packageRealNam @@ -50,7 +50,7 @@ SET(VMIME_VERSION_MICRO 2)
vmime_pc.write("Description: " + packageDescription + "\n") # . Interfaces added/removed/changed: CURRENT++, REVISION=0
vmime_pc.write("Version: " + packageVersion + "\n") # . Interfaces added (upward-compatible changes): AGE++
vmime_pc.write("Requires: " + vmime_pc_requires + "\n") # . Interfaces removed: AGE=0
-vmime_pc.write("Libs: -L${libdir} -l" + packageVersionedGenericName + " " + vmime_pc_libs + "\n") -SET(VMIME_API_VERSION_CURRENT 0)
+vmime_pc.write("Libs: -L${libdir} -l" + packageVersionedGenericName + "-" + str(packageVersion) + " " + vmime_pc_libs + "\n") +SET(VMIME_API_VERSION_CURRENT 1)
#vmime_pc.write("Cflags: -I${includedir}/" + packageVersionedGenericName + "\n") SET(VMIME_API_VERSION_REVISION 0)
vmime_pc.write("Cflags: -I${includedir}/" + "\n") SET(VMIME_API_VERSION_AGE 0)
@@ -1090,7 +1090,7 @@ def generateAutotools(target, source, en @@ -63,7 +63,7 @@ SET(VMIME_API_VERSION ${VMIME_API_VERSION_CURRENT}.${VMIME_API_VERSION_REVISION}
vmime_pc_in.write("Description: " + packageDescription + "\n") # VMime Library
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') # Set base name
Makefile_am.write(packageVersionedName + '_la_LDFLAGS = -export-dynamic -version-info ' -SET(VMIME_LIBRARY_NAME vmime)
-# + '@LIBRARY_VERSION@ -release @LIBRARY_RELEASE@ @PKGCONFIG_LIBS@ @EXTRA_LIBS@\n') +SET(VMIME_LIBRARY_NAME vmime-0.9.2)
- + '@LIBRARY_VERSION@ @PKGCONFIG_LIBS@ @EXTRA_LIBS@\n')
+ + '@LIBRARY_VERSION@ -release @PACKAGE_VERSION@ @PKGCONFIG_LIBS@ @EXTRA_LIBS@\n') # Source files
FILE(
--
1.8.1.4
sourceFiles = [] # for conversion: subpath/file.cpp --> subpath_file.cpp
# used to avoid collision when two files have the same name if different dirs

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Wed Mar 27 18:26:20 UTC 2013 - jengelh@inai.de
- Update to new git snapshot (54b5fe13f7e7cb6c4f63884e91ff472b42b63147)
- Removed because merged: vmime-0.8.1-charset-catch.diff,
vmime-mixed-qp-in-parameter.diff, vmime-0.9.2-qp-in-buffers.diff
- Removed because they no longer apply: vmime-automake1_13.diff,
vmime-noansiflag.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Mar 3 19:47:40 UTC 2013 - jengelh@inai.de Sun Mar 3 19:47:40 UTC 2013 - jengelh@inai.de

View File

@ -17,50 +17,53 @@
Name: libvmime Name: libvmime
%define lname libvmime-0_9_2-0 %define lname libvmime-0_9_2-1
Summary: Library for working with MIME messages and IMAP/POP/SMTP Summary: Library for working with MIME messages and IMAP/POP/SMTP
License: GPL-3.0+ License: GPL-3.0+
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Version: 0.9.2 Version: 0.9.2
Release: 0 Release: 0
Url: http://vmime.sf.net/ Url: http://vmime.org/
#Svn-Clone: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk #Svn-Clone: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk
#Source: http://downloads.sf.net/vmime/%name-%version.tar.bz2 #Source: http://downloads.sf.net/vmime/%name-%version.tar.bz2
Source: %name-0.9.1+svn603.tar.bz2 Source: %name-0.9.1+git175.tar.xz
Source2: spice_source.sh
Patch1: libvmime-nodatetime.diff Patch1: libvmime-nodatetime.diff
# PATCH-WORKAROUND-UPSTREAM libvmime-sotag.diff
Patch2: 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.9.2-header-value-on-next-line.diff
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
Patch8: vmime-automake1_13.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf BuildRequires: ImageMagick
BuildRequires: automake BuildRequires: cmake >= 2.8.3
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: libgcrypt-devel BuildRequires: inkscape
BuildRequires: libgsasl-devel BuildRequires: libgsasl-devel
BuildRequires: libtool
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: postfix BuildRequires: postfix
BuildRequires: scons %if 0%{?suse_version} >= 1130 && "%_repository" != "devel:libraries:c_c++"
# Cannot realistically build because of all the new libs this prj has
# Nothing provides libzzip-0-13 required by texlive
# Nothing provides libMagick++.so.5 required by Inkscape
%define with_pdf 1
BuildRequires: texlive-bin-latex
BuildRequires: texlive-latex
%if 0%{?suse_version} >= 1230
BuildRequires: texlive-metafont-bin
BuildRequires: tex(8r.enc)
BuildRequires: tex(courier.sty)
BuildRequires: tex(fancyheadings.sty)
BuildRequires: tex(pcrr7t.tfm)
BuildRequires: tex(ucs.sty)
%endif
%endif
BuildRequires: xz BuildRequires: xz
%if 0%{?suse_version} >= 1100 %if 0%{?suse_version} >= 1100
BuildRequires: gettext-tools
BuildRequires: libgnutls-devel BuildRequires: libgnutls-devel
BuildRequires: libselinux-devel
%else %else
%if 0%{?suse_version} > 0 %if 0%{?suse_version}
BuildRequires: gnutls-devel BuildRequires: gnutls-devel
%endif %endif
%endif %endif
%if 0%{?fedora_version} > 0 || 0%{?redhat_version} || 0%{?centos_version} %if 0%{?fedora_version} || 0%{?redhat_version} || 0%{?centos_version}
BuildRequires: gettext
BuildRequires: gnutls-devel BuildRequires: gnutls-devel
%endif %endif
@ -102,42 +105,50 @@ complete mail client.
%prep %prep
%setup -qn vmime %setup -qn vmime
%patch -P 1 -P 2 -P 3 -P 4 -P 5 -P 6 -P 7 -P 8 -p1 %patch -P 1 -P 2 -P 3 -p1
%build %build
export CFLAGS="%optflags -DVMIME_ALWAYS_GENERATE_7BIT_PARAMETER=1"; %if 0%{?with_pdf}
export CXXFLAGS="$CFLAGS"; pushd doc/book/
make book_pdf
popd
%endif
cf="%optflags -DVMIME_ALWAYS_GENERATE_7BIT_PARAMETER=1"
# sendmail's awesome location. # sendmail's awesome location.
export PATH="$PATH:/usr/sbin"; export PATH="$PATH:/usr/sbin";
%if 0%{?suse_version} >= 1100 || 0%{?!suse_version} cmake . \
scons autotools; -DVMIME_BUILD_STATIC_LIBRARY:BOOL=OFF \
# SL10 and other too old distros: -DCMAKE_RELEASE_TYPE:STRING="Release" \
# Rely on scons already having been run before the tarball was made. -DCMAKE_INSTALL_PREFIX:PATH="%_prefix" \
%endif -DCMAKE_C_FLAGS:STRING="$cf" -DCMAKE_CXX_FLAGS:STRING="$cf"
%configure --disable-static make %{?_smp_mflags} VERBOSE=1
make %{?_smp_mflags};
%install %install
b="%buildroot"; b="%buildroot";
make install DESTDIR="$b" docdir="%_docdir/%name"; %if 0%{?with_pdf}
mkdir -p "$b/%_docdir/%name"
cp -a doc/book/book.pdf "$b/%_docdir/%name/"
%endif
make install DESTDIR="$b"
ln -s libvmime-%version.so "$b/%_libdir/libvmime.so"
find "$b" -type f -name "*.la" -delete; find "$b" -type f -name "*.la" -delete;
%check
make check;
%post -n %lname -p /sbin/ldconfig %post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig %postun -n %lname -p /sbin/ldconfig
%files -n %lname %files -n %lname
%defattr(-,root,root) %defattr(-,root,root)
%_libdir/%{name}*.so.* %_libdir/%name-%version.so.1*
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%doc %_docdir/%name %_includedir/vmime
%_includedir/* %_libdir/libvmime-%version.so
%_libdir/%{name}*.so %_libdir/libvmime.so
%_libdir/pkgconfig/*.pc %_libdir/pkgconfig/*.pc
%if 0%{?with_pdf}
%_docdir/%name
%endif
%changelog %changelog

View File

@ -1,11 +0,0 @@
#!/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;

View File

@ -1,17 +0,0 @@
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);
}

View File

@ -1,7 +1,12 @@
diff -Nurb libvmime-0.9.2.orig/src/headerField.cpp libvmime-0.9.2.patched/src/headerField.cpp ---
--- libvmime-0.9.2.orig/src/headerField.cpp 2010-05-20 05:33:45.000000000 -0700 src/headerField.cpp | 16 +---------------
+++ libvmime-0.9.2.patched/src/headerField.cpp 2011-08-29 12:10:08.438497914 -0700 1 file changed, 1 insertion(+), 15 deletions(-)
@@ -157,14 +157,12 @@
diff --git a/src/headerField.cpp b/src/headerField.cpp
index 1d33dac..ec575dc 100644
--- a/src/headerField.cpp
+++ b/src/headerField.cpp
@@ -160,16 +160,14 @@ ref <headerField> headerField::parseNext
{ {
contentsEnd = pos; contentsEnd = pos;
pos += 2; pos += 2;
@ -12,19 +17,14 @@ diff -Nurb libvmime-0.9.2.orig/src/headerField.cpp libvmime-0.9.2.patched/src/he
contentsEnd = pos; contentsEnd = pos;
++pos; ++pos;
- break; - break;
- }
+ } else {
while (pos < end)
{
@@ -186,24 +184,13 @@
++pos;
} }
+ }
// Handle the case of folded lines - while (pos < end)
if (buffer[pos] == ' ' || buffer[pos] == '\t') + else while (pos < end)
{
c = buffer[pos];
@@ -195,18 +193,6 @@ ref <headerField> headerField::parseNext
{ {
// This is a folding white-space: we keep it as is and // This is a folding white-space: we keep it as is and
// we continue with contents parsing... // we continue with contents parsing...
@ -43,3 +43,4 @@ diff -Nurb libvmime-0.9.2.orig/src/headerField.cpp libvmime-0.9.2.patched/src/he
} }
else else
{ {
--

View File

@ -1,16 +0,0 @@
--- svn/src/wordEncoder.cpp (revision 603)
+++ svn/src/wordEncoder.cpp (working copy)
@@ -239,6 +239,13 @@
if (buffer.find_first_of("\n\r") != string::npos)
return true;
+ // If the string contains a QP string, we need to encode this.
+ // Not a 100% check, but we'd only get more encoded strings.
+ std::string::size_type pos = buffer.find("=?");
+ std::string::size_type end = buffer.find("?=");
+ if (pos != string::npos && end != string::npos && end > pos)
+ return true;
+
return false;
}

View File

@ -1,41 +0,0 @@
From: Jan Engelhardt <jengelh@inai.de>
Date: 2013-03-03 20:43:59.641072360 +0100
AM_INIT_AUTOMAKE takes one argument.
AM_CONFIG_HEADERS is obsolete.
---
Makefile.am | 3 ---
configure.in | 4 ++--
2 files changed, 2 insertions(+), 5 deletions(-)
Index: vmime/Makefile.am
===================================================================
--- vmime.orig/Makefile.am
+++ vmime/Makefile.am
@@ -10,9 +10,6 @@ SUBDIRS = src $(INCLUDE) $(BINDING)
DIST_SUBDIRS = $(SUBDIRS) autotools
-#AUTOMAKE_OPTIONS = dist-bzip2
-AUTOMAKE_OPTIONS = no-dist
-
pkgconfigdir = $(VMIME_PKGCONFIGDIR)
pkgconfig_DATA = $(GENERIC_VERSIONED_LIBRARY_NAME).pc
Index: vmime/configure.in
===================================================================
--- vmime.orig/configure.in
+++ vmime/configure.in
@@ -36,9 +36,9 @@ AC_SUBST(LIBRARY_RELEASE)
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
-AM_INIT_AUTOMAKE(vmime, 0.9.2)
+AM_INIT_AUTOMAKE([no-dist])
AC_CONFIG_SRCDIR([src/base.cpp])
-AM_CONFIG_HEADER([config.h])
+AC_CONFIG_HEADERS([config.h])
AM_MAINTAINER_MODE

View File

@ -1,28 +0,0 @@
Index: svn/src/parameter.cpp
===================================================================
--- svn/src/parameter.cpp (revision 597)
+++ svn/src/parameter.cpp (working copy)
@@ -239,8 +239,21 @@
{
value << t.getWholeBuffer();
- if (!foundCharsetChunk)
- ch = t.getWordAt(0)->getCharset();
+ if (!foundCharsetChunk) {
+ // this is still wrong. each word can have it's
+ // own charset, and can be mixed (eg. iso-8859-1
+ // and iso-2022-jp), but very unlikely.
+ // real fix is to have parameters store a
+ // vmime::text in stead of a vmime::word in
+ // m_value. but that changes the interface
+ for (size_t i = 0; i < t.getWordCount(); i++) {
+ if (t.getWordAt(i)->getCharset() != ch && ch == charsets::US_ASCII) {
+ ch = t.getWordAt(i)->getCharset();
+ break;
+ }
+ }
+
+ }
}
}
}

View File

@ -1,57 +0,0 @@
---
SConstruct | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
Index: vmime/SConstruct
===================================================================
--- vmime.orig/SConstruct
+++ vmime/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')