pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
gimp option for print/gutenprint-lib
I am installing print/gutenprint-lib on a Raspberry Pi (model 1). The dependency on graphics/gimp is huge and useless in my use case. Therefore I move it to an options.mk file. Do you think it is acceptable to commit the patch below?
----------8<----------8<----------8<----------8<----------8<----------
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/gutenprint-lib/Makefile,v
retrieving revision 1.100
diff -u -r1.100 Makefile
--- Makefile 31 Aug 2020 18:11:01 -0000 1.100
+++ Makefile 20 Oct 2020 03:21:41 -0000
@@ -4,7 +4,7 @@
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 @@
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 @@
# 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 @@
# 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"
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/print/gutenprint-lib/PLIST,v
retrieving revision 1.20
diff -u -r1.20 PLIST
--- PLIST 11 Oct 2019 23:47:42 -0000 1.20
+++ PLIST 20 Oct 2020 03:21:41 -0000
@@ -28,16 +28,16 @@
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
Index: options.mk
===================================================================
RCS file: options.mk
diff -N options.mk
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ options.mk 20 Oct 2020 03:21:41 -0000
@@ -0,0 +1,21 @@
+# $NetBSD$
+
+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"
+.else
+CONFIGURE_ARGS+= --without-gimp2
+.endif
Home |
Main Index |
Thread Index |
Old Index