From 069534a44bc958eba7d13986fc93ffc6fd13ab8b Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 22 Jun 2026 08:09:38 -0400 Subject: [PATCH] MT#55283 improve no-transcoding build profile Don't test for presence of packages when not needed Honour build profiles for dependencies and build flags Closes #2121 Change-Id: Icad346fd1afe14e07d959c8d15778a76abc28477 (cherry picked from commit c2038e035eb481961f1ac31ee696da870a7f975e) --- Makefile | 6 ++++++ daemon/Makefile | 6 ++++++ debian/control | 14 +++++++------- utils/gen-common-flags | 15 +++++++++------ 4 files changed, 28 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 19ed9a77c..aa1ea9351 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,12 @@ .DEFAULT_GOAL := all +ifeq (,$(filter pkg.ngcp-rtpengine.no-transcoding pkg.rtpengine.no-transcoding,$(DEB_BUILD_PROFILES))) with_transcoding ?= yes +else +with_transcoding ?= no +endif + +export with_transcoding export top_srcdir = $(CURDIR) diff --git a/daemon/Makefile b/daemon/Makefile index 83ae644e9..c274ce8a7 100644 --- a/daemon/Makefile +++ b/daemon/Makefile @@ -4,7 +4,13 @@ export top_srcdir = .. include ../lib/deps.Makefile +ifeq (,$(filter pkg.ngcp-rtpengine.no-transcoding pkg.rtpengine.no-transcoding,$(DEB_BUILD_PROFILES))) with_transcoding ?= yes +else +with_transcoding ?= no +endif + +export with_transcoding include ../lib/flags.Makefile diff --git a/debian/control b/debian/control index e7f4e8989..7cd23ddbe 100644 --- a/debian/control +++ b/debian/control @@ -10,11 +10,11 @@ Build-Depends: default-libmysqlclient-dev, discount, gperf, - libavcodec-dev (>= 6:10), - libavfilter-dev (>= 6:10), - libavformat-dev (>= 6:10), - libavutil-dev (>= 6:10), - libbcg729-dev , + libavcodec-dev (>= 6:10) , + libavfilter-dev (>= 6:10) , + libavformat-dev (>= 6:10) , + libavutil-dev (>= 6:10) , + libbcg729-dev , libbellesip-dev , libbencode-perl, libcrypt-openssl-rsa-perl, @@ -39,9 +39,9 @@ Build-Depends: libpcap0.8-dev, libpcre2-dev, libsocket6-perl, - libspandsp-dev, + libspandsp-dev , libssl-dev (>= 1.0.1), - libswresample-dev (>= 6:10), + libswresample-dev (>= 6:10) , libsystemd-dev, libtest2-suite-perl, liburing-dev (>= 2.3) , diff --git a/utils/gen-common-flags b/utils/gen-common-flags index f9ac26172..4b8efed09 100755 --- a/utils/gen-common-flags +++ b/utils/gen-common-flags @@ -70,26 +70,29 @@ echo "export LDFLAGS_DEFAULT := ${LDFLAGS_DEFAULT}" gen-pkgconf-flags GLIB glib-2.0 gen-pkgconf-flags GTHREAD gthread-2.0 gen-pkgconf-flags JSON_GLIB json-glib-1.0 -gen-pkgconf-flags LIBAVCODEC libavcodec -gen-pkgconf-flags LIBAVFILTER libavfilter -gen-pkgconf-flags LIBAVFORMAT libavformat -gen-pkgconf-flags LIBAVUTIL libavutil gen-pkgconf-flags LIBCURL libcurl gen-pkgconf-flags LIBCRYPTO libcrypto gen-pkgconf-flags LIBEVENT libevent_pthreads gen-pkgconf-flags LIBPCRE libpcre2-8 echo "CFLAGS_LIBPCRE += -DPCRE2_CODE_UNIT_WIDTH=8" -gen-pkgconf-flags LIBSWRESAMPLE libswresample gen-pkgconf-flags LIBWEBSOCKETS libwebsockets gen-pkgconf-flags LIBZ zlib gen-pkgconf-flags NCURSESW ncursesw gen-pkgconf-flags OPENSSL openssl gen-pkgconf-flags OPUS opus -gen-pkgconf-flags SPANDSP spandsp gen-pkgconf-flags LIBJWT libjwt gen-pkgconf-flags LIBHIREDIS hiredis gen-pkgconf-flags LIBPCAP libpcap +if [ "${with_transcoding:-yes}" = yes ]; then + gen-pkgconf-flags LIBAVCODEC libavcodec + gen-pkgconf-flags LIBAVFILTER libavfilter + gen-pkgconf-flags LIBAVFORMAT libavformat + gen-pkgconf-flags LIBAVUTIL libavutil + gen-pkgconf-flags LIBSWRESAMPLE libswresample + gen-pkgconf-flags SPANDSP spandsp +fi + if pkg-config --exists libmosquitto; then gen-pkgconf-flags MQTT libmosquitto echo "CFLAGS_MQTT += -DHAVE_MQTT"