[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / graphics / gegl

File: [cvs.NetBSD.org] / pkgsrc / graphics / gegl / Makefile (download)

Revision 1.78, Tue Feb 25 04:29:36 2020 UTC (4 years, 1 month ago) by brook
Branch: MAIN
Changes since 1.77: +27 -1 lines

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.

# $NetBSD: Makefile,v 1.78 2020/02/25 04:29:36 brook Exp $

DISTNAME=	gegl-0.4.18
CATEGORIES=	graphics
MASTER_SITES=	https://download.gimp.org/pub/gegl/0.4/
EXTRACT_SUFX=	.tar.xz

MAINTAINER=	adam@NetBSD.org
HOMEPAGE=	http://gegl.org/
COMMENT=	Graph based image processing framework
LICENSE=	gnu-gpl-v3

MESON_ARGS+=	-Dintrospection=false
MESON_ARGS+=	-Dlibv4l=disabled
MESON_ARGS+=	-Dlibv4l2=disabled

USE_LANGUAGES=	c c++
USE_TOOLS+=	pkg-config xgettext
USE_TOOLS+=	bash

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:
	cd ${WRKSRC}/opencl && for file in $$(ls -1 | grep '\.cl$$'); do \
		${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"
.include "../../devel/SDL2/buildlink3.mk"
BUILDLINK_API_DEPENDS.babl+=	babl>=0.1.72
.include "../../graphics/babl/buildlink3.mk"
.include "../../mk/jpeg.buildlink3.mk"
.include "../../graphics/gdk-pixbuf2/buildlink3.mk"
.include "../../graphics/lcms2/buildlink3.mk"
.include "../../graphics/openexr/buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
.include "../../graphics/tiff/buildlink3.mk"
.include "../../graphics/libwebp/buildlink3.mk"
.include "../../lang/python/tool.mk"
.include "../../textproc/json-glib/buildlink3.mk"
.include "../../mk/dlopen.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"