pkgsrc-WIP-changes archive

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

swig4: add tool.mk for packages that uses swig as a build tool



Module Name:	pkgsrc-wip
Committed By:	Niclas Rosenvik <nros%pkgsrc.org@localhost>
Pushed By:	nros
Date:		Mon Jan 3 10:37:03 2022 +0100
Changeset:	a00bc2b4273b8375b16703088489077f73c25931

Added Files:
	swig4/tool.mk

Log Message:
swig4: add tool.mk for packages that uses swig as a build tool

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=a00bc2b4273b8375b16703088489077f73c25931

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

diffstat:
 swig4/tool.mk | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diffs:
diff --git a/swig4/tool.mk b/swig4/tool.mk
new file mode 100644
index 0000000000..0c56cd0ae4
--- /dev/null
+++ b/swig4/tool.mk
@@ -0,0 +1,28 @@
+# $NetBSD$
+#
+# This mk fragment can be included in all packages that use `swig'
+# as a tool
+#
+# Based on lang/python/tool.mk
+#
+# Feel free to add if there is something missing
+#
+
+.if !defined(SWIG_TOOL_MK)
+SWIG_TOOL_MK=	defined
+
+TOOL_DEPENDS+=	swig4-[0-9]*:../../wip/swig4
+
+BUILDLINK_TARGETS+=	buildlink-bin-swig
+
+.PHONY: buildlink-bin-swig
+buildlink-bin-swig:
+.for bin in swig swig2.0 swig3.0 swig4.0
+	${RUN} \
+	t=${BUILDLINK_DIR}/bin/${bin}; \
+	if ${TEST} -f "${PREFIX}/bin/swig4.0" -a ! -f $$t; then \
+		${LN} -sf "${PREFIX}/bin/swig4.0" $$t; \
+	fi
+.endfor
+
+.endif # SWIG_TOOL_MK


Home | Main Index | Thread Index | Old Index