On Sun, Nov 30, 2008 at 09:10:16PM +0100, LÉVAI Dániel wrote:
> > No. All you need is a global
> >
> > BUILD_DEPENDS=          :ghostscript-*:print/ghostscript/gnu
> >
> > regardless of no_x11 or not. The whole purpose of this dependency
> > is to always get the same delegates.mgk that uses pnmraw for
> > gs-color.
> But the whole point of the no_gs FLAVOR was that if one doesn't need 
> ghostscript, then don't install it with GM (ie. don't make gs mandatory 
> for GM). With your proposal, gs would always get installed, no matter 
> what...

No, it wouldn't. It's just a BUILD dependency. People can install
GraphicsMagick without having to install ghostscript, and you can
pkg_delete ghostscript after building GraphicsMagick.

> And it's no use either to put that BUILD_DEPENDS only outside 
> FLAVOR:no_x11, because if one already has a no_x11 FLAVORed ghostscript 
> installed, then building an x11 enabled GraphicsMagick would want to 
> install an x11 enabled ghostscript, which is certainly not what the 
> user wanted in the first place.

No, having any flavor of ghostscript installed is enough to satisfy
the BUILD_DEPENDS.

> So with the no_gs FLAVOR added, one 
> could build an x11 enabled GM, and can also have a no_x11 FLAVORed 
> ghostscript side-by-side.
> Besides, one could of course build an x11 and gs free GM too, with 
> FLAVOR="no_gs no_x11".

Repeating myself: when building GraphicsMagick, with or without
your no_gs flavor, and with or without ghostscript installed, the
*only* difference on the installed files is delegates.mgk, and it
looks like this:

--- /usr/local/lib/GraphicsMagick/config/delegates.mgk  Sun Nov 30 12:03:18 2008
+++ delegates.mgk       Sun Nov 30 11:51:56 2008
@@ -83,7 +83,7 @@
   <delegate decode="fig" command='"fig2dev" -L ps "%i" "%o"' />
   <delegate decode="gplt" command='"echo" "set size 1.25,0.62; set terminal 
postscript portrait color solid; set output "%o"; load "%i"" > "%u"; "gnuplot" 
"%u"' />
   <!-- Read color Postscript, EPS, and PDF  -->
-  <delegate decode="gs-color" stealth="True" command='"gs" -q -dBATCH 
-dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=pnmraw -dTextAlphaBits=%u 
-dGraphicsAlphaBits=%u -g%s -r%s %s "-sOutputFile=%s" -- "%s" -c quit' />
+  <delegate decode="gs-color" stealth="True" command='"gs" -q -dBATCH 
-dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=ppmraw -dTextAlphaBits=%u 
-dGraphicsAlphaBits=%u -g%s -r%s %s "-sOutputFile=%s" -- "%s" -c quit' />
   <!-- Read monochrome Postscript, EPS, and PDF  -->
   <delegate decode="gs-mono" stealth="True" command='"gs" -q -dBATCH 
-dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=pbmraw -dTextAlphaBits=%u 
-dGraphicsAlphaBits=%u -g%s -r%s %s "-sOutputFile=%s" -- "%s" -c quit' />
   <delegate decode="hpg" command='"hp2xx" -q -m eps -f `basename "%o"` "%i" && 
mv -f `basename "%o"` "%o"' />


The difference between a GraphicsMagick package with FLAVOR=no_gs
and without it would be nothing except the latter would have a run
dependency on ghostscript. And since there's no need for a run
dependency at all, there would be absolutely no difference.

If you don't believe me, do what I did:

- run make fake on GraphicsMagick with and without FLAVOR=no_gs.
- save or rename the WRKDIRs.
- temporarily move ghostscript out of scope, or pkg_delete it and
  comment the BUILD_ and RUN_DEPENDS from GraphicsMagick.
- again run make fake on GraphicsMagick with and without FLAVOR=no_gs.
- compare the contents of the saved and new WRKDIRs against each other.

Ciao,
        Kili

Reply via email to