tech-pkg archive

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

graphics/gegl: fixing MacOS issues



The graphics/gegl package has some fixes in hacks.mk to overcome problems with OpenCL usage when __APPLE__ is defined.  However, they are insufficient (at least for me) in that they do not remove all of the conditional code.  Also, the PLIST uses .so instead of .dylib.

The patch below allows it to compile for me.  Comments and suggestions welcome.  Thanks.

Cheers,
Brook



Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/gegl/Makefile,v
retrieving revision 1.77
diff -u -r1.77 Makefile
--- Makefile	2 Nov 2019 14:05:46 -0000	1.77
+++ Makefile	22 Feb 2020 23:59:19 -0000
@@ -22,6 +22,18 @@
 
 PYTHON_FOR_BUILD_ONLY=	tool
 
+.include "../../mk/bsd.prefs.mk"
+
+PLIST_VARS+=		Darwin
+PLIST_VARS+=		not_Darwin
+.if ${OPSYS} == "Darwin"
+PLIST.Darwin=		yes
+PLIST_SUBST+=   	SOEXT="dylib"
+.else
+PLIST.not_Darwin=	yes
+PLIST_SUBST+=   	SOEXT="so"
+.endif
+
 # ../gegl/opencl/gegl-cl-color.c:32:10: fatal error: opencl/colors.cl.h: No such file or directory
 # race condition in meson?
 pre-build:
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/gegl/PLIST,v
retrieving revision 1.24
diff -u -r1.24 PLIST
--- PLIST	2 Nov 2019 14:05:46 -0000	1.24
+++ PLIST	22 Feb 2020 23:59:19 -0000
@@ -80,47 +80,47 @@
 include/gegl-0.4/sc/sc-context.h
 include/gegl-0.4/sc/sc-outline.h
 include/gegl-0.4/sc/sc-sample.h
-lib/gegl-0.4/exr-load.so
-lib/gegl-0.4/exr-save.so
-lib/gegl-0.4/gegl-common-cxx.so
-lib/gegl-0.4/gegl-common-gpl3.so
-lib/gegl-0.4/gegl-common.so
-lib/gegl-0.4/gegl-core.so
-lib/gegl-0.4/gegl-generated.so
-lib/gegl-0.4/gif-load.so
+lib/gegl-0.4/exr-load.${SOEXT}
+lib/gegl-0.4/exr-save.${SOEXT}
+lib/gegl-0.4/gegl-common-cxx.${SOEXT}
+lib/gegl-0.4/gegl-common-gpl3.${SOEXT}
+lib/gegl-0.4/gegl-common.${SOEXT}
+lib/gegl-0.4/gegl-core.${SOEXT}
+lib/gegl-0.4/gegl-generated.${SOEXT}
+lib/gegl-0.4/gif-load.${SOEXT}
 lib/gegl-0.4/grey2.json
-${PLIST.jasper}lib/gegl-0.4/jp2-load.so
-lib/gegl-0.4/jpg-load.so
-lib/gegl-0.4/jpg-save.so
-lib/gegl-0.4/lcms-from-profile.so
-lib/gegl-0.4/npd.so
-lib/gegl-0.4/npy-save.so
-lib/gegl-0.4/path.so
-lib/gegl-0.4/pixbuf-load.so
-lib/gegl-0.4/pixbuf-save.so
-lib/gegl-0.4/png-load.so
-lib/gegl-0.4/png-save.so
-lib/gegl-0.4/ppm-load.so
-lib/gegl-0.4/ppm-save.so
-lib/gegl-0.4/rgbe-load.so
-lib/gegl-0.4/rgbe-save.so
-lib/gegl-0.4/sdl2-display.so
-lib/gegl-0.4/seamless-clone-compose.so
-lib/gegl-0.4/seamless-clone.so
-${PLIST.svg}lib/gegl-0.4/svg-load.so
-lib/gegl-0.4/text.so
-lib/gegl-0.4/tiff-load.so
-lib/gegl-0.4/tiff-save.so
-lib/gegl-0.4/transformops.so
-lib/gegl-0.4/vector-fill.so
-lib/gegl-0.4/vector-stroke.so
-lib/gegl-0.4/webp-load.so
-lib/gegl-0.4/webp-save.so
-lib/libgegl-0.4.so
-lib/libgegl-0.4.so.0
-lib/libgegl-0.4.so.0.417.1
-lib/libgegl-npd-0.4.so
-lib/libgegl-sc-0.4.so
+${PLIST.jasper}lib/gegl-0.4/jp2-load.${SOEXT}
+lib/gegl-0.4/jpg-load.${SOEXT}
+lib/gegl-0.4/jpg-save.${SOEXT}
+lib/gegl-0.4/lcms-from-profile.${SOEXT}
+lib/gegl-0.4/npd.${SOEXT}
+lib/gegl-0.4/npy-save.${SOEXT}
+lib/gegl-0.4/path.${SOEXT}
+lib/gegl-0.4/pixbuf-load.${SOEXT}
+lib/gegl-0.4/pixbuf-save.${SOEXT}
+lib/gegl-0.4/png-load.${SOEXT}
+lib/gegl-0.4/png-save.${SOEXT}
+lib/gegl-0.4/ppm-load.${SOEXT}
+lib/gegl-0.4/ppm-save.${SOEXT}
+lib/gegl-0.4/rgbe-load.${SOEXT}
+lib/gegl-0.4/rgbe-save.${SOEXT}
+lib/gegl-0.4/sdl2-display.${SOEXT}
+lib/gegl-0.4/seamless-clone-compose.${SOEXT}
+lib/gegl-0.4/seamless-clone.${SOEXT}
+${PLIST.svg}lib/gegl-0.4/svg-load.${SOEXT}
+lib/gegl-0.4/text.${SOEXT}
+lib/gegl-0.4/tiff-load.${SOEXT}
+lib/gegl-0.4/tiff-save.${SOEXT}
+lib/gegl-0.4/transformops.${SOEXT}
+lib/gegl-0.4/vector-fill.${SOEXT}
+lib/gegl-0.4/vector-stroke.${SOEXT}
+lib/gegl-0.4/webp-load.${SOEXT}
+lib/gegl-0.4/webp-save.${SOEXT}
+lib/libgegl-0.4.${SOEXT}
+${PLIST.Darwin}lib/libgegl-0.4.0.${SOEXT}
+${PLIST.not_Darwin}lib/libgegl-0.4.${SOEXT}.0.417.1
+lib/libgegl-npd-0.4.${SOEXT}
+lib/libgegl-sc-0.4.${SOEXT}
 lib/pkgconfig/gegl-0.4.pc
 lib/pkgconfig/gegl-sc-0.4.pc
 share/locale/bs/LC_MESSAGES/gegl-0.4.mo
Index: hacks.mk
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/gegl/hacks.mk,v
retrieving revision 1.1
diff -u -r1.1 hacks.mk
--- hacks.mk	11 Feb 2015 18:05:23 -0000	1.1
+++ hacks.mk	22 Feb 2020 23:59:19 -0000
@@ -17,13 +17,14 @@
 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_FILES.non-darwin=		gegl/opencl/*.h gegl/opencl/*.c
+SUBST_SED.non-darwin+=		-e 's,\#ifdef __APPLE__,\#if 0,g'
+SUBST_SED.non-darwin+=		-e 's,\#if defined(__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_FILES.no-altivec=		gegl/opencl/*.h gegl/opencl/*.c
 SUBST_SED.no-altivec=		-e 's,\#if defined( __VEC__ ),\#if 0,g'
 .endif
 


Home | Main Index | Thread Index | Old Index