[vlc-devel] [PATCH] contrib: add a bootstrap option to allow using prebuilt packages when cross-compiling

Marvin Scholz (ePirat) epirat07 at gmail.com
Fri Jan 31 16:32:57 CET 2020


That option name is imo too confusing considering we call it „prebuilt“ contribs while it seems here you refer to finding „system“ libraries using pkg-config which has nothing to do with prebuilt contribs.

Von meinem iPhone gesendet

> Am 31.01.2020 um 16:26 schrieb Steve Lhomme <robux4 at ycbcr.xyz>:
> 
> In the case of Raspbian there's a heavily patched libavcodec which we can
> access through pre-built packages.
> Qt cross compiling also a major PITA which we can avoid this way.
> ---
> contrib/bootstrap    | 6 ++++++
> contrib/src/main.mak | 7 +++++--
> 2 files changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/contrib/bootstrap b/contrib/bootstrap
> index 5ed5f6f25d3..998bc6e34a2 100755
> --- a/contrib/bootstrap
> +++ b/contrib/bootstrap
> @@ -36,6 +36,7 @@ usage()
>    echo "                   (USE AT YOUR OWN LEGAL RISKS)"
>    echo "  --disable-optim  disable optimization in libraries"
>    echo "  --enable-pdb     generate debug information in PDB format"
> +    echo "  --enable-prebuilt use pre-compiled packages via pkg-config"
> }
> 
> BUILD=
> @@ -51,6 +52,7 @@ GNUV3="1"
> AD_CLAUSES=
> WITH_OPTIMIZATION="1"
> ENABLE_PDB=
> +USE_BUILT_PKGS=
> 
> while test -n "$1"
> do
> @@ -95,6 +97,9 @@ do
>        --enable-ad-clauses)
>            AD_CLAUSES=1
>            ;;
> +        --enable-prebuilt)
> +            USE_BUILT_PKGS=1
> +            ;;
>        --disable-*)
>            PKGS_DISABLE="${PKGS_DISABLE} ${1#--disable-}"
>            ;;
> @@ -256,6 +261,7 @@ test -z "$GNUV3" || add_make_enabled "GNUV3"
> test -z "$AD_CLAUSES" || add_make_enabled "AD_CLAUSES"
> test -z "$WITH_OPTIMIZATION" || add_make_enabled "WITH_OPTIMIZATION"
> test -z "$ENABLE_PDB" || add_make_enabled "ENABLE_PDB"
> +test -z "$USE_BUILT_PKGS" || add_make_enabled "USE_BUILT_PKGS"
> test "`uname -o 2>/dev/null`" != "Msys" || add_make "CMAKE_GENERATOR := -G \"MSYS Makefiles\""
> 
> #
> diff --git a/contrib/src/main.mak b/contrib/src/main.mak
> index 73d23d0018f..5b0d942bc1c 100644
> --- a/contrib/src/main.mak
> +++ b/contrib/src/main.mak
> @@ -46,14 +46,17 @@ HAVE_WIN64 := 1
> endif
> 
> ifdef HAVE_CROSS_COMPILE
> -need_pkg = 1
> +ifdef USE_BUILT_PKGS
> +need_pkg = $(shell $(PKG_CONFIG) $(1) || echo 1)
> else
> +need_pkg = 1
> +endif
> ifeq ($(findstring mingw32,$(BUILD)),mingw32)
> need_pkg = $(shell PKG_CONFIG_LIBDIR="${PKG_CONFIG_PATH}" $(PKG_CONFIG) $(1) || echo 1)
> +endif
> else
> need_pkg = $(shell $(PKG_CONFIG) $(1) || echo 1)
> endif
> -endif
> 
> ifeq ($(findstring mingw32,$(BUILD)),mingw32)
> MSYS_BUILD := 1
> -- 
> 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