pkgsrc-WIP-changes archive

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

muon: Add build.mk (derived from devel/meson)



Module Name:	pkgsrc-wip
Committed By:	Michael Baeuerle <micha%NetBSD.org@localhost>
Pushed By:	micha
Date:		Fri Feb 24 15:19:45 2023 +0100
Changeset:	3d65c731fd285a8f95648f3f10ef068a92347fc0

Modified Files:
	muon/DESCR
Added Files:
	muon/build.mk

Log Message:
muon: Add build.mk (derived from devel/meson)

In theory muon should be usable as drop-in replacement for meson.

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

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

diffstat:
 muon/DESCR    |  2 +-
 muon/build.mk | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 73 insertions(+), 1 deletion(-)

diffs:
diff --git a/muon/DESCR b/muon/DESCR
index e780fdd437..9f9fe5b9b6 100644
--- a/muon/DESCR
+++ b/muon/DESCR
@@ -1,4 +1,4 @@
-muon is an implementation of the meson build system in c99 with minimal
+muon is an implementation of the meson build system in C99 with minimal
 dependencies.
 
 Non-features
diff --git a/muon/build.mk b/muon/build.mk
new file mode 100644
index 0000000000..a4f32d9aeb
--- /dev/null
+++ b/muon/build.mk
@@ -0,0 +1,72 @@
+# $NetBSD$
+
+# Based on devel/meson/build.mk without the cross-compilation stuff
+# (cross-compilation is not supported by muon).
+# Uses devel/samurai as build tool (instead of devel/ninja-build).
+
+MUON_REQD?=	0
+.for version in ${MUON_REQD}
+TOOL_DEPENDS+=	muon>=${version}:../../wip/muon
+.endfor
+
+CONFIGURE_DIRS?=	.
+BUILD_DIRS?=		${CONFIGURE_DIRS}
+INSTALL_DIRS?=		${CONFIGURE_DIRS}
+TEST_DIRS?=		${CONFIGURE_DIRS}
+
+.PHONY: muon-configure muon-build muon-install muon-test
+
+# pkgsrc contains multiple llvm-config executables at multiple locations.
+.if !empty(LLVM_CONFIG_PATH)
+MAKE_ENV+=	LLVM_CONFIG_PATH=${LLVM_CONFIG_PATH:Q}
+.endif
+
+.include "../../mk/bsd.prefs.mk"
+
+do-configure: muon-configure
+muon-configure:
+.for d in ${CONFIGURE_DIRS}
+	cd ${WRKSRC} && cd ${d} && ${SETENV} ${MAKE_ENV} muon setup \
+	    --prefix ${PREFIX} \
+	    --libdir lib \
+	    --libexecdir libexec \
+	    --mandir ${PKGMANDIR} \
+	    --sysconfdir ${PKG_SYSCONFDIR} \
+	    --buildtype=plain ${MUON_ARGS} . output
+.endfor
+
+do-build: muon-build
+muon-build:
+.for d in ${BUILD_DIRS}
+	cd ${WRKSRC} && cd ${d} && ${SETENV} ${MAKE_ENV} \
+	    samu -j ${_MAKE_JOBS_N:U1} -C output
+.endfor
+
+do-install: muon-install
+muon-install:
+.for d in ${INSTALL_DIRS}
+	cd ${WRKSRC} && cd ${d} && ${SETENV} ${INSTALL_ENV} ${MAKE_ENV} \
+	    samu -j ${_MAKE_JOBS_N:U1} -C output install
+.endfor
+
+do-test: muon-test
+muon-test:
+.for d in ${TEST_DIRS}
+	cd ${WRKSRC} && cd ${d} && ${SETENV} ${TEST_ENV} \
+	    samu -j ${_MAKE_JOBS_N:U1} -C output test
+.endfor
+
+_VARGROUPS+=		muon
+_PKG_VARS.muon=		MUON_REQD
+_PKG_VARS.muon+=	CONFIGURE_DIRS
+_PKG_VARS.muon+=	BUILD_DIRS MAKE_ENV
+_PKG_VARS.muon+=	TEST_DIRS TEST_ENV
+_PKG_VARS.muon+=	INSTALL_DIRS INSTALL_ENV
+_PKG_VARS.muon+=	LLVM_CONFIG_PATH
+_PKG_VARS.muon+=	MUON_ARGS
+_USER_VARS.muon=	MAKE_JOBS PKG_SYSCONFDIR
+_USE_VARS.muon=		WRKSRC PREFIX PKGMANDIR
+_USE_VARS.muon+=	_MAKE_JOBS_N
+_DEF_VARS.muon=		TOOL_DEPENDS
+_LISTED_VARS.muon=	*_ARGS *_DEPENDS
+_SORTED_VARS.muon=	*_ENV


Home | Main Index | Thread Index | Old Index