package/luvi: fix build without c++

Buildroot commit 00317f0aff bumped the
package to 2.15.0 which first included upstream commit
262d5f7dff
that added the miniz submodule.

The version of miniz used by luvi contains commit
05ab4dc05c
which removed "C" from the project variable causing a dependency to c++
which causes build errors when the toolchain does not support c++:

-- Check for working CXX compiler: /bin/false - broken

This dependency was not intended so we add an upstream commit to fix the
problem.

Fixes:
https://autobuild.buildroot.net/results/2a5/2a5cf09dc9303b11e2a2769c5b0b319284ec1bbb/

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit d267b59fa9)
Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
This commit is contained in:
Bernd Kuhls
2026-10-06 18:20:18 +02:00
committed by Raphaël Mélotte
parent 33ea536021
commit 3f859c10af

View File

@@ -0,0 +1,45 @@
From c6a1f6a3650e8487e506080eb34a244e75e37a78 Mon Sep 17 00:00:00 2001
From: Thomas Devoogdt <thomas@devoogdt.com>
Date: Tue, 1 Apr 2025 22:56:00 +0200
Subject: [PATCH] CMakeLists.txt: only require a C compiler
Commit 05ab4dc05c9d1e1f951f5849b659e2c7e291a620
"Add some catch2 tests" dropped that C flag,
but should instead only have added a simple
enable_language call for tests only.
Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
Upstream: https://github.com/richgel999/miniz/commit/383e551cccf41fc2ce1177712d6a37a85d936642
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
CMakeLists.txt | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/deps/miniz/CMakeLists.txt b/deps/miniz/CMakeLists.txt
index 8978910..55d1cde 100644
--- a/deps/miniz/CMakeLists.txt
+++ b/deps/miniz/CMakeLists.txt
@@ -7,10 +7,10 @@ if(DEFINED PROJECT_NAME)
endif()
if(CMAKE_MINOR_VERSION LESS 12)
- project(miniz)
+ project(miniz C)
# see issue https://gitlab.kitware.com/cmake/cmake/merge_requests/1799
else()
- project(miniz)
+ project(miniz C)
set(CMAKE_C_STANDARD 90)
set(CMAKE_VERBOSE_MAKEFILE ON)
# set(CMAKE_C_VISIBILITY_PRESET hidden)
@@ -298,6 +298,7 @@ if(BUILD_FUZZERS)
endif()
if(BUILD_TESTS)
+ enable_language(CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
--
2.55.0