pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc
Module Name: pkgsrc
Committed By: leot
Date: Sat Jun 8 19:51:38 UTC 2019
Modified Files:
pkgsrc/graphics/librsvg: buildlink3.mk
pkgsrc/mk/defaults: mk.conf
Added Files:
pkgsrc/graphics/librsvg: available.mk tool.mk
Log Message:
librsvg: Add available.mk and tool.mk mk fragments
Rename LIBRSVG_USE_RUST to LIBRSVG_TYPE.
Isolate the LIBRSVG_TYPE logic in available.mk mk fragments in
order that can be used by other librsvg mk (e.g. tool.mk) or by
other package to check the preferred librsvg implementation to be
used. (e.g. devel/pango, fonts/harfbuzz and misc/libreoffice).
Add a tool.mk mk fragment in order to be able to specify librsvg
as a tool dependency honoring user's LIBRSVG_TYPE.
Thanks to <wiz> for suggesting that!
Discussed on tech-pkg@:
<https://mail-index.NetBSD.org/tech-pkg/2019/06/05/msg021393.html>
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/graphics/librsvg/available.mk \
pkgsrc/graphics/librsvg/tool.mk
cvs rdiff -u -r1.48 -r1.49 pkgsrc/graphics/librsvg/buildlink3.mk
cvs rdiff -u -r1.304 -r1.305 pkgsrc/mk/defaults/mk.conf
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/graphics/librsvg/buildlink3.mk
diff -u pkgsrc/graphics/librsvg/buildlink3.mk:1.48 pkgsrc/graphics/librsvg/buildlink3.mk:1.49
--- pkgsrc/graphics/librsvg/buildlink3.mk:1.48 Sat Jun 1 13:55:31 2019
+++ pkgsrc/graphics/librsvg/buildlink3.mk Sat Jun 8 19:51:38 2019
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.48 2019/06/01 13:55:31 wiz Exp $
+# $NetBSD: buildlink3.mk,v 1.49 2019/06/08 19:51:38 leot Exp $
BUILDLINK_TREE+= librsvg
@@ -10,16 +10,16 @@ BUILDLINK_ABI_DEPENDS.librsvg+= librsvg
.include "../../mk/bsd.fast.prefs.mk"
-# default to rust version on platforms where pkgsrc supports lang/rust
-.include "../../lang/rust/platform.mk"
-LIBRSVG_USE_RUST?= ${PLATFORM_SUPPORTS_RUST}
+.include "../../graphics/librsvg/available.mk"
-.if ${LIBRSVG_USE_RUST} == "yes"
+.if ${LIBRSVG_TYPE} == "rust"
BUILDLINK_PKGSRCDIR.librsvg?= ../../graphics/librsvg
BUILDLINK_API_DEPENDS.librsvg+= librsvg>=2.41
-.else
+.elif ${LIBRSVG_TYPE} == "c"
BUILDLINK_PKGSRCDIR.librsvg?= ../../graphics/librsvg-c
BUILDLINK_API_DEPENDS.librsvg+= librsvg<2.41
+.else
+PKG_FAIL_REASON+= "[graphics/librsvg/buildlink3.mk] Invalid value ${LIBRSVG_TYPE} for LIBRSVG_TYPE."
.endif
.include "../../devel/pango/buildlink3.mk"
Index: pkgsrc/mk/defaults/mk.conf
diff -u pkgsrc/mk/defaults/mk.conf:1.304 pkgsrc/mk/defaults/mk.conf:1.305
--- pkgsrc/mk/defaults/mk.conf:1.304 Wed Jun 5 21:05:00 2019
+++ pkgsrc/mk/defaults/mk.conf Sat Jun 8 19:51:38 2019
@@ -1,4 +1,4 @@
-# $NetBSD: mk.conf,v 1.304 2019/06/05 21:05:00 wiz Exp $
+# $NetBSD: mk.conf,v 1.305 2019/06/08 19:51:38 leot Exp $
#
# This file provides default values for variables that may be overridden
@@ -1293,11 +1293,12 @@ LEAFNODE_GROUP?= news
# Default: news
# Note: default is the same as INN_GROUP
-#LIBRSVG_USE_RUST?= yes
+#LIBRSVG_TYPE?= rust
# Used by dependencies of graphics/librsvg to decide if the outdated
# librsvg-2.40.xx should be used, which is plain C, or if the latest
# version should be used, which is partially written in rust.
-# Default: yes on operating systems supported by lang/rust
+# Possible: c rust
+# Default: rust on operating systems supported by lang/rust
LINUX_LOCALES?= \
af ar bg br ca cs cy da de el en eo es et eu fi fo fr ga gl \
Added files:
Index: pkgsrc/graphics/librsvg/available.mk
diff -u /dev/null pkgsrc/graphics/librsvg/available.mk:1.1
--- /dev/null Sat Jun 8 19:51:38 2019
+++ pkgsrc/graphics/librsvg/available.mk Sat Jun 8 19:51:38 2019
@@ -0,0 +1,27 @@
+# $NetBSD: available.mk,v 1.1 2019/06/08 19:51:38 leot Exp $
+#
+# This mk fragment define LIBRSVG_TYPE variable used in other librsvg mk
+# fragments.
+#
+# User-settable variables:
+#
+# LIBRSVG_TYPE
+# Type of used librsvg implementation.
+#
+# Possible values: c rust
+# Default: rust on platforms were Rust is supported
+#
+
+.if !defined(LIBRSVG_AVAILABLE_MK)
+LIBRSVG_AVAILABLE_MK= defined
+
+.include "../../mk/bsd.prefs.mk"
+
+.include "../../lang/rust/platform.mk"
+.if !empty(PLATFORM_SUPPORTS_RUST:M[Yy][Ee][Ss])
+LIBRSVG_TYPE?= rust
+.else
+LIBRSVG_TYPE?= c
+.endif
+
+.endif # LIBRSVG_AVAILABLE_MK
Index: pkgsrc/graphics/librsvg/tool.mk
diff -u /dev/null pkgsrc/graphics/librsvg/tool.mk:1.1
--- /dev/null Sat Jun 8 19:51:38 2019
+++ pkgsrc/graphics/librsvg/tool.mk Sat Jun 8 19:51:38 2019
@@ -0,0 +1,18 @@
+# $NetBSD: tool.mk,v 1.1 2019/06/08 19:51:38 leot Exp $
+#
+# This mk fragment can be included by all packages that need librsvg as a tool
+# dependency (e.g. for rsvg-convert).
+#
+
+.if !defined(LIBRSVG_TOOL_MK)
+LIBRSVG_TOOL_MK= defined
+
+.include "../../graphics/librsvg/available.mk"
+
+.if ${LIBRSVG_TYPE} == "rust"
+TOOL_DEPENDS+= librsvg-[0-9]*:../../graphics/librsvg
+.else
+TOOL_DEPENDS+= librsvg-[0-9]*:../../graphics/librsvg-c
+.endif
+
+.endif # LIBRSVG_TOOL_MK
Home |
Main Index |
Thread Index |
Old Index