diff --git a/x11/babl/Makefile b/x11/babl/Makefile index 871d178ce63e..22f8462de688 100644 --- a/x11/babl/Makefile +++ b/x11/babl/Makefile @@ -1,71 +1,71 @@ PORTNAME= babl PORTVERSION= 0.1.122 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11 MASTER_SITES= GIMP MAINTAINER= gnome@FreeBSD.org COMMENT= Dynamic pixel format conversion library WWW= https://www.gegl.org/babl/ LICENSE= LGPL3 LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= liblcms2.so:graphics/lcms2 USES= compiler:c11 gnome meson pathfix pkgconfig tar:xz vala:build USE_GNOME= introspection:build USE_LDCONFIG= yes # relocatable does not mean ELF relocation MESON_ARGS= -Dgi-docgen=disabled -Dwith-docs=false -Drelocatable=disabled BABL_SHLIB= 0.221.1 BABL_VER= 0.1 PLIST_SUB+= BABL_SHLIB=${BABL_SHLIB} BABL_VER=${BABL_VER} OPTIONS_DEFINE_amd64= AVX2 F16C MMX SSE2 SSE41 SSE OPTIONS_DEFINE_i386= AVX2 F16C MMX SSE2 SSE41 SSE OPTIONS_DEFAULT_amd64= MMX SSE2 SSE AVX2_DESC= Use AVX2 optimized routines F16C_DESC= Use F16C optimized routines SSE2_DESC= Use SSE2 optimized routines SSE41_DESC= Use SSE4.1 optimized routines AVX2_IMPLIES= SSE41 AVX2_MESON_ON= -Denable-avx2=true AVX2_MESON_OFF= -Denable-avx2=false F16C_IMPLIES= MMX F16C_MESON_ON= -Denable-f16c=true F16C_MESON_OFF= -Denable-f16c=false MMX_MESON_ON= -Denable-mmx=true MMX_MESON_OFF= -Denable-mmx=false SSE2_IMPLIES= SSE SSE2_MESON_ON= -Denable-sse2=true SSE2_MESON_OFF= -Denable-sse2=false SSE41_IMPLIES= SSE2 SSE41_MESON_ON= -Denable-sse4_1=true SSE41_MESON_OFF= -Denable-sse4_1=false SSE_IMPLIES= MMX SSE_MESON_ON= -Denable-sse=true SSE_MESON_OFF= -Denable-sse=false .include .if ${ARCH} == "amd64" PLIST_SUB+= AMD64="" ARM="@comment " .elif ${ARCH} == "armv6" || ${ARCH} == "armv7" PLIST_SUB+= AMD64="@comment " ARM="" .else PLIST_SUB+= AMD64="@comment " ARM="@comment " .endif .include 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 + #include + #endif ++#ifdef __FreeBSD__ ++#include ++#include ++#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);