[Midnightbsd-cvs] mports [23915] trunk/Mk: add meson

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Aug 26 17:13:35 EDT 2018


Revision: 23915
          http://svnweb.midnightbsd.org/mports/?rev=23915
Author:   laffer1
Date:     2018-08-26 17:13:34 -0400 (Sun, 26 Aug 2018)
Log Message:
-----------
add meson

Modified Paths:
--------------
    trunk/Mk/bsd.mport.mk

Added Paths:
-----------
    trunk/Mk/extensions/meson.mk

Modified: trunk/Mk/bsd.mport.mk
===================================================================
--- trunk/Mk/bsd.mport.mk	2018-08-26 20:42:10 UTC (rev 23914)
+++ trunk/Mk/bsd.mport.mk	2018-08-26 21:13:34 UTC (rev 23915)
@@ -374,7 +374,7 @@
 		gecko gettext gettext-tools gettext-runtime \
 		ghostscript gnome gnustep groff gssapi gstreamer iconv imake jpeg kde4 \
 		ldap libarchive libedit libtool localbase lua \
-		metaport makeself mono motif mysql ncurses objc ocaml openal \
+		metaport makeself meson mono motif mysql ncurses objc ocaml openal \
 		pgsql php python java qt ruby samba scons sdl sqlite ssl \
 		tar tcl tk tex wx xfce zip
 

Added: trunk/Mk/extensions/meson.mk
===================================================================
--- trunk/Mk/extensions/meson.mk	                        (rev 0)
+++ trunk/Mk/extensions/meson.mk	2018-08-26 21:13:34 UTC (rev 23915)
@@ -0,0 +1,70 @@
+# $MidnightBSD$
+# $FreeBSD: head/Mk/Uses/meson.mk 443540 2017-06-13 21:04:27Z kwm $
+#
+# Provide support for Meson based projects
+#
+# Feature:		meson
+# Usage:		USES=meson
+#
+# The following files are bundled in source tar files.
+# meson.build		- Instructions for meson like autoconf configure,
+#			there is no changeable parts in the file.
+# meson_options.txt	- All the options meson understands
+#
+# Variables for ports:
+# MESON_ARGS		- Arguments passed to meson
+#			format: -Denable_foo=true
+# MESON_BUILD_DIR	- Path to the build directory
+#			Default: ${WRKSRC}/_build
+#
+
+.if !defined(_INCLUDE_USES_MESON_MK)
+_INCLUDE_USES_MESON_MK=	yes
+
+# Sanity check
+.if !empty(meson_ARGS)
+IGNORE=	Incorrect 'USES+= meson:${meson_ARGS}'. meson takes no arguments
+.endif
+
+BUILD_DEPENDS+=		meson:devel/meson
+
+# meson uses ninja
+.include "${EXTENSIONSDIR}/ninja.mk"
+
+# meson might have issues with non-unicode locales
+USE_LOCALE?=	en_US.UTF-8
+
+CONFIGURE_ARGS+=	--prefix ${PREFIX} \
+			--mandir man
+
+# meson has it own strip mechanic
+INSTALL_TARGET=		install
+
+# should we have strip separate from WITH_DEBUG?
+.if defined(WITH_DEBUG)
+CONFIGURE_ARGS+=	--buildtype debug
+.else
+CONFIGURE_ARGS+=	--buildtype release \
+			--strip
+.endif
+
+HAS_CONFIGURE=		yes
+CONFIGURE_CMD=		meson
+# Pull in manual set settings and from options
+CONFIGURE_ARGS+=	${MESON_ARGS}
+
+BUILD_WRKSRC=		${WRKSRC}/${MESON_BUILD_DIR}
+
+INSTALL_WRKSRC=		${WRKSRC}/${MESON_BUILD_DIR}
+
+TEST_WRKSRC=		${WRKSRC}/${MESON_BUILD_DIR}
+TEST_TARGET=		test
+
+MESON_BUILD_DIR?=	_build
+
+CONFIGURE_LOG=		${MESON_BUILD_DIR}/meson-logs/meson-log.txt
+
+# Add meson build dir at the end.
+CONFIGURE_ARGS+=	${MESON_BUILD_DIR}
+
+.endif #!defined(_INCLUDE_USES_MESON_MK)


Property changes on: trunk/Mk/extensions/meson.mk
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property


More information about the Midnightbsd-cvs mailing list