Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 Feb 2026 09:47:16 +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: 9609a9f22a24 - main - graphics/gegl: deal with FreeBSD procfs in Right Way(tm)
Message-ID:  <69846724.437ce.51c2cfc@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=9609a9f22a240a61e99fb048bc4b7ef17fa42814

commit 9609a9f22a240a61e99fb048bc4b7ef17fa42814
Author:     Dima Panov <fluffy@FreeBSD.org>
AuthorDate: 2026-02-05 09:46:55 +0000
Commit:     Dima Panov <fluffy@FreeBSD.org>
CommitDate: 2026-02-05 09:46:55 +0000

    graphics/gegl: deal with FreeBSD procfs in Right Way(tm)
    
    FreeBSD procfs implementation is not equal the linux one.
    Handle it correctly
---
 graphics/gegl/Makefile                     |  2 +-
 graphics/gegl/files/patch-gegl_gegl-init.c | 63 ++++++++++++++++++++++++++++++
 2 files changed, 64 insertions(+), 1 deletion(-)

diff --git a/graphics/gegl/Makefile b/graphics/gegl/Makefile
index e83948c4b44c..3eaf2fc1a1cb 100644
--- a/graphics/gegl/Makefile
+++ b/graphics/gegl/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	gegl
 DISTVERSION=	0.4.66
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	graphics
 MASTER_SITES=	GIMP
 
diff --git a/graphics/gegl/files/patch-gegl_gegl-init.c b/graphics/gegl/files/patch-gegl_gegl-init.c
new file mode 100644
index 000000000000..ead6a4a52d85
--- /dev/null
+++ b/graphics/gegl/files/patch-gegl_gegl-init.c
@@ -0,0 +1,63 @@
+--- gegl/gegl-init.c.orig	2025-12-11 20:43:07 UTC
++++ gegl/gegl-init.c
+@@ -68,6 +68,11 @@ DllMain (HINSTANCE hinstDLL,
+ #import <Foundation/Foundation.h>
+ #endif
+ 
++#ifdef __FreeBSD__
++#include <sys/limits.h>
++#include <sys/param.h>
++#endif
++
+ #include "gegl-debug.h"
+ 
+ guint gegl_debug_flags = 0;
+@@ -901,7 +906,11 @@ gegl_find_relocatable_exe (void)
+   if (path)
+     return path;
+ 
++#if defined(__FreeBSD__)
++  sym_path = g_strdup ("/proc/curproc/file");
++#else
+   sym_path = g_strdup ("/proc/self/exe");
++#endif
+ 
+   while (1)
+     {
+@@ -917,7 +926,11 @@ gegl_find_relocatable_exe (void)
+           /* I don't think /proc/self/ symlinks will ever be relative, but just
+            * to be safe.
+            */
++#if defined(__FreeBSD__)
++          gchar *absolute_path = g_build_filename ("/proc/curproc", path, NULL);
++#else
+           gchar *absolute_path = g_build_filename ("/proc/self", path, NULL);
++#endif
+           g_free (path);
+           path = g_steal_pointer (&absolute_path);
+         }
+@@ -944,8 +957,11 @@ gegl_find_relocatable_exe (void)
+    * Read from /proc/self/maps as fallback.
+    */
+ 
++#if defined(__FreeBSD__)
++  file = g_fopen ("/proc/curproc/map", "rb");
++#else
+   file = g_fopen ("/proc/self/maps", "rb");
+-
++#endif
+   g_return_val_if_fail (file != NULL, NULL);
+ 
+   /* The first entry with r-xp permission should be the executable name. */
+@@ -955,7 +971,11 @@ gegl_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 = g_strdup (path);


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69846724.437ce.51c2cfc>