Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'update_to_3330' into 'master'
[sqlite] Update to version 3.33.0. Fixes JB#51475

See merge request mer-core/sqlite!12
  • Loading branch information
xfade committed Oct 9, 2020
2 parents 6abe96c + 9287313 commit 5b12136
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 38 deletions.
94 changes: 57 additions & 37 deletions rpm/sqlite.spec
@@ -1,18 +1,27 @@
# Disable test for now by default since tests are using tcl
%bcond_with check

Name: sqlite
Summary: Library that implements an embeddable SQL database engine
Version: 3.30.0
Version: 3.33.0
Release: 1
License: Public Domain
URL: http://www.sqlite.org/download.html
Source0: %{name}-%{version}.tar.gz
URL: https://www.sqlite.org
Source0: %{name}-%{version}.tar.bz2
Patch0: sqlite-3.12.2-no-malloc-usable-size.patch
BuildRequires: readline-devel
BuildRequires: autoconf
BuildRequires: libtool
BuildRequires: pkgconfig(readline)
BuildRequires: pkgconfig(zlib)
# See bug 15004 Add ICU support to sqlite.
BuildRequires: pkgconfig(icu-i18n)
%if %{with check}
BuildRequires: tcl-devel
%else
# Need to have tcl since sqlite generates files like sqlite3.h and
# shell.c with the tclsh script.
BuildRequires: tcl
%endif
Requires: %{name}-libs = %{version}-%{release}

# Ensure updates from pre-split work on multi-lib systems
Expand All @@ -39,13 +48,14 @@ to install %{name}-devel.

%package doc
Summary: Documentation for %{name}
BuildArch: noarch
Requires: %{name} = %{version}-%{release}

%description doc
Man page for %{name}.

%package libs
Summary: SQlite shared library
Summary: Shared library for the sqlite3 embeddable SQL database engine
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
# We need to ensure rpm is updated before sqlite-libs as this can break
Expand All @@ -61,18 +71,14 @@ This package contains the shared library for %{name}.
%autosetup -p1 -n %{name}-%{version}/%{name}

%build
export CFLAGS="$RPM_OPT_FLAGS \
export CFLAGS="$RPM_OPT_FLAGS $RPM_LD_FLAGS \
-DSQLITE_ENABLE_COLUMN_METADATA=1 \
-DSQLITE_DISABLE_DIRSYNC=1 \
-DYYSTACKDEPTH=500 \
-DSQLITE_SECURE_DELETE=1 \
-DSQLITE_ENABLE_UNLOCK_NOTIFY=1 \
-DSQLITE_ENABLE_DBSTAT_VTAB=1 \
-DSQLITE_ENABLE_FTS3_PARENTHESIS \
-DSQLITE_SOUNDEX=1 \
-DNDEBUG \
-D_XOPEN_SOURCE=500 \
-DSQLITE_ENABLE_DBSTAT_VTAB=1 \
-DUSE_PREAD \
-DSQLITE_ENABLE_UNLOCK_NOTIFY=1 \
-DSQLITE_ENABLE_ICU \
-DSQLITE_DEFAULT_CACHE_SIZE=500 \
-DSQLITE_DEFAULT_TEMP_CACHE_SIZE=125 \
Expand All @@ -81,50 +87,64 @@ export CFLAGS="$RPM_OPT_FLAGS \

export LDFLAGS="-lm `icu-config --ldflags-libsonly`"

%configure --disable-tcl \
--disable-static \
--enable-json1 \
--enable-fts3 \
--enable-fts4 \
--enable-fts5 \
--enable-rtree \
--enable-threadsafe \
--enable-readline
%reconfigure \
--disable-static \
--disable-debug \
--disable-tcl \
--enable-json1 \
--enable-fts3 \
--enable-fts4 \
--enable-fts5 \
--enable-rtree \
--enable-threadsafe \
--enable-readline

# rpath removal fix
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool

make %{?_smp_mflags}

# Disable test for now since, tests are using tcl.
#make test || echo Tests failed
%make_build

%install
rm -rf %{buildroot}
%make_install

install -D -m0644 ../sqlite/sqlite3.1 $RPM_BUILD_ROOT/%{_mandir}/man1/sqlite3.1
install -D -m0644 sqlite3.1 %{buildroot}/%{_mandir}/man1/sqlite3.1

%if %{with check}
%check
# XXX shell tests are broken due to loading system libsqlite3, work around...
export LD_LIBRARY_PATH=`pwd`/.libs
export MALLOC_CHECK_=3

# csv01 hangs on all non-intel archs i've tried
%ifarch x86_64 %{ix86}
%else
rm test/csv01.test
%endif

%ifarch s390x ppc64
rm test/fts3conf.test
%endif

make test
%endif #with check

%post libs -p /sbin/ldconfig

%postun libs -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%{_bindir}/*
%{_bindir}/sqlite3

%files libs
%defattr(-,root,root,-)
%license LICENSE.md
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root,-)
%{_includedir}/*.h
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%exclude %{_libdir}/*.la

%files doc
%defattr(-,root,root,-)
%doc README.md
%{_mandir}/man1/%{name}3.*

%files libs
%defattr(-,root,root,-)
%{_libdir}/*.so.*
2 changes: 1 addition & 1 deletion sqlite
Submodule sqlite updated from 228a52 to ef215f

0 comments on commit 5b12136

Please sign in to comment.