[vlc-commits] [Git][videolan/vlc][master] 5 commits: tools: get the latest config.guess/config.sub and patch to support arm64_32

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Jun 25 08:30:30 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
ef36847c by Steve Lhomme at 2024-06-25T09:14:48+02:00
tools: get the latest config.guess/config.sub and patch to support arm64_32

It's updated independently from automake which we use to pick a recent enough version.

The fake automake path is to fool the contribs in using that one prioritarily.

- - - - -
591fb885 by Steve Lhomme at 2024-06-25T09:14:48+02:00
tools: copy the local config.guess in automake/autotools

If it exists.

- - - - -
3732bf36 by Steve Lhomme at 2024-06-25T09:15:00+02:00
tools: install config.guess/sub in a dummy autoconf folder

Rather than automake.
config.guess/sub are installed by autoreconf --install --force, not because of automake.

- - - - -
980c20db by Steve Lhomme at 2024-06-25T09:15:01+02:00
contrib: use our custom config.guess if it's present

When it's not forced to be created we may need to check
if the timestamp is older or not.

- - - - -
95c7c1b5 by Steve Lhomme at 2024-06-25T09:15:01+02:00
bootstrap: use our config.guess to reconf VLC

- - - - -


8 changed files:

- bootstrap
- contrib/src/main.mak
- extras/tools/SHA512SUMS
- extras/tools/bootstrap
- + extras/tools/config.guess-config-add-support-for-arm64_32.patch
- + extras/tools/config.sub-config-add-support-for-arm64_32.patch
- extras/tools/packages.mak
- extras/tools/tools.mak


Changes:

=====================================
bootstrap
=====================================
@@ -29,6 +29,9 @@ if test -d ${VLC_TOOLS}/share/aclocal; then
   # https://www.gnu.org/software/automake/manual/html_node/Macro-Search-Path.html
   ACLOCAL_ARGS="${ACLOCAL_ARGS} -I ${VLC_TOOLS}/share/aclocal/"
 fi
+if test -f ${VLC_TOOLS}/share/autoconf-vlc/build-aux/config.guess -a -f ${VLC_TOOLS}/share/autoconf-vlc/build-aux/config.sub; then
+  export autom4te_buildauxdir="$( cd "${VLC_TOOLS}/share/autoconf-vlc/build-aux" ; pwd -P )"
+fi
 
 ###
 ###  Get a sane environment, just in case


=====================================
contrib/src/main.mak
=====================================
@@ -442,7 +442,7 @@ APPLY = (cd $(UNPACK_DIR) && patch -fp1) <
 pkg_static = (cd $(UNPACK_DIR) && $(SRC_BUILT)/pkg-static.sh $(1))
 MOVE = mv $(UNPACK_DIR) $@ && touch $@
 
-AUTOMAKE_DATA_DIRS=$(foreach n,$(foreach n,$(subst :, ,$(shell echo $$PATH)),$(abspath $(n)/../share)),$(wildcard $(n)/automake*))
+AUTOMAKE_DATA_DIRS=$(foreach n,$(foreach n,$(subst :, ,$(shell echo $$PATH)),$(abspath $(n)/../share)),$(wildcard $(n)/autoconf*/build-aux))
 UPDATE_AUTOCONFIG = for dir in $(AUTOMAKE_DATA_DIRS); do \
 		if test -f "$${dir}/config.sub" -a -f "$${dir}/config.guess"; then \
 			cp "$${dir}/config.sub" "$${dir}/config.guess" $(UNPACK_DIR); \
@@ -450,9 +450,13 @@ UPDATE_AUTOCONFIG = for dir in $(AUTOMAKE_DATA_DIRS); do \
 		fi; \
 	done
 
+ifneq ($(wildcard $(abspath $(VLC_TOOLS))/share/autoconf-vlc/build-aux),)
+VLC_CONFIG_GUESS := autom4te_buildauxdir=$(abspath $(VLC_TOOLS))/share/autoconf-vlc/build-aux
+endif
+
 AUTORECONF = GTKDOCIZE=true autoreconf
 RECONF = mkdir -p -- $(PREFIX)/share/aclocal && \
-	cd $< && $(AUTORECONF) -fiv
+	cd $< && $(VLC_CONFIG_GUESS) $(AUTORECONF) -fiv
 
 BUILD_DIR = $</vlc_build
 BUILD_SRC := ..


=====================================
extras/tools/SHA512SUMS
=====================================
@@ -17,3 +17,5 @@ d24849b93de58b20f518c071687e7bfa653a96600382f36c4cf7fc1047656458f75f093b911b786b
 8b5768cf0dab5f88d2f3e3962305910e707ff810cbd21b5997aab0bb6abe1c4d5dbd24ec59ab4072f1faa9b81daa8be993d56679445afa93700676f52e314d23  meson-1.2.0.tar.gz
 27acef46d9eb67203d708b57d80b853f76fa4b9c2720ff36ec161e6cdf702249e7982214ddf60bae75511aa79bc7d92aa27e3eab7ef9c0f5c040e8e42e76a385  libtool-2.4.7.tar.gz
 855ebce5ff36753238a44f14c95be7afdc3990b085960345ca2caf1a2db884f7db74d406ce9eec2f4a52abb8a063d4ed000a36b317c9a353ef4e25e2cca9a3f4  gperf-3.1.tar.gz
+1bf28876ee38557042bf790af3d06ae0dcddc2d310480a821fbae1f269d433259b1ef0243fa6eff829ce67a22e8461655d41bbb7382355b7530d5648e296c9d6  config.guess
+14e316b18542d0a971d925a0dfca38f67680f1e2933d170767b59137d527a15d2b785910c9ba0845ebba7e089e3a05fe60aabd6a7c06a7481822942a698f8a6a  config.sub


=====================================
extras/tools/bootstrap
=====================================
@@ -134,6 +134,23 @@ else
 fi
 }
 
+check_config() {
+    # always install it for now as we need the arm64_32 patch
+    NEEDED="$NEEDED configguess"
+# # TODO find the relevant config.guess
+# AUTOMAKE_DATA_DIRS=$(foreach n,$(foreach n,$(subst :, ,$(shell echo $$PATH)),$(abspath $(n)/../share)),$(wildcard $(n)/automake*))
+# for dir in $AUTOMAKE_DATA_DIRS; do
+#     if test -f "$dir/config.sub" -a -f "$dir/config.guess"; then
+#         # check if it's recent enough
+#         DIR_VERSION=$("$dir/config.guess" --time-stamp | sed -e 's/-/./g')
+#         check_version "$dir/config.guess" $2 $DIR_VERSION
+#         # cp "$dir/config.sub" "$dir/config.guess" $(UNPACK_DIR);
+#         break
+#     fi
+# done
+}
+
+check_config 2024.01.01
 check autoconf 2.69
 check automake 1.15
 check m4 1.4.16


=====================================
extras/tools/config.guess-config-add-support-for-arm64_32.patch
=====================================
@@ -0,0 +1,26 @@
+From 1d28edfb0574c77591403f133d42e0edf7d037e1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <felix at feepk.net>
+Date: Wed, 19 Jun 2024 13:59:41 +0200
+Subject: [PATCH] config: add support for arm64_32
+
+---
+ config.guess | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletion(-)
+
+diff --git a/config.guess b/config.guess
+index f6d217a4..84bd5401 100755
+--- a/config.guess
++++ b/config.guess
+@@ -1455,6 +1455,9 @@ EOF
+     arm64:Darwin:*:*)
+ 	GUESS=aarch64-apple-darwin$UNAME_RELEASE
+ 	;;
++    arm64_32:Darwin:*:*)
++	GUESS=aarch64_32-apple-darwin$UNAME_RELEASE
++	;;
+     *:Darwin:*:*)
+ 	UNAME_PROCESSOR=`uname -p`
+ 	case $UNAME_PROCESSOR in
+-- 
+2.32.1 (Apple Git-133)
+


=====================================
extras/tools/config.sub-config-add-support-for-arm64_32.patch
=====================================
@@ -0,0 +1,25 @@
+From 1d28edfb0574c77591403f133d42e0edf7d037e1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <felix at feepk.net>
+Date: Wed, 19 Jun 2024 13:59:41 +0200
+Subject: [PATCH] config: add support for arm64_32
+
+---
+ config.sub   | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletion(-)
+
+diff --git a/config.sub b/config.sub
+index 2c6a07ab..b7f358cb 100755
+--- a/config.sub
++++ b/config.sub
+@@ -1181,7 +1181,7 @@ case $cpu-$vendor in
+ 		case $cpu in
+ 			1750a | 580 \
+ 			| a29k \
+-			| aarch64 | aarch64_be | aarch64c | arm64ec \
++			| aarch64 | aarch64_be | aarch64c | arm64ec | aarch64_32 | arm64_32 \
+ 			| abacus \
+ 			| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
+ 			| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
+-- 
+2.32.1 (Apple Git-133)
+


=====================================
extras/tools/packages.mak
=====================================
@@ -58,3 +58,9 @@ NINJA_URL=https://github.com/Kitware/ninja/archive/refs/tags/v$(NINJA_BUILD_NAME
 
 GPERF_VERSION=3.1
 GPERF_URL=$(GNU)/gperf/gperf-$(GPERF_VERSION).tar.gz
+
+CONFIGGUESS_VERSION=948ae97ca5703224bd3eada06b7a69f40dd15a02
+CONFIGGUESS_URL=https://git.savannah.gnu.org/cgit/config.git/plain/config.guess?id=$(CONFIGGUESS_VERSION)
+
+CONFIGSUB_VERSION=948ae97ca5703224bd3eada06b7a69f40dd15a02
+CONFIGSUB_URL=https://git.savannah.gnu.org/cgit/config.git/plain/config.sub?id=$(CONFIGSUB_VERSION)


=====================================
extras/tools/tools.mak
=====================================
@@ -165,13 +165,34 @@ CLEAN_PKG += xz
 DISTCLEAN_PKG += xz-$(XZ_VERSION).tar.bz2
 CLEAN_FILE += .buildxz
 
+# config.guess
+
+config.guess:UNPACK_DIR=.
+config.guess:
+	$(call download_pkg,$(CONFIGGUESS_URL),config.guess)
+	$(APPLY) $(TOOLS)/config.guess-config-add-support-for-arm64_32.patch
+
+config.sub:UNPACK_DIR=.
+config.sub:
+	$(call download_pkg,$(CONFIGSUB_URL),config.sub)
+	$(APPLY) $(TOOLS)/config.sub-config-add-support-for-arm64_32.patch
+
+.buildconfigguess: config.guess config.sub
+	# install in a dummy autoconf so that VLC contribs pick it
+	install -d           "$(PREFIX)/share/autoconf-vlc/build-aux"
+	install config.guess "$(PREFIX)/share/autoconf-vlc/build-aux"
+	install config.sub   "$(PREFIX)/share/autoconf-vlc/build-aux"
+	touch $@
+
 # autoconf
 
 autoconf-$(AUTOCONF_VERSION).tar.gz:
 	$(call download_pkg,$(AUTOCONF_URL),autoconf)
 
-autoconf: autoconf-$(AUTOCONF_VERSION).tar.gz
+autoconf: autoconf-$(AUTOCONF_VERSION).tar.gz .configguess
 	$(UNPACK)
+	@-cp config.guess $(UNPACK_DIR)/build-aux
+	@-cp config.sub $(UNPACK_DIR)/build-aux
 	$(MOVE)
 
 .buildautoconf: autoconf .pkg-config .m4
@@ -187,10 +208,12 @@ DISTCLEAN_PKG += autoconf-$(AUTOCONF_VERSION).tar.gz
 automake-$(AUTOMAKE_VERSION).tar.gz:
 	$(call download_pkg,$(AUTOMAKE_URL),automake)
 
-automake: automake-$(AUTOMAKE_VERSION).tar.gz
+automake: automake-$(AUTOMAKE_VERSION).tar.gz .configguess
 	$(UNPACK)
 	$(APPLY) $(TOOLS)/automake-disable-documentation.patch
 	$(APPLY) $(TOOLS)/automake-clang.patch
+	@-cp config.guess $(UNPACK_DIR)/lib
+	@-cp config.sub $(UNPACK_DIR)/lib
 	$(MOVE)
 
 .buildautomake: automake .autoconf



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/bcd7d4ef4fb99f5fdd0b9366345486a02fd0335f...95c7c1b5747ca4021cc8a40bdce968e47984ef88

-- 
This project does not include diff previews in email notifications.
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/bcd7d4ef4fb99f5fdd0b9366345486a02fd0335f...95c7c1b5747ca4021cc8a40bdce968e47984ef88
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