pkgsrc-Users archive

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

graphics/gd -- reduce build time



Hi there,

hope you're doing well.

I've found recently that it takes hours (honestly speaking,
probably days) to build the graphics/gd package, just because of
lang/rust and lang/llvm as build dependences of the
graphics/libimagequant.

I'd suggest the attached patch to keep historicaly enabled
libimagequant dependency, but have a choice to disable it in
case of that need.

Please let me know your thoughts.

Thank you.

--
Sergey A. Osokin
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/gd/Makefile,v
retrieving revision 1.139
diff -u -p -r1.139 Makefile
--- Makefile	22 May 2023 11:38:58 -0000	1.139
+++ Makefile	23 May 2023 20:47:47 -0000
@@ -2,7 +2,7 @@
 
 DISTNAME=	libgd-2.3.3
 PKGNAME=	${DISTNAME:S/libgd/gd/}
-PKGREVISION=	9
+PKGREVISION=	10
 CATEGORIES=	graphics
 MASTER_SITES=	${MASTER_SITE_GITHUB:=libgd/}
 GITHUB_PROJECT=	libgd
@@ -22,7 +22,6 @@ CONFIGURE_ARGS+=	--disable-werror
 CONFIGURE_ARGS+=	--with-fontconfig=${BUILDLINK_PREFIX.fontconfig}
 CONFIGURE_ARGS+=	--with-freetype=${BUILDLINK_PREFIX.freetype2}
 CONFIGURE_ARGS+=	--with-jpeg=${JPEGBASE}
-CONFIGURE_ARGS+=	--with-liq=${BUILDLINK_PREFIX.libimagequant}
 CONFIGURE_ARGS+=	--with-png=${BUILDLINK_PREFIX.png}
 CONFIGURE_ARGS+=	--with-webp=${BUILDLINK_PREFIX.libwebp}
 CONFIGURE_ARGS+=	--with-zlib=${BUILDLINK_PREFIX.zlib}
@@ -35,7 +34,6 @@ PKGCONFIG_OVERRIDE+=	config/gdlib.pc.in
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../fonts/fontconfig/buildlink3.mk"
 .include "../../graphics/freetype2/buildlink3.mk"
-.include "../../graphics/libimagequant/buildlink3.mk"
 .include "../../graphics/libwebp/buildlink3.mk"
 .include "../../graphics/png/buildlink3.mk"
 .include "../../mk/jpeg.buildlink3.mk"
Index: buildlink3.mk
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/gd/buildlink3.mk,v
retrieving revision 1.50
diff -u -p -r1.50 buildlink3.mk
--- buildlink3.mk	22 May 2023 11:38:58 -0000	1.50
+++ buildlink3.mk	23 May 2023 20:47:47 -0000
@@ -25,7 +25,11 @@ pkgbase := gd
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../fonts/fontconfig/buildlink3.mk"
 .include "../../graphics/freetype2/buildlink3.mk"
+
+.if ${PKG_BUILD_OPTIONS.gd:Mliq}
 .include "../../graphics/libimagequant/buildlink3.mk"
+.endif
+
 .include "../../graphics/libwebp/buildlink3.mk"
 .include "../../graphics/png/buildlink3.mk"
 .include "../../mk/jpeg.buildlink3.mk"
Index: options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/gd/options.mk,v
retrieving revision 1.8
diff -u -p -r1.8 options.mk
--- options.mk	10 Sep 2018 13:34:16 -0000	1.8
+++ options.mk	23 May 2023 20:47:47 -0000
@@ -1,11 +1,18 @@
 # $NetBSD: options.mk,v 1.8 2018/09/10 13:34:16 kim Exp $
 
 PKG_OPTIONS_VAR=	PKG_OPTIONS.gd
-PKG_SUPPORTED_OPTIONS=	tiff x11
+PKG_SUPPORTED_OPTIONS=	liq tiff x11
 PKG_SUGGESTED_OPTIONS=	liq tiff
 
 .include "../../mk/bsd.options.mk"
 
+.if !empty(PKG_OPTIONS:Mliq)
+.include "../../graphics/libimagequant/buildlink3.mk"
+CONFIGURE_ARGS+=	--with-liq=${BUILDLINK_PREFIX.libimagequant}
+.else
+CONFIGURE_ARGS+=	--without-liq
+.endif
+
 .if !empty(PKG_OPTIONS:Mtiff)
 .include "../../graphics/tiff/buildlink3.mk"
 CONFIGURE_ARGS+=	--with-tiff=${BUILDLINK_PREFIX.tiff}


Home | Main Index | Thread Index | Old Index