NetBSD Problem Report #50912

From www@NetBSD.org  Tue Mar  8 08:27:48 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 59E957A13F
	for <gnats-bugs@gnats.NetBSD.org>; Tue,  8 Mar 2016 08:27:48 +0000 (UTC)
Message-Id: <20160308082747.50C437ACBA@mollari.NetBSD.org>
Date: Tue,  8 Mar 2016 08:27:47 +0000 (UTC)
From: triaxx@triaxx.org
Reply-To: triaxx@triaxx.org
To: gnats-bugs@NetBSD.org
Subject: graphics/gd add options
X-Send-Pr-Version: www-1.0

>Number:         50912
>Category:       pkg
>Synopsis:       graphics/gd add options
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    adam
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 08 08:30:00 +0000 2016
>Closed-Date:    Tue Dec 25 12:41:23 +0000 2018
>Last-Modified:  Tue Dec 25 12:41:23 +0000 2018
>Originator:     Frédéric Fauberteau
>Release:        pkgsrc-2015Q4
>Organization:
>Environment:
NetBSD trashware 7.0_STABLE NetBSD 7.0_STABLE (TRASHWARE) #1: Sat Dec  5 19:26:52 CET 2015  triaxx@hydralisk:/home/triaxx/dev/nbsd/netbsd-7/usr/objs/sys/arch/amd64/compile/TRASHWARE amd64
>Description:
gd package has only 2 options but 6 arguments are enabled in Makefile. The idea is to move these arguments as default options in order to potentially disable some features (e.g. tiff).
>How-To-Repeat:

>Fix:
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/gd/Makefile,v
retrieving revision 1.108
diff -u -r1.108 Makefile
--- Makefile	18 Nov 2015 14:19:46 -0000	1.108
+++ Makefile	8 Mar 2016 07:55:21 -0000
@@ -2,7 +2,7 @@

 DISTNAME=	libgd-2.1.1
 PKGNAME=	${DISTNAME:S/libgd/gd/}
-PKGREVISION=	2
+PKGREVISION=	3
 CATEGORIES=	graphics
 MASTER_SITES=	https://bitbucket.org/libgd/gd-libgd/downloads/
 EXTRACT_SUFX=	.tar.xz
@@ -18,21 +18,9 @@
 USE_LIBTOOL=		yes
 USE_TOOLS+=		perl:run
 GNU_CONFIGURE=		yes
-CONFIGURE_ARGS+=	--with-fontconfig=${BUILDLINK_PREFIX.fontconfig}
-CONFIGURE_ARGS+=	--with-freetype=${BUILDLINK_PREFIX.freetype2}
-CONFIGURE_ARGS+=	--with-jpeg=${BUILDLINK_PREFIX.jpeg}
-CONFIGURE_ARGS+=	--with-png=${BUILDLINK_PREFIX.png}
-CONFIGURE_ARGS+=	--with-tiff=${BUILDLINK_PREFIX.tiff}
-CONFIGURE_ARGS+=	--with-zlib=${BUILDLINK_PREFIX.zlib}
 REPLACE_PERL+=		src/bdftogd
 PTHREAD_AUTO_VARS=	yes

 .include "../../converters/libiconv/buildlink3.mk"
-.include "../../devel/zlib/buildlink3.mk"
-.include "../../fonts/fontconfig/buildlink3.mk"
-.include "../../graphics/freetype2/buildlink3.mk"
-.include "../../graphics/png/buildlink3.mk"
-.include "../../graphics/tiff/buildlink3.mk"
-.include "../../mk/jpeg.buildlink3.mk"
 .include "../../mk/pthread.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
Index: options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/gd/options.mk,v
retrieving revision 1.4
diff -u -r1.4 options.mk
--- options.mk	4 Jul 2015 16:18:35 -0000	1.4
+++ options.mk	8 Mar 2016 07:55:21 -0000
@@ -1,11 +1,53 @@
 # $NetBSD: options.mk,v 1.4 2015/07/04 16:18:35 joerg Exp $

 PKG_OPTIONS_VAR=	PKG_OPTIONS.gd
-PKG_SUPPORTED_OPTIONS=	libvpx x11
-PKG_SUGGESTED_OPTIONS=	libvpx
+PKG_SUPPORTED_OPTIONS=	fontconfig freetype jpeg libvpx png tiff x11 zlib
+PKG_SUGGESTED_OPTIONS=	fontconfig freetype jpeg libvpx png tiff zlib

 .include "../../mk/bsd.options.mk"

+.if !empty(PKG_OPTIONS:Mfontconfig)
+.include "../../fonts/fontconfig/buildlink3.mk"
+CONFIGURE_ARGS+=	--with-fontconfig=${BUILDLINK_PREFIX.fontconfig}
+.else
+CONFIGURE_ARGS+=	--without-fontconfig
+.endif
+
+.if !empty(PKG_OPTIONS:Mfreetype)
+.include "../../graphics/freetype2/buildlink3.mk"
+CONFIGURE_ARGS+=	--with-freetype=${BUILDLINK_PREFIX.freetype2}
+.else
+CONFIGURE_ARGS+=	--without-freetype
+.endif
+
+.if !empty(PKG_OPTIONS:Mjpeg)
+.include "../../mk/jpeg.buildlink3.mk"
+CONFIGURE_ARGS+=	--with-jpeg=${BUILDLINK_PREFIX.jpeg}
+.else
+CONFIGURE_ARGS+=	--without-jpeg
+.endif
+
+.if !empty(PKG_OPTIONS:Mlibvpx)
+.include "../../multimedia/libvpx/buildlink3.mk"
+CONFIGURE_ARGS+=	--with-vpx=${BUILDLINK_PREFIX.libvpx}
+.else
+CONFIGURE_ARGS+=	--without-vpx
+.endif
+
+.if !empty(PKG_OPTIONS:Mpng)
+.include "../../graphics/png/buildlink3.mk"
+CONFIGURE_ARGS+=	--with-png=${BUILDLINK_PREFIX.png}
+.else
+CONFIGURE_ARGS+=	--without-png
+.endif
+
+.if !empty(PKG_OPTIONS:Mtiff)
+.include "../../graphics/tiff/buildlink3.mk"
+CONFIGURE_ARGS+=	--with-tiff=${BUILDLINK_PREFIX.tiff}
+.else
+CONFIGURE_ARGS+=	--without-tiff
+.endif
+
 .if !empty(PKG_OPTIONS:Mx11)
 .include "../../x11/libXpm/buildlink3.mk"
 CONFIGURE_ENV+=		X11BASE=${X11BASE}
@@ -14,9 +56,9 @@
 CONFIGURE_ARGS+=	--without-xpm
 .endif

-.if !empty(PKG_OPTIONS:Mlibvpx)
-.include "../../multimedia/libvpx/buildlink3.mk"
-CONFIGURE_ARGS+=	--with-vpx=${BUILDLINK_PREFIX.libvpx}
+.if !empty(PKG_OPTIONS:Mzlib)
+.include "../../devel/zlib/buildlink3.mk"
+CONFIGURE_ARGS+=	--with-zlib=${BUILDLINK_PREFIX.zlib}
 .else
-CONFIGURE_ARGS+=	--without-vpx
+CONFIGURE_ARGS+=	--without-zlib
 .endif

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->adam
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Tue, 08 Mar 2016 09:42:14 +0000
Responsible-Changed-Why:
Over to maintainer


From: Benny Siegert <bsiegert@gmail.com>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@netbsd.org,
 gnats-admin@netbsd.org,
 pkgsrc-bugs@netbsd.org
Subject: Re: pkg/50912: graphics/gd add options
Date: Thu, 10 Mar 2016 21:30:18 +0100

 > -CONFIGURE_ARGS+=3D	--with-fontconfig=3D${BUILDLINK_PREFIX.fontconfig}=

 > -CONFIGURE_ARGS+=3D	--with-freetype=3D${BUILDLINK_PREFIX.freetype2}
 > -CONFIGURE_ARGS+=3D	--with-jpeg=3D${BUILDLINK_PREFIX.jpeg}
 > -CONFIGURE_ARGS+=3D	--with-png=3D${BUILDLINK_PREFIX.png}
 > -CONFIGURE_ARGS+=3D	--with-tiff=3D${BUILDLINK_PREFIX.tiff}
 > -CONFIGURE_ARGS+=3D	--with-zlib=3D${BUILDLINK_PREFIX.zlib}

 Allow me to disagree. Why the hell do you want to build without all =
 these things?=20

 - zlib is tiny, for one.
 - freetype and fontconfig make GD much less useful, as you cannot draw =
 text.
 - Why would you build without jpeg, png and tiff? There are so many =
 things that depend on these three that you are likely to have them on =
 your system anyway.



From: triaxx <triaxx@c0mput3r.science>
To: gnats-bugs@netbsd.org
Cc: adam@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org,
 triaxx@triaxx.org
Subject: Re: pkg/50912: graphics/gd add options
Date: Fri, 11 Mar 2016 11:26:35 +0100

 Le 2016-03-10 21:35, Benny Siegert a écrit :
 > The following reply was made to PR pkg/50912; it has been noted by 
 > GNATS.
 > 
 > From: Benny Siegert <bsiegert@gmail.com>
 > To: gnats-bugs@NetBSD.org
 > Cc: pkg-manager@netbsd.org,
 >  gnats-admin@netbsd.org,
 >  pkgsrc-bugs@netbsd.org
 > Subject: Re: pkg/50912: graphics/gd add options
 > Date: Thu, 10 Mar 2016 21:30:18 +0100
 > 
 >  > 
 > -CONFIGURE_ARGS+=3D	--with-fontconfig=3D${BUILDLINK_PREFIX.fontconfig}=
 > 
 >  > -CONFIGURE_ARGS+=3D	--with-freetype=3D${BUILDLINK_PREFIX.freetype2}
 >  > -CONFIGURE_ARGS+=3D	--with-jpeg=3D${BUILDLINK_PREFIX.jpeg}
 >  > -CONFIGURE_ARGS+=3D	--with-png=3D${BUILDLINK_PREFIX.png}
 >  > -CONFIGURE_ARGS+=3D	--with-tiff=3D${BUILDLINK_PREFIX.tiff}
 >  > -CONFIGURE_ARGS+=3D	--with-zlib=3D${BUILDLINK_PREFIX.zlib}
 > 
 >  Allow me to disagree. Why the hell do you want to build without all =
 >  these things?=20
 > 
 >  - zlib is tiny, for one.
 >  - freetype and fontconfig make GD much less useful, as you cannot draw 
 > =
 >  text.
 >  - Why would you build without jpeg, png and tiff? There are so many =
 >  things that depend on these three that you are likely to have them on 
 > =
 >  your system anyway.

 I had just 3 packages depending on tiff and if I was a paranoid admin, I 
 would like to remove it since it has many vulnerabilities. If I make 
 tiff as an option, why does not make the other dependencies the sames? 
 Especially this package is well configurable.

 It was no problem for me because the options you cited are default. But 
 this patch is just a proposal... it can be dropped...

State-Changed-From-To: open->closed
State-Changed-By: adam@NetBSD.org
State-Changed-When: Tue, 25 Dec 2018 12:41:23 +0000
State-Changed-Why:
TIFF is now optional, that should be enought. :]


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.