NetBSD Problem Report #54824
From www@netbsd.org Thu Jan 2 00:46:39 2020
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id C21847A174
for <gnats-bugs@gnats.NetBSD.org>; Thu, 2 Jan 2020 00:46:39 +0000 (UTC)
Message-Id: <20200102004638.C06B47A1AC@mollari.NetBSD.org>
Date: Thu, 2 Jan 2020 00:46:38 +0000 (UTC)
From: js-pkgsrc@heap.zone
Reply-To: js-pkgsrc@heap.zone
To: gnats-bugs@NetBSD.org
Subject: graphics/gegl does not compile on macOS
X-Send-Pr-Version: www-1.0
>Number: 54824
>Category: pkg
>Synopsis: graphics/gegl does not compile on macOS
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: brook
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jan 02 00:50:01 +0000 2020
>Closed-Date: Tue Jan 31 23:38:10 +0000 2023
>Last-Modified: Tue Jan 31 23:38:10 +0000 2023
>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>
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,
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->macos-pkg-people
Responsible-Changed-By: leot@NetBSD.org
Responsible-Changed-When: Thu, 02 Jan 2020 00:55:46 +0000
Responsible-Changed-Why:
macOS problem
From: "Brook Milligan" <brook@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/54824 CVS commit: pkgsrc/graphics/babl
Date: Tue, 25 Feb 2020 04:13:46 +0000
Module Name: pkgsrc
Committed By: brook
Date: Tue Feb 25 04:13:46 UTC 2020
Modified Files:
pkgsrc/graphics/babl: Makefile PLIST
Log Message:
Correctly fix the build breakage on Darwin.
The previous patch removed use of --version-script on Darwin and converted
the shared library extensions to the Darwin standard of .dylib. The former
is necessary, but the latter was not quite correct. A distinction must be
made between shared libraries provided by the package for linking of
applications and shared libraries provided by the package for dynamic loading
by Gnome applications. Gnome applications expect that plugins will use the
.so extension on all Unix platforms, including Darwin. Thus, a subset of the
shared libraries must be renamed, both on the filesystem and internally.
This is partly mentioned in PR #54824, although that is for graphics/gegl
not tnis package.
To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 pkgsrc/graphics/babl/Makefile
cvs rdiff -u -r1.11 -r1.12 pkgsrc/graphics/babl/PLIST
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Brook Milligan" <brook@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/54824 CVS commit: pkgsrc/graphics/gegl
Date: Tue, 25 Feb 2020 04:29:36 +0000
Module Name: pkgsrc
Committed By: brook
Date: Tue Feb 25 04:29:36 UTC 2020
Modified Files:
pkgsrc/graphics/gegl: Makefile PLIST hacks.mk
Log Message:
Fix build breakage on Darwin.
Darwin uses a different extension (.dylib) than other Unixes (.so) for
shared libraries that applications must link against. However, Gnome
applications expect plugins to use the same extension (.so) on all platforms,
including Darwin. Consequently, on Darwin some shared libraries must be
renamed, both on the filesystem and internally, and others must use the
correct extension in PLIST. This is partially mentioned in PR #54824, but
that missed the need for internal renaming of the libraries. It also
introduced a dependency on the Apple OpenCL framework, which does not seem
to be necessary.
Finally, all the references to Apple-specific OpenCL code must be removed;
previously only some of them were.
To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 pkgsrc/graphics/gegl/Makefile
cvs rdiff -u -r1.24 -r1.25 pkgsrc/graphics/gegl/PLIST
cvs rdiff -u -r1.1 -r1.2 pkgsrc/graphics/gegl/hacks.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Responsible-Changed-From-To: macos-pkg-people->brook
Responsible-Changed-By: cjep@NetBSD.org
Responsible-Changed-When: Tue, 09 Feb 2021 22:55:54 +0000
Responsible-Changed-Why:
Hi Brook - it looks like you've fixed this one? Are you ok to close this PR?
State-Changed-From-To: open->feedback
State-Changed-By: cjep@NetBSD.org
State-Changed-When: Tue, 09 Feb 2021 22:55:54 +0000
State-Changed-Why:
Looks fixed.
State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Tue, 31 Jan 2023 23:38:10 +0000
State-Changed-Why:
Feedback timeout; "looks fixed" a year ago.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.