[vlc-commits] [Git][videolan/vlc][master] 3 commits: contrib: protobuf: fix protoc detection

Hugo Beauzée-Luyssen (@chouquette) gitlab at videolan.org
Sat Mar 5 18:01:02 UTC 2022



Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC


Commits:
772a68b2 by Steve Lhomme at 2022-03-05T15:44:38+00:00
contrib: protobuf: fix protoc detection

Only assume protoc is available for native builds.

Otherwise we check '$(HOST)-protoc' and 'protoc'.

- - - - -
d3d4267f by Steve Lhomme at 2022-03-05T15:44:38+00:00
configure: don't check luac in deprecated path

Maybe it was OK to keep it in 3.0 but in 4.0 we can't expect to reuse ancient
folders, just to save a luac rebuild.

Also add a nice message when configuring.

- - - - -
a080e5d3 by Steve Lhomme at 2022-03-05T15:44:38+00:00
contrib: lua: fix luac detection

Only assume luac is available for native builds. Otherwise we need $(HOST)-luac.

- - - - -


3 changed files:

- configure.ac
- contrib/src/lua/rules.mak
- contrib/src/protobuf/rules.mak


Changes:

=====================================
configure.ac
=====================================
@@ -534,14 +534,12 @@ AS_IF([test -n "${CONTRIB_DIR}"], [
   LDFLAGS="${LDFLAGS} -L${CONTRIB_DIR}/lib"
 
   AS_IF([test -z "$LUAC"], [
-    dnl Old contribs mixed cross-tools and cross-compiled executables
-    AS_IF([test -x "${CONTRIB_DIR}/bin/luac${BUILDEXEEXT}"], [
-      LUAC="${CONTRIB_DIR}/bin/luac${BUILDEXEEXT}"
-    ])
-
-    dnl Newer contribs follow usual name space rules
+    AC_MSG_CHECKING([if contribs provide luac])
     AS_IF([test -x "${CONTRIB_DIR}/../bin/${host_alias}-luac${BUILDEXEEXT}"], [
       LUAC="${CONTRIB_DIR}/../bin/${host_alias}-luac${BUILDEXEEXT}"
+      AC_MSG_RESULT([yes])
+    ],[
+      AC_MSG_RESULT([no])
     ])
   ])
 


=====================================
contrib/src/lua/rules.mak
=====================================
@@ -29,16 +29,32 @@ endif
 PKGS += lua luac
 PKGS_ALL += luac
 ifeq ($(call need_pkg,"lua >= 5.1"),)
-PKGS_FOUND += lua luac
+PKGS_FOUND += lua
+ifndef HAVE_CROSS_COMPILE
+PKGS_FOUND += luac
+endif
 else
 ifeq ($(call need_pkg,"lua5.2"),)
-PKGS_FOUND += lua luac
+PKGS_FOUND += lua
+ifndef HAVE_CROSS_COMPILE
+PKGS_FOUND += luac
+endif
 else
 ifeq ($(call need_pkg,"lua5.1"),)
-PKGS_FOUND += lua luac
+PKGS_FOUND += lua
+ifndef HAVE_CROSS_COMPILE
+PKGS_FOUND += luac
 endif
 endif
 endif
+endif
+
+ifeq ($(shell $(HOST)-luac -v 2>/dev/null | head -1 | sed  -E 's/Lua ([0-9]+).([0-9]+).*/\1.\2/'),$(LUA_SHORTVERSION))
+PKGS_FOUND += luac
+endif
+ifeq ($(shell $(HOST)-luac -v 2>/dev/null | head -1 | sed  -E 's/Lua ([0-9]+).([0-9]+).*/\1.\2/'),5.2)
+PKGS_FOUND += luac
+endif
 
 $(TARBALLS)/lua-$(LUA_VERSION).tar.gz:
 	$(call download_pkg,$(LUA_URL),lua)


=====================================
contrib/src/protobuf/rules.mak
=====================================
@@ -7,11 +7,17 @@ PKGS += protobuf protoc
 endif # !HAVE_TVOS
 PKGS_ALL += protoc
 ifeq ($(call need_pkg, "protobuf-lite = $(PROTOBUF_VERSION)"),)
-PKGS_FOUND += protobuf protoc
-else
+PKGS_FOUND += protobuf
+ifndef HAVE_CROSS_COMPILE
+PKGS_FOUND += protoc
+endif
+endif
+
+ifeq ($(shell $(HOST)-protoc --version 2>/dev/null | head -1 | sed s/'.* '//),$(PROTOBUF_VERSION))
+PKGS_FOUND += protoc
+endif
 ifeq ($(shell protoc --version 2>/dev/null | head -1 | sed s/'.* '//),$(PROTOBUF_VERSION))
 PKGS_FOUND += protoc
-endif # protoc
 endif
 
 $(TARBALLS)/protobuf-$(PROTOBUF_VERSION)-cpp.tar.gz:



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/4efd9096639357fca7f4077ef1d5a04021c31641...a080e5d3484e634c612bb97a392131436e5ced75

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/4efd9096639357fca7f4077ef1d5a04021c31641...a080e5d3484e634c612bb97a392131436e5ced75
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list