pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/50912: graphics/gd add options



>Number:         50912
>Category:       pkg
>Synopsis:       graphics/gd add options
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 08 08:30:00 +0000 2016
>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


Home | Main Index | Thread Index | Old Index