summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Horn <niels.horn@gmail.com>2013-04-14 23:15:38 -0500
committerRobby Workman <rworkman@slackbuilds.org>2013-04-15 17:20:37 -0500
commitfaff5338b51a316e34efbdecfb6aeb608213b88f (patch)
tree5ef903146d8c8c07db20227b34c6a4066a619f04
parent30b0fed50d4853361c0d1ac9b4aa38133297fdbe (diff)
downloadslackbuilds-faff5338b51a316e34efbdecfb6aeb608213b88f.tar.gz
libraries/libvmime: Updated for version 0.9.1.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
-rw-r--r--libraries/libvmime/libvmime.SlackBuild30
-rw-r--r--libraries/libvmime/libvmime.info8
-rw-r--r--libraries/libvmime/libvmime_gnutls3.patch148
3 files changed, 177 insertions, 9 deletions
diff --git a/libraries/libvmime/libvmime.SlackBuild b/libraries/libvmime/libvmime.SlackBuild
index 6da988f846..5d897a14ab 100644
--- a/libraries/libvmime/libvmime.SlackBuild
+++ b/libraries/libvmime/libvmime.SlackBuild
@@ -3,11 +3,30 @@
# Slackware build script for libvmime:
# a library for working with MIME messages
-# Written by Niels Horn <niels.horn@gmail.com>
-# revision date 2010/11/20
+# Copyright 2010,2013 Niels Horn, Rio de Janeiro, Brazil
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# revision date 2013/03/31
PRGNAM=libvmime
-VERSION=${VERSION:-20120730_99908ce}
+VERSION=${VERSION:-0.9.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -43,12 +62,13 @@ set -e
rm -rf $TMP/$PRGNAM-$VERSION $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-scons autotools
+# Apply patch for newer gnutls version
+patch -p1 <$CWD/libvmime_gnutls3.patch
EXTRA_CFLAGS=$SLKCFLAGS \
./configure \
diff --git a/libraries/libvmime/libvmime.info b/libraries/libvmime/libvmime.info
index 4f0f05efb1..36003082db 100644
--- a/libraries/libvmime/libvmime.info
+++ b/libraries/libvmime/libvmime.info
@@ -1,10 +1,10 @@
PRGNAM="libvmime"
-VERSION="20120730_99908ce"
+VERSION="0.9.1"
HOMEPAGE="http://www.vmime.org/"
-DOWNLOAD="http://ponce.cc/slackware/sources/repo/libvmime-20120730_99908ce.tar.xz"
-MD5SUM="a9df26735865f4d649859fad0c39497c"
+DOWNLOAD="http://downloads.sourceforge.net/vmime/libvmime-0.9.1.tar.bz2"
+MD5SUM="d5b6de44f7f9ca0e4cefe597d1905605"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="libgsasl scons"
+REQUIRES="libgsasl"
MAINTAINER="Niels Horn"
EMAIL="niels.horn@gmail.com"
diff --git a/libraries/libvmime/libvmime_gnutls3.patch b/libraries/libvmime/libvmime_gnutls3.patch
new file mode 100644
index 0000000000..66ad19cba4
--- /dev/null
+++ b/libraries/libvmime/libvmime_gnutls3.patch
@@ -0,0 +1,148 @@
+--- libvmime-0.9.1/src/net/tls/TLSSession.cpp 2010-08-19 04:44:52.000000000 -0300
++++ libvmime-0.9.1_patched/src/net/tls/TLSSession.cpp 2013-03-31 09:35:30.294331115 -0300
+@@ -22,7 +22,9 @@
+ //
+
+ #include <gnutls/gnutls.h>
++#if GNUTLS_VERSION_NUMBER < 0x030000
+ #include <gnutls/extra.h>
++#endif
+
+ #include "vmime/config.hpp"
+
+@@ -41,6 +41,9 @@
+ //#define GNUTLS_DEBUG 1
+
+
++#include <sstream>
++#include <iomanip>
++
+ #if VMIME_DEBUG && GNUTLS_DEBUG
+ #include <iostream>
+ #endif // VMIME_DEBUG && GNUTLS_DEBUG
+@@ -240,119 +243,14 @@
+
+ void TLSSession::throwTLSException(const string& fname, const int code)
+ {
+- string msg = fname + "() returned ";
+-
+-#define ERROR(x) \
+- case x: msg += #x; break;
+-
+- switch (code)
+- {
+- ERROR(GNUTLS_E_SUCCESS)
+- ERROR(GNUTLS_E_UNKNOWN_COMPRESSION_ALGORITHM)
+- ERROR(GNUTLS_E_UNKNOWN_CIPHER_TYPE)
+- ERROR(GNUTLS_E_LARGE_PACKET)
+- ERROR(GNUTLS_E_UNSUPPORTED_VERSION_PACKET)
+- ERROR(GNUTLS_E_UNEXPECTED_PACKET_LENGTH)
+- ERROR(GNUTLS_E_INVALID_SESSION)
+- ERROR(GNUTLS_E_FATAL_ALERT_RECEIVED)
+- ERROR(GNUTLS_E_UNEXPECTED_PACKET)
+- ERROR(GNUTLS_E_WARNING_ALERT_RECEIVED)
+- ERROR(GNUTLS_E_ERROR_IN_FINISHED_PACKET)
+- ERROR(GNUTLS_E_UNEXPECTED_HANDSHAKE_PACKET)
+- ERROR(GNUTLS_E_UNKNOWN_CIPHER_SUITE)
+- ERROR(GNUTLS_E_UNWANTED_ALGORITHM)
+- ERROR(GNUTLS_E_MPI_SCAN_FAILED)
+- ERROR(GNUTLS_E_DECRYPTION_FAILED)
+- ERROR(GNUTLS_E_MEMORY_ERROR)
+- ERROR(GNUTLS_E_DECOMPRESSION_FAILED)
+- ERROR(GNUTLS_E_COMPRESSION_FAILED)
+- ERROR(GNUTLS_E_AGAIN)
+- ERROR(GNUTLS_E_EXPIRED)
+- ERROR(GNUTLS_E_DB_ERROR)
+- ERROR(GNUTLS_E_SRP_PWD_ERROR)
+- ERROR(GNUTLS_E_INSUFFICIENT_CREDENTIALS)
+- ERROR(GNUTLS_E_HASH_FAILED)
+- ERROR(GNUTLS_E_BASE64_DECODING_ERROR)
+- ERROR(GNUTLS_E_MPI_PRINT_FAILED)
+- ERROR(GNUTLS_E_REHANDSHAKE)
+- ERROR(GNUTLS_E_GOT_APPLICATION_DATA)
+- ERROR(GNUTLS_E_RECORD_LIMIT_REACHED)
+- ERROR(GNUTLS_E_ENCRYPTION_FAILED)
+- ERROR(GNUTLS_E_PK_ENCRYPTION_FAILED)
+- ERROR(GNUTLS_E_PK_DECRYPTION_FAILED)
+- ERROR(GNUTLS_E_PK_SIGN_FAILED)
+- ERROR(GNUTLS_E_X509_UNSUPPORTED_CRITICAL_EXTENSION)
+- ERROR(GNUTLS_E_KEY_USAGE_VIOLATION)
+- ERROR(GNUTLS_E_NO_CERTIFICATE_FOUND)
+- ERROR(GNUTLS_E_INVALID_REQUEST)
+- ERROR(GNUTLS_E_SHORT_MEMORY_BUFFER)
+- ERROR(GNUTLS_E_INTERRUPTED)
+- ERROR(GNUTLS_E_PUSH_ERROR)
+- ERROR(GNUTLS_E_PULL_ERROR)
+- ERROR(GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER)
+- ERROR(GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE)
+- ERROR(GNUTLS_E_PKCS1_WRONG_PAD)
+- ERROR(GNUTLS_E_RECEIVED_ILLEGAL_EXTENSION)
+- ERROR(GNUTLS_E_INTERNAL_ERROR)
+- ERROR(GNUTLS_E_DH_PRIME_UNACCEPTABLE)
+- ERROR(GNUTLS_E_FILE_ERROR)
+- ERROR(GNUTLS_E_TOO_MANY_EMPTY_PACKETS)
+- ERROR(GNUTLS_E_UNKNOWN_PK_ALGORITHM)
+- 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)
+- ERROR(GNUTLS_E_PK_SIG_VERIFY_FAILED)
+- ERROR(GNUTLS_E_ILLEGAL_SRP_USERNAME)
+- ERROR(GNUTLS_E_SRP_PWD_PARSING_ERROR)
+- ERROR(GNUTLS_E_NO_TEMPORARY_DH_PARAMS)
+- ERROR(GNUTLS_E_ASN1_ELEMENT_NOT_FOUND)
+- ERROR(GNUTLS_E_ASN1_IDENTIFIER_NOT_FOUND)
+- ERROR(GNUTLS_E_ASN1_DER_ERROR)
+- ERROR(GNUTLS_E_ASN1_VALUE_NOT_FOUND)
+- ERROR(GNUTLS_E_ASN1_GENERIC_ERROR)
+- ERROR(GNUTLS_E_ASN1_VALUE_NOT_VALID)
+- ERROR(GNUTLS_E_ASN1_TAG_ERROR)
+- ERROR(GNUTLS_E_ASN1_TAG_IMPLICIT)
+- ERROR(GNUTLS_E_ASN1_TYPE_ANY_ERROR)
+- ERROR(GNUTLS_E_ASN1_SYNTAX_ERROR)
+- ERROR(GNUTLS_E_ASN1_DER_OVERFLOW)
+- //ERROR(GNUTLS_E_OPENPGP_TRUSTDB_VERSION_UNSUPPORTED)
+- ERROR(GNUTLS_E_OPENPGP_UID_REVOKED)
+- ERROR(GNUTLS_E_CERTIFICATE_ERROR)
+- //ERROR(GNUTLS_E_X509_CERTIFICATE_ERROR)
+- ERROR(GNUTLS_E_CERTIFICATE_KEY_MISMATCH)
+- ERROR(GNUTLS_E_UNSUPPORTED_CERTIFICATE_TYPE)
+- ERROR(GNUTLS_E_X509_UNKNOWN_SAN)
+- ERROR(GNUTLS_E_OPENPGP_FINGERPRINT_UNSUPPORTED)
+- ERROR(GNUTLS_E_X509_UNSUPPORTED_ATTRIBUTE)
+- ERROR(GNUTLS_E_UNKNOWN_HASH_ALGORITHM)
+- ERROR(GNUTLS_E_UNKNOWN_PKCS_CONTENT_TYPE)
+- ERROR(GNUTLS_E_UNKNOWN_PKCS_BAG_TYPE)
+- ERROR(GNUTLS_E_INVALID_PASSWORD)
+- ERROR(GNUTLS_E_MAC_VERIFY_FAILED)
+- ERROR(GNUTLS_E_CONSTRAINT_ERROR)
+- ERROR(GNUTLS_E_BASE64_ENCODING_ERROR)
+- ERROR(GNUTLS_E_INCOMPATIBLE_GCRYPT_LIBRARY)
+- //ERROR(GNUTLS_E_INCOMPATIBLE_CRYPTO_LIBRARY)
+- ERROR(GNUTLS_E_INCOMPATIBLE_LIBTASN1_LIBRARY)
+- ERROR(GNUTLS_E_OPENPGP_KEYRING_ERROR)
+- ERROR(GNUTLS_E_X509_UNSUPPORTED_OID)
+- //ERROR(GNUTLS_E_RANDOM_FAILED)
+- ERROR(GNUTLS_E_UNIMPLEMENTED_FEATURE)
+-
+- default:
+-
+- msg += "unknown error";
+- break;
+- }
++ std::ostringstream msg;
+
+-#undef ERROR
++ msg << fname + "() returned code ";
++ msg << std::hex << code;
++ msg << ": ";
++ msg << gnutls_strerror(code);
+
+- throw exceptions::tls_exception(msg);
++ throw exceptions::tls_exception(msg.str());
+ }
+
+