Index: head/graphics/gegl/Makefile
===================================================================
--- head/graphics/gegl/Makefile	(revision 506361)
+++ head/graphics/gegl/Makefile	(revision 506362)
@@ -1,153 +1,149 @@
 # Created by: Pietro Cerutti <gahr@FreeBSD.org>
 # $FreeBSD$
 
 PORTNAME=	gegl
-PORTVERSION=	0.4.14
-PORTREVISION=	2
+PORTVERSION=	0.4.16
 CATEGORIES=	graphics
 MASTER_SITES=	GIMP
 
 MAINTAINER=	gnome@FreeBSD.org
 COMMENT=	Graph based image processing framework
 
 LICENSE=	BSD3CLAUSE GPLv3+ LGPL3+
 LICENSE_COMB=	multi
 LICENSE_FILE_GPLv3+ =	${WRKSRC}/COPYING
 LICENSE_FILE_LGPL3+ =	${WRKSRC}/COPYING.LESSER
 
 LIB_DEPENDS=	libbabl-0.1.so:x11/babl \
 		libjson-glib-1.0.so:devel/json-glib \
 		libfribidi.so:converters/fribidi \
 		libpng.so:graphics/png
 
 USES=		compiler:c++14-lang cpe gettext gmake gnome jpeg libtool localbase \
 		pathfix pkgconfig shebangfix uniquefiles tar:bzip2
 USE_GNOME=	glib20 intltool introspection:build
 USE_LDCONFIG=	yes
 GNU_CONFIGURE=	yes
 CONFIGURE_ENV=	ac_cv_header_execinfo_h=no
 CONFIGURE_ARGS=	--without-vala --disable-docs
 CONFIGURE_ARGS+=--without-mrg --without-lensfun
 INSTALL_TARGET=	install-strip
 
-GEGL_MINOR=	414
+GEGL_MINOR=	416
 GEGL_VER=	0.4
 PLIST_SUB+=	GEGL_MINOR="${GEGL_MINOR}" GEGL_VER=${GEGL_VER}
 
 EXAMPLES=	2geglbuffer \
 		gegl-convert gegl-slicer geglbuffer-add-image \
 		geglbuffer-clock hello-world sdl-draw
 
 SHEBANG_FILES=	tools/xml_insert.sh
 
 # Fix conflicts with sysutils/coreutils
 UNIQUE_SUFFIX=	-${GEGL_VER}
 UNIQUE_SUFFIX_FILES=	bin/gcut
 
 OPTIONS_SUB=	yes
-OPTIONS_DEFINE=	CAIRO ENSCRIPT EXIV2 FFMPEG PIXBUF GRAPHVIZ JASPER \
+OPTIONS_DEFINE=	CAIRO ENSCRIPT FFMPEG PIXBUF GRAPHVIZ JASPER \
 		LUA OPENEXR RAW PANGO POPPLER LIBRSVG2 SDL SPIRO V4L \
 		EXAMPLES LCMS2 WEBP TIFF GEXIV2
-OPTIONS_DEFAULT=CAIRO ENSCRIPT EXIV2 PIXBUF GRAPHVIZ JASPER LCMS2 LUA \
+OPTIONS_DEFAULT=CAIRO ENSCRIPT GEXIV2 PIXBUF GRAPHVIZ JASPER LCMS2 LUA \
 		OPENEXR RAW PANGO POPPLER LIBRSVG2 SDL SPIRO V4L WEBP TIFF
 
 ENSCRIPT_DESC=	Enscript support
 SPIRO_DESC=	Spiro support
 #UMFPACK_DESC=	UMFpack support
 GEXIV2_DESC=	EXIF and IPTC metadata support via gexiv2
 
 PIXBUF_USE=	GNOME=gdkpixbuf2
 PIXBUF_CONFIGURE_WITH=	gdk-pixbuf
 
 CAIRO_USE=	GNOME=cairo
 CAIRO_CONFIGURE_WITH=	cairo
 
 PANGO_USE=	GNOME=pango
 PANGO_CONFIGURE_WITH=	pango
 
 POPPLER_LIB_DEPENDS=	libpoppler-glib.so:graphics/poppler-glib
 POPPLER_CONFIGURE_WITH=	popplerglib
 
 ENSCRIPT_BUILD_DEPENDS=	enscript:print/enscript-a4
 
 FFMPEG_LIB_DEPENDS=	libavformat.so:multimedia/ffmpeg
 FFMPEG_CONFIGURE_WITH=	libavformat
 
 GRAPHVIZ_LIB_DEPENDS=	libcgraph.so:graphics/graphviz
 GRAPHVIZ_CONFIGURE_WITH=	graphviz
 
 JASPER_LIB_DEPENDS=	libjasper.so:graphics/jasper
 JASPER_CONFIGURE_WITH=	jasper
 
 LCMS2_LIB_DEPENDS=	liblcms2.so:graphics/lcms2
 LCMS2_CONFIGURE_OFF=	--without-lcms
 
 LUA_USES=		lua
 LUA_CONFIGURE_WITH=	lua
 
 OPENEXR_LIB_DEPENDS=	libIlmImf.so:graphics/openexr \
 			libImath.so:graphics/ilmbase
 OPENEXR_CONFIGURE_WITH=	openexr
 
 RAW_LIB_DEPENDS=	libraw.so:graphics/libraw
 RAW_CONFIGURE_WITH=	libraw
 
 LIBRSVG2_USE=		GNOME=librsvg2
 LIBRSVG2_CONFIGURE_OFF=	--without-librsvg
 
 SDL_USE=		SDL=sdl
 SDL_USES=		sdl
 SDL_CONFIGURE_WITH=	sdl
 
 SPIRO_LIB_DEPENDS=	libspiro.so:graphics/libspiro
 SPIRO_CONFIGURE_WITH=	libspiro
 
 V4L_BUILD_DEPENDS=	v4l_compat>=0:multimedia/v4l_compat
 V4L_LIB_DEPENDS=	libv4l2.so:multimedia/libv4l
 V4L_CONFIGURE_WITH=	libv4l
 V4L_VARS=		LICENSE+=LGPL20+
 
 WEBP_LIB_DEPENDS=	libwebp.so:graphics/webp
 WEBP_CONFIGURE_WITH=	webp
 
 # UMFPACK has two "problems"
 # 1) it build with port gcc 2) needed libs aren't recorded in the libraries.
 #UMFPACK_LIB_DEPENDS=	libumfpack.so:math/suitesparse
 #UMFPACK_CONFIGURE_WITH=	umfpack
 CONFIGURE_ARGS+=	--without-umfpack
-
-EXIV2_LIB_DEPENDS=	libexiv2.so:graphics/exiv2
-EXIV2_CONFIGURE_WITH=	exiv2
 
 GEXIV2_LIB_DEPENDS=	libgexiv2.so:graphics/gexiv2
 GEXIV2_CONFIGURE_WITH=	gexiv2
 
 TIFF_LIB_DEPENDS=	libtiff.so:graphics/tiff
 TIFF_CONFIGURE_WITH=	libtiff
 
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MPANGO} && ${PORT_OPTIONS:MCAIRO}
 PLIST_SUB+=	PANGOCAIRO=""
 .else
 CONFIGURE_ARGS+=--without-pangocairo
 PLIST_SUB+=	PANGOCAIRO="@comment "
 .endif
 
 post-patch:
 	${REINPLACE_CMD} -e "s/lua >/lua-${LUA_VER} >/g" \
 		-e 's|\(lua\)\(5\.1\)|\1-\2|g ; s|x86_64|amd64|g' \
 		${WRKSRC}/configure
 
 post-patch-EXAMPLES-off:
 	${REINPLACE_CMD} -e 's|tools examples|tools|g' \
 		${WRKSRC}/Makefile.in
 
 post-install-EXAMPLES-on:
 	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/data
 	${INSTALL_DATA} ${WRKSRC}/examples/data/surfer.png ${STAGEDIR}${EXAMPLESDIR}/data
 .for ex in ${EXAMPLES}
 	${INSTALL_DATA} ${WRKSRC}/examples/${ex}.c ${STAGEDIR}${EXAMPLESDIR}
 .endfor
 
 .include <bsd.port.mk>
Index: head/graphics/gegl/distinfo
===================================================================
--- head/graphics/gegl/distinfo	(revision 506361)
+++ head/graphics/gegl/distinfo	(revision 506362)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1555532285
-SHA256 (gegl-0.4.14.tar.bz2) = 4c01d58599d8ddb3714effd2675ea1863272cf2d7d9ed3d32aee80c89f859901
-SIZE (gegl-0.4.14.tar.bz2) = 7209142
+TIMESTAMP = 1562677461
+SHA256 (gegl-0.4.16.tar.bz2) = 0112df690301d9eb993cc48965fc71b7751c9021a4f4ee08fcae366c326b5e5a
+SIZE (gegl-0.4.16.tar.bz2) = 7304904
Index: head/graphics/gegl/files/patch-08084a6
===================================================================
--- head/graphics/gegl/files/patch-08084a6	(nonexistent)
+++ head/graphics/gegl/files/patch-08084a6	(revision 506362)
@@ -0,0 +1,33 @@
+From 08084a6de9e6d4ee665addf3b0b8587f7f639420 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=98yvind=20Kol=C3=A5s?= <pippin@gimp.org>
+Date: Mon, 8 Jul 2019 18:45:33 +0200
+Subject: [PATCH] gegl: use uint64_t for memory computations
+
+This ensures we avoid overflow in case PAE lets 32bit builds know of more
+memory than a single process can acccess. See issue #176.
+---
+ gegl/gegl-config.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/gegl/gegl-config.c b/gegl/gegl-config.c
+index 9f774514d..1b6fc25e8 100644
+--- gegl/gegl-config.c
++++ gegl/gegl-config.c
+@@ -230,10 +230,10 @@ gegl_config_class_init (GeglConfigClass *klass)
+                                                      G_PARAM_READWRITE));
+ 
+   {
+-    long default_tile_cache_size = 1024l * 1024 * 1024;
+-    long mem_total = default_tile_cache_size;
+-    long mem_min = 512 << 20; // 512mb
+-    long mem_available = mem_min;
++    uint64_t default_tile_cache_size = 1024l * 1024 * 1024;
++    uint64_t mem_total = default_tile_cache_size;
++    uint64_t mem_min = 512 << 20; // 512mb
++    uint64_t mem_available = mem_min;
+ 
+ #ifdef G_OS_WIN32
+ # if defined(_MSC_VER) && (_MSC_VER <= 1200)
+-- 
+2.21.0
+

Property changes on: head/graphics/gegl/files/patch-08084a6
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: head/graphics/gegl/files/patch-a6bcf48
===================================================================
--- head/graphics/gegl/files/patch-a6bcf48	(nonexistent)
+++ head/graphics/gegl/files/patch-a6bcf48	(revision 506362)
@@ -0,0 +1,75 @@
+From a6bcf486113b05e0c84ccb38704ed09ef5aadf22 Mon Sep 17 00:00:00 2001
+From: Ting-Wei Lan <lantw@src.gnome.org>
+Date: Mon, 8 Jul 2019 22:33:22 +0800
+Subject: [PATCH] Use a way similar to libgtop to get memory usage on FreeBSD
+
+Fixes: https://gitlab.gnome.org/GNOME/gegl/issues/176
+---
+ gegl/gegl-config.c | 37 +++++++++++++++++++++++++++++++++++++
+ 1 file changed, 37 insertions(+)
+
+diff --git a/gegl/gegl-config.c b/gegl/gegl-config.c
+index 9882a0390..9f774514d 100644
+--- gegl/gegl-config.c
++++ gegl/gegl-config.c
+@@ -18,6 +18,8 @@
+ 
+ #include "config.h"
+ 
++#include <stdbool.h>
++#include <stdint.h>
+ #include <string.h>
+ 
+ #include <glib-object.h>
+@@ -40,6 +42,9 @@
+ 
+ #ifdef __APPLE__
+ #include <mach/mach.h>
++#endif
++
++#if defined(__APPLE__) || defined(__FreeBSD__)
+ #include <sys/types.h>
+ #include <sys/sysctl.h>
+ #endif
+@@ -278,6 +283,38 @@ gegl_config_class_init (GeglConfigClass *klass)
+                              ) * page_size;
+       mach_port_deallocate (mach_task_self (), host);
+     }
++#elif defined(__FreeBSD__)
++    bool ok = true;
++
++    unsigned long physmem;
++    ok = ok && sysctl ((int[2]){ CTL_HW, HW_PHYSMEM }, 2, &physmem,
++                       &(size_t){ sizeof physmem }, NULL, 0) == 0;
++    if (ok)
++      mem_total = physmem;
++
++    uint32_t active_count;
++    uint32_t wired_count;
++    ok = ok && sysctlbyname ("vm.stats.vm.v_active_count", &active_count,
++                             &(size_t){ sizeof active_count }, NULL, 0) == 0;
++    ok = ok && sysctlbyname ("vm.stats.vm.v_wire_count", &wired_count,
++                             &(size_t){ sizeof wired_count }, NULL, 0) == 0;
++
++    if (ok) {
++      uint32_t laundry_count;
++      uint64_t zfs_arc_size;
++      if (sysctlbyname ("vm.stats.vm.v_laundry_count", &laundry_count,
++                        &(size_t){ sizeof laundry_count }, NULL, 0) != 0)
++        laundry_count = 0;
++      if (sysctlbyname ("kstat.zfs.misc.arcstats.size", &zfs_arc_size,
++                        &(size_t){ sizeof zfs_arc_size }, NULL, 0) != 0)
++        zfs_arc_size = 0;
++
++      int page_size = getpagesize ();
++      mem_available = physmem - (uint64_t) active_count * page_size
++                              - (uint64_t) wired_count * page_size
++                              - (uint64_t) laundry_count * page_size
++                              + zfs_arc_size;
++    }
+ #else
+     mem_total = sysconf (_SC_PHYS_PAGES) * sysconf (_SC_PAGESIZE);
+     mem_available = sysconf (_SC_AVPHYS_PAGES) * sysconf (_SC_PAGESIZE);
+-- 
+2.21.0
+

Property changes on: head/graphics/gegl/files/patch-a6bcf48
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property