From 480c1d4b13a98f2de6b4013cfc460a19fd7b1d3e Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 25 Dec 2017 08:49:22 +0100 Subject: add meson/ninja host tools --- package/meson/Makefile | 46 +++++++++++++++++++++++++++++ package/meson/src/cross-compilation.conf.in | 22 ++++++++++++++ package/ninja/Makefile | 36 ++++++++++++++++++++++ 3 files changed, 104 insertions(+) create mode 100644 package/meson/Makefile create mode 100644 package/meson/src/cross-compilation.conf.in create mode 100644 package/ninja/Makefile (limited to 'package') diff --git a/package/meson/Makefile b/package/meson/Makefile new file mode 100644 index 000000000..d16d450e0 --- /dev/null +++ b/package/meson/Makefile @@ -0,0 +1,46 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(ADK_TOPDIR)/rules.mk + +PKG_NAME:= meson +PKG_VERSION:= 0.44.0 +PKG_RELEASE:= 1 +PKG_HASH:= 5cdbc68c63b5b4a8ee862ab3b6393a2633487ebc9b3e1c3da1091b9c912d1d95 +PKG_DESCR:= build utility +PKG_SECTION:= dev/tools +HOST_BUILDDEP:= python3-host ninja-host +PKG_URL:= http://www.mesonbuild.com/ +PKG_SITES:= https://github.com/mesonbuild/meson/archive/ + +DISTFILES:= ${PKG_VERSION}.tar.gz + +PKG_CFLINE_MESON:= depends on ADK_HOST_ONLY + +include $(ADK_TOPDIR)/mk/host.mk +include $(ADK_TOPDIR)/mk/package.mk + +$(eval $(call HOST_template,MESON,meson,$(PKG_VERSION)-${PKG_RELEASE})) + +HOST_STYLE:= manual + +host-configure: + +host-build: + +meson-hostinstall: + (cd $(WRKBUILD); PATH='$(HOST_PATH)' python3 ./setup.py install) + $(INSTALL_DIR) $(STAGING_HOST_DIR)/etc/meson + sed -e "s%@TARGET_CROSS@%$(TARGET_CROSS)%g" \ + -e "s%@TARGET_ARCH@%$(ADK_TARGET_ARCH)%g" \ + -e "s%@TARGET_CPU@%$(ADK_TARGET_CPU_ARCH)%g" \ + -e "s%@TARGET_ENDIAN@%$(ADK_TARGET_ENDIAN)%g" \ + -e "s%@TARGET_CFLAGS@%`printf '"%s", ' $(TARGET_CFLAGS)`%g" \ + -e "s%@TARGET_LDFLAGS@%`printf '"%s", ' $(TARGET_LDFLAGS)`%g" \ + -e "s%@TARGET_CXXFLAGS@%`printf '"%s", ' $(TARGET_CXXFLAGS)`%g" \ + -e "s%@STAGING_HOST_DIR@%$(STAGING_HOST_DIR)%g" \ + $(WRKBUILD)/cross-compilation.conf.in \ + > $(STAGING_HOST_DIR)/etc/meson/cross-compilation.conf + +include ${ADK_TOPDIR}/mk/host-bottom.mk +include ${ADK_TOPDIR}/mk/pkg-bottom.mk diff --git a/package/meson/src/cross-compilation.conf.in b/package/meson/src/cross-compilation.conf.in new file mode 100644 index 000000000..a636ca329 --- /dev/null +++ b/package/meson/src/cross-compilation.conf.in @@ -0,0 +1,22 @@ +# Note: OpenADK's and Meson's terminologies differ about the meaning +# of 'build', 'host' and 'target': +# - OpenADK's 'host' is Meson's 'build' +# - OpenADK's 'target' is Meson's 'host' + +[binaries] +c = '@TARGET_CROSS@gcc' +cpp = '@TARGET_CROSS@g++' +ar = '@TARGET_CROSS@ar' +strip = '@TARGET_CROSS@strip' +pkgconfig = '@STAGING_HOST_DIR@/usr/bin/pkg-config' +[properties] +c_args = [@TARGET_CFLAGS@] +c_link_args = [@TARGET_LDFLAGS@] +cpp_args = [@TARGET_CXXFLAGS@] +cpp_link_args = [@TARGET_LDFLAGS@] + +[host_machine] +system = 'linux' +cpu_family ='@TARGET_ARCH@' +cpu = '@TARGET_CPU@' +endian = '@TARGET_ENDIAN@' diff --git a/package/ninja/Makefile b/package/ninja/Makefile new file mode 100644 index 000000000..9f9f0ad12 --- /dev/null +++ b/package/ninja/Makefile @@ -0,0 +1,36 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(ADK_TOPDIR)/rules.mk + +PKG_NAME:= ninja +PKG_VERSION:= 1.8.2 +PKG_RELEASE:= 1 +PKG_HASH:= 86b8700c3d0880c2b44c2ff67ce42774aaf8c28cbf57725cb881569288c1c6f4 +PKG_DESCR:= build utility +PKG_SECTION:= dev/tools +PKG_URL:= http://www.ninja-build.org/ +PKG_SITES:= https://github.com/ninja-build/ninja/archive/ + +DISTFILES:= v${PKG_VERSION}.tar.gz + +PKG_CFLINE_NINJA:= depends on ADK_HOST_ONLY + +include $(ADK_TOPDIR)/mk/host.mk +include $(ADK_TOPDIR)/mk/package.mk + +$(eval $(call HOST_template,NINJA,ninja,$(PKG_VERSION)-${PKG_RELEASE})) + +HOST_STYLE:= manual + +host-configure: + (cd $(WRKBUILD); ./configure.py --bootstrap) + +host-build: + +ninja-hostinstall: + $(INSTALL_BIN) $(WRKBUILD)/ninja \ + $(STAGING_HOST_DIR)/usr/bin + +include ${ADK_TOPDIR}/mk/host-bottom.mk +include ${ADK_TOPDIR}/mk/pkg-bottom.mk -- cgit v1.2.3