summaryrefslogtreecommitdiff
path: root/mk/tools
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2021-05-02 11:06:12 +0000
committernia <nia@pkgsrc.org>2021-05-02 11:06:12 +0000
commit74da10948afd2af555b0fd521263e7e01c1b2ec1 (patch)
treed5295d8b9d59aa8afe901dd33796555c45525c7e /mk/tools
parent9fe096593275aedf407ed4d21fe19a5ebf309f03 (diff)
downloadpkgsrc-74da10948afd2af555b0fd521263e7e01c1b2ec1.tar.gz
*: Use the tools framework for gdbus-codegen
Diffstat (limited to 'mk/tools')
-rw-r--r--mk/tools/bsd.tools.mk3
-rw-r--r--mk/tools/gdbus-codegen.mk17
2 files changed, 19 insertions, 1 deletions
diff --git a/mk/tools/bsd.tools.mk b/mk/tools/bsd.tools.mk
index 9a4703d440e..f46f8b20ee4 100644
--- a/mk/tools/bsd.tools.mk
+++ b/mk/tools/bsd.tools.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.tools.mk,v 1.63 2021/05/02 10:24:50 nia Exp $
+# $NetBSD: bsd.tools.mk,v 1.64 2021/05/02 11:06:13 nia Exp $
#
# Copyright (c) 2005, 2006 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -154,6 +154,7 @@ post-tools:
.include "cmake.mk"
.include "imake.mk"
.include "itstool.mk"
+.include "gdbus-codegen.mk"
.include "zip.mk"
.include "replace.mk"
.include "perl.mk"
diff --git a/mk/tools/gdbus-codegen.mk b/mk/tools/gdbus-codegen.mk
new file mode 100644
index 00000000000..5702bcd12e8
--- /dev/null
+++ b/mk/tools/gdbus-codegen.mk
@@ -0,0 +1,17 @@
+# $NetBSD: gdbus-codegen.mk,v 1.1 2021/05/02 11:06:13 nia Exp $
+
+.if !empty(USE_TOOLS:Mgdbus-codegen)
+TOOLS_CREATE+= gdbus-codegen
+TOOLS_DEPENDS.gdbus-codegen?= gdbus-codegen-[0-9]*:../../textproc/gdbus-codegen
+TOOLS_PATH.gdbus-codegen= ${PREFIX}/bin/gdbus-codegen
+.else
+#
+# If a package doesn't explicitly say it uses gdbus-codegen, then create a "broken"
+# gdbus-codegen in the tools directory.
+#
+TOOLS_FAIL+= gdbus-codegen
+TOOLS_PATH.gdbus-codegen= ${TOOLS_CMD.gdbus-codegen}
+.endif
+
+CONFIGURE_ENV+= GDBUS_CODEGEN=${TOOLS_CMD.gdbus-codegen:Q}
+MAKE_ENV+= GDBUS_CODEGEN=${TOOLS_CMD.gdbus-codegen:Q}