Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 Feb 2026 09:47:15 +0000
From:      Dima Panov <fluffy@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: f8b5751a9b6f - main - x11/babl: deal with FreeBSD procfs in Right Way(tm)
Message-ID:  <69846723.4390d.1478493e@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by fluffy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f8b5751a9b6fc3a0e22e6a1174b46a6d8dded74a

commit f8b5751a9b6fc3a0e22e6a1174b46a6d8dded74a
Author:     Dima Panov <fluffy@FreeBSD.org>
AuthorDate: 2026-02-05 09:43:40 +0000
Commit:     Dima Panov <fluffy@FreeBSD.org>
CommitDate: 2026-02-05 09:43:40 +0000

    x11/babl: deal with FreeBSD procfs in Right Way(tm)
    
    FreeBSD procfs implementation is not equal the linux one.
    Handle it correctly
---
 x11/babl/Makefile                |  2 +-
 x11/babl/files/patch-babl_babl.c | 49 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 50 insertions(+), 1 deletion(-)

diff --git a/x11/babl/Makefile b/x11/babl/Makefile
index 871d178ce63e..22f8462de688 100644
--- a/x11/babl/Makefile
+++ b/x11/babl/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	babl
 PORTVERSION=	0.1.122
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	x11
 MASTER_SITES=	GIMP
 
diff --git a/x11/babl/files/patch-babl_babl.c b/x11/babl/files/patch-babl_babl.c
new file mode 100644
index 000000000000..e779fa1dca34
--- /dev/null
+++ b/x11/babl/files/patch-babl_babl.c
@@ -0,0 +1,49 @@
+--- babl/babl.c.orig	2026-01-28 17:44:45 UTC
++++ babl/babl.c
+@@ -24,6 +24,10 @@
+ #include <dlfcn.h>
+ #include <libgen.h>
+ #endif
++#ifdef __FreeBSD__
++#include <sys/limits.h>
++#include <sys/param.h>
++#endif
+ 
+ #include "config.h"
+ #include "babl-internal.h"
+@@ -456,7 +460,11 @@ _babl_find_relocatable_exe (void)
+   char   *maps_line      = NULL;
+   size_t  maps_line_size = 0;
+ 
++#if defined(__FreeBSD__)
++  sym_path = babl_strdup ("/proc/curproc/file");
++#else
+   sym_path = babl_strdup ("/proc/self/exe");
++#endif
+ 
+   while (1)
+     {
+@@ -520,7 +528,11 @@ _babl_find_relocatable_exe (void)
+    * Read from /proc/self/maps as fallback.
+    */
+ 
++#if defined(__FreeBSD__)
++  file = _babl_fopen ("/proc/curproc/map", "rb");
++#else
+   file = _babl_fopen ("/proc/self/maps", "rb");
++#endif
+ 
+   if (! file)
+     babl_fatal ("Failed to read /proc/self/maps: %s", strerror (errno));
+@@ -532,7 +544,11 @@ _babl_find_relocatable_exe (void)
+       path = strchr (maps_line, '/');
+ 
+       /* Sanity check. */
++#if defined(__FreeBSD__)
++      if (path && strstr (maps_line, " r-x "))
++#else
+       if (path && strstr (maps_line, " r-xp "))
++#endif
+         {
+           /* We found the executable name. */
+           path = babl_strdup (path);


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69846723.4390d.1478493e>