[vlc-devel] [PATCH] contrib: sqlite: don't build the shell exe in winstore builds

Steve Lhomme robux4 at ycbcr.xyz
Thu Apr 9 10:19:46 CEST 2020


It's not done for all platforms as it runs reconf which can be slow, but 
it could be done.

On 2020-04-09 10:16, Steve Lhomme wrote:
> It's using (formerly) forbidden patches and we don't need it.
> ---
>   contrib/src/sqlite/rules.mak             |  9 +++++++
>   contrib/src/sqlite/sqlite-no-shell.patch | 31 ++++++++++++++++++++++++
>   2 files changed, 40 insertions(+)
>   create mode 100644 contrib/src/sqlite/sqlite-no-shell.patch
> 
> diff --git a/contrib/src/sqlite/rules.mak b/contrib/src/sqlite/rules.mak
> index e6564abca41..3bf88e4414e 100644
> --- a/contrib/src/sqlite/rules.mak
> +++ b/contrib/src/sqlite/rules.mak
> @@ -15,6 +15,9 @@ SQLITE_CFLAGS += -DSQLITE_OS_WINRT=1
>   endif
>   
>   SQLITE_CONF = $(HOSTCONF) --disable-readline
> +ifdef HAVE_WINSTORE
> +SQLITE_CONF += --disable-shell
> +endif
>   
>   $(TARBALLS)/sqlite-autoconf-$(SQLITE_VERSION).tar.gz:
>   	$(call download_pkg,$(SQLITE_URL),sqlite)
> @@ -23,10 +26,16 @@ $(TARBALLS)/sqlite-autoconf-$(SQLITE_VERSION).tar.gz:
>   
>   sqlite: sqlite-autoconf-$(SQLITE_VERSION).tar.gz .sum-sqlite
>   	$(UNPACK)
> +ifdef HAVE_WINSTORE
> +	$(APPLY) $(SRC)/sqlite/sqlite-no-shell.patch
> +endif
>   	$(call pkg_static, "sqlite3.pc.in")
>   	$(MOVE)
>   
>   .sqlite: sqlite
> +ifdef HAVE_WINSTORE
> +	$(RECONF)
> +endif
>   	cd $< && $(HOSTVARS) CFLAGS="$(SQLITE_CFLAGS)" ./configure $(SQLITE_CONF)
>   	cd $< && $(MAKE) && $(MAKE) install
>   	touch $@
> diff --git a/contrib/src/sqlite/sqlite-no-shell.patch b/contrib/src/sqlite/sqlite-no-shell.patch
> new file mode 100644
> index 00000000000..1277061c798
> --- /dev/null
> +++ b/contrib/src/sqlite/sqlite-no-shell.patch
> @@ -0,0 +1,31 @@
> +--- 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@
> -- 
> 2.17.1
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> 


More information about the vlc-devel mailing list