From ecbb6d123f4507f63ca14b3d4dce7f4e372ae343 Mon Sep 17 00:00:00 2001 From: Twaik Yont Date: Wed, 8 May 2024 21:35:10 +0300 Subject: [PATCH] bump(main/libsqlite): 3.45.3; chore(main/libsqlite-tcl): subpackage of libsqlite --- packages/libsqlite-tcl/build.sh | 31 ------------------- packages/libsqlite/build.sh | 31 +++++++++---------- .../libsqlite/libsqlite-tcl.subpackage.sh | 4 +++ 3 files changed, 19 insertions(+), 47 deletions(-) delete mode 100644 packages/libsqlite-tcl/build.sh create mode 100644 packages/libsqlite/libsqlite-tcl.subpackage.sh diff --git a/packages/libsqlite-tcl/build.sh b/packages/libsqlite-tcl/build.sh deleted file mode 100644 index 8e8d3a561260d0..00000000000000 --- a/packages/libsqlite-tcl/build.sh +++ /dev/null @@ -1,31 +0,0 @@ -TERMUX_PKG_HOMEPAGE=https://www.sqlite.org -TERMUX_PKG_DESCRIPTION="tcl bindings for SQLite" -TERMUX_PKG_LICENSE="Public Domain" -TERMUX_PKG_MAINTAINER="@termux" -# Note: Updating this version requires bumping libsqlite package as well. -_SQLITE_MAJOR=3 -_SQLITE_MINOR=45 -_SQLITE_PATCH=2 -_SQLITE_YEAR=2024 -TERMUX_PKG_VERSION=${_SQLITE_MAJOR}.${_SQLITE_MINOR}.${_SQLITE_PATCH} -TERMUX_PKG_SRCURL=https://www.sqlite.org/${_SQLITE_YEAR}/sqlite-autoconf-${_SQLITE_MAJOR}${_SQLITE_MINOR}0${_SQLITE_PATCH}00.tar.gz -TERMUX_PKG_SHA256=bc9067442eedf3dd39989b5c5cfbfff37ae66cc9c99274e0c3052dc4d4a8f6ae -TERMUX_PKG_DEPENDS="libsqlite, tcl" -TERMUX_PKG_BREAKS="sqlcipher (<< 4.4.2-1), tcl (<< 8.6.10-4)" -TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" ---with-tcl=${TERMUX_PREFIX}/lib ---with-system-sqlite -" - -termux_step_post_get_source() { - # Version guard - local ver_s=$(. $TERMUX_SCRIPTDIR/packages/libsqlite/build.sh; echo ${TERMUX_PKG_VERSION#*:}) - local ver_t=${TERMUX_PKG_VERSION#*:} - if [ "${ver_s}" != "${ver_t}" ]; then - termux_error_exit "Version mismatch between libsqlite and libsqlite-tcl." - fi -} - -termux_step_post_get_source() { - TERMUX_PKG_SRCDIR+="/tea" -} diff --git a/packages/libsqlite/build.sh b/packages/libsqlite/build.sh index 1d134f6e80502c..e878c1b5f11464 100644 --- a/packages/libsqlite/build.sh +++ b/packages/libsqlite/build.sh @@ -2,15 +2,13 @@ TERMUX_PKG_HOMEPAGE=https://www.sqlite.org TERMUX_PKG_DESCRIPTION="Library implementing a self-contained and transactional SQL database engine" TERMUX_PKG_LICENSE="Public Domain" TERMUX_PKG_MAINTAINER="@termux" -# Note: Updating this version requires bumping libsqlite-tcl package as well. -_SQLITE_MAJOR=3 -_SQLITE_MINOR=45 -_SQLITE_PATCH=2 +TERMUX_PKG_VERSION="3.45.3" _SQLITE_YEAR=2024 -TERMUX_PKG_VERSION=${_SQLITE_MAJOR}.${_SQLITE_MINOR}.${_SQLITE_PATCH} -TERMUX_PKG_SRCURL=https://www.sqlite.org/${_SQLITE_YEAR}/sqlite-autoconf-${_SQLITE_MAJOR}${_SQLITE_MINOR}0${_SQLITE_PATCH}00.tar.gz -TERMUX_PKG_SHA256=bc9067442eedf3dd39989b5c5cfbfff37ae66cc9c99274e0c3052dc4d4a8f6ae +TERMUX_PKG_SRCURL=https://www.sqlite.org/${_SQLITE_YEAR}/sqlite-autoconf-$(sed 's/\./''/; s/\./0/' <<< "$TERMUX_PKG_VERSION")00.tar.gz +TERMUX_PKG_SHA256=b2809ca53124c19c60f42bf627736eae011afdcc205bb48270a5ee9a38191531 +TERMUX_PKG_AUTO_UPDATE=true TERMUX_PKG_DEPENDS="zlib" +TERMUX_PKG_BUILD_DEPENDS="tcl" TERMUX_PKG_BREAKS="libsqlite-dev" TERMUX_PKG_REPLACES="libsqlite-dev" TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" @@ -18,16 +16,17 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" --enable-fts3 " -termux_step_post_get_source() { - # Version guard - local ver_s=${TERMUX_PKG_VERSION#*:} - local ver_t=$(. $TERMUX_SCRIPTDIR/packages/libsqlite-tcl/build.sh; echo ${TERMUX_PKG_VERSION#*:}) - if [ "${ver_s}" != "${ver_t}" ]; then - termux_error_exit "Version mismatch between libsqlite and libsqlite-tcl." - fi -} - termux_step_pre_configure() { CPPFLAGS+=" -Werror -DSQLITE_ENABLE_DBSTAT_VTAB=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1" LDFLAGS+=" -lm" } + +termux_step_post_make_install() { + echo -e "termux - building libsqlite-tcl for arch ${TERMUX_ARCH}..." + TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" --with-tcl=${TERMUX_PREFIX}/lib --with-system-sqlite" + TERMUX_PKG_SRCDIR+="/tea" + rm -rf "$TERMUX_PKG_TMPDIR/config-scripts" + termux_step_configure + termux_step_make + termux_step_make_install +} diff --git a/packages/libsqlite/libsqlite-tcl.subpackage.sh b/packages/libsqlite/libsqlite-tcl.subpackage.sh new file mode 100644 index 00000000000000..dcfce66d3ee9f4 --- /dev/null +++ b/packages/libsqlite/libsqlite-tcl.subpackage.sh @@ -0,0 +1,4 @@ +TERMUX_SUBPKG_DESCRIPTION="tcl bindings for SQLite" +TERMUX_SUBPKG_DEPENDS="tcl" +TERMUX_SUBPKG_BREAKS="sqlcipher (<< 4.4.2-1), tcl (<< 8.6.10-4)" +TERMUX_SUBPKG_INCLUDE="lib/sqlite*/* share/man/mann/sqlite3.n.gz"