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

Rémi Denis-Courmont remi at remlab.net
Fri Jan 31 18:06:04 CET 2020


Hi,

I don't really see the point in adding an option here, and the consideration is not specific to cross-compilation anyway.  Plus some pkg-config packages refer to build tools, static libraries or protocol metadata that are necessary and/or always usable, so blanket blacklist just feels wrong.

It's just that we never cross-compiled to a platform that uses pkg-config. Back then, the ARM Linux builds were faked as native builds using Scratchbox.

Le 31 janvier 2020 17:25:52 GMT+02:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>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

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20200131/790f2b97/attachment.html>


More information about the vlc-devel mailing list