app-misc/openrgb: workaround cpp-httplib lib name change

Closes: https://bugs.gentoo.org/934576
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
This commit is contained in:
Maciej Barć
2024-06-20 15:40:13 +02:00
parent c0bddfdde6
commit 07ff1130ba
2 changed files with 22 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
# Copyright 2020-2023 Gentoo Authors
# Copyright 2020-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -63,10 +63,19 @@ src_configure() {
# > warning: ‘-pipe’ ignored because ‘-save-temps’ specified
filter-flags -pipe
# cpp-httplib >=0.16.0 changed the library name from "httplib" to "cpp-httplib".
# See bug: https://bugs.gentoo.org/934576
local -a libs=()
if has_version "<dev-cpp/cpp-httplib-0.16.0" ; then
libs+=( -lhttplib )
else
libs+=( -lcpp-httplib )
fi
eqmake5 \
INCLUDEPATH+="${ESYSROOT}/usr/include/nlohmann" \
DEFINES+="OPENRGB_EXTRA_PLUGIN_DIRECTORY=\\\\\"\\\"${EPREFIX}/usr/$(get_libdir)/OpenRGB/plugins\\\\\"\\\"" \
LIBS+=-lhttplib
LIBS+="${libs[@]}"
}
src_install() {

View File

@@ -1,4 +1,4 @@
# Copyright 2020-2023 Gentoo Authors
# Copyright 2020-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -63,10 +63,19 @@ src_configure() {
# > warning: ‘-pipe’ ignored because ‘-save-temps’ specified
filter-flags -pipe
# cpp-httplib >=0.16.0 changed the library name from "httplib" to "cpp-httplib".
# See bug: https://bugs.gentoo.org/934576
local -a libs=()
if has_version "<dev-cpp/cpp-httplib-0.16.0" ; then
libs+=( -lhttplib )
else
libs+=( -lcpp-httplib )
fi
eqmake5 \
INCLUDEPATH+="${ESYSROOT}/usr/include/nlohmann" \
DEFINES+="OPENRGB_EXTRA_PLUGIN_DIRECTORY=\\\\\"\\\"${EPREFIX}/usr/$(get_libdir)/OpenRGB/plugins\\\\\"\\\"" \
LIBS+=-lhttplib
LIBS+="${libs[@]}"
}
src_install() {