commit: 0bf458e450124f6a7b87e6daeefc5c901fa36448 Author: Brahmajit Das <listout <AT> listout <DOT> xyz> AuthorDate: Fri Apr 4 03:13:49 2025 +0000 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> CommitDate: Fri Apr 4 11:03:29 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0bf458e4
net-libs/dleyna: Fix implicit declaration of function basename Closes: https://bugs.gentoo.org/936939 Signed-off-by: Brahmajit Das <listout <AT> listout.xyz> Closes: https://github.com/gentoo/gentoo/pull/37830 Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org> net-libs/dleyna/dleyna-0.8.3-r1.ebuild | 57 ++++++++++++++++++++++ ...dleyna-0.8.3-fix-basename-declration-musl.patch | 41 ++++++++++++++++ 2 files changed, 98 insertions(+) diff --git a/net-libs/dleyna/dleyna-0.8.3-r1.ebuild b/net-libs/dleyna/dleyna-0.8.3-r1.ebuild new file mode 100644 index 000000000000..a749a75155a1 --- /dev/null +++ b/net-libs/dleyna/dleyna-0.8.3-r1.ebuild @@ -0,0 +1,57 @@ +# Copyright 2022-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( python3_{10..12} ) + +inherit meson python-single-r1 + +DESCRIPTION="A set of services and D-Bus APIs to simplify access to UPnP/DLNA media devices" +HOMEPAGE="https://gitlab.gnome.org/World/dLeyna" +SRC_URI="https://gitlab.gnome.org/World/dLeyna/-/archive/v${PV}/dLeyna-v${PV}.tar.bz2" +S="${WORKDIR}"/dLeyna-v${PV} + +LICENSE="LGPL-2.1" +SLOT="1.0/6" # soname of libdleyna-core-1.0.so +KEYWORDS="~amd64 ~arm64 ~loong ~riscv ~x86" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND=" + >=dev-libs/glib-2.28:2 + >=net-libs/gssdp-1.6.0:1.6= + >=net-libs/gupnp-1.6.0:1.6= + >=net-libs/gupnp-av-0.12.9:0= + >=media-libs/gupnp-dlna-0.9.4:2.0= + >=net-libs/libsoup-3.0:3.0 + dev-libs/libxml2 + + ${PYTHON_DEPS} + + !net-libs/dleyna-connector-dbus + !net-libs/dleyna-core + !net-libs/dleyna-renderer + !net-misc/dleyna-server +" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-python/docutils + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}/${PN}-0.8.3-fix-basename-declration-musl.patch" +) + +src_configure() { + local emesonargs=( + -Ddbus_service_dir="${EPREFIX}/usr/share/dbus-1/services" + -Dman_pages=true + -Ddocs=false + ) + meson_src_configure +} + +src_install() { + meson_src_install + python_optimize +} diff --git a/net-libs/dleyna/files/dleyna-0.8.3-fix-basename-declration-musl.patch b/net-libs/dleyna/files/dleyna-0.8.3-fix-basename-declration-musl.patch new file mode 100644 index 000000000000..4d59ac72d69e --- /dev/null +++ b/net-libs/dleyna/files/dleyna-0.8.3-fix-basename-declration-musl.patch @@ -0,0 +1,41 @@ +https://gitlab.gnome.org/World/dLeyna/-/commit/8c8e17a77dc666738a6f1c309b46056dd25fe576 +From: Brahmajit Das <[email protected]> +Date: Mon, 5 Aug 2024 07:07:37 +0000 +Subject: [PATCH] Fix implicit declaration of basename + +On musl there is only one implementation of basename, which comes from +the libgen.h header file. However, in this case the code is using GNU +implementation of basename, which is not available on musl. This results +in build error: + +../dLeyna-v0.8.3/libdleyna/core/log.c: In function 'dleyna_log_init': +../dLeyna-v0.8.3/libdleyna/core/log.c:156:17: error: implicit declaration of function 'basename'; did you mean 'g_basename'? [-Wimplicit-function-declaration] + 156 | openlog(basename(program), option, LOG_DAEMON); + | ^~~~~~~~ + | g_basename +../dLeyna-v0.8.3/libdleyna/core/log.c:156:17: error: passing argument 1 of 'openlog' makes pointer from integer without a cast [-Wint-conversion] + 156 | openlog(basename(program), option, LOG_DAEMON); + | ^~~~~~~~~~~~~~~~~ + | | + | int +In file included from ../dLeyna-v0.8.3/libdleyna/core/log.h:27, + from ../dLeyna-v0.8.3/libdleyna/core/log.c:30: + +Please also reffer: https://bugs.gentoo.org/936939 + +Co-authored-by: Jens Georg <[email protected]> +Signed-off-by: Brahmajit Das <[email protected]> +--- a/libdleyna/core/log.c ++++ b/libdleyna/core/log.c +@@ -153,7 +153,7 @@ void dleyna_log_init(const char *program, const char *version) + s_log_context.log_domain = g_strdup(program); + prv_set_flags_from_param(); + +- openlog(basename(program), option, LOG_DAEMON); ++ openlog(NULL, option, LOG_DAEMON); + + old = setlogmask(LOG_MASK(LOG_INFO)); + syslog(LOG_INFO, "dLeyna core version %s", VERSION); +-- +GitLab +
