Browse Source

tcl: Fix using system libsqlite

We really want to use the system library, and using the bundled
produced the error 'dlopen failed: cannot locate symbol "log"'.
android-5
Fredrik Fornwall 8 years ago
parent
commit
4ab31c9b57
  1. 1
      packages/libsqlite/build.sh
  2. 18
      packages/tcl/build.sh

1
packages/libsqlite/build.sh

@ -1,5 +1,6 @@
TERMUX_PKG_HOMEPAGE=http://www.sqlite.org/ TERMUX_PKG_HOMEPAGE=http://www.sqlite.org/
TERMUX_PKG_DESCRIPTION="Software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine" TERMUX_PKG_DESCRIPTION="Software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine"
# Note: Updating this version requires bumping the tcl package as well.
_SQLITE_MAJOR=3 _SQLITE_MAJOR=3
_SQLITE_MINOR=14 _SQLITE_MINOR=14
_SQLITE_PATCH=1 _SQLITE_PATCH=1

18
packages/tcl/build.sh

@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Powerful but easy to learn dynamic programming language"
TERMUX_PKG_DEPENDS="libsqlite" TERMUX_PKG_DEPENDS="libsqlite"
_MAJOR_VERSION=8.6 _MAJOR_VERSION=8.6
TERMUX_PKG_VERSION=${_MAJOR_VERSION}.6 TERMUX_PKG_VERSION=${_MAJOR_VERSION}.6
TERMUX_PKG_BUILD_REVISION=1
TERMUX_PKG_SRCURL=http://downloads.sourceforge.net/project/tcl/Tcl/${TERMUX_PKG_VERSION}/tcl${TERMUX_PKG_VERSION}-src.tar.gz TERMUX_PKG_SRCURL=http://downloads.sourceforge.net/project/tcl/Tcl/${TERMUX_PKG_VERSION}/tcl${TERMUX_PKG_VERSION}-src.tar.gz
TERMUX_PKG_FOLDERNAME=tcl$TERMUX_PKG_VERSION TERMUX_PKG_FOLDERNAME=tcl$TERMUX_PKG_VERSION
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="tcl_cv_strtod_buggy=ok tcl_cv_strstr_unbroken=ok" TERMUX_PKG_EXTRA_CONFIGURE_ARGS="tcl_cv_strtod_buggy=ok tcl_cv_strstr_unbroken=ok"
@ -10,7 +11,7 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" ac_cv_func_strtod=yes tcl_cv_strtod_unbroken=
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" ac_cv_func_strtoul=yes tcl_cv_strtoul_unbroken=ok" TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" ac_cv_func_strtoul=yes tcl_cv_strtoul_unbroken=ok"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" ac_cv_func_memcmp=yes ac_cv_func_memcmp_working=yes" TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" ac_cv_func_memcmp=yes ac_cv_func_memcmp_working=yes"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --mandir=$TERMUX_PREFIX/share/man --enable-man-symlinks" TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --mandir=$TERMUX_PREFIX/share/man --enable-man-symlinks"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --disable-rpath"
termux_step_pre_configure () { termux_step_pre_configure () {
TERMUX_PKG_SRCDIR=$TERMUX_PKG_SRCDIR/unix TERMUX_PKG_SRCDIR=$TERMUX_PKG_SRCDIR/unix
@ -19,4 +20,19 @@ termux_step_pre_configure () {
termux_step_post_make_install () { termux_step_post_make_install () {
cd $TERMUX_PREFIX/bin cd $TERMUX_PREFIX/bin
ln -f -s tclsh$_MAJOR_VERSION tclsh ln -f -s tclsh$_MAJOR_VERSION tclsh
# Hack to use system libsqlite (https://www.sqlite.org/howtocompile.html#tcl)
# since --with-system-sqlite fails to build:
rm -Rf $TERMUX_PREFIX/lib/sqlite3.13.0
local NEW_LIBDIR=$TERMUX_PREFIX/lib/tcl$_MAJOR_VERSION/sqlite
mkdir -p $NEW_LIBDIR
$CC $CFLAGS $CPPFLAGS $LDFLAGS \
-DUSE_SYSTEM_SQLITE=1 \
-o $NEW_LIBDIR/libtclsqlite3.so \
-shared \
$TERMUX_PKG_SRCDIR/../../../libsqlite/src/tea/generic/tclsqlite3.c \
-ltcl$_MAJOR_VERSION -lsqlite3
local LIBSQLITE_VERSION=`$PKG_CONFIG --modversion sqlite3`
echo "package ifneeded sqlite3 $LIBSQLITE_VERSION [list load [file join \$dir libtclsqlite3.so] Sqlite3]" > \
$NEW_LIBDIR/pkgIndex.tcl
} }

Loading…
Cancel
Save