build: add support for debian trixie 86/42086/4
authorVladimir Smirnov <[email protected]>
Fri, 3 Jan 2025 11:46:53 +0000 (12:46 +0100)
committerDave Wallace <[email protected]>
Thu, 23 Jan 2025 05:30:55 +0000 (05:30 +0000)
Debian testing is currently codenamed trixie and planned
to be released in 2025. As it is still 'testing', it doesn't
define VERSION_ID in /etc/os-release file, therefore it
should be matched by VERSION_CODENAME instead

That patch adds support for forcing VERSION_ID based on
codename in case VERSION_ID is absent and defines correct
dependencies for debian/trixie.

Type: make

Change-Id: Idb68630a7ec53d99223e4f6496db4b3a5b61363e
Signed-off-by: Vladimir Smirnov <[email protected]>
Makefile

index 3144905..c637ec1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -57,6 +57,15 @@ GDB_ARGS= -ex "handle SIGUSR1 noprint nostop"
 ifneq ($(shell uname),Darwin)
 OS_ID        = $(shell grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
 OS_VERSION_ID= $(shell grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
+OS_CODENAME  = $(shell grep '^VERSION_CODENAME=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
+endif
+
+# Fill in OS_VERSION_ID based on codename if its absent
+ifeq ($(OS_VERSION_ID),)
+# Debian testing doesn't define version_id and therefore need to be referenced by name
+ifeq ($(OS_CODENAME),trixie)
+OS_VERSION_ID = 13
+endif
 endif
 
 ifeq ($(filter ubuntu debian linuxmint,$(OS_ID)),$(OS_ID))
@@ -127,6 +136,13 @@ else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-12)
        # TODO: remove once ubuntu 20.04 is deprecated and extras/scripts/checkstyle.sh is upgraded to -15
        export CLANG_FORMAT_VER=15
        LIBFFI=libffi8
+else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-13)
+       DEB_DEPENDS += virtualenv
+       DEB_DEPENDS += clang-19 clang-format-19
+       # for extras/scripts/checkstyle.sh
+       # TODO: remove once ubuntu 20.04 is deprecated and extras/scripts/checkstyle.sh is upgraded to -15
+       export CLANG_FORMAT_VER=15
+       LIBFFI=libffi8
 else
        DEB_DEPENDS += clang-11 clang-format-11
        LIBFFI=libffi7