pkgsrc-Changes archive

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

CVS commit: pkgsrc/graphics/gegl



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.

Modified files:

Index: pkgsrc/graphics/gegl/Makefile
diff -u pkgsrc/graphics/gegl/Makefile:1.77 pkgsrc/graphics/gegl/Makefile:1.78
--- pkgsrc/graphics/gegl/Makefile:1.77  Sat Nov  2 14:05:46 2019
+++ pkgsrc/graphics/gegl/Makefile       Tue Feb 25 04:29:36 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.77 2019/11/02 14:05:46 nia Exp $
+# $NetBSD: Makefile,v 1.78 2020/02/25 04:29:36 brook Exp $
 
 DISTNAME=      gegl-0.4.18
 CATEGORIES=    graphics
@@ -22,6 +22,17 @@ PKGCONFIG_OVERRIDE+= gegl.pc.in
 
 PYTHON_FOR_BUILD_ONLY= tool
 
+.include "../../mk/bsd.prefs.mk"
+
+PLIST_VARS+=           Darwin 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:
@@ -29,6 +40,21 @@ pre-build:
                ${PYTHONBIN} cltostring.py "$$file" "$$file".h \
        ; done
 
+.if ${OPSYS} == "Darwin"
+#
+# Meson uses .dylib for Darwin shared libraries, but G_MODULE_SUFFIX
+# is always .so on Unix, including Darwin.  This is under discussion
+# at https://gitlab.gnome.org/GNOME/glib/issues/1413 but for now
+# rename the plugins and reset their internal ID to match the new
+# name.
+#
+post-install:
+       cd ${DESTDIR}/${PREFIX}/lib/gegl-0.4 && for i in *.dylib; do \
+               install_name_tool -id ${PREFIX}/lib/gegl-0.4/$${i%.dylib}.so $${i}; \
+               mv "$${i}" "$${i%.dylib}.so" \
+       ; done
+.endif
+
 .include "options.mk"
 .include "../../devel/meson/build.mk"
 .include "../../devel/pango/buildlink3.mk"

Index: pkgsrc/graphics/gegl/PLIST
diff -u pkgsrc/graphics/gegl/PLIST:1.24 pkgsrc/graphics/gegl/PLIST:1.25
--- pkgsrc/graphics/gegl/PLIST:1.24     Sat Nov  2 14:05:46 2019
+++ pkgsrc/graphics/gegl/PLIST  Tue Feb 25 04:29:36 2020
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.24 2019/11/02 14:05:46 nia Exp $
+@comment $NetBSD: PLIST,v 1.25 2020/02/25 04:29:36 brook Exp $
 bin/gegl
 bin/gegl-imgcmp
 include/gegl-0.4/gegl-apply.h
@@ -116,11 +116,11 @@ 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
+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: pkgsrc/graphics/gegl/hacks.mk
diff -u pkgsrc/graphics/gegl/hacks.mk:1.1 pkgsrc/graphics/gegl/hacks.mk:1.2
--- pkgsrc/graphics/gegl/hacks.mk:1.1   Wed Feb 11 18:05:23 2015
+++ pkgsrc/graphics/gegl/hacks.mk       Tue Feb 25 04:29:36 2020
@@ -1,4 +1,4 @@
-# $NetBSD: hacks.mk,v 1.1 2015/02/11 18:05:23 pho Exp $
+# $NetBSD: hacks.mk,v 1.2 2020/02/25 04:29:36 brook Exp $
 
 .if !defined(GEGL_HACKS_MK)
 GEGL_HACKS_MK= # defined
@@ -17,13 +17,14 @@ 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_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