diff options
author | Eli Schwartz <eschwartz93@gmail.com> | 2024-01-15 14:46:03 -0500 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-01-30 05:09:51 +0000 |
commit | 02c6e8f75e84190fe4d806aae1146c2534b51ba8 (patch) | |
tree | f5d7d4f69825821fa4abdb3fc02573862e94b1bd /dev-libs/folks | |
parent | dev-libs/liberasurecode: suppress LTO, as it does not work (diff) | |
download | gentoo-02c6e8f75e84190fe4d806aae1146c2534b51ba8.tar.gz gentoo-02c6e8f75e84190fe4d806aae1146c2534b51ba8.tar.bz2 gentoo-02c6e8f75e84190fe4d806aae1146c2534b51ba8.zip |
dev-libs/folks: Apply MR to fix broken implicit-function-declaration
Modern C porting makes this an error.
https://gitlab.gnome.org/GNOME/folks/-/merge_requests/68
Closes: https://bugs.gentoo.org/920098
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs/folks')
-rw-r--r-- | dev-libs/folks/files/folks-0.15.6-implicit-decl.patch | 61 | ||||
-rw-r--r-- | dev-libs/folks/folks-0.15.6-r1.ebuild | 102 |
2 files changed, 163 insertions, 0 deletions
diff --git a/dev-libs/folks/files/folks-0.15.6-implicit-decl.patch b/dev-libs/folks/files/folks-0.15.6-implicit-decl.patch new file mode 100644 index 000000000000..f61d655343e4 --- /dev/null +++ b/dev-libs/folks/files/folks-0.15.6-implicit-decl.patch @@ -0,0 +1,61 @@ +From 127bacf86b7ef639c37dd07afc0bf848c005c3c2 Mon Sep 17 00:00:00 2001 +From: Mohammed Anas <triallax@tutanota.com> +Date: Sun, 14 Jan 2024 03:27:31 +0000 +Subject: [PATCH] build: add missing API declaration -include to dummy and EDS + backends + +In 7a9c8133468c1f8eb7fbb0e68a6a7e061b9452fb, the original +`-include redeclare-internal-api.h` was added for autotools. It is +necessary due to vala internals that require guaranteeing a private +ABI's prototype is available when compiling folks, even though vala +doesn't generate that prototype. + +During the port to meson, this `-include` was dropped. + +Without it, `-Werror=implicit-function-declaration` will cause folks to +fail to compile. Implicit function declarations are a terrible feature +-- they were part of c89, but c99 removed them without a deprecation +because they were too dangerous to use, notable in a language that +doesn't like to remove features even *with* a deprecation. + +For over two decades, compilers have, by default, allowed this invalid C +anyways, on the grounds that it commonly existed, but modern compilers +are finally starting to enforce this. It will become a fatal error by +default in gcc 14, and clang 16. + +Folks got this right all the way back in 2013; it disappeared by +accident. Let's restore it as originally intended. +--- +Upstream: https://gitlab.gnome.org/GNOME/folks/-/merge_requests/68 + + backends/dummy/lib/meson.build | 1 + + backends/eds/lib/meson.build | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/backends/dummy/lib/meson.build b/backends/dummy/lib/meson.build +index 32448f35..eacc0e7a 100644 +--- a/backends/dummy/lib/meson.build ++++ b/backends/dummy/lib/meson.build +@@ -23,6 +23,7 @@ dummy_backendlib_vala_flags = [ + + dummy_backendlib_c_flags = [ + '-include', 'config.h', ++ '-include', 'folks/redeclare-internal-api.h', + '-DBACKEND_NAME="@0@"'.format(dummy_backend_name), + '-DG_LOG_DOMAIN="@0@"'.format(dummy_backend_name), + ] +diff --git a/backends/eds/lib/meson.build b/backends/eds/lib/meson.build +index 3e3db84c..68d803b3 100644 +--- a/backends/eds/lib/meson.build ++++ b/backends/eds/lib/meson.build +@@ -40,6 +40,7 @@ endif + + eds_backendlib_c_flags = [ + '-include', 'config.h', ++ '-include', 'folks/redeclare-internal-api.h', + '-DBACKEND_NAME="@0@"'.format(eds_backend_name), + '-DG_LOG_DOMAIN="@0@"'.format(eds_backend_name), + ] +-- +GitLab + diff --git a/dev-libs/folks/folks-0.15.6-r1.ebuild b/dev-libs/folks/folks-0.15.6-r1.ebuild new file mode 100644 index 000000000000..a01a4476a16d --- /dev/null +++ b/dev-libs/folks/folks-0.15.6-r1.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( python3_{9..11} ) + +inherit gnome.org gnome2-utils meson python-any-r1 vala xdg + +DESCRIPTION="Library for aggregating people from multiple sources" +HOMEPAGE="https://wiki.gnome.org/Projects/Folks https://gitlab.gnome.org/GNOME/folks" + +LICENSE="LGPL-2.1+" +SLOT="0/26" # subslot = libfolks soname version +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~x86-linux" + +IUSE="bluetooth eds telepathy test utils" +REQUIRED_USE="bluetooth? ( eds )" +RESTRICT="!test? ( test )" + +DEPEND=" + >=dev-libs/glib-2.58:2 + >=dev-libs/libgee-0.10:0.8[introspection] + >=dev-libs/gobject-introspection-1.54:= + telepathy? ( + >=net-libs/telepathy-glib-0.19.9 + dev-libs/dbus-glib + ) + eds? ( >=gnome-extra/evolution-data-server-3.38:= ) + dev-libs/libxml2:2 + utils? ( sys-libs/readline:0= ) +" +# telepathy-mission-control needed at runtime; it is used by the telepathy +# backend via telepathy-glib's AccountManager binding. +RDEPEND="${DEPEND} + bluetooth? ( >=net-wireless/bluez-5[obex] ) + telepathy? ( net-im/telepathy-mission-control ) +" +BDEPEND=" + ${PYTHON_DEPS} + >=sys-devel/gettext-0.19.8 + virtual/pkgconfig + $(vala_depend) + telepathy? ( net-libs/telepathy-glib[vala] ) + eds? ( gnome-extra/evolution-data-server[vala] ) + test? ( + sys-apps/dbus + bluetooth? ( + $(python_gen_any_dep ' + dev-python/python-dbusmock[${PYTHON_USEDEP}] + ') + ) + ) +" + +PATCHES=( + # implicit function declaration (Modern C porting): + # - https://bugs.gentoo.org/920098 + # - https://gitlab.gnome.org/GNOME/folks/-/merge_requests/68 + "${FILESDIR}"/folks-0.15.6-implicit-decl.patch +) + +python_check_deps() { + if use test && use bluetooth; then + python_has_version "dev-python/python-dbusmock[${PYTHON_USEDEP}]" + fi +} + +src_prepare() { + default + vala_setup + xdg_environment_reset +} + +src_configure() { + local emesonargs=( + $(meson_use bluetooth bluez_backend) + $(meson_use eds eds_backend) + $(meson_use eds ofono_backend) + $(meson_use telepathy telepathy_backend) + -Dzeitgeist=false # last rited package + -Dimport_tool=true + $(meson_use utils inspect_tool) + $(meson_use test tests) + -Dinstalled_tests=false + -Ddocs=false # Needs find_program sedding to specific version; only dev docs, don't bother + ) + meson_src_configure +} + +src_test() { + dbus-run-session meson test -C "${BUILD_DIR}" -t 5 +} + +pkg_postinst() { + xdg_pkg_postinst + gnome2_schemas_update +} + +pkg_postrm() { + xdg_pkg_postrm + gnome2_schemas_update +} |