summaryrefslogtreecommitdiff
path: root/print
diff options
context:
space:
mode:
Diffstat (limited to 'print')
-rw-r--r--print/gutenprint-lib/Makefile14
-rw-r--r--print/gutenprint-lib/PLIST16
-rw-r--r--print/gutenprint-lib/options.mk22
3 files changed, 34 insertions, 18 deletions
diff --git a/print/gutenprint-lib/Makefile b/print/gutenprint-lib/Makefile
index 65253575a0a..a480ad726d5 100644
--- a/print/gutenprint-lib/Makefile
+++ b/print/gutenprint-lib/Makefile
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.100 2020/08/31 18:11:01 wiz Exp $
+# $NetBSD: Makefile,v 1.101 2020/10/26 10:57:15 triaxx Exp $
INSTALLVERSION= 5.3
VERSION= ${INSTALLVERSION}.3
DISTNAME= gutenprint-${VERSION}
PKGNAME= gutenprint-lib-${VERSION}
-PKGREVISION= 6
+PKGREVISION= 7
CATEGORIES= print
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=gimp-print/}
EXTRACT_SUFX= .tar.xz
@@ -31,6 +31,8 @@ USE_LANGUAGES+= c99
GNU_CONFIGURE= YES
+.include "../../print/gutenprint-lib/options.mk"
+
# gutenprint has many options, and really should be split into
# multiple packages. Splitting is difficult because of the structure
# of the upstream distribution. For now, this package contains
@@ -81,10 +83,6 @@ CONFIGURE_ARGS+= --enable-escputil
# why, so just disable it to reduce dependencies.
CONFIGURE_ARGS+= --without-readline
-# gimp2 plugin, on by default, and named gutenprint
-#CONFIGURE_ARGS+= --with-gimp2
-#CONFIGURE_ARGS+= --with-gimp2-as-gutenprint
-
# XXX Make command.types be a CONF_FILE
# XXX Replace patch-aa with SUBST_SED to use PREFIX rather than hard-coded /usr/pkg.
@@ -94,10 +92,6 @@ TEST_TARGET= check
# A libintl is optional in gutenprint.
.include "../../devel/gettext-lib/buildlink3.mk"
-# gutenprint-gimp: gimp plugin
-.include "../../graphics/gimp/buildlink3.mk"
-.include "../../x11/gtk2/buildlink3.mk"
-
# gutenprint-cups: cups support
.include "../../print/cups-base/buildlink3.mk"
diff --git a/print/gutenprint-lib/PLIST b/print/gutenprint-lib/PLIST
index 2dde159bc38..0c4ab252f20 100644
--- a/print/gutenprint-lib/PLIST
+++ b/print/gutenprint-lib/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.20 2019/10/11 23:47:42 gdt Exp $
+@comment $NetBSD: PLIST,v 1.21 2020/10/26 10:57:15 triaxx Exp $
bin/cups-calibrate
bin/escputil
bin/testpattern
@@ -28,16 +28,16 @@ include/gutenprint/util.h
include/gutenprint/vars.h
include/gutenprint/weave.h
include/gutenprint/xml.h
-include/gutenprintui2/curve.h
-include/gutenprintui2/gammacurve.h
-include/gutenprintui2/gutenprintui.h
-include/gutenprintui2/typebuiltins.h
-lib/gimp/2.0/plug-ins/gutenprint
+${PLIST.gimp}include/gutenprintui2/curve.h
+${PLIST.gimp}include/gutenprintui2/gammacurve.h
+${PLIST.gimp}include/gutenprintui2/gutenprintui.h
+${PLIST.gimp}include/gutenprintui2/typebuiltins.h
+${PLIST.gimp}lib/gimp/2.0/plug-ins/gutenprint
lib/gutenprint/${INSTALLVERSION}/config.summary
lib/libgutenprint.la
-lib/libgutenprintui2.la
+${PLIST.gimp}lib/libgutenprintui2.la
lib/pkgconfig/gutenprint.pc
-lib/pkgconfig/gutenprintui2.pc
+${PLIST.gimp}lib/pkgconfig/gutenprintui2.pc
libexec/cups/driver/gutenprint.${INSTALLVERSION}
libexec/cups/filter/commandtocanon
libexec/cups/filter/commandtoepson
diff --git a/print/gutenprint-lib/options.mk b/print/gutenprint-lib/options.mk
new file mode 100644
index 00000000000..f4d38493241
--- /dev/null
+++ b/print/gutenprint-lib/options.mk
@@ -0,0 +1,22 @@
+# $NetBSD: options.mk,v 1.1 2020/10/26 10:57:15 triaxx Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.gutenprint
+PKG_SUPPORTED_OPTIONS= gimp
+PKG_SUGGESTED_OPTIONS= gimp
+
+.include "../../mk/bsd.options.mk"
+
+PLIST_VARS+= gimp
+
+###
+### Gimp support
+###
+.if !empty(PKG_OPTIONS:Mgimp)
+CONFIGURE_ARGS+= --with-gimp2
+CONFIGURE_ARGS+= --with-gimp2-as-gutenprint
+PLIST.gimp= yes
+. include "../../graphics/gimp/buildlink3.mk"
+. include "../../x11/gtk2/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --without-gimp2
+.endif