diff --git a/sqlite-fts5-link.patch b/sqlite-fts5-link.patch index 14b661c..27bbe1e 100644 --- a/sqlite-fts5-link.patch +++ b/sqlite-fts5-link.patch @@ -2,17 +2,11 @@ Index: sqlite-autoconf-3110100/Makefile.am =================================================================== --- sqlite-autoconf-3110100.orig/Makefile.am +++ sqlite-autoconf-3110100/Makefile.am -@@ -3,11 +3,11 @@ AM_CFLAGS = @THREADSAFE_FLAGS@ @DYNAMIC_ +@@ -3,6 +3,7 @@ AM_CFLAGS = @THREADSAFE_FLAGS@ @DYNAMIC_ lib_LTLIBRARIES = libsqlite3.la libsqlite3_la_SOURCES = sqlite3.c --libsqlite3_la_LDFLAGS = -no-undefined -version-info 8:6:8 -+libsqlite3_la_LDFLAGS = -lm -no-undefined -version-info 8:6:8 ++libsqlite3_la_LIBADD = -lm + libsqlite3_la_LDFLAGS = -no-undefined -version-info 8:6:8 bin_PROGRAMS = sqlite3 - sqlite3_SOURCES = shell.c sqlite3.c sqlite3.h --sqlite3_LDADD = @READLINE_LIBS@ -+sqlite3_LDADD = @READLINE_LIBS@ -lm - sqlite3_DEPENDENCIES = @EXTRA_SHELL_OBJ@ - sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS - diff --git a/sqlite3-link-binary-with-libsqlite3.patch b/sqlite3-link-binary-with-libsqlite3.patch new file mode 100644 index 0000000..e256fa6 --- /dev/null +++ b/sqlite3-link-binary-with-libsqlite3.patch @@ -0,0 +1,15 @@ +Index: sqlite-autoconf-3110100/Makefile.am +=================================================================== +--- sqlite-autoconf-3110100.orig/Makefile.am ++++ sqlite-autoconf-3110100/Makefile.am +@@ -7,8 +7,8 @@ libsqlite3_la_LIBADD = -lm + libsqlite3_la_LDFLAGS = -no-undefined -version-info 8:6:8 + + bin_PROGRAMS = sqlite3 +-sqlite3_SOURCES = shell.c sqlite3.c sqlite3.h +-sqlite3_LDADD = @READLINE_LIBS@ ++sqlite3_SOURCES = shell.c sqlite3.h ++sqlite3_LDADD = libsqlite3.la @READLINE_LIBS@ + sqlite3_DEPENDENCIES = @EXTRA_SHELL_OBJ@ + sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS + diff --git a/sqlite3.changes b/sqlite3.changes index e1b9996..5fa0bbf 100644 --- a/sqlite3.changes +++ b/sqlite3.changes @@ -1,7 +1,16 @@ +------------------------------------------------------------------- +Mon Mar 7 15:22:53 UTC 2016 - dimstar@opensuse.org + +- Fix sqlite-fts5-link.patch: link libsqlite3.so with libm instead + of the sqlite3 binary: the library is the actual user of log(). +- Add sqlite3-link-binary-with-libsqlite3.patch: dyamically link + /usr/bin/sqlite3 to libsqlite3 instead of statically using it. +- Move autoreconf call to build section, where it belongs. + ------------------------------------------------------------------- Mon Mar 7 13:53:03 UTC 2016 - idonmez@suse.com -- Enable FTS5 support. +- Enable FTS5 support. - Add sqlite-fts5-link.patch to link to math library because FTS5 code uses log(). diff --git a/sqlite3.spec b/sqlite3.spec index 0ba3a05..e38a6c9 100644 --- a/sqlite3.spec +++ b/sqlite3.spec @@ -30,6 +30,7 @@ Url: http://www.sqlite.org/ Source0: http://www.sqlite.org/2016/sqlite-autoconf-%{tarversion}.tar.gz Source1: baselibs.conf Source2: http://www.sqlite.org/2016/sqlite-doc-%{tarversion}.zip +Patch0: sqlite3-link-binary-with-libsqlite3.patch Patch1: sqlite-fts5-link.patch BuildRequires: autoconf BuildRequires: automake @@ -118,12 +119,13 @@ other documentation found on sqlite.org. The files can be found in %prep %setup -q -n sqlite-autoconf-%{tarversion} -a2 -autoreconf -fi +%patch0 -p1 +%patch1 -p1 rm -v sqlite-doc-%{tarversion}/releaselog/current.html ln -sv `echo %{version} | sed "s/\./_/g"`.html sqlite-doc-%{tarversion}/releaselog/current.html -%patch1 -p1 %build +autoreconf -fi export CFLAGS="%{optflags} \ -DSQLITE_ENABLE_COLUMN_METADATA \ -DSQLITE_ENABLE_FTS4 \