Files
Khem Raj f45c615323 gerbera: fix build against fmt 12.2.0
fmt 12.2.0 turns <fmt/core.h> into a shim that only pulls in
<fmt/base.h>, which no longer declares fmt::format() and no longer drags
in <cstring> transitively. gerbera 3.0.0 relied on both, so do_compile
fails first with:

  src/exceptions.cc:37:31: error: no member named 'format' in namespace 'fmt'

and, once that is addressed, with a second wave of:

  src/util/thread_runner.h:194:68: error: no member named 'strerror' in namespace 'std'
  src/content/inotify/mt_inotify.cc:163:13: error: no member named 'memcpy' in namespace 'std'
  src/util/url_utils.cc:144:24: error: no member named 'strchr' in namespace 'std'

Add two backport patches:

* 0001 switches the central headers exceptions.h and search_handler.h
  from <fmt/core.h> to <fmt/format.h> (upstream commit 9507706136fd).
* 0002 adds an explicit #include <cstring> to every translation unit
  that uses std::strerror/std::memcpy/std::strchr (based on upstream
  commit 7caa9ae9ebf5, extended to cover all affected files in this
  release).

Neither fix is in any released gerbera tag (both are master-only), so a
version bump would not help; backporting is the least invasive option.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-07-12 17:39:43 -07:00

33 lines
1.7 KiB
BlitzBasic

Description = "Gerbera is a UPnP media server which allows you to stream your digital media through your home network and consume it on a variety of UPnP compatible devices."
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=25cdec9afe3f1f26212ead6bd2f7fac8"
SRC_URI = "git://github.com/gerbera/gerbera.git;protocol=https;branch=master;tag=v${PV} \
file://0001-fix-build-against-fmt-12-include-fmt-format.h.patch \
file://0002-include-cstring-for-std-strerror-std-memcpy.patch \
"
SRCREV = "7846f3dd5d0f848a60d0c3146c3b7290881a8992"
DEPENDS = "pugixml sqlite3 zlib fmt spdlog util-linux-libuuid libupnp libnsl2 icu jsoncpp"
SYSTEMD_SERVICE:${PN} = "gerbera.service"
inherit bash-completion cmake pkgconfig systemd
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} curl taglib inotify exif matroska magic js"
PACKAGECONFIG[systemd] = "-DWITH_SYSTEMD=TRUE,-DWITH_SYSTEMD=FALSE,systemd"
PACKAGECONFIG[taglib] = "-DWITH_TAGLIB=TRUE,-DWITH_TAGLIB=FALSE,taglib"
PACKAGECONFIG[curl] = "-DWITH_CURL=TRUE,-DWITH_CURL=FALSE,curl"
PACKAGECONFIG[inotify] = "-DWITH_INOTIFY=TRUE,-DWITH_INOTIFY=FALSE,inotify-tools"
PACKAGECONFIG[avcodec] = "-DWITH_AVCODEC=TRUE,-DWITH_AVCODEC=FALSE,ffmpeg"
PACKAGECONFIG[wavpack] = "-DWITH_WAVPACK=TRUE,-DWITH_WAVPACK=FALSE,wavpack"
PACKAGECONFIG[exif] = "-DWITH_EXIF=TRUE,-DWITH_EXIF=FALSE,libexif"
PACKAGECONFIG[exiv2] = "-DWITH_EXIV2=TRUE,-DWITH_EXIV2=FALSE,exiv2"
PACKAGECONFIG[matroska] = "-DWITH_MATROSKA=TRUE,-DWITH_MATROSKA=FALSE,libebml libmatroska"
PACKAGECONFIG[magic] = "-DWITH_MAGIC=TRUE,-DWITH_MAGIC=FALSE,file"
PACKAGECONFIG[js] = "-DWITH_JS=TRUE,-DWITH_JS=FALSE,duktape"
SECURITY_CFLAGS:riscv64 = "${SECURITY_NOPIE_CFLAGS}"