[vlc-commits] [Git][videolan/vlc][master] contrib: opus: switch to meson build

Tristan Matthews (@tmatth) gitlab at videolan.org
Wed Apr 26 14:08:53 UTC 2023



Tristan Matthews pushed to branch master at VideoLAN / VLC


Commits:
fb9cd5de by Tristan Matthews at 2023-04-26T12:48:17+00:00
contrib: opus: switch to meson build

- - - - -


3 changed files:

- + contrib/src/opus/0001-meson-arm64.patch
- − contrib/src/opus/0002-CMake-set-the-pkg-config-string-as-with-autoconf-mes.patch
- contrib/src/opus/rules.mak


Changes:

=====================================
contrib/src/opus/0001-meson-arm64.patch
=====================================
@@ -0,0 +1,36 @@
+From 07d1fa08b618585c7c019b7a24a221c8161cbbb5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim at centricular.com>
+Date: Thu, 20 Apr 2023 19:06:13 +0100
+Subject: [PATCH] meson: fix build on arm64
+
+Would fail like:
+
+Checking if "compiler supports ARMv7/AArch64 NEON intrinsics" : links: NO
+Checking if "compiler supports ARMv7/AArch64 NEON intrinsics with -mfpu=neon" : links: YES
+Checking if "compiler supports AArch64 NEON intrinsics" : links: NO
+Checking if "compiler supports AArch64 NEON intrinsics with -mfpu=neon" : links: NO
+Message: Compiler does not support AArch64 NEON intrinsics
+../silk/meson.build:28:45: ERROR: Unknown variable "have_arm_intrinsics_or_asm".
+
+since commit 08088411259056f63774befb2d00951fdd5c46ba.
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index ed66d380..9f28de33 100644
+--- a/meson.build
++++ b/meson.build
+@@ -574,8 +574,8 @@ foreach l : lines
+ endforeach
+ 
+ subdir('include')
+-subdir('silk')
+ subdir('celt')
++subdir('silk')
+ subdir('src')
+ 
+ configure_file(output: 'config.h', configuration: opus_conf)
+-- 
+GitLab
+


=====================================
contrib/src/opus/0002-CMake-set-the-pkg-config-string-as-with-autoconf-mes.patch deleted
=====================================
@@ -1,28 +0,0 @@
-From 77b5a3a4c024892a33c5ead0d38c707c02cef790 Mon Sep 17 00:00:00 2001
-From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Fri, 9 Sep 2022 07:58:02 +0200
-Subject: [PATCH 2/2] CMake: set the pkg-config string as with autoconf/meson
-
----
- CMakeLists.txt | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 9d824cdc..216ed4b1 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -533,6 +533,14 @@ if(OPUS_INSTALL_PKG_CONFIG_MODULE)
-   set(libdir ${CMAKE_INSTALL_FULL_LIBDIR})
-   set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR})
-   set(VERSION ${PACKAGE_VERSION})
-+  if(OPUS_FIXED_POINT)
-+    set(PC_BUILD "fixed-point")
-+  else()
-+    set(PC_BUILD "floating-point")
-+  endif()
-+  if(OPUS_CUSTOM_MODES)
-+    set(PC_BUILD "${PC_BUILD}, custom modes")
-+  endif()
-   if(HAVE_LIBM)
-     set(LIBM "-lm")
-   endif()


=====================================
contrib/src/opus/rules.mak
=====================================
@@ -16,28 +16,16 @@ $(TARBALLS)/opus-$(OPUS_VERSION).tar.gz:
 
 opus: opus-$(OPUS_VERSION).tar.gz .sum-opus
 	$(UNPACK)
-	$(APPLY) $(SRC)/opus/0002-CMake-set-the-pkg-config-string-as-with-autoconf-mes.patch
-	# fix missing included file in packaged source
-	cd $(UNPACK_DIR) && sed -e 's,include(opus_buildtype,#include(opus_buildtype,' -i.orig CMakeLists.txt
+	$(APPLY) $(SRC)/opus/0001-meson-arm64.patch
 	$(MOVE)
 
-OPUS_CONF=
+OPUS_CONF=  -D extra-programs=disabled -D tests=disabled -D docs=disabled
 ifndef HAVE_FPU
-OPUS_CONF += -DOPUS_FIXED_POINT=ON
+OPUS_CONF += -D fixed-point=true
 endif
 
-# rtcd is not working on win64-arm64
-ifdef HAVE_WIN64
-ifeq ($(ARCH),aarch64)
-OPUS_CONF += -DOPUS_MAY_HAVE_NEON=OFF -DOPUS_PRESUME_NEON=ON
-endif
-endif
-
-
-
-.opus: opus toolchain.cmake
-	$(CMAKECLEAN)
-	$(HOSTVARS) $(CMAKE) $(OPUS_CONF)
-	+$(CMAKEBUILD)
-	$(CMAKEINSTALL)
+.opus: opus crossfile.meson
+	$(MESONCLEAN)
+	$(HOSTVARS_MESON) $(MESON) $(OPUS_CONF)
+	+$(MESONBUILD)
 	touch $@



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/fb9cd5dea159613943904cc28389c1c1ed3a8b26

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/fb9cd5dea159613943904cc28389c1c1ed3a8b26
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