jsoncpp: build with C++17 to enable string_view API
authorAlexandru Ardelean <redacted>
Sun, 10 May 2026 09:05:38 +0000 (12:05 +0300)
committerAlexandru Ardelean <redacted>
Mon, 11 May 2026 17:43:58 +0000 (20:43 +0300)
jsoncpp 1.9.7 added std::string_view overloads for Value::get() and
Value::operator[], but these are only compiled when C++17 is active.
Building with the default C++11 standard leaves those symbols out of
the library, causing link failures for consumers that include the
headers with C++17 enabled (e.g. upmpdcli 1.9.17, domoticz 2025.2).

Add -Dcpp_std=c++17 to the meson args so the string_view API is
available in the installed library.

Signed-off-by: Alexandru Ardelean <redacted>
libs/jsoncpp/Makefile

index cfcaccc8b5503b997cfb5bdeaa2dd3735127f699..b20788a86cd42340e6f5aa4a7b2bc08ca9015e01 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=jsoncpp
 PKG_VERSION:=1.9.7
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/open-source-parsers/jsoncpp/tar.gz/$(PKG_VERSION)?
@@ -42,7 +42,8 @@ endef
 
 MESON_ARGS += \
        -Db_lto=true \
-       -Dtests=false
+       -Dtests=false \
+       -Dcpp_std=c++17
 
 TARGET_LDFLAGS += -Wl,--gc-sections
 
git clone https://git.99rst.org/PROJECT