Source-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/graphics/opencv Make GTK support optional. opencv is u...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9e758e6f5476
branches:  trunk
changeset: 436495:9e758e6f5476
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Mon Aug 03 22:37:05 2020 +0000

description:
Make GTK support optional. opencv is useful for server-side processing,
but GTK is a waste of space in that case.

diffstat:

 graphics/opencv/Makefile   |   5 +----
 graphics/opencv/options.mk |  18 ++++++++++++++++--
 2 files changed, 17 insertions(+), 6 deletions(-)

diffs (51 lines):

diff -r 394f773499ca -r 9e758e6f5476 graphics/opencv/Makefile
--- a/graphics/opencv/Makefile  Mon Aug 03 22:35:48 2020 +0000
+++ b/graphics/opencv/Makefile  Mon Aug 03 22:37:05 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.92 2020/05/21 20:53:38 ryoon Exp $
+# $NetBSD: Makefile,v 1.93 2020/08/03 22:37:05 joerg Exp $
 
 .include "Makefile.common"
 
@@ -39,8 +39,5 @@
 .include "../../graphics/tiff/buildlink3.mk"
 .include "../../lang/python/extension.mk"
 .include "../../math/py-numpy/buildlink3.mk"
-.if ${OPSYS} != "Darwin"
-.include "../../x11/gtk3/buildlink3.mk"
-.endif
 .include "../../mk/jpeg.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 394f773499ca -r 9e758e6f5476 graphics/opencv/options.mk
--- a/graphics/opencv/options.mk        Mon Aug 03 22:35:48 2020 +0000
+++ b/graphics/opencv/options.mk        Mon Aug 03 22:37:05 2020 +0000
@@ -1,7 +1,14 @@
-# $NetBSD: options.mk,v 1.11 2020/03/01 15:36:01 nia Exp $
+# $NetBSD: options.mk,v 1.12 2020/08/03 22:37:05 joerg Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.opencv
-PKG_SUPPORTED_OPTIONS= ffmpeg jasper
+PKG_SUPPORTED_OPTIONS= ffmpeg gtk jasper
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} != "Darwin"
+PKG_SUPPORTED_OPTIONS+=        gtk
+PKG_SUGGESTED_OPTIONS+=        gtk
+.endif
 
 .include "../../mk/bsd.options.mk"
 
@@ -23,5 +30,12 @@
 CMAKE_ARGS+=   -DWITH_JASPER=OFF
 .endif
 
+.if !empty(PKG_OPTIONS:Mgtk)
+CMAKE_ARGS+=   -DWITH_GTK=ON
+.include "../../x11/gtk3/buildlink3.mk"
+.else
+CMAKE_ARGS+=   -DWITH_GTK=OFF
+.endif
+
 # FIXME: should be option.mk'ed instead
 CMAKE_ARGS+=   -DBUILD_DOCS=OFF



Home | Main Index | Thread Index | Old Index