NetBSD Problem Report #52148

From kim@tac.gw.com  Sun Apr  9 22:57:26 2017
Return-Path: <kim@tac.gw.com>
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 31D8E7A212
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  9 Apr 2017 22:57:26 +0000 (UTC)
Message-Id: <20170409225721.88714B13B@equinoxe.gw.com>
Date: Sun,  9 Apr 2017 22:57:21 +0000 (UTC)
From: Kimmo Suominen <kim@netbsd.org>
Reply-To: Kimmo Suominen <kim@netbsd.org>
To: gnats-bugs@NetBSD.org
Subject: make tiff optional for gd
X-Send-Pr-Version: 3.95

>Number:         52148
>Category:       pkg
>Synopsis:       make tiff optional for gd
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kim
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 09 23:00:00 +0000 2017
>Closed-Date:    Sat Apr 15 16:00:24 +0000 2017
>Last-Modified:  Sat Apr 15 16:00:24 +0000 2017
>Originator:     Kimmo Suominen
>Release:        NetBSD 7.0.2
>Organization:

>Environment:


System: NetBSD equinoxe.gw.com 7.0.2 NetBSD 7.0.2 (XEN3_DOMU.201610210724Z) amd64
Architecture: x86_64
Machine: amd64
>Description:
	Make tiff option when building gd, as tiff has many long-standing
	vulnerabilities.
>How-To-Repeat:

>Fix:
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/gd/Makefile,v
retrieving revision 1.114
diff -u -r1.114 Makefile
--- Makefile	28 Feb 2017 15:19:59 -0000	1.114
+++ Makefile	9 Apr 2017 22:20:07 -0000
@@ -1,9 +1,8 @@
 # $NetBSD: Makefile,v 1.114 2017/02/28 15:19:59 ryoon Exp $

 DISTNAME=	libgd-2.2.4
-#PKGREVISION=	1
 PKGNAME=	${DISTNAME:S/libgd/gd/}
-PKGREVISION=	1
+PKGREVISION=	2
 CATEGORIES=	graphics
 MASTER_SITES=	${MASTER_SITE_GITHUB:=libgd/}
 EXTRACT_SUFX=	.tar.xz
@@ -25,7 +24,6 @@
 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-webp=${BUILDLINK_PREFIX.libwebp}
 CONFIGURE_ARGS+=	--with-zlib=${BUILDLINK_PREFIX.zlib}
 REPLACE_PERL+=		src/bdftogd
@@ -37,7 +35,6 @@
 .include "../../graphics/freetype2/buildlink3.mk"
 .include "../../graphics/libwebp/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: buildlink3.mk
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/gd/buildlink3.mk,v
retrieving revision 1.40
diff -u -r1.40 buildlink3.mk
--- buildlink3.mk	28 Feb 2017 15:19:59 -0000	1.40
+++ buildlink3.mk	9 Apr 2017 22:20:07 -0000
@@ -14,6 +14,10 @@
 pkgbase := gd
 .include "../../mk/pkg-build-options.mk"

+.if !empty(PKG_BUILD_OPTIONS.gd:Mtiff)
+.include "../../graphics/tiff/buildlink3.mk"
+.endif
+
 .if !empty(PKG_BUILD_OPTIONS.gd:Mx11)
 .include "../../x11/libXpm/buildlink3.mk"
 .endif
@@ -23,7 +27,6 @@
 .include "../../graphics/freetype2/buildlink3.mk"
 .include "../../graphics/libwebp/buildlink3.mk"
 .include "../../graphics/png/buildlink3.mk"
-.include "../../graphics/tiff/buildlink3.mk"
 .include "../../mk/jpeg.buildlink3.mk"
 .include "../../mk/pthread.buildlink3.mk"
 .endif # GD_BUILDLINK3_MK
Index: options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/gd/options.mk,v
retrieving revision 1.5
diff -u -r1.5 options.mk
--- options.mk	2 Aug 2016 18:29:21 -0000	1.5
+++ options.mk	9 Apr 2017 22:20:07 -0000
@@ -1,10 +1,17 @@
 # $NetBSD: options.mk,v 1.5 2016/08/02 18:29:21 adam Exp $

 PKG_OPTIONS_VAR=	PKG_OPTIONS.gd
-PKG_SUPPORTED_OPTIONS=	x11
+PKG_SUPPORTED_OPTIONS=	tiff x11

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

+.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}

>Release-Note:

>Audit-Trail:
From: "Kimmo Suominen" <kim@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52148 CVS commit: pkgsrc/graphics/gd
Date: Sat, 15 Apr 2017 15:50:42 +0000

 Module Name:	pkgsrc
 Committed By:	kim
 Date:		Sat Apr 15 15:50:42 UTC 2017

 Modified Files:
 	pkgsrc/graphics/gd: Makefile buildlink3.mk options.mk

 Log Message:
 Make tiff option when building gd, as tiff has many long-standing
 vulnerabilities. Still enabled by default, as before. Ok by wiz@.

 Fixes PR pkg/52148 and adds tiff to PKG_SUGGESTED_OPTIONS.


 To generate a diff of this commit:
 cvs rdiff -u -r1.114 -r1.115 pkgsrc/graphics/gd/Makefile
 cvs rdiff -u -r1.40 -r1.41 pkgsrc/graphics/gd/buildlink3.mk
 cvs rdiff -u -r1.5 -r1.6 pkgsrc/graphics/gd/options.mk

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: pkg-manager->kim
Responsible-Changed-By: kim@NetBSD.org
Responsible-Changed-When: Sat, 15 Apr 2017 16:00:24 +0000
Responsible-Changed-Why:
Committed myself.


State-Changed-From-To: open->closed
State-Changed-By: kim@NetBSD.org
State-Changed-When: Sat, 15 Apr 2017 16:00:24 +0000
State-Changed-Why:
Fixed by making it not change the default case.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.