# HG changeset patch
# User Mark Brand
# Date 1274351603 -7200
# Node ID c439bff8176e6f3826c2d15b7f49e6575efa7757
# Parent 2429543e1aa9bb92503642fbf5e4b05591e0fc9a
fix use of pthreads in package vmime
The configure option "-without-pthread" seems not to work even
if it is listed as a configure option. As long as pthreads is
available, it is detected. This meant that the configuration
of vmime dependend on whether pthreads had already been installed,
even though pthreads was not listed as a dependency.
The solution seems to be to add the missing #include
and allow pthreads to be used.
diff --git a/src/vmime-99999-fix-pthreads.patch b/src/vmime-99999-fix-pthreads.patch
new file mode 100644
--- /dev/null
+++ b/src/vmime-99999-fix-pthreads.patch
@@ -0,0 +1,14 @@
+This file is part of mingw-cross-env.
+See doc/index.html for further information.
+
+diff -urN a/src/net/tls/TLSSession.cpp b/src/net/tls/TLSSession.cpp
+--- a/src/net/tls/TLSSession.cpp 2010-05-20 12:19:24.163128483 +0200
++++ b/src/net/tls/TLSSession.cpp 2010-05-20 12:21:31.979114130 +0200
+@@ -27,6 +27,7 @@
+ #include "vmime/config.hpp"
+
+ #if VMIME_HAVE_PTHREAD
++# include
+ # include
+ # include
+ #endif // VMIME_HAVE_PTHREAD
diff --git a/src/vmime.mk b/src/vmime.mk
--- a/src/vmime.mk
+++ b/src/vmime.mk
@@ -10,7 +10,7 @@
$(PKG)_FILE := libvmime-$($(PKG)_VERSION).tar.bz2
$(PKG)_WEBSITE := http://vmime.sourceforge.net/
$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/vmime/vmime/0.9/$($(PKG)_FILE)
-$(PKG)_DEPS := gcc libiconv gnutls libgsasl
+$(PKG)_DEPS := gcc libiconv gnutls libgsasl pthreads
define $(PKG)_UPDATE
$(call SOURCEFORGE_FILES,http://sourceforge.net/projects/vmime/files/vmime/) | \
@@ -39,8 +39,7 @@
--disable-shared \
--enable-platform-windows \
--disable-rpath \
- --disable-dependency-tracking \
- --without-pthread
+ --disable-dependency-tracking
# Disable VMIME_HAVE_MLANG_H
# We have the header, but there is no implementation for IMultiLanguage in MinGW