Skip to content
Snippets Groups Projects
Commit 11cefbd4 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen Committed by Nicolas Pomepuy
Browse files

buildsystem: Rely on sqlite's .pc file to find it

Once we start building the medialibrary with meson, there's no trivial
way of pointing it to a library without a .pc or another dependency
system
parent 898fddd5
No related branches found
No related tags found
1 merge request!910Switch medialib to meson
......@@ -57,6 +57,8 @@ if [ ! -d "${MEDIALIBRARY_MODULE_DIR}/${SQLITE_RELEASE}" ]; then
fi
tar -xozf ${SQLITE_RELEASE}.tar.gz
rm -f ${SQLITE_RELEASE}.tar.gz
cd ${SQLITE_RELEASE}
patch -1 ${SRC_DIR}/buildsystem/sqlite/sqlite-no-shell.patch
fi
cd ${MEDIALIBRARY_MODULE_DIR}/${SQLITE_RELEASE}
if [ ! -d "build-$ANDROID_ABI" ]; then
......@@ -67,6 +69,8 @@ cd "build-$ANDROID_ABI";
if [ ! -e ./config.status -o "$RELEASE" = "1" ]; then
../configure \
--host=$TARGET_TUPLE \
--prefix=${SRC_DIR}/medialibrary/prefix/${TARGET_TUPLE} \
--disable-shell \
--enable-force-attachments-api \
--disable-shared \
CFLAGS="${VLC_CFLAGS}" \
......@@ -76,9 +80,12 @@ if [ ! -e ./config.status -o "$RELEASE" = "1" ]; then
fi
make $MAKEFLAGS
avlc_checkfail "sqlite build failed"
make install
avlc_checkfail "sqlite installation failed"
cd ${SRC_DIR}
avlc_checkfail "sqlite build failed"
##############################
# FETCH MEDIALIBRARY SOURCES #
......@@ -135,10 +142,9 @@ if [ ! -e ./config.h -o "$RELEASE" = "1" ]; then
STRIP="${CROSS_TOOLS}strip" \
RANLIB="${CROSS_TOOLS}ranlib" \
PKG_CONFIG_LIBDIR="$SRC_DIR/vlc/build-android-${TARGET_TUPLE}/install/lib/pkgconfig" \
PKG_CONFIG_PATH="$SRC_DIR/medialibrary/prefix/${TARGET_TUPLE}/lib/pkgconfig" \
LIBJPEG_LIBS="-L$SRC_DIR/vlc/contrib/contrib-android-$TARGET_TUPLE/jpeg/.libs -ljpeg" \
LIBJPEG_CFLAGS="-I$SRC_DIR/vlc/contrib/$TARGET_TUPLE/include/" \
SQLITE_LIBS="-L$MEDIALIBRARY_MODULE_DIR/$SQLITE_RELEASE/build-$ANDROID_ABI/.libs -lsqlite3" \
SQLITE_CFLAGS="-I$MEDIALIBRARY_MODULE_DIR/$SQLITE_RELEASE" \
AR="${CROSS_TOOLS}ar"
avlc_checkfail "medialibrary: autoconf failed"
fi
......
--- sqlite/configure.ac.noshell 2020-04-09 10:07:14.127078500 +0200
+++ sqlite/configure.ac 2020-04-09 10:03:50.435193500 +0200
@@ -203,6 +203,16 @@ fi
AC_SUBST(EXTRA_SHELL_OBJ)
#-----------------------------------------------------------------------
+#-----------------------------------------------------------------------
+# --disable-shell
+#
+AC_ARG_ENABLE(shell, [AS_HELP_STRING(
+ [--enable-shell],
+ [build the shell tool [default=yes]])],
+ [], [enable_shell=yes])
+AM_CONDITIONAL([BUILD_SHELL], [test x"$enable_shell" = "xyes"])
+#-----------------------------------------------------------------------
+
AC_CHECK_FUNCS(posix_fallocate)
AC_CHECK_HEADERS(zlib.h,[
AC_SEARCH_LIBS(deflate,z,[BUILD_CFLAGS="$BUILD_CFLAGS -DSQLITE_HAVE_ZLIB"])
--- sqlite/Makefile.am.noshell 2020-04-09 10:07:10.055569100 +0200
+++ sqlite/Makefile.am 2020-04-09 10:04:00.028577700 +0200
@@ -4,7 +4,9 @@ lib_LTLIBRARIES = libsqlite3.la
libsqlite3_la_SOURCES = sqlite3.c
libsqlite3_la_LDFLAGS = -no-undefined -version-info 8:6:8
+if BUILD_SHELL
bin_PROGRAMS = sqlite3
+endif
sqlite3_SOURCES = shell.c sqlite3.h
EXTRA_sqlite3_SOURCES = sqlite3.c
sqlite3_LDADD = @EXTRA_SHELL_OBJ@ @READLINE_LIBS@
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment