pkgsrc-Bugs archive

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

pkg/40523: patch to make librsvg optional for graphics/gegl



>Number:         40523
>Category:       pkg
>Synopsis:       patch to make librsvg optional for graphics/gegl
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 31 04:50:00 +0000 2009
>Originator:     David A. Holland
>Release:        NetBSD 4.99.54 (pkgsrc 20090130)
>Organization:
>Environment:
System: NetBSD tanaqui 4.99.54 NetBSD 4.99.54 (TANAQUI) #21: Fri Feb 29 
12:31:31 EST 2008 dholland@tanaqui:/usr/src/sys/arch/i386/compile/TANAQUI i386
Architecture: i386
Machine: i386
>Description:

The new gimp uses this new(?) gegl package. It unconditionally uses
librsvg. This makes building gimp without librsvg fairly pointless.

(librsvg uses, transitively, a dozen or so big gnome libraries, so
being able to turn it off is useful.)

>How-To-Repeat:

make

>Fix:

Someone please eyeball the following before committing it. I have
tested it with the option both ways, but I'm not up on the formalities
of creating new options.mk files and don't have time for the moment to
ask or dig around.

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/gegl/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- Makefile    29 Jan 2009 19:14:13 -0000      1.3
+++ Makefile    31 Jan 2009 04:43:30 -0000
@@ -20,9 +20,10 @@
 
 PKGCONFIG_OVERRIDE+=   gegl.pc.in
 
+.include "options.mk"
+
 .include "../../graphics/babl/buildlink3.mk"
 .include "../../graphics/jpeg/buildlink3.mk"
-.include "../../graphics/librsvg/buildlink3.mk"
 .include "../../graphics/openexr/buildlink3.mk"
 .include "../../graphics/png/buildlink3.mk"
 #.include "../../multimedia/ffmpeg/buildlink3.mk"
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/gegl/PLIST,v
retrieving revision 1.3
diff -u -r1.3 PLIST
--- PLIST       29 Jan 2009 19:14:13 -0000      1.3
+++ PLIST       31 Jan 2009 04:43:30 -0000
@@ -99,7 +99,7 @@
 lib/gegl-0.0/stretch-contrast.la
 lib/gegl-0.0/subtract.la
 lib/gegl-0.0/svg-huerotate.la
-lib/gegl-0.0/svg-load.la
+${PLIST.svg}lib/gegl-0.0/svg-load.la
 lib/gegl-0.0/svg-luminancetoalpha.la
 lib/gegl-0.0/svg-matrix.la
 lib/gegl-0.0/svg-multiply.la
Index: buildlink3.mk
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/gegl/buildlink3.mk,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 buildlink3.mk
--- buildlink3.mk       16 Oct 2008 21:53:57 -0000      1.1.1.1
+++ buildlink3.mk       31 Jan 2009 04:43:30 -0000
@@ -16,9 +16,15 @@
 BUILDLINK_PKGSRCDIR.gegl?=     ../../graphics/gegl
 .endif # GEGL_BUILDLINK3_MK
 
+pkgbase := gegl
+.include "../../mk/pkg-build-options.mk"
+
+.if !empty(PKG_BUILD_OPTIONS.gegl:Msvg)
+.include "../../graphics/librsvg/buildlink3.mk"
+.endif
+
 .include "../../graphics/babl/buildlink3.mk"
 .include "../../graphics/jpeg/buildlink3.mk"
-.include "../../graphics/librsvg/buildlink3.mk"
 .include "../../graphics/openexr/buildlink3.mk"
 .include "../../graphics/png/buildlink3.mk"
 .include "../../x11/gtk2/buildlink3.mk"
Index: options.mk
===================================================================
RCS file: options.mk
diff -N options.mk
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ options.mk  31 Jan 2009 04:43:30 -0000
@@ -0,0 +1,14 @@
+# $NetBSD$
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.gegl
+PKG_SUPPORTED_OPTIONS= svg
+PKG_SUGGESTED_OPTIONS= svg
+
+.include "../../mk/bsd.options.mk"
+
+PLIST_VARS+=           svg
+
+.if !empty(PKG_OPTIONS:Msvg)
+.include "../../graphics/librsvg/buildlink3.mk"
+PLIST.svg=             yes
+.endif



Home | Main Index | Thread Index | Old Index