pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/54824: graphics/gegl does not compile on macOS



>Number:         54824
>Category:       pkg
>Synopsis:       graphics/gegl does not compile on macOS
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 02 00:50:01 +0000 2020
>Originator:     Jonathan Schleifer
>Release:        HEAD
>Organization:
>Environment:
Darwin
>Description:
gegl fails to build because of the switch to Meson. In particular, it fails because:
* The meson.build does not link OpenCL.framework
* Meson uses .dylib (more or less correctly) for plugins, while gegl always assumes .so (even on Darwin).
>How-To-Repeat:

>Fix:
commit c734e6728721f4ed573e6c595f382d20aded93d4
Author: Jonathan Schleifer <js%heap.zone@localhost>
Date:   Thu Jan 2 01:44:09 2020 +0100

    gegl: Fix compilation on macOS

diff --git a/graphics/gegl/Makefile b/graphics/gegl/Makefile
index 7a822cafb03..5e20aba474f 100644
--- a/graphics/gegl/Makefile
+++ b/graphics/gegl/Makefile
@@ -29,6 +29,16 @@ pre-build:
 		${PYTHONBIN} cltostring.py "$$file" "$$file".h \
 	; done
 
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "Darwin"
+# Meson uses .dylib for plugins, but gegl expects .so. Yes, even on Darwin.
+post-install:
+	cd ${DESTDIR}/${PREFIX}/lib/gegl-0.4 && for i in *.dylib; do \
+		mv "$$i" "$${i%.dylib}.so" \
+	; done
+.endif
+
 .include "options.mk"
 .include "../../devel/meson/build.mk"
 .include "../../devel/pango/buildlink3.mk"
diff --git a/graphics/gegl/distinfo b/graphics/gegl/distinfo
index ff61d027c2c..209f956eade 100644
--- a/graphics/gegl/distinfo
+++ b/graphics/gegl/distinfo
@@ -5,4 +5,5 @@ RMD160 (gegl-0.4.18.tar.xz) = c33c56c7b839b508f9f89a1bf4ae51ccd6758ca2
 SHA512 (gegl-0.4.18.tar.xz) = e79874cd50e9f0c27c7dc9d9b952545c31d0a48e2b158aa54b92c3e933267877222f86ede7256f2528f18985dc85d6eadbcd809f7a3563efc4449ec7634f15fd
 Size (gegl-0.4.18.tar.xz) = 4812756 bytes
 SHA1 (patch-gegl_gegl-config.c) = a8e1f5f5394a33be2bcdcb05ec7654d06f7ad4bc
+SHA1 (patch-gegl_meson.build) = a77ea394625a3fec870bc5ab3998b6f58bfc13a7
 SHA1 (patch-meson.build) = 10c564848e9821be63ea6aa82f27339d4e2bc421
diff --git a/graphics/gegl/patches/patch-gegl_meson.build b/graphics/gegl/patches/patch-gegl_meson.build
new file mode 100644
index 00000000000..ac402fc6b43
--- /dev/null
+++ b/graphics/gegl/patches/patch-gegl_meson.build
@@ -0,0 +1,21 @@
+$NetBSD$
+
+--- gegl/meson.build.orig	2020-01-01 19:50:37.000000000 +0000
++++ gegl/meson.build
+@@ -80,6 +80,8 @@ install_headers(gegl_headers,
+   subdir: api_name
+ )
+ 
++opencl = dependency('appleframeworks', modules : 'opencl')
++
+ gegl_lib = library(api_name,
+   gegl_sources,
+   include_directories: [ rootInclude, geglInclude, ],
+@@ -89,6 +91,7 @@ gegl_lib = library(api_name,
+     gio,
+     math,
+     gmodule,
++    opencl,
+   ],
+   c_args: [ gegl_cflags, ],
+   install: true,



Home | Main Index | Thread Index | Old Index