Bug 179481

Summary: [patch] graphics/rubygem-rmagick: optional X11
Product: Ports & Packages Reporter: David Demelier <demelier.david>
Component: Individual Port(s)Assignee: freebsd-ruby (Nobody) <ruby>
Status: Closed FIXED    
Severity: Affects Only Me CC: bsdbug-ihj
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch.diff none

Description David Demelier 2013-06-11 09:50:00 UTC
On headless machine, if you compile without X11, this port will conflicts with ImageMagick and ImageMagick-nox11.

This add, just like my old patch for graphics/ruby-rmagick, an optional X11 option.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-06-11 09:50:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ruby

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Steve Wills freebsd_committer freebsd_triage 2013-06-23 04:34:25 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 3 dfilter service freebsd_committer freebsd_triage 2013-06-23 04:36:37 UTC
Author: swills
Date: Sun Jun 23 03:33:41 2013
New Revision: 321608
URL: http://svnweb.freebsd.org/changeset/ports/321608

Log:
  - Make X11 dependency on ImageMagick optional
  
  PR:		ports/179481
  Submitted by:	David Demelier <demelier.david@gmail.com>

Modified:
  head/graphics/rubygem-rmagick/Makefile   (contents, props changed)

Modified: head/graphics/rubygem-rmagick/Makefile
==============================================================================
--- head/graphics/rubygem-rmagick/Makefile	Sun Jun 23 02:26:26 2013	(r321607)
+++ head/graphics/rubygem-rmagick/Makefile	Sun Jun 23 03:33:41 2013	(r321608)
@@ -8,10 +8,19 @@ MASTER_SITES=		RG
 MAINTAINER=		ruby@FreeBSD.org
 COMMENT=		Ruby binding for ImageMagick
 
-LIB_DEPENDS=		MagickWand:${PORTSDIR}/graphics/ImageMagick
-
 USE_RUBY=		yes
 USE_RUBYGEMS=		yes
 RUBYGEM_AUTOPLIST=	yes
 
+OPTIONS_DEFINE=		X11
+OPTIONS_DEFAULT=	X11
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MX11}
+LIB_DEPENDS=	MagickWand:${PORTSDIR}/graphics/ImageMagick
+.else
+LIB_DEPENDS=	MagickWand:${PORTSDIR}/graphics/ImageMagick-nox11
+.endif
+
 .include <bsd.port.mk>
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Josh C 2015-05-20 13:15:49 UTC
This was an incorrect change has has now BROKEN builds for sites that define OPTIONS_UNSET+=X11 in the global make.conf.

If you want to build without X11, this is the correct way.

Maintainer, can you please revert this patch? The problem here is that compliant ports do not depend on "meta" packages like ImageMagick-nox11 because these ports already have the logic to build without X11 if THAT port has such a feature.

As graphics/rubygem-rmagick does not itself have any X11 build options, the X11 flag needs to be changed in the pkg UNIQUENAME of ImageMagick, either using the syntax above to set it globally, or defining ImageMagick_UNSET+=X11 in make.conf.

This change has resulted in duplicate origin errors if attempting to install graphics/rubygem-rmagick witih ANY other complaint port in the tree, as both graphics/ImageMagick AND graphics/ImageMagick-nox11 (the latter, incorrectly pulled in as a result of this unnecessary change.)

Please let me know if further information is required.