commit 4bb26ada5bf42e9604090f2046a28f6dbd89b54c Author: Erik van Pienbroek epienbro@fedoraproject.org Date: Sun May 26 21:41:30 2013 +0200
Don't try to link against pthreads even if it is available on win32
sqlite uses the native win32 threading API already
mingw-sqlite.spec | 22 ++++++++- sqlite-dont-search-for-pthreads-on-non-unix.patch | 54 +++++++++++++++++++++ 2 files changed, 74 insertions(+), 2 deletions(-) --- diff --git a/mingw-sqlite.spec b/mingw-sqlite.spec index fcb223a..2b5307a 100644 --- a/mingw-sqlite.spec +++ b/mingw-sqlite.spec @@ -11,7 +11,7 @@
Name: mingw-%{name1} Version: %{rpmver} -Release: 1%{?dist} +Release: 2%{?dist} Summary: MinGW Windows port of sqlite embeddable SQL database engine
License: Public Domain @@ -24,6 +24,9 @@ BuildArch: noarch # Patches for MinGW port. Patch1000: mingw32-sqlite-3.7.9-no-undefined.patch
+# Don't try to link against pthreads even if it is available +Patch1001: sqlite-dont-search-for-pthreads-on-non-unix.patch + BuildRequires: mingw32-filesystem >= 95 BuildRequires: mingw32-gcc BuildRequires: mingw32-binutils @@ -38,6 +41,9 @@ BuildRequires: mingw64-pdcurses BuildRequires: mingw64-readline BuildRequires: mingw64-termcap
+# For the pthread patch +BuildRequires: autoconf automake libtool + BuildRequires: /usr/bin/tclsh
%if %{with tcl} @@ -131,6 +137,9 @@ This package contains static cross-compiled library
%prep %setup -q -n %{name1}-src-%{realver} +%patch1001 -p0 +autoreconf -i --force + %patch1000 -p1
@@ -178,6 +187,11 @@ mv $RPM_BUILD_ROOT%{_datadir}/tcl%{tclversion}/sqlite3/pkgIndex.tcl $RPM_BUILD_R # Drop all .la files find $RPM_BUILD_ROOT -name "*.la" -delete
+# For some reason the libraries are installed in /lib +# instead of /bin when a modern automake is used +mv $RPM_BUILD_ROOT%{mingw32_libdir}/libsqlite3-0.dll $RPM_BUILD_ROOT%{mingw32_bindir}/ +mv $RPM_BUILD_ROOT%{mingw64_libdir}/libsqlite3-0.dll $RPM_BUILD_ROOT%{mingw64_bindir}/ +
# Win32 %files -n mingw32-%{name1} @@ -215,6 +229,10 @@ find $RPM_BUILD_ROOT -name "*.la" -delete
%changelog +* Sun May 12 2013 Erik van Pienbroek epienbro@fedoraproject.org - 3.7.16.2-2 +- Don't try to link against pthreads even if it is available on win32 + (sqlite uses the native win32 threading API already) + * Mon May 6 2013 Thomas Sailer t.sailer@alumni.ethz.ch - 3.7.16.2-1 - update to 3.7.16.2
@@ -276,7 +294,7 @@ find $RPM_BUILD_ROOT -name "*.la" -delete * Sun Jan 31 2010 Thomas Sailer t.sailer@alumni.ethz.ch - 3.6.22-1 - update to 3.6.22
-* Sun Dec 5 2009 Thomas Sailer t.sailer@alumni.ethz.ch - 3.6.20-1 +* Sun Dec 6 2009 Thomas Sailer t.sailer@alumni.ethz.ch - 3.6.20-1 - update to 3.6.20
* Sun Sep 20 2009 Thomas Sailer t.sailer@alumni.ethz.ch - 3.6.17-1 diff --git a/sqlite-dont-search-for-pthreads-on-non-unix.patch b/sqlite-dont-search-for-pthreads-on-non-unix.patch new file mode 100644 index 0000000..fd51474 --- /dev/null +++ b/sqlite-dont-search-for-pthreads-on-non-unix.patch @@ -0,0 +1,54 @@ +--- configure.ac.orig 2013-05-12 17:08:29.934340680 +0200 ++++ configure.ac 2013-05-12 17:09:42.918555699 +0200 +@@ -233,25 +233,6 @@ + AC_SUBST(BUILD_CC) + + ########## +-# Do we want to support multithreaded use of sqlite +-# +-AC_ARG_ENABLE(threadsafe, +-AC_HELP_STRING([--enable-threadsafe],[Support threadsafe operation]),,enable_threadsafe=yes) +-AC_MSG_CHECKING([whether to support threadsafe operation]) +-if test "$enable_threadsafe" = "no"; then +- SQLITE_THREADSAFE=0 +- AC_MSG_RESULT([no]) +-else +- SQLITE_THREADSAFE=1 +- AC_MSG_RESULT([yes]) +-fi +-AC_SUBST(SQLITE_THREADSAFE) +- +-if test "$SQLITE_THREADSAFE" = "1"; then +- AC_SEARCH_LIBS(pthread_create, pthread) +-fi +- +-########## + # Do we want to allow a connection created in one thread to be used + # in another thread. This does not work on many Linux systems (ex: RedHat 9) + # due to bugs in the threading implementations. This is thus off by default. +@@ -365,6 +346,25 @@ + AC_SUBST(TARGET_EXEEXT) + + ########## ++# Do we want to support multithreaded use of sqlite ++# ++AC_ARG_ENABLE(threadsafe, ++AC_HELP_STRING([--enable-threadsafe],[Support threadsafe operation]),,enable_threadsafe=yes) ++AC_MSG_CHECKING([whether to support threadsafe operation]) ++if test "$enable_threadsafe" = "no"; then ++ SQLITE_THREADSAFE=0 ++ AC_MSG_RESULT([no]) ++else ++ SQLITE_THREADSAFE=1 ++ AC_MSG_RESULT([yes]) ++fi ++AC_SUBST(SQLITE_THREADSAFE) ++ ++if test "$SQLITE_THREADSAFE" = "1" -a "$SQLITE_OS_UNIX" = "1" ; then ++ AC_SEARCH_LIBS(pthread_create, pthread) ++fi ++ ++########## + # Figure out all the parameters needed to compile against Tcl. + # + # This code is derived from the SC_PATH_TCLCONFIG and SC_LOAD_TCLCONFIG