Merge git://pkgs.fedoraproject.org/mingw32-sqlite
This commit is contained in:
commit
79704ecc95
7
.gitignore
vendored
7
.gitignore
vendored
@ -0,0 +1,7 @@
|
||||
sqlite-3.6.14.2.tar.gz
|
||||
sqlite-3.6.17.tar.gz
|
||||
sqlite-3.6.20.tar.gz
|
||||
sqlite-3.6.22.tar.gz
|
||||
/sqlite-3.7.3.tar.gz
|
||||
/sqlite-src-3070500.zip
|
||||
/sqlite-src-3070900.zip
|
20
mingw32-sqlite-3.7.9-no-undefined.patch
Normal file
20
mingw32-sqlite-3.7.9-no-undefined.patch
Normal file
@ -0,0 +1,20 @@
|
||||
--- sqlite-3.7.9/Makefile.in.orig 2009-03-30 18:37:16.000000000 +0200
|
||||
+++ sqlite-3.7.9/Makefile.in 2009-04-23 11:16:17.000000000 +0200
|
||||
@@ -486,14 +486,15 @@
|
||||
|
||||
libsqlite3.la: $(LIBOBJ)
|
||||
$(LTLINK) -o $@ $(LIBOBJ) $(TLIBS) \
|
||||
- ${ALLOWRELEASE} -rpath "$(libdir)" -version-info "8:6:8"
|
||||
+ ${ALLOWRELEASE} -rpath "$(libdir)" -version-info "8:6:8" \
|
||||
+ -no-undefined
|
||||
|
||||
libtclsqlite3.la: tclsqlite.lo libsqlite3.la
|
||||
$(LTLINK) -o $@ tclsqlite.lo \
|
||||
libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
|
||||
-rpath "$(TCLLIBDIR)" \
|
||||
-version-info "8:6:8" \
|
||||
- -avoid-version
|
||||
+ -avoid-version -no-undefined
|
||||
|
||||
sqlite3$(TEXE): $(TOP)/src/shell.c libsqlite3.la sqlite3.h
|
||||
$(LTLINK) $(READLINE_FLAGS) \
|
238
mingw32-sqlite.spec
Normal file
238
mingw32-sqlite.spec
Normal file
@ -0,0 +1,238 @@
|
||||
%global __strip %{_mingw32_strip}
|
||||
%global __objdump %{_mingw32_objdump}
|
||||
%global _use_internal_dependency_generator 0
|
||||
%global __find_requires %{_mingw32_findrequires}
|
||||
%global __find_provides %{_mingw32_findprovides}
|
||||
%define __debug_install_post %{_mingw32_debug_install_post}
|
||||
|
||||
%global name1 sqlite
|
||||
|
||||
%global realver 3070900
|
||||
%global rpmver %(echo %{realver}|sed -e "s/00//g" -e "s/0/./g")
|
||||
|
||||
# bcond default logic is nicely backwards...
|
||||
%bcond_with tcl
|
||||
%global tclversion 8.5
|
||||
|
||||
Name: mingw32-%{name1}
|
||||
Version: %{rpmver}
|
||||
Release: 2%{?dist}
|
||||
Summary: MinGW Windows port of sqlite embeddable SQL database engine
|
||||
|
||||
License: Public Domain
|
||||
Group: Applications/Databases
|
||||
URL: http://www.sqlite.org/
|
||||
Source0: http://www.sqlite.org/%{name1}-src-%{realver}.zip
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
# Patches from Fedora native package.
|
||||
# Support a system-wide lemon template
|
||||
Patch1: sqlite-3.6.23-lemon-system-template.patch
|
||||
# Shut up stupid tests depending on system settings of allowed open fd's
|
||||
Patch2: sqlite-3.7.7.1-stupid-openfiles-test.patch
|
||||
|
||||
# Patches for MinGW port.
|
||||
Patch1000: mingw32-sqlite-3.7.9-no-undefined.patch
|
||||
|
||||
BuildRequires: mingw32-filesystem >= 52
|
||||
BuildRequires: mingw32-gcc
|
||||
BuildRequires: mingw32-binutils
|
||||
|
||||
BuildRequires: mingw32-pdcurses
|
||||
BuildRequires: mingw32-readline
|
||||
BuildRequires: mingw32-termcap >= 1.3.1-3
|
||||
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: libtool
|
||||
BuildRequires: /usr/bin/tclsh
|
||||
|
||||
Requires: pkgconfig
|
||||
|
||||
%if %{with tcl}
|
||||
BuildRequires: /usr/bin/tclsh
|
||||
BuildRequires: mingw32-tcl
|
||||
%endif
|
||||
|
||||
|
||||
%description
|
||||
SQLite is a C library that implements an SQL database engine. A large
|
||||
subset of SQL92 is supported. A complete database is stored in a
|
||||
single disk file. The API is designed for convenience and ease of use.
|
||||
Applications that link against SQLite can enjoy the power and
|
||||
flexibility of an SQL database without the administrative hassles of
|
||||
supporting a separate database server. Version 2 and version 3 binaries
|
||||
are named to permit each to be installed on a single host
|
||||
|
||||
This package contains cross-compiled libraries and development tools
|
||||
for Windows.
|
||||
|
||||
|
||||
%package static
|
||||
Summary: Static version of MinGW Windows port of sqlite library
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Group: Development/Libraries
|
||||
|
||||
%description static
|
||||
SQLite is a C library that implements an SQL database engine. A large
|
||||
subset of SQL92 is supported. A complete database is stored in a
|
||||
single disk file. The API is designed for convenience and ease of use.
|
||||
Applications that link against SQLite can enjoy the power and
|
||||
flexibility of an SQL database without the administrative hassles of
|
||||
supporting a separate database server. Version 2 and version 3 binaries
|
||||
are named to permit each to be installed on a single host
|
||||
|
||||
This package contains static cross-compiled library
|
||||
|
||||
|
||||
%{_mingw32_debug_package}
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name1}-src-%{realver}
|
||||
%patch1 -p1 -b .lemon-system-template
|
||||
%patch2 -p1 -b .stupid-openfiles-test
|
||||
%patch1000 -p1
|
||||
|
||||
# Ships with an old/broken version of libtool which cannot create
|
||||
# Windows libraries properly. So pull in the current version.
|
||||
autoreconf
|
||||
libtoolize --force
|
||||
|
||||
|
||||
%build
|
||||
# I think there's a bug in the configure script where, if
|
||||
# cross-compiling, it cannot correctly determine the target executable
|
||||
# extension (ie. .exe). As a result it doesn't correctly detect that
|
||||
# the target is Windows and so tries to use Unix-specific functions
|
||||
# which don't exist. In any case we can work around this by forcing
|
||||
# the extension via this export.
|
||||
# - RWMJ 2008-09-30
|
||||
export config_TARGET_EXEEXT=.exe
|
||||
# add compile flags to enable rtree, fts3
|
||||
export MINGW32_CFLAGS="%{_mingw32_cflags} -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_FTS3=3 -DSQLITE_ENABLE_RTREE=1 -fno-strict-aliasing"
|
||||
|
||||
%{_mingw32_configure} %{!?with_tcl:--disable-tcl} \
|
||||
--enable-threadsafe \
|
||||
--enable-threads-override-locks \
|
||||
--enable-load-extension
|
||||
|
||||
# -lc hack
|
||||
sed -e s,build_libtool_need_lc=yes,build_libtool_need_lc=no, < libtool > libtool.x
|
||||
mv libtool.x libtool
|
||||
chmod a+x libtool
|
||||
|
||||
make
|
||||
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
|
||||
chmod 0644 $RPM_BUILD_ROOT%{_mingw32_libdir}/libsqlite3.dll.a
|
||||
|
||||
mv $RPM_BUILD_ROOT%{_mingw32_libdir}/libsqlite3-0.dll $RPM_BUILD_ROOT%{_mingw32_bindir}/
|
||||
|
||||
%if %{with tcl}
|
||||
install -d -m755 $RPM_BUILD_ROOT%{_mingw32_datadir}/tcl%{tclversion}/sqlite3/
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/tcl%{tclversion}/sqlite3/pkgIndex.tcl $RPM_BUILD_ROOT%{_mingw32_datadir}/tcl%{tclversion}/sqlite3/
|
||||
%endif
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc README VERSION
|
||||
%{_mingw32_bindir}/sqlite3.exe
|
||||
%{_mingw32_bindir}/libsqlite3-0.dll
|
||||
#%{_mingw32_bindir}/libsqlite3-0.dll.debug
|
||||
%{_mingw32_libdir}/libsqlite3.dll.a
|
||||
%{_mingw32_libdir}/libsqlite3.la
|
||||
%{_mingw32_includedir}/sqlite3.h
|
||||
%{_mingw32_includedir}/sqlite3ext.h
|
||||
%{_mingw32_libdir}/pkgconfig/sqlite3.pc
|
||||
%if %{with tcl}
|
||||
%{_mingw32_datadir}/tcl%{tclversion}/sqlite3/
|
||||
%{_mingw32_datadir}/tcl%{tclversion}/sqlite3/pkgIndex.tcl
|
||||
%endif
|
||||
|
||||
%files static
|
||||
%defattr(-,root,root,-)
|
||||
%{_mingw32_libdir}/libsqlite3.a
|
||||
|
||||
%changelog
|
||||
* Mon Feb 27 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 3.7.9-2
|
||||
- Rebuild against the mingw-w64 toolchain
|
||||
|
||||
* Mon Jan 16 2012 Thomas Sailer <t.sailer@alumni.ethz.ch> - 3.7.9-1
|
||||
- update to 3.7.9
|
||||
|
||||
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7.5-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||
|
||||
* Sat Dec 24 2011 Ivan Romanov <drizt@land.ru> - 3.7.5-2
|
||||
- static subpackage
|
||||
|
||||
* Sun Feb 13 2011 Thomas Sailer <t.sailer@alumni.ethz.ch> - 3.7.5-1
|
||||
- update to 3.7.5
|
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
* Mon Dec 6 2010 Thomas Sailer <t.sailer@alumni.ethz.ch> - 3.7.3-1
|
||||
- update to 3.7.3
|
||||
|
||||
* 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
|
||||
- update to 3.6.20
|
||||
|
||||
* Sun Sep 20 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 3.6.17-1
|
||||
- update to 3.6.17
|
||||
|
||||
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6.14.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
||||
|
||||
* Tue Jun 23 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 3.6.14.2-1
|
||||
- update to 3.6.14.2
|
||||
- add debuginfo packages
|
||||
|
||||
* Thu Apr 23 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 3.6.12-4
|
||||
- fix CFLAGS setting
|
||||
|
||||
* Thu Apr 23 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 3.6.12-3
|
||||
- use Erik van Pienbroek way to add to CFLAGS
|
||||
|
||||
* Thu Apr 23 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 3.6.12-2
|
||||
- BR tclsh; the build process without tclsh and with extensions
|
||||
enabled is broken
|
||||
|
||||
* Thu Apr 23 2009 Thomas Sailer <t.sailer@alumni.ee.ethz.ch> - 3.6.12-1
|
||||
- update to 3.6.12 to match native
|
||||
- enable rtree, fts3
|
||||
|
||||
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6.6.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
||||
|
||||
* Fri Feb 20 2009 Richard W.M. Jones <rjones@redhat.com> - 3.6.6.2-2
|
||||
- Rebuild for mingw32-gcc 4.4
|
||||
|
||||
* Tue Dec 16 2008 Richard Jones <rjones@redhat.com> - 3.6.6.2-1
|
||||
- New upstream release (to match Fedora native), 3.6.6.2.
|
||||
- Replace patches with ones from native.
|
||||
- Rebase -no-undefined patch.
|
||||
- Remove spurious +x permissions on libsqlite3.dll.a.
|
||||
- Requires pkgconfig.
|
||||
|
||||
* Sat Nov 22 2008 Richard Jones <rjones@redhat.com> - 3.5.9-3
|
||||
- Rebuild against new readline.
|
||||
|
||||
* Fri Oct 31 2008 Richard Jones <rjones@redhat.com> - 3.5.9-2
|
||||
- Rebuild against latest termcap.
|
||||
|
||||
* Thu Sep 25 2008 Richard Jones <rjones@redhat.com> - 3.5.9-1
|
||||
- Initial RPM release.
|
21
sqlite-3.6.23-lemon-system-template.patch
Normal file
21
sqlite-3.6.23-lemon-system-template.patch
Normal file
@ -0,0 +1,21 @@
|
||||
diff -up sqlite-3.6.23/tool/lemon.c.system-template sqlite-3.6.23/tool/lemon.c
|
||||
--- sqlite-3.6.23/tool/lemon.c.system-template 2010-03-10 16:40:35.000000000 +0200
|
||||
+++ sqlite-3.6.23/tool/lemon.c 2010-03-10 16:40:39.000000000 +0200
|
||||
@@ -3106,6 +3106,8 @@ PRIVATE FILE *tplt_open(struct lemon *le
|
||||
tpltname = buf;
|
||||
}else if( access(templatename,004)==0 ){
|
||||
tpltname = templatename;
|
||||
+ }else if( access("/usr/share/lemon/lempar.c", R_OK)==0){
|
||||
+ tpltname = "/usr/share/lemon/lempar.c";
|
||||
}else{
|
||||
tpltname = pathsearch(lemp->argv0,templatename,0);
|
||||
}
|
||||
@@ -3117,7 +3119,7 @@ PRIVATE FILE *tplt_open(struct lemon *le
|
||||
}
|
||||
in = fopen(tpltname,"rb");
|
||||
if( in==0 ){
|
||||
- fprintf(stderr,"Can't open the template file \"%s\".\n",templatename);
|
||||
+ fprintf(stderr,"Can't open the template file \"%s\".\n",tpltname);
|
||||
lemp->errorcnt++;
|
||||
return 0;
|
||||
}
|
36
sqlite-3.7.7.1-stupid-openfiles-test.patch
Normal file
36
sqlite-3.7.7.1-stupid-openfiles-test.patch
Normal file
@ -0,0 +1,36 @@
|
||||
diff -up sqlite-src-3070701/test/oserror.test.openfiles sqlite-src-3070701/test/oserror.test
|
||||
--- sqlite-src-3070701/test/oserror.test.openfiles 2011-07-13 09:56:46.025857411 +0300
|
||||
+++ sqlite-src-3070701/test/oserror.test 2011-07-13 09:57:11.634759798 +0300
|
||||
@@ -51,19 +51,19 @@ proc do_re_test {tn script expression} {
|
||||
# a call to getcwd() may fail if there are no free file descriptors. So
|
||||
# an error may be reported for either open() or getcwd() here.
|
||||
#
|
||||
-puts "Possible valgrind error about invalid file descriptor follows:"
|
||||
-do_test 1.1.1 {
|
||||
- set ::log [list]
|
||||
- list [catch {
|
||||
- for {set i 0} {$i < 2000} {incr i} { sqlite3 dbh_$i test.db -readonly 1 }
|
||||
- } msg] $msg
|
||||
-} {1 {unable to open database file}}
|
||||
-do_test 1.1.2 {
|
||||
- catch { for {set i 0} {$i < 2000} {incr i} { dbh_$i close } }
|
||||
-} {1}
|
||||
-do_re_test 1.1.3 {
|
||||
- lindex $::log 0
|
||||
-} {^os_unix.c:\d+: \(\d+\) (open|getcwd)\(.*test.db\) - }
|
||||
+#puts "Possible valgrind error about invalid file descriptor follows:"
|
||||
+#do_test 1.1.1 {
|
||||
+# set ::log [list]
|
||||
+# list [catch {
|
||||
+# for {set i 0} {$i < 2000} {incr i} { sqlite3 dbh_$i test.db -readonly 1 }
|
||||
+# } msg] $msg
|
||||
+#} {1 {unable to open database file}}
|
||||
+#do_test 1.1.2 {
|
||||
+# catch { for {set i 0} {$i < 2000} {incr i} { dbh_$i close } }
|
||||
+#} {1}
|
||||
+#do_re_test 1.1.3 {
|
||||
+# lindex $::log 0
|
||||
+#} {^os_unix.c:\d+: \(\d+\) (open|getcwd)\(.*test.db\) - }
|
||||
|
||||
|
||||
# Test a failure in open() due to the path being a directory.
|
Loading…
Reference in New Issue
Block a user