pkgsrc-WIP-changes archive

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

muon: Import version 0.0.1



Module Name:	pkgsrc-wip
Committed By:	Michael Baeuerle <micha%NetBSD.org@localhost>
Pushed By:	micha
Date:		Wed May 25 20:59:12 2022 +0200
Changeset:	246c3b1cc166242e09d4c1340b1dbeabeba93d1b

Modified Files:
	Makefile
Added Files:
	muon/DESCR
	muon/Makefile
	muon/PLIST
	muon/distinfo
	muon/hacks.mk
	muon/patches/patch-meson.build

Log Message:
muon: Import version 0.0.1

muon is an implementation of the meson build system in c99 with minimal
dependencies.

Non-features
============
- bug-for-bug compatibility with meson.
  In fact, muon aspires to be stricter than meson in cases where meson's
  implementation seems error prone. muon uses the official meson
  documentation as its specification.
- cli compatibility with meson.
  muon has different flags, subcommands, etc., and should not be
  renamed/symlinked to meson.

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

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

diffstat:
 Makefile                       |  1 +
 muon/DESCR                     | 12 +++++++++
 muon/Makefile                  | 55 ++++++++++++++++++++++++++++++++++++++++++
 muon/PLIST                     |  2 ++
 muon/distinfo                  |  3 +++
 muon/hacks.mk                  | 15 ++++++++++++
 muon/patches/patch-meson.build | 22 +++++++++++++++++
 7 files changed, 110 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 3a76104528..3d89545ea6 100644
--- a/Makefile
+++ b/Makefile
@@ -2528,6 +2528,7 @@ SUBDIR+=	multisync-syncml-moto
 SUBDIR+=	multitail
 SUBDIR+=	mummer4
 SUBDIR+=	munge
+SUBDIR+=	muon
 SUBDIR+=	muparser
 SUBDIR+=	mupen64plus
 SUBDIR+=	mupen64plus-extraplugins
diff --git a/muon/DESCR b/muon/DESCR
new file mode 100644
index 0000000000..e780fdd437
--- /dev/null
+++ b/muon/DESCR
@@ -0,0 +1,12 @@
+muon is an implementation of the meson build system in c99 with minimal
+dependencies.
+
+Non-features
+============
+- bug-for-bug compatibility with meson.
+  In fact, muon aspires to be stricter than meson in cases where meson's
+  implementation seems error prone. muon uses the official meson
+  documentation as its specification.
+- cli compatibility with meson.
+  muon has different flags, subcommands, etc., and should not be
+  renamed/symlinked to meson.
diff --git a/muon/Makefile b/muon/Makefile
new file mode 100644
index 0000000000..6d156849a3
--- /dev/null
+++ b/muon/Makefile
@@ -0,0 +1,55 @@
+# $NetBSD$
+
+DISTNAME=	muon-0.0.1
+CATEGORIES=	devel
+GIT_REPO=	https://git.sr.ht/~lattis/muon
+GIT_BRANCH=	master
+GIT_REVISION=	944dd7e2f91a83fd39f50aa49b30a19c2fcb02ce
+
+MAINTAINER=	micha%NetBSD.org@localhost
+HOMEPAGE=	https://git.sr.ht/~lattis/muon
+COMMENT=	Implementation of meson build system in c99 with minimal dependencies
+LICENSE=	gnu-gpl-v3
+
+TOOL_DEPENDS+=	samurai>=1.2:../../devel/samurai
+
+MESON_CFLAGS=	${CFLAGS:C/ /' c_args+='/Wg}
+MESON_LDFLAGS=	${LDFLAGS:S/ /' link_args+='/Wg}
+
+SUBST_CLASSES+=		flags1
+SUBST_STAGE.flags1=	pre-configure
+SUBST_MESSAGE.flags1=	Honor CFLAGS and LDFLAGS in bootstrap.sh ...
+SUBST_FILES.flags1=	bootstrap.sh
+SUBST_SED.flags1=	-e 's,$${CC:-c99} -o "$$dir/muon",$${CC} -std=c99 $$LDFLAGS -o "$$dir/muon",'
+SUBST_SED.flags1+=	-e 's,$${CC:-c99} -g,$${CC} -std=c99 $$CFLAGS -g,'
+
+SUBST_CLASSES+=		flags2
+SUBST_STAGE.flags2=	pre-configure
+SUBST_MESSAGE.flags2=	Honor CFLAGS and LDFLAGS in meson.build ...
+SUBST_FILES.flags2=	meson.build
+SUBST_SED.flags2=	-e "s|@CFLAGS@|c_args+='${MESON_CFLAGS:S/ /@LF@/Wg}'|"
+SUBST_SED.flags2+=	-e "s|@LDFLAGS@|link_args+='${MESON_LDFLAGS:S/ /@LF@/Wg}'|"
+SUBST_SED.flags2+=	-e "s|@LF@|\\${.newline}|g"
+
+INSTALLATION_DIRS=	bin
+
+do-configure:
+	cd ${WRKSRC} && env ${CONFIGURE_ENV} \
+		${CONFIG_SHELL} ./bootstrap.sh bootstrap1
+	cd ${WRKSRC} && env ${CONFIGURE_ENV} ./bootstrap1/muon setup -Ddocs=disabled -Dstatic=false -Dlibcurl=disabled -Dlibarchive=disabled bootstrap2
+	cd ${WRKSRC} && env ${CONFIGURE_ENV} samu -C bootstrap2
+
+do-build:
+	cd ${WRKSRC} && env ${MAKE_ENV} ./bootstrap2/muon setup -Ddocs=disabled -Dstatic=false -Dlibcurl=disabled -Dlibarchive=disabled output
+	cd ${WRKSRC} && env ${MAKE_ENV} samu -C output
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/output/muon \
+		${DESTDIR}${PREFIX}/bin/muon
+
+# Note: pkgconf library is included via hacks.mk
+#.include "../../archivers/libarchive/buildlink3.mk"
+#.include "../../www/curl/buildlink3.mk"
+
+.include "../../wip/mk/git-package.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/muon/PLIST b/muon/PLIST
new file mode 100644
index 0000000000..dbf47723f2
--- /dev/null
+++ b/muon/PLIST
@@ -0,0 +1,2 @@
+@comment $NetBSD$
+bin/muon
diff --git a/muon/distinfo b/muon/distinfo
new file mode 100644
index 0000000000..c64dbb779e
--- /dev/null
+++ b/muon/distinfo
@@ -0,0 +1,3 @@
+$NetBSD$
+
+SHA1 (patch-meson.build) = 7ba0c01fdf672c2e032af836de1e0bdb8a76081a
diff --git a/muon/hacks.mk b/muon/hacks.mk
new file mode 100644
index 0000000000..cb28f313ca
--- /dev/null
+++ b/muon/hacks.mk
@@ -0,0 +1,15 @@
+# $NetBSD$
+
+# devel/pkgconf has no bl3 file.
+# This package uses the pkgconf library, therefore DEPENDS is not sufficient.
+
+BUILDLINK_TREE+=	pkgconf
+
+.if !defined(PKGCONF_BUILDLINK3_MK)
+PKGCONF_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.pkgconf+=		pkgconf>=1.8.0
+BUILDLINK_PKGSRCDIR.pkgconf?=		../../devel/pkgconf
+.endif	# PKGCONF_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-pkgconf
diff --git a/muon/patches/patch-meson.build b/muon/patches/patch-meson.build
new file mode 100644
index 0000000000..47a31f275f
--- /dev/null
+++ b/muon/patches/patch-meson.build
@@ -0,0 +1,22 @@
+$NetBSD$
+
+Honor CFLAGS and LDFLAGS.
+
+--- meson.build.orig	2022-05-25 11:33:02.000000000 +0000
++++ meson.build
+@@ -58,6 +58,7 @@ add_project_arguments(
+ 
+ deps = []
+ c_args = []
++@CFLAGS@
+ 
+ include_dir = include_directories('include')
+ 
+@@ -65,6 +66,7 @@ subdir('tools')
+ subdir('src')
+ 
+ link_args = []
++@LDFLAGS@
+ if get_option('static')
+     link_args += '-static'
+ endif


Home | Main Index | Thread Index | Old Index