pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/graphics/gegl Fix build failure on Darwin < 10



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f4460cb6f6a0
branches:  trunk
changeset: 646584:f4460cb6f6a0
user:      pho <pho%pkgsrc.org@localhost>
date:      Wed Feb 11 18:05:23 2015 +0000

description:
Fix build failure on Darwin < 10

GEGL tries to use OpenCL in a really weird way. It has (and installs!)
a local copy of OpenCL headers and then tries to find implementation
by dlopen'ing "libOpenCL.so". The problem is that it fails to compile
on Darwin < 10 by trying to include non-existent native OpenCL headers
too, which is in fact only optional.

diffstat:

 graphics/gegl/hacks.mk |  30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diffs (34 lines):

diff -r f11dc9ba2da3 -r f4460cb6f6a0 graphics/gegl/hacks.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/gegl/hacks.mk    Wed Feb 11 18:05:23 2015 +0000
@@ -0,0 +1,30 @@
+# $NetBSD: hacks.mk,v 1.1 2015/02/11 18:05:23 pho Exp $
+
+.if !defined(GEGL_HACKS_MK)
+GEGL_HACKS_MK= # defined
+
+### [Wed Dec 12 12:47:17 JST 2012 : pho]
+### GEGL tries to use OpenCL in a really weird way. It has (and
+### installs!) a local copy of OpenCL headers and then tries to find
+### implementation by dlopen'ing "libOpenCL.so". The problem is that
+### it fails to compile on Darwin < 10 by trying to include
+### non-existent native OpenCL headers too, which is in fact only
+### optional.
+
+.if !empty(MACHINE_PLATFORM:Darwin-[0-9].*-*)
+PKG_HACKS+=                    darwin-opencl
+
+SUBST_CLASSES+=                        non-darwin
+SUBST_STAGE.non-darwin=                pre-build
+SUBST_MESSAGE.non-darwin=      Pretending as if we were not on Darwin.
+SUBST_FILES.non-darwin=                gegl/opencl/*.h
+SUBST_SED.non-darwin=          -e 's,\#ifdef __APPLE__,\#if 0,g'
+
+SUBST_CLASSES+=                        no-altivec
+SUBST_STAGE.no-altivec=                pre-build
+SUBST_MESSAGE.no-altivec=      Pretending as if we did not have altivec.
+SUBST_FILES.no-altivec=                gegl/opencl/*.h
+SUBST_SED.no-altivec=          -e 's,\#if defined( __VEC__ ),\#if 0,g'
+.endif
+
+.endif



Home | Main Index | Thread Index | Old Index