[mingw-clucene] Don't use pthreads on win32 even when it is available

Erik van Pienbroek epienbro at fedoraproject.org
Fri May 31 15:29:48 UTC 2013


commit 31dff648b7dc4922e5e6cb626895b6f8e4e4ca07
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date:   Fri May 31 17:29:37 2013 +0200

    Don't use pthreads on win32 even when it is available

 mingw-clucene-dont-use-pthreads-on-win32.patch |   14 ++++++++++++++
 mingw-clucene.spec                             |   11 ++++++++++-
 2 files changed, 24 insertions(+), 1 deletions(-)
---
diff --git a/mingw-clucene-dont-use-pthreads-on-win32.patch b/mingw-clucene-dont-use-pthreads-on-win32.patch
new file mode 100644
index 0000000..71ba0dd
--- /dev/null
+++ b/mingw-clucene-dont-use-pthreads-on-win32.patch
@@ -0,0 +1,14 @@
+--- src/shared/CMakeLists.txt.orig	2013-05-31 17:11:01.425990943 +0200
++++ src/shared/CMakeLists.txt	2013-05-31 17:11:38.683672231 +0200
+@@ -214,9 +214,9 @@
+ IF ( CMAKE_USE_WIN32_THREADS_INIT )
+     SET ( _CL_HAVE_WIN32_THREADS 1 )
+ ENDIF ( CMAKE_USE_WIN32_THREADS_INIT )
+-IF ( CMAKE_USE_PTHREADS_INIT )
++IF ( CMAKE_USE_PTHREADS_INIT AND NOT _CL_HAVE_WIN32_THREADS)
+     SET ( _CL_HAVE_PTHREAD 1 )
+-ENDIF (CMAKE_USE_PTHREADS_INIT)
++ENDIF (CMAKE_USE_PTHREADS_INIT AND NOT _CL_HAVE_WIN32_THREADS)
+ IF ( CMAKE_USE_SPROC_INIT OR CMAKE_HP_PTHREADS_INIT )
+     MESSAGE(FATAL_ERROR "Threads library not implemented")
+ ENDIF( CMAKE_USE_SPROC_INIT OR CMAKE_HP_PTHREADS_INIT )
diff --git a/mingw-clucene.spec b/mingw-clucene.spec
index dd0a6ca..12df6bd 100644
--- a/mingw-clucene.spec
+++ b/mingw-clucene.spec
@@ -5,7 +5,7 @@
 Summary:	MinGW build of a C++ port of Lucene
 Name:		mingw-%{_pkg_name}
 Version:	2.3.3.4
-Release:	6%{?dist}
+Release:	7%{?dist}
 License:	LGPLv2+ or ASL 2.0
 URL:		http://www.sourceforge.net/projects/clucene
 Source0:	http://downloads.sourceforge.net/clucene/clucene-core-%{version}.tar.gz
@@ -31,6 +31,10 @@ Patch50: clucene-core-2.3.3.4-pkgconfig.patch
 Patch51: clucene-core-2.3.3.4-install_contribs_lib.patch  
 Patch52: mingw-clucene-core-2.3.3.4-fix-threads.patch
 
+# Don't try to use pthreads on win32 even when it is available
+# Fixes FTBFS against mingw-winpthreads
+Patch53: mingw-clucene-dont-use-pthreads-on-win32.patch
+
 %description
 CLucene is a C++ port of the popular Apache Lucene search engine
 (http://lucene.apache.org/java). 
@@ -71,6 +75,7 @@ Java version.
 %patch50 -p1 -b .pkgconfig
 %patch51 -p1 -b .install_contribs_lib
 %patch52 -p1 -b .threads
+%patch53 -p0 -b .pthread
 
 rm -rf src/ext/{boost,zlib}
 
@@ -130,6 +135,10 @@ mv $RPM_BUILD_ROOT%{mingw64_libdir}/libclucene-core.dll \
 %{mingw64_includedir}/CLucene.h
 
 %changelog
+* Fri May 31 2013 Erik van Pienbroek <epienbro at fedoraproject.org> - 2.3.3.4-7
+- Don't use pthreads on win32 even when it is available
+  (clucene uses the win32 threading API directly)
+
 * Sun Jan 27 2013 Erik van Pienbroek <epienbro at fedoraproject.org> - 2.3.3.4-6
 - Rebuild against mingw-gcc 4.8 (win64 uses SEH exceptions now)
 


More information about the scm-commits mailing list