pkgsrc-Changes archive

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

CVS commit: pkgsrc/graphics/libimagequant



Module Name:    pkgsrc
Committed By:   hauke
Date:           Fri Jul 21 16:03:39 UTC 2023

Modified Files:
        pkgsrc/graphics/libimagequant: Makefile buildlink3.mk
Added Files:
        pkgsrc/graphics/libimagequant: available.mk

Log Message:
Hook up the graphics/libimagequant{,-c}�alternative mechanism,
modelled after graphics/librsvg{,-c}.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 pkgsrc/graphics/libimagequant/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/graphics/libimagequant/available.mk
cvs rdiff -u -r1.4 -r1.5 pkgsrc/graphics/libimagequant/buildlink3.mk

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

Modified files:

Index: pkgsrc/graphics/libimagequant/Makefile
diff -u pkgsrc/graphics/libimagequant/Makefile:1.31 pkgsrc/graphics/libimagequant/Makefile:1.32
--- pkgsrc/graphics/libimagequant/Makefile:1.31 Tue Jun  6 12:41:34 2023
+++ pkgsrc/graphics/libimagequant/Makefile      Fri Jul 21 16:03:38 2023
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.31 2023/06/06 12:41:34 riastradh Exp $
+# $NetBSD: Makefile,v 1.32 2023/07/21 16:03:38 hauke Exp $
 
 DISTNAME=      libimagequant-4.2.0
+PKGREVISION=   1
 CATEGORIES=    graphics
 MASTER_SITES+= ${MASTER_SITE_GITHUB:=ImageOptim/}
 GITHUB_TAG=    ${PKGVERSION_NOREV}

Index: pkgsrc/graphics/libimagequant/buildlink3.mk
diff -u pkgsrc/graphics/libimagequant/buildlink3.mk:1.4 pkgsrc/graphics/libimagequant/buildlink3.mk:1.5
--- pkgsrc/graphics/libimagequant/buildlink3.mk:1.4     Mon May 22 11:37:14 2023
+++ pkgsrc/graphics/libimagequant/buildlink3.mk Fri Jul 21 16:03:38 2023
@@ -1,12 +1,24 @@
-# $NetBSD: buildlink3.mk,v 1.4 2023/05/22 11:37:14 wiz Exp $
+# $NetBSD: buildlink3.mk,v 1.5 2023/07/21 16:03:38 hauke Exp $
 
 BUILDLINK_TREE+=       libimagequant
 
 .if !defined(LIBIMAGEQUANT_BUILDLINK3_MK)
 LIBIMAGEQUANT_BUILDLINK3_MK:=
 
+.include "../../mk/bsd.fast.prefs.mk"
+
+.include "../../graphics/libimagequant/available.mk"
+
+.if ${LIBIMAGEQUANT_TYPE:tl} == "rust"
 BUILDLINK_API_DEPENDS.libimagequant+=  libimagequant>=4.2.0
 BUILDLINK_PKGSRCDIR.libimagequant?=    ../../graphics/libimagequant
+.elif ${LIBIMAGEQUANT_TYPE:tl} == "c"
+BUILDLINK_API_DEPENDS.libimagequant+=  libimagequant>=2.17.0<3.0.0
+BUILDLINK_PKGSRCDIR.libimagequant?=    ../../graphics/libimagequant-c
+.else
+PKG_FAIL_REASON+=      "[graphics/libimagequant/buildlink3.mk] Invalid value ${LIBIMAGEQUANT_TYPE} for LIBIMAGEQUANT_TYPE."
+.endif
+
 .endif # LIBIMAGEQUANT_BUILDLINK3_MK
 
 BUILDLINK_TREE+=       -libimagequant

Added files:

Index: pkgsrc/graphics/libimagequant/available.mk
diff -u /dev/null pkgsrc/graphics/libimagequant/available.mk:1.1
--- /dev/null   Fri Jul 21 16:03:39 2023
+++ pkgsrc/graphics/libimagequant/available.mk  Fri Jul 21 16:03:38 2023
@@ -0,0 +1,27 @@
+# $NetBSD: available.mk,v 1.1 2023/07/21 16:03:38 hauke Exp $
+#
+# This mk fragment defines the LIBIMAGEQUANT_TYPE variable used in
+# other libimagequant mk fragments.
+#
+# User-settable variables:
+#
+# LIBIMAGEQUANT_TYPE
+#      Type of libimagequant implementation used.
+#
+#      Possible values: c rust
+#      Default: rust on platforms were Rust is supported
+#
+
+.if !defined(LIBIMAGEQUANT_AVAILABLE_MK)
+LIBIMAGEQUANT_AVAILABLE_MK=    defined
+
+.include "../../mk/bsd.prefs.mk"
+
+.include "../../lang/rust/platform.mk"
+.if ${PLATFORM_SUPPORTS_RUST:tl} == "yes"
+LIBIMAGEQUANT_TYPE?=   rust
+.else
+LIBIMAGEQUANT_TYPE?=   c
+.endif
+
+.endif # LIBIMAGEQUANT_AVAILABLE_MK



Home | Main Index | Thread Index | Old Index