aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile3
-rw-r--r--tools/meson/Makefile32
-rw-r--r--tools/meson/src/openwrt-cross.txt.in23
-rw-r--r--tools/meson/src/openwrt-native.txt.in13
4 files changed, 70 insertions, 1 deletions
diff --git a/tools/Makefile b/tools/Makefile
index 82a877379c..e16af6c68f 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -23,7 +23,7 @@ endif
tools-y += autoconf autoconf-archive automake bc bison cmake cpio dosfstools
tools-y += e2fsprogs fakeroot findutils firmware-utils flex gengetopt
-tools-y += libressl libtool lzma m4 make-ext4fs missing-macros mkimage
+tools-y += libressl libtool lzma m4 make-ext4fs meson missing-macros mkimage
tools-y += mklibs mtd-utils mtools ninja padjffs2 patch-image
tools-y += patchelf pkgconf quilt squashfskit4 sstrip xxd zip zlib zstd
tools-$(BUILD_B43_TOOLS) += b43-tools
@@ -57,6 +57,7 @@ $(curdir)/libressl/compile := $(curdir)/pkgconf/compile
$(curdir)/libtool/compile := $(curdir)/m4/compile $(curdir)/autoconf/compile $(curdir)/automake/compile $(curdir)/missing-macros/compile
$(curdir)/lzma-old/compile := $(curdir)/zlib/compile
$(curdir)/make-ext4fs/compile := $(curdir)/zlib/compile
+$(curdir)/meson/compile := $(curdir)/ninja/compile
$(curdir)/missing-macros/compile := $(curdir)/autoconf/compile
$(curdir)/mkimage/compile += $(curdir)/libressl/compile
$(curdir)/mklibs/compile := $(curdir)/libtool/compile
diff --git a/tools/meson/Makefile b/tools/meson/Makefile
new file mode 100644
index 0000000000..bae89654a5
--- /dev/null
+++ b/tools/meson/Makefile
@@ -0,0 +1,32 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=meson
+PKG_VERSION:=0.59.1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/mesonbuild/meson/releases/download/$(PKG_VERSION)
+PKG_HASH:=db586a451650d46bbe10984a87b79d9bcdc1caebf38d8e189f8848f8d502356d
+
+PKG_MAINTAINER:=Andre Heider <a.heider@gmail.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=COPYING
+
+include $(INCLUDE_DIR)/host-build.mk
+
+define Host/Configure
+endef
+
+define Host/Compile
+endef
+
+define Host/Install
+ $(INSTALL_DIR) $(STAGING_DIR_HOST)/lib/meson
+ $(CP) $(HOST_BUILD_DIR)/* $(STAGING_DIR_HOST)/lib/meson/
+endef
+
+define Host/Clean
+ $(call Host/Clean/Default)
+ rm -rf $(STAGING_DIR_HOST)/lib/meson
+endef
+
+$(eval $(call HostBuild))
diff --git a/tools/meson/src/openwrt-cross.txt.in b/tools/meson/src/openwrt-cross.txt.in
new file mode 100644
index 0000000000..30b4c116c4
--- /dev/null
+++ b/tools/meson/src/openwrt-cross.txt.in
@@ -0,0 +1,23 @@
+[binaries]
+c = [@CC@]
+cpp = [@CXX@]
+ar = '@AR@'
+strip = '@STRIP@'
+nm = '@NM@'
+pkgconfig = '@PKGCONFIG@'
+
+[built-in options]
+c_args = [@CFLAGS@]
+c_link_args = [@LDFLAGS@]
+cpp_args = [@CXXFLAGS@]
+cpp_link_args = [@LDFLAGS@]
+prefix = '/usr'
+
+[host_machine]
+system = 'linux'
+cpu_family = '@ARCH@'
+cpu = '@CPU@'
+endian = '@ENDIAN@'
+
+[properties]
+needs_exe_wrapper = true
diff --git a/tools/meson/src/openwrt-native.txt.in b/tools/meson/src/openwrt-native.txt.in
new file mode 100644
index 0000000000..50308ec8e4
--- /dev/null
+++ b/tools/meson/src/openwrt-native.txt.in
@@ -0,0 +1,13 @@
+[binaries]
+c = [@CC@]
+cpp = [@CXX@]
+pkgconfig = '@PKGCONFIG@'
+
+[built-in options]
+c_args = [@CFLAGS@]
+c_link_args = [@LDFLAGS@]
+cpp_args = [@CXXFLAGS@]
+cpp_link_args = [@LDFLAGS@]
+prefix = '@PREFIX@'
+sbindir = 'bin'
+libdir = 'lib'