pkgsrc-WIP-changes archive

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

zig-git: options (debug building)



Module Name:	pkgsrc-wip
Committed By:	nikita <nikita%NetBSD.org@localhost>
Pushed By:	nikita
Date:		Sun Apr 30 11:03:58 2023 +0200
Changeset:	3bb079acc34e652f0d3a22b66141a018940d4266

Modified Files:
	zig-git/Makefile
Added Files:
	zig-git/options.mk

Log Message:
zig-git: options (debug building)

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

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

diffstat:
 zig-git/Makefile   |  5 ++++-
 zig-git/options.mk | 12 ++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diffs:
diff --git a/zig-git/Makefile b/zig-git/Makefile
index b1fbc9d366..cfec916172 100644
--- a/zig-git/Makefile
+++ b/zig-git/Makefile
@@ -14,7 +14,8 @@ USE_CMAKE=	yes
 USE_TOOLS+=	bash:run
 USE_LANGUAGES=	c c++14
 
-CMAKE_ARGS+=	-DCMAKE_BUILD_TYPE=Release
+.include "options.mk"
+
 CMAKE_ARGS+=	-DDESTDIR=${DESTDIR}
 # avoid full-cu-features available to build host,
 # in other words ensure that we run everywhere
@@ -29,8 +30,10 @@ UNLIMIT_RESOURCES=	stacksize
 
 # \todo: There is currently an issue building this as a PIE
 MKPIE_SUPPORTED=	no
+CHECK_PIE_SKIP=		bin/zig
 # RELRO checks fail for this package at the moment
 RELRO_SUPPORTED=	no
+CHECK_RELRO_SKIP=	bin/zig
 
 CONFLICTS+=		zig-[0-9]*
 
diff --git a/zig-git/options.mk b/zig-git/options.mk
new file mode 100644
index 0000000000..195494dc23
--- /dev/null
+++ b/zig-git/options.mk
@@ -0,0 +1,12 @@
+# $NetBSD$
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.zig-git
+PKG_SUPPORTED_OPTIONS=	debug
+
+.include "../../mk/bsd.options.mk"
+
+.if ${PKG_OPTIONS:Mdebug}
+CMAKE_ARGS+=		-DCMAKE_BUILD_TYPE=Debug
+.else
+CMAKE_ARGS+=		-DCMAKE_BUILD_TYPE=Release
+.endif


Home | Main Index | Thread Index | Old Index