Source-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/zig Add lang/zig/application, common mk to handle...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6e679894d8db
branches:  trunk
changeset: 434421:6e679894d8db
user:      nikita <nikita%pkgsrc.org@localhost>
date:      Tue Jun 16 11:01:42 2020 +0000

description:
Add lang/zig/application, common mk to handle build.zig applications.

diffstat:

 lang/zig/application.mk |  20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diffs (24 lines):

diff -r 76f9c4f03d4c -r 6e679894d8db lang/zig/application.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/zig/application.mk   Tue Jun 16 11:01:42 2020 +0000
@@ -0,0 +1,20 @@
+# $NetBSD: application.mk,v 1.1 2020/06/16 11:01:42 nikita Exp $
+#
+# Common logic to handle zig packages
+# This is only usable if they include a 'build.zig' file
+#
+.include "../../mk/bsd.fast.prefs.mk"
+
+_ZIGBUILDINSTALLARGS=  -Drelease-fast --prefix ${DESTDIR}${PREFIX}
+
+BUILD_DEPENDS+=                zig-[0-9]*:../../lang/zig
+USE_LANGUAGES=         c
+
+do-build:
+       cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} zig build ${_ZIGBUILDINSTALLARGS}
+
+do-install:
+       cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} zig build install ${_ZIGBUILDINSTALLARGS}
+
+do-test:
+       cd ${WRKSRC} && ${SETENV} ${TEST_ENV} zig build test



Home | Main Index | Thread Index | Old Index