kalev pushed to mingw-clucene (f22). "Fix FTBFS against recent mingw-w64 (conflicting beginthread declaration)"

notifications at fedoraproject.org notifications at fedoraproject.org
Sat Apr 11 17:36:06 UTC 2015


>From 6a895933e12ea72d9c38a7034f08f13c4fb49379 Mon Sep 17 00:00:00 2001
From: Erik van Pienbroek <epienbro at fedoraproject.org>
Date: Fri, 30 Jan 2015 23:28:13 +0100
Subject: Fix FTBFS against recent mingw-w64 (conflicting beginthread
 declaration)


diff --git a/clucene-remove-beginthread-declaration.patch b/clucene-remove-beginthread-declaration.patch
new file mode 100644
index 0000000..a6600b4
--- /dev/null
+++ b/clucene-remove-beginthread-declaration.patch
@@ -0,0 +1,22 @@
+--- src/shared/CLucene/config/_threads.h.orig	2015-01-30 23:11:30.364569769 +0100
++++ src/shared/CLucene/config/_threads.h	2015-01-30 23:12:06.368149959 +0100
+@@ -52,7 +52,6 @@
+ 			  bool bManualReset, bool bInitialState, char* lpName );
+ 		  __declspec(dllimport) bool __stdcall SetEvent(void* hEvent);
+ 		  __declspec(dllimport) bool __stdcall CloseHandle(void* hObject);
+-		  void* _beginthread( void( __stdcall *start_address )( void * ), unsigned stack_size, void *arglist );
+       }
+       #endif //_WINBASE_
+ 	#elif defined(_CL_HAVE_PTHREAD)
+--- src/shared/CLucene/LuceneThreads.h.orig	2011-03-17 01:21:07.000000000 +0100
++++ src/shared/CLucene/LuceneThreads.h	2015-01-30 23:24:05.775743669 +0100
+@@ -109,7 +112,7 @@
+           #define _LUCENE_ATOMIC_INT_SET(x,v) x=v
+           #define _LUCENE_ATOMIC_INT_GET(x) x
+ 
+-          typedef void (__stdcall luceneThreadStartRoutine)(void* lpThreadParameter );
++          typedef void (__cdecl luceneThreadStartRoutine)(void* lpThreadParameter );
+           class CLUCENE_SHARED_EXPORT mutex_thread
+         	{
+         	private:
+
diff --git a/mingw-clucene.spec b/mingw-clucene.spec
index b0a75c3..2820c62 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:	10%{?dist}
+Release:	11%{?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
@@ -35,6 +35,10 @@ Patch52: mingw-clucene-core-2.3.3.4-fix-threads.patch
 # Fixes FTBFS against mingw-winpthreads
 Patch53: mingw-clucene-dont-use-pthreads-on-win32.patch
 
+# Don't try to declare beginthread as it is already part of the mingw-w64 headers
+Patch54: clucene-remove-beginthread-declaration.patch
+
+
 %description
 CLucene is a C++ port of the popular Apache Lucene search engine
 (http://lucene.apache.org/java). 
@@ -76,6 +80,7 @@ Java version.
 %patch51 -p1 -b .install_contribs_lib
 %patch52 -p1 -b .threads
 %patch53 -p0 -b .pthread
+%patch54 -p0 -b .beginthread
 
 rm -rf src/ext/{boost,zlib}
 
@@ -135,6 +140,9 @@ mv $RPM_BUILD_ROOT%{mingw64_libdir}/libclucene-core.dll \
 %{mingw64_includedir}/CLucene.h
 
 %changelog
+* Fri Jan 30 2015 Erik van Pienbroek <epienbro at fedoraproject.org> - 2.3.3.4-11
+- Fix FTBFS against recent mingw-w64 (conflicting _beginthread declaration)
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.3.3.4-10
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/mingw-clucene.git/commit/?h=f22&id=6a895933e12ea72d9c38a7034f08f13c4fb49379


More information about the scm-commits mailing list