Bug 194284 - [PATCH] security/p5-GD-SecurityImage: handle OPTIONS_UNSET=X11
Summary: [PATCH] security/p5-GD-SecurityImage: handle OPTIONS_UNSET=X11
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-perl mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-10 13:40 UTC by Frank Wall
Modified: 2014-12-22 17:21 UTC (History)
3 users (show)

See Also:
fw: maintainer-feedback? (perl)


Attachments
patch security/p5-GD-SecurityImage (671 bytes, patch)
2014-10-10 13:40 UTC, Frank Wall
no flags Details | Diff
updated patch (1.23 KB, patch)
2014-12-22 15:20 UTC, Frank Wall
no flags Details | Diff
revised patch (2.46 KB, patch)
2014-12-22 15:39 UTC, Frank Wall
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Wall 2014-10-10 13:40:30 UTC
Created attachment 148164 [details]
patch security/p5-GD-SecurityImage

Attached patch adds a check to use the -nox11 version of ImageMagick if OPTIONS_UNSET=X11 is set.
Comment 1 Bugzilla Automation freebsd_committer 2014-10-10 13:40:30 UTC
Auto-assigned to maintainer perl@FreeBSD.org
Comment 2 florian.heigl 2014-12-22 01:58:59 UTC
Also ran into this with poudriere...

The patch works, could it please get reviewed / submitted?
Comment 3 Frank Wall 2014-12-22 15:20:52 UTC
Created attachment 150852 [details]
updated patch
Comment 4 Frank Wall 2014-12-22 15:22:09 UTC
As pointed out in a similar bug report (#194283) my original patch was incomplete. I've submitted a new patch.
Comment 5 Mathieu Arnold freebsd_committer 2014-12-22 15:25:31 UTC
(In reply to Frank Wall from comment #4)
> As pointed out in a similar bug report (#194283) my original patch was
> incomplete. I've submitted a new patch.

It will not work.  Options helpers must be defined before bsd.port.options.mk is included.

You should do something along the lines of:

.if ${PORT_OPTIONS:MIMAGEMAGICK}
.if ${PORT_OPTIONS:MX11}
BUILD_DEPENDS+= ${LOCALBASE}/bin/convert:${PORTSDIR}/graphics/ImageMagick
RUN_DEPENDS+=   ${LOCALBASE}/bin/convert:${PORTSDIR}/graphics/ImageMagick
.else
BUILD_DEPENDS+= ${LOCALBASE}/bin/convert:${PORTSDIR}/graphics/ImageMagick-nox11
RUN_DEPENDS+=   ${LOCALBASE}/bin/convert:${PORTSDIR}/graphics/ImageMagick-nox11
.endif
.endif
Comment 6 Frank Wall 2014-12-22 15:39:36 UTC
Created attachment 150853 [details]
revised patch
Comment 7 Frank Wall 2014-12-22 15:41:36 UTC
(In reply to Mathieu Arnold from comment #5)
> It will not work.  Options helpers must be defined before
> bsd.port.options.mk is included.

Of course, thanks.
Comment 8 Kurt Jaeger freebsd_committer 2014-12-22 16:32:07 UTC
X11 depends on IMAGEMAGICK being set, right ? There is no use in X11
being set and IMAGEMAGICK not ?
Comment 9 Frank Wall 2014-12-22 16:37:28 UTC
(In reply to Kurt Jaeger from comment #8)
> X11 depends on IMAGEMAGICK being set, right ? There is no use in X11
> being set and IMAGEMAGICK not ?

Exactly.
Comment 10 commit-hook freebsd_committer 2014-12-22 16:54:04 UTC
A commit references this bug:

Author: pi
Date: Mon Dec 22 16:53:58 UTC 2014
New revision: 375246
URL: https://svnweb.freebsd.org/changeset/ports/375246

Log:
  security/p5-GD-SecurityImage: knob to allow correct DEPENDS for IMAGEMAGICK

  Allow to select X11 with IMAGEMAGICK (manually).

  PR:		194284
  Submitted by:	Frank WAll <fw@moov.de>

Changes:
  head/security/p5-GD-SecurityImage/Makefile
Comment 11 Kurt Jaeger freebsd_committer 2014-12-22 16:57:50 UTC
While the patch works (and is committed now), there is a general issue still
unresolved:

- the ports options scheme should have a knob that conditionally sets
  one option in relation to some other knob
- even better would be if a knob of one port (here: the X11 knob of the
  ImageMagick port) could be inherited in some other port (here: p5-GD-SecurityImage)
Comment 12 Mathieu Arnold freebsd_committer 2014-12-22 17:21:48 UTC
(In reply to Kurt Jaeger from comment #11)
> While the patch works (and is committed now), there is a general issue still
> unresolved:
> 
> - the ports options scheme should have a knob that conditionally sets
>   one option in relation to some other knob
> - even better would be if a knob of one port (here: the X11 knob of the
>   ImageMagick port) could be inherited in some other port (here:
> p5-GD-SecurityImage)

Patches to Mk/bsd.options.mk *are* welcome :-)