From 6a274e6b86a9a2841530efc093e7e9ad6496e850 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: [PATCH] * Tue Dec 16 2008 Richard Jones - 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. --- .hgignore | 1 + ...h => mingw32-sqlite-3.6.6.2-no-undefined.patch} | 8 +- sqlite/mingw32-sqlite.spec | 27 ++- sqlite/sqlite-3.5.8-pkgconfig-version.patch | 12 -- sqlite/sqlite-3.6.6.2-lemon-snprintf.patch | 111 ++++++++++ sqlite/sqlite-3.6.6.2-libdl.patch | 240 +++++++++++++++++++++ 6 files changed, 377 insertions(+), 22 deletions(-) rename sqlite/{mingw32-sqlite-3.5.9-no-undefined.patch => mingw32-sqlite-3.6.6.2-no-undefined.patch} (70%) delete mode 100644 sqlite/sqlite-3.5.8-pkgconfig-version.patch create mode 100644 sqlite/sqlite-3.6.6.2-lemon-snprintf.patch create mode 100644 sqlite/sqlite-3.6.6.2-libdl.patch diff --git a/.hgignore b/.hgignore index 22caa94..2ed5fb6 100644 --- a/.hgignore +++ b/.hgignore @@ -116,6 +116,7 @@ runtime-bootstrap/mingw-runtime-3.14.tar.gz runtime/mingw-runtime-3.14-src.tar.gz runtime/mingwrt-3.15.1-mingw32-src.tar.gz sqlite/sqlite-3.5.9.tar.gz +sqlite/sqlite-3.6.6.2.tar.gz termcap/termcap-1.3.1.tar.gz virt-ctrl/virt-ctrl-1.0.1.tar.gz virt-top/virt-top-1.0.3.tar.gz diff --git a/sqlite/mingw32-sqlite-3.5.9-no-undefined.patch b/sqlite/mingw32-sqlite-3.6.6.2-no-undefined.patch similarity index 70% rename from sqlite/mingw32-sqlite-3.5.9-no-undefined.patch rename to sqlite/mingw32-sqlite-3.6.6.2-no-undefined.patch index c16bcc2..3da0b54 100644 --- a/sqlite/mingw32-sqlite-3.5.9-no-undefined.patch +++ b/sqlite/mingw32-sqlite-3.6.6.2-no-undefined.patch @@ -1,6 +1,6 @@ ---- sqlite-3.5.9/Makefile.in.orig 2008-09-30 12:06:50.000000000 +0100 -+++ sqlite-3.5.9/Makefile.in 2008-09-30 12:07:07.000000000 +0100 -@@ -413,13 +413,14 @@ +--- sqlite-3.6.6.2/Makefile.in.orig 2008-12-16 15:43:08.000000000 +0000 ++++ sqlite-3.6.6.2/Makefile.in 2008-12-16 15:43:27.000000000 +0000 +@@ -448,13 +448,14 @@ libsqlite3.la: $(LIBOBJ) $(LTLINK) -o $@ $(LIBOBJ) $(TLIBS) \ @@ -10,7 +10,7 @@ libtclsqlite3.la: tclsqlite.lo libsqlite3.la $(LTLINK) -o $@ tclsqlite.lo \ - $(LIBOBJ) @TCL_STUB_LIB_SPEC@ $(TLIBS) \ + libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \ -rpath "$(libdir)/sqlite" \ - -version-info "8:6:8" + -version-info "8:6:8" -no-undefined diff --git a/sqlite/mingw32-sqlite.spec b/sqlite/mingw32-sqlite.spec index 0855022..32b96aa 100644 --- a/sqlite/mingw32-sqlite.spec +++ b/sqlite/mingw32-sqlite.spec @@ -5,8 +5,8 @@ %define __find_provides %{_mingw32_findprovides} Name: mingw32-sqlite -Version: 3.5.9 -Release: 3%{?dist} +Version: 3.6.6.2 +Release: 1%{?dist} Summary: MinGW Windows port of sqlite embeddable SQL database engine License: Public Domain @@ -17,9 +17,12 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch -Patch1: sqlite-3.5.8-pkgconfig-version.patch +# Patches from Fedora native package. +Patch1: sqlite-3.6.6.2-libdl.patch +Patch2: sqlite-3.6.6.2-lemon-snprintf.patch -Patch1000: mingw32-sqlite-3.5.9-no-undefined.patch +# Patches for MinGW port. +Patch1000: mingw32-sqlite-3.6.6.2-no-undefined.patch BuildRequires: mingw32-filesystem >= 26 BuildRequires: mingw32-gcc @@ -32,6 +35,8 @@ BuildRequires: mingw32-termcap >= 1.3.1-3 BuildRequires: autoconf BuildRequires: libtool +Requires: pkgconfig + %description SQLite is a C library that implements an SQL database engine. A large @@ -48,7 +53,8 @@ for Windows. %prep %setup -q -n sqlite-%{version} -%patch1 -p1 +%patch1 -p1 -b .libdl +%patch2 -p1 -b .lemon-sprintf %patch1000 -p1 # Ships with an old/broken version of libtool which cannot create @@ -78,6 +84,8 @@ make DESTDIR=$RPM_BUILD_ROOT install # Remove static libraries but DON'T remove *.dll.a files. rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libsqlite3.a +chmod 0644 $RPM_BUILD_ROOT%{_mingw32_libdir}/libsqlite3.dll.a + %clean rm -rf $RPM_BUILD_ROOT @@ -85,6 +93,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) +%doc README VERSION %{_mingw32_bindir}/sqlite3.exe %{_mingw32_bindir}/libsqlite3-0.dll %{_mingw32_libdir}/libsqlite3.dll.a @@ -92,10 +101,16 @@ rm -rf $RPM_BUILD_ROOT %{_mingw32_includedir}/sqlite3.h %{_mingw32_includedir}/sqlite3ext.h %{_mingw32_libdir}/pkgconfig/sqlite3.pc -# etc. %changelog +* Tue Dec 16 2008 Richard Jones - 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 - 3.5.9-3 - Rebuild against new readline. diff --git a/sqlite/sqlite-3.5.8-pkgconfig-version.patch b/sqlite/sqlite-3.5.8-pkgconfig-version.patch deleted file mode 100644 index cb5b5ef..0000000 --- a/sqlite/sqlite-3.5.8-pkgconfig-version.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up sqlite-3.5.8/sqlite3.pc.in.release sqlite-3.5.8/sqlite3.pc.in ---- sqlite-3.5.8/sqlite3.pc.in.release 2008-04-23 09:11:38.000000000 +0300 -+++ sqlite-3.5.8/sqlite3.pc.in 2008-04-23 09:11:48.000000000 +0300 -@@ -7,7 +7,7 @@ includedir=@includedir@ - - Name: SQLite - Description: SQL database engine --Version: @VERSION@ -+Version: @RELEASE@ - Libs: -L${libdir} -lsqlite3 - Libs.private: @LIBS@ - Cflags: -I${includedir} diff --git a/sqlite/sqlite-3.6.6.2-lemon-snprintf.patch b/sqlite/sqlite-3.6.6.2-lemon-snprintf.patch new file mode 100644 index 0000000..299f5e3 --- /dev/null +++ b/sqlite/sqlite-3.6.6.2-lemon-snprintf.patch @@ -0,0 +1,111 @@ +diff -up sqlite-3.6.6.2/tool/lemon.c.lemparpath sqlite-3.6.6.2/tool/lemon.c +--- sqlite-3.6.6.2/tool/lemon.c.lemparpath 2008-12-05 20:37:49.000000000 +0200 ++++ sqlite-3.6.6.2/tool/lemon.c 2008-12-05 20:44:08.000000000 +0200 +@@ -1324,15 +1324,15 @@ void ErrorMsg(const char *filename, int + va_start(ap, format); + /* Prepare a prefix to be prepended to every output line */ + if( lineno>0 ){ +- sprintf(prefix,"%.*s:%d: ",PREFIXLIMIT-10,filename,lineno); ++ snprintf(prefix,sizeof prefix,"%.*s:%d: ",PREFIXLIMIT-10,filename,lineno); + }else{ +- sprintf(prefix,"%.*s: ",PREFIXLIMIT-10,filename); ++ snprintf(prefix,sizeof prefix,"%.*s: ",PREFIXLIMIT-10,filename); + } + prefixsize = lemonStrlen(prefix); + availablewidth = LINEWIDTH - prefixsize; + + /* Generate the error message */ +- vsprintf(errmsg,format,ap); ++ vsnprintf(errmsg,sizeof errmsg,format,ap); + va_end(ap); + errmsgsize = lemonStrlen(errmsg); + /* Remove trailing '\n's from the error message. */ +@@ -2911,7 +2911,7 @@ struct lemon *lemp; + while( cfp ){ + char buf[20]; + if( cfp->dot==cfp->rp->nrhs ){ +- sprintf(buf,"(%d)",cfp->rp->index); ++ snprintf(buf,sizeof buf,"(%d)",cfp->rp->index); + fprintf(fp," %5s ",buf); + }else{ + fprintf(fp," "); +@@ -2966,6 +2966,7 @@ int modemask; + { + char *pathlist; + char *path,*cp; ++ size_t pathsz; + char c; + + #ifdef __WIN32__ +@@ -2976,21 +2977,21 @@ int modemask; + if( cp ){ + c = *cp; + *cp = 0; +- path = (char *)malloc( lemonStrlen(argv0) + lemonStrlen(name) + 2 ); +- if( path ) sprintf(path,"%s/%s",argv0,name); ++ path = (char *)malloc((pathsz=lemonStrlen(argv0) + lemonStrlen(name) + 2)); ++ if( path ) snprintf(path,pathsz,"%s/%s",argv0,name); + *cp = c; + }else{ + extern char *getenv(); + pathlist = getenv("PATH"); + if( pathlist==0 ) pathlist = ".:/bin:/usr/bin"; +- path = (char *)malloc( lemonStrlen(pathlist)+lemonStrlen(name)+2 ); ++ path = (char *)malloc((pathsz=lemonStrlen(pathlist)+lemonStrlen(name)+2)); + if( path!=0 ){ + while( *pathlist ){ + cp = strchr(pathlist,':'); + if( cp==0 ) cp = &pathlist[lemonStrlen(pathlist)]; + c = *cp; + *cp = 0; +- sprintf(path,"%s/%s",pathlist,name); ++ snprintf(path,pathsz,"%s/%s",pathlist,name); + *cp = c; + if( c==0 ) pathlist = ""; + else pathlist = &cp[1]; +@@ -3070,14 +3071,16 @@ struct lemon *lemp; + + cp = strrchr(lemp->filename,'.'); + if( cp ){ +- sprintf(buf,"%.*s.lt",(int)(cp-lemp->filename),lemp->filename); ++ snprintf(buf,sizeof buf,"%.*s.lt",(int)(cp-lemp->filename),lemp->filename); + }else{ +- sprintf(buf,"%s.lt",lemp->filename); ++ snprintf(buf,sizeof buf,"%s.lt",lemp->filename); + } + if( access(buf,004)==0 ){ + tpltname = buf; + }else if( access(templatename,004)==0 ){ + tpltname = templatename; ++ }else if( access("/usr/share/lemon/lempar.c",004)==0 ){ ++ tpltname = "/usr/share/lemon/lempar.c"; + }else{ + tpltname = pathsearch(lemp->argv0,templatename,0); + } +@@ -3089,7 +3092,7 @@ struct lemon *lemp; + } + 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; + } +@@ -3827,7 +3830,7 @@ int mhflag; /* Output in makeheaders + /* Generate a table containing the symbolic name of every symbol + */ + for(i=0; insymbol; i++){ +- sprintf(line,"\"%s\",",lemp->symbols[i]->name); ++ snprintf(line,sizeof line,"\"%s\",",lemp->symbols[i]->name); + fprintf(out," %-15s",line); + if( (i&3)==3 ){ fprintf(out,"\n"); lineno++; } + } +@@ -3983,7 +3986,7 @@ struct lemon *lemp; + in = file_open(lemp,".h","rb"); + if( in ){ + for(i=1; interminal && fgets(line,LINESIZE,in); i++){ +- sprintf(pattern,"#define %s%-30s %2d\n",prefix,lemp->symbols[i]->name,i); ++ snprintf(pattern,sizeof pattern,"#define %s%-30s %2d\n",prefix,lemp->symbols[i]->name,i); + if( strcmp(line,pattern) ) break; + } + fclose(in); diff --git a/sqlite/sqlite-3.6.6.2-libdl.patch b/sqlite/sqlite-3.6.6.2-libdl.patch new file mode 100644 index 0000000..19d10ba --- /dev/null +++ b/sqlite/sqlite-3.6.6.2-libdl.patch @@ -0,0 +1,240 @@ +diff -up sqlite-3.6.4/configure.ac.orig sqlite-3.6.4/configure.ac +--- sqlite-3.6.4/configure.ac.orig 2008-11-08 11:37:15.000000000 +0200 ++++ sqlite-3.6.4/configure.ac 2008-11-08 11:35:50.000000000 +0200 +@@ -606,6 +606,7 @@ AC_ARG_ENABLE(load-extension, AC_HELP_ST + [use_loadextension=$enableval],[use_loadextension=no]) + if test "${use_loadextension}" = "yes" ; then + OPT_FEATURE_FLAGS="" ++ AC_SEARCH_LIBS(dlopen, [dl]) + else + OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1" + fi +diff -up sqlite-3.6.4/configure.orig sqlite-3.6.4/configure +--- sqlite-3.6.4/configure.orig 2008-11-08 11:39:22.000000000 +0200 ++++ sqlite-3.6.4/configure 2008-11-08 11:39:29.000000000 +0200 +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.59 for sqlite 3.6.1. ++# Generated by GNU Autoconf 2.59 for sqlite 3.6.4. + # + # Copyright (C) 2003 Free Software Foundation, Inc. + # This configure script is free software; the Free Software Foundation +@@ -416,8 +416,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} + # Identity of this package. + PACKAGE_NAME='sqlite' + PACKAGE_TARNAME='sqlite' +-PACKAGE_VERSION='3.6.1' +-PACKAGE_STRING='sqlite 3.6.1' ++PACKAGE_VERSION='3.6.4' ++PACKAGE_STRING='sqlite 3.6.4' + PACKAGE_BUGREPORT='' + + # Factoring default headers for most tests. +@@ -926,7 +926,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures sqlite 3.6.1 to adapt to many kinds of systems. ++\`configure' configures sqlite 3.6.4 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -987,7 +987,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of sqlite 3.6.1:";; ++ short | recursive ) echo "Configuration of sqlite 3.6.4:";; + esac + cat <<\_ACEOF + +@@ -1137,7 +1137,7 @@ fi + test -n "$ac_init_help" && exit 0 + if $ac_init_version; then + cat <<\_ACEOF +-sqlite configure 3.6.1 ++sqlite configure 3.6.4 + generated by GNU Autoconf 2.59 + + Copyright (C) 2003 Free Software Foundation, Inc. +@@ -1151,7 +1151,7 @@ cat >&5 <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by sqlite $as_me 3.6.1, which was ++It was created by sqlite $as_me 3.6.4, which was + generated by GNU Autoconf 2.59. Invocation command line was + + $ $0 $@ +@@ -1489,7 +1489,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + # The following RCS revision string applies to configure.in +-# $Revision: 1.65 $ ++# $Revision: 1.49 $ + + ######### + # Programs needed +@@ -11266,10 +11266,6 @@ if test "$TARGET_EXEEXT" = ".exe"; then + SQLITE_OS_WIN=0 + SQLITE_OS_OS2=1 + CFLAGS="$CFLAGS -DSQLITE_OS_OS2=1" +- if test "$ac_compiler_gnu" = "yes" ; then +- CFLAGS="$CFLAGS -Zomf -Zexe -Zmap" +- BUILD_CFLAGS="$BUILD_CFLAGS -Zomf -Zexe" +- fi + else + SQLITE_OS_UNIX=0 + SQLITE_OS_WIN=1 +@@ -12066,6 +12062,132 @@ else + fi; + if test "${use_loadextension}" = "yes" ; then + OPT_FEATURE_FLAGS="" ++ echo "$as_me:$LINENO: checking for library containing dlopen" >&5 ++echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6 ++if test "${ac_cv_search_dlopen+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ac_func_search_save_LIBS=$LIBS ++ac_cv_search_dlopen=no ++cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++/* Override any gcc2 internal prototype to avoid an error. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char dlopen (); ++int ++main () ++{ ++dlopen (); ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_cv_search_dlopen="none required" ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++fi ++rm -f conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++if test "$ac_cv_search_dlopen" = no; then ++ for ac_lib in dl; do ++ LIBS="-l$ac_lib $ac_func_search_save_LIBS" ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++/* Override any gcc2 internal prototype to avoid an error. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char dlopen (); ++int ++main () ++{ ++dlopen (); ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_cv_search_dlopen="-l$ac_lib" ++break ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++fi ++rm -f conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++ done ++fi ++LIBS=$ac_func_search_save_LIBS ++fi ++echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5 ++echo "${ECHO_T}$ac_cv_search_dlopen" >&6 ++if test "$ac_cv_search_dlopen" != no; then ++ test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS" ++ ++fi ++ + else + OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1" + fi +@@ -12506,7 +12628,7 @@ _ASBOX + } >&5 + cat >&5 <<_CSEOF + +-This file was extended by sqlite $as_me 3.6.1, which was ++This file was extended by sqlite $as_me 3.6.4, which was + generated by GNU Autoconf 2.59. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -12569,7 +12691,7 @@ _ACEOF + + cat >>$CONFIG_STATUS <<_ACEOF + ac_cs_version="\\ +-sqlite config.status 3.6.1 ++sqlite config.status 3.6.4 + configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + -- 1.8.3.1