From nobody@FreeBSD.org  Mon Mar  5 08:49:40 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 86262106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  5 Mar 2012 08:49:40 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 757528FC1B
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  5 Mar 2012 08:49:40 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q258ndeo081439
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 5 Mar 2012 08:49:39 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q258ndE4081438;
	Mon, 5 Mar 2012 08:49:39 GMT
	(envelope-from nobody)
Message-Id: <201203050849.q258ndE4081438@red.freebsd.org>
Date: Mon, 5 Mar 2012 08:49:39 GMT
From: Pavel Gubin <pg@2lazy.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: print/ghostscript9 forces dependency of dns/libidn which is really optional
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         165706
>Category:       ports
>Synopsis:       print/ghostscript9 forces dependency of dns/libidn which is really optional
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    doceng
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 05 08:50:12 UTC 2012
>Closed-Date:    Tue Sep 04 05:19:08 UTC 2012
>Last-Modified:  Tue Sep 04 05:19:08 UTC 2012
>Originator:     Pavel Gubin
>Release:        8.2-RELEASE
>Organization:
>Environment:
>Description:
While trying to update ghostscript9-9.05 to ghostscript9-9.05_2 I noticed that it wants to install dns/libidn, and found that libidn dependency appeared in Makefile's CVS version 1.12 of 2012/02/29 fixing inplicit dependency.

But really gs may be configured --without-libidn, so this dep may be made tunable.
>How-To-Repeat:
Try to update ghostscript9-9.05 to ghostscript9-9.05_2 on system without libidn.
>Fix:


Patch attached with submission follows:

--- Makefile.orig	2012-03-04 11:38:28.000000000 +0400
+++ Makefile	2012-03-05 12:36:39.000000000 +0400
@@ -24,7 +24,6 @@
 COMMENT=	Ghostscript 9.x PostScript interpreter
 
 LIB_DEPENDS=	expat:${PORTSDIR}/textproc/expat2 \
-		idn:${PORTSDIR}/dns/libidn \
 		jbig2dec:${PORTSDIR}/graphics/jbig2dec \
 		jpeg:${PORTSDIR}/graphics/jpeg \
 		png:${PORTSDIR}/graphics/png \
@@ -56,7 +55,6 @@
 		--enable-contrib \
 		--enable-dynamic \
 		--with-ijs \
-		--with-libidn \
 		--without-jasper \
 		--with-drivers=""
 CPPFLAGS+=	-DUPD_SIGNAL=0 -I. \
@@ -79,6 +77,7 @@
 		CUPS	"Enable CUPS support"	on \
 		FONTCONFIG	"fontconfig support"	on \
 		LIBPAPER	"libpaper support"	off \
+		LIBIDN		"libidn support"	on \
 		GTK	"GTK frontend"	off \
 		X11	"X11 support"	on
 
@@ -123,6 +122,13 @@
 CONFIGURE_ARGS+=	--without-libpaper
 .endif
 
+.if !defined(WITHOUT_LIBIDN)
+LIB_DEPENDS+=	idn:${PORTSDIR}/dns/libidn
+CONFIGURE_ARGS+=	--with-libidn
+.else
+CONFIGURE_ARGS+=	--without-libidn
+.endif
+
 .if !defined(WITHOUT_FONTCONFIG)
 LIB_DEPENDS+=	fontconfig.1:${PORTSDIR}/x11-fonts/fontconfig
 CONFIGURE_ARGS+=	--enable-fontconfig


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-ports-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Mar 5 09:01:57 UTC 2012 
Responsible-Changed-Why:  
ports PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=165706 

From: Hiroki Sato <hrs@FreeBSD.org>
To: pg@2lazy.ru
Cc: freebsd-gnats-submit@FreeBSD.org, hrs@FreeBSD.org
Subject: Re: misc/165706: print/ghostscript9 forces dependency of
 dns/libidn which is really optional
Date: Mon, 05 Mar 2012 18:05:00 +0900 (JST)

 ----Security_Multipart(Mon_Mar__5_18_05_00_2012_619)--
 Content-Type: Text/Plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 
 Pavel Gubin <pg@2lazy.ru> wrote
   in <201203050849.q258ndE4081438@red.freebsd.org>:
 
 pg> While trying to update ghostscript9-9.05 to ghostscript9-9.05_2 I
 pg> noticed that it wants to install dns/libidn, and found that libidn
 pg> dependency appeared in Makefile's CVS version 1.12 of 2012/02/29
 pg> fixing inplicit dependency.
 pg>
 pg> But really gs may be configured --without-libidn, so this dep may be
 pg> made tunable.
 
  Why?
 
 -- Hiroki
 
 ----Security_Multipart(Mon_Mar__5_18_05_00_2012_619)--
 Content-Type: application/pgp-signature
 Content-Transfer-Encoding: 7bit
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (FreeBSD)
 
 iEYEABECAAYFAk9UgbwACgkQTyzT2CeTzy3l5wCeMgrodWn70elStxMFDy/RVkll
 0E0AmwUs8OQxykH+2uRvkbLI9O0cmdU1
 =4h1y
 -----END PGP SIGNATURE-----
 
 ----Security_Multipart(Mon_Mar__5_18_05_00_2012_619)----

From: Hiroki Sato <hrs@FreeBSD.org>
To: pg@2lazy.ru
Cc: freebsd-gnats-submit@FreeBSD.org, hrs@FreeBSD.org
Subject: Re: misc/165706: print/ghostscript9 forces dependency of
 dns/libidn which is really optional
Date: Tue, 06 Mar 2012 02:44:01 +0900 (JST)

 ----Security_Multipart(Tue_Mar__6_02_44_01_2012_732)--
 Content-Type: Text/Plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 
 Pavel Gubin <pg@2lazy.ru> wrote
   in <4F54AB2F.40703@2lazy.ru>:
 
 pg> Hiroki Sato wrote:
 pg> > pg> While trying to update ghostscript9-9.05 to ghostscript9-9.05_2
 pg> > I pg> noticed that it wants to install dns/libidn, and found that
 pg> > libidn pg> dependency appeared in Makefile's CVS version 1.12 of
 pg> > 2012/02/29 pg> fixing inplicit dependency. pg> pg> But really gs
 pg> > may be configured --without-libidn, so this dep may be pg> made
 pg> > tunable.
 pg> >
 pg> > Why?
 pg>
 pg> Because it is optional, am I Wrong?
 pg> My system works well without libidn, and gs until ghostscript9-9.05_2
 pg> (or _1) also works, and I verified this patch. Also I set default for
 pg> libidn to "on", so this should not break anything, but will allow to
 pg> disable unnecessary dependence if one doesn'n need it.
 
  You just do not use the PDF password feature newly added.  I do not
  think it is unnecessary or should be optional unless it breaks other
  features.
 
 -- Hiroki
 
 ----Security_Multipart(Tue_Mar__6_02_44_01_2012_732)--
 Content-Type: application/pgp-signature
 Content-Transfer-Encoding: 7bit
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (FreeBSD)
 
 iEYEABECAAYFAk9U+2EACgkQTyzT2CeTzy0jCgCfbBWkKCMO4qxiR6ot/Q7wMjyy
 cMMAoNjImfqneMCYO3HAU7OPinUaDzOX
 =tu58
 -----END PGP SIGNATURE-----
 
 ----Security_Multipart(Tue_Mar__6_02_44_01_2012_732)----

From: Pavel Gubin <pg@2lazy.ru>
To: Hiroki Sato <hrs@FreeBSD.org>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: misc/165706: print/ghostscript9 forces dependency of dns/libidn
 which is really optional
Date: Tue, 06 Mar 2012 10:01:16 +0400

 Hiroki Sato wrote:
 > pg> > may be configured --without-libidn, so this dep may be pg>
 > made pg> > tunable. pg> > pg> > Why? pg> pg> Because it is
 > optional, am I Wrong? pg> My system works well without libidn, and
 > gs until ghostscript9-9.05_2 pg> (or _1) also works, and I verified
 > this patch. Also I set default for pg> libidn to "on", so this
 > should not break anything, but will allow to pg> disable
 > unnecessary dependence if one doesn'n need it.
 > 
 > You just do not use the PDF password feature newly added.  I do
 > not think it is unnecessary or should be optional unless it breaks
 > other features.
 Yes, and I've never used any password-protected PDFs, and see no
 reason why this feature cannot be made optional (ON by default) if one
 really does not need it, if this knob will cost almost nothing.
 
 Anyway, this may be done by just checking WITH[OUT]_LIBIDN without
 defining additional config knob, thus it will cost nothing but a some
 bytes in Makefile.
 
 Again, I see no reason why make extra dependency mandatory if it is
 optional.
 
 -- 
 Pavel Gubin
 Jabber: xmpp:pg@2lazy.ru / Phone +79218959055 / sip:pg@2lazy.ru

From: Hiroki Sato <hrs@FreeBSD.org>
To: pg@2lazy.ru
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: misc/165706: print/ghostscript9 forces dependency of
 dns/libidn which is really optional
Date: Wed, 07 Mar 2012 11:06:00 +0900 (JST)

 ----Security_Multipart(Wed_Mar__7_11_06_00_2012_533)--
 Content-Type: Text/Plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 
 Pavel Gubin <pg@2lazy.ru> wrote
   in <4F55A82C.6050706@2lazy.ru>:
 
 pg> Hiroki Sato wrote:
 pg> > pg> > may be configured --without-libidn, so this dep may be pg>
 pg> > made pg> > tunable. pg> > pg> > Why? pg> pg> Because it is
 pg> > optional, am I Wrong? pg> My system works well without libidn, and
 pg> > gs until ghostscript9-9.05_2 pg> (or _1) also works, and I verified
 pg> > this patch. Also I set default for pg> libidn to "on", so this
 pg> > should not break anything, but will allow to pg> disable
 pg> > unnecessary dependence if one doesn'n need it.
 pg> >
 pg> > You just do not use the PDF password feature newly added.  I do
 pg> > not think it is unnecessary or should be optional unless it breaks
 pg> > other features.
 pg> Yes, and I've never used any password-protected PDFs, and see no
 pg> reason why this feature cannot be made optional (ON by default) if one
 pg> really does not need it, if this knob will cost almost nothing.
 pg>
 pg> Anyway, this may be done by just checking WITH[OUT]_LIBIDN without
 pg> defining additional config knob, thus it will cost nothing but a some
 pg> bytes in Makefile.
 pg>
 pg> Again, I see no reason why make extra dependency mandatory if it is
 pg> optional.
 
  It is not optional because it is designed to use it.  Also I do not
  think adding libidn by default is a big problem for most of people
  because ghostscript9 already depends on 47 packages and libidn is
  small enough.  Adding a knob increases the maintenance cost---it is
  not small as you expect.  These are the reasons why I have no
  intention to add it at this moment unless it has a problem about the
  functionality or huge bloat of the dependency.
 
 -- Hiroki
 
 ----Security_Multipart(Wed_Mar__7_11_06_00_2012_533)--
 Content-Type: application/pgp-signature
 Content-Transfer-Encoding: 7bit
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (FreeBSD)
 
 iEYEABECAAYFAk9WwogACgkQTyzT2CeTzy1hgwCgn1o5Up82YyOAqrl78Lyf8Wol
 iHUAn23W0iGRhvPuTXZZdEo1qoyAE7C5
 =mXj4
 -----END PGP SIGNATURE-----
 
 ----Security_Multipart(Wed_Mar__7_11_06_00_2012_533)----
Responsible-Changed-From-To: freebsd-ports-bugs->doceng 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Mar 21 17:11:50 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=165706 
State-Changed-From-To: open->closed 
State-Changed-By: hrs 
State-Changed-When: Tue Sep 4 05:17:31 UTC 2012 
State-Changed-Why:  
libidn is essential for PDF support, so currently there is no plan to make it 
an option. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=165706 
>Unformatted:
