git: 8107e8e7cb0b - main - devel/glib20: Prevent the silent grabbing of libelf from ports
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 24 Apr 2025 08:46:12 UTC
The branch main has been updated by arrowd: URL: https://cgit.FreeBSD.org/ports/commit/?id=8107e8e7cb0b549bdc4789a52e69015cd64b7b8d commit 8107e8e7cb0b549bdc4789a52e69015cd64b7b8d Author: Gleb Popov <arrowd@FreeBSD.org> AuthorDate: 2025-04-24 08:12:15 +0000 Commit: Gleb Popov <arrowd@FreeBSD.org> CommitDate: 2025-04-24 08:45:47 +0000 devel/glib20: Prevent the silent grabbing of libelf from ports PR: 273479 --- devel/glib20/Makefile | 3 ++- devel/glib20/files/patch-gio_gresource-tool.c | 15 +++++++++++++++ devel/glib20/files/patch-gio_meson.build | 11 +++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/devel/glib20/Makefile b/devel/glib20/Makefile index 170e4515ae0f..3ad20c2597cd 100644 --- a/devel/glib20/Makefile +++ b/devel/glib20/Makefile @@ -1,6 +1,6 @@ PORTNAME= glib DISTVERSION= 2.84.1 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 2 CATEGORIES= devel MASTER_SITES= GNOME @@ -42,6 +42,7 @@ MESON_ARGS= -Db_lundef=false \ -Ddefault_library=both \ -Dfile_monitor_backend='libinotify-kqueue' \ -Dinstalled_tests=false \ + -Dlibelf=disabled \ -Dlibmount=disabled \ -Druntime_dir=/var/run \ -Dselinux=disabled \ diff --git a/devel/glib20/files/patch-gio_gresource-tool.c b/devel/glib20/files/patch-gio_gresource-tool.c new file mode 100644 index 000000000000..1c58aa930ff4 --- /dev/null +++ b/devel/glib20/files/patch-gio_gresource-tool.c @@ -0,0 +1,15 @@ +--- gio/gresource-tool.c.orig 2025-04-03 14:38:51 UTC ++++ gio/gresource-tool.c +@@ -31,8 +31,10 @@ + #include <locale.h> + + #ifdef HAVE_LIBELF +-#include <libelf.h> +-#include <gelf.h> ++#include </usr/include/libelf.h> ++// fool libelf from ports to not include its libelf.h ++#define _LIBELF_H 1 ++#include </usr/include/gelf.h> + #endif + + #ifdef HAVE_MMAP diff --git a/devel/glib20/files/patch-gio_meson.build b/devel/glib20/files/patch-gio_meson.build new file mode 100644 index 000000000000..2a7e786fc478 --- /dev/null +++ b/devel/glib20/files/patch-gio_meson.build @@ -0,0 +1,11 @@ +--- gio/meson.build.orig 2025-04-03 14:38:51 UTC ++++ gio/meson.build +@@ -971,7 +971,7 @@ else + # This fallback is necessary on *BSD. elfutils isn't the only libelf + # implementation, and *BSD usually includes their own libelf as a system + # library which doesn't have a corresponding .pc file. +- libelf = cc.find_library('elf', required : get_option ('libelf')) ++ libelf = declare_dependency(link_args: '/lib/libelf.so.2') + have_libelf = libelf.found() + have_libelf = have_libelf and cc.has_function('elf_begin', dependencies : libelf) + have_libelf = have_libelf and cc.has_function('elf_getshdrstrndx', dependencies : libelf)