Mercurial > mxe-octave
comparison src/build-meson.mk @ 5498:4edf49596bf0
Add build rule for meson (bug #58689).
* src/build-meson.mk: New file to build meson.
* dist-files.mk: Add new file to list.
* index.html: Add new package to list.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Thu, 02 Jul 2020 17:53:59 +0200 |
parents | |
children | 5f9dc6e65bd2 |
comparison
equal
deleted
inserted
replaced
5497:455bb9c9a7eb | 5498:4edf49596bf0 |
---|---|
1 # This file is part of MXE. | |
2 # See index.html for further information. | |
3 | |
4 PKG := build-meson | |
5 $(PKG)_IGNORE := | |
6 $(PKG)_VERSION := 0.54.3 | |
7 $(PKG)_CHECKSUM := 741e42a3c8237abe74eb9f189cd8978897ef144d | |
8 $(PKG)_SUBDIR := meson-$($(PKG)_VERSION) | |
9 $(PKG)_FILE := meson-$($(PKG)_VERSION).tar.gz | |
10 $(PKG)_URL := https://github.com/mesonbuild/meson/archive/$($(PKG)_VERSION).tar.gz | |
11 $(PKG)_DEPS := build-python3 build-ninja | |
12 | |
13 define $(PKG)_UPDATE | |
14 echo 'Warning: Updates are temporarily disabled for package $(PKG).' >&2; | |
15 echo $($(PKG)_VERSION) | |
16 endef | |
17 | |
18 # FIXME: Should this be defined in the top-level Makefile? | |
19 ifeq ($(MXE_NATIVE_BUILD),no) | |
20 MESON_TOOLCHAIN_FILE := $(HOST_PREFIX)/share/meson/cross/mxe-conf.ini | |
21 else | |
22 MESON_TOOLCHAIN_FILE := $(HOST_PREFIX)/share/meson/native/mxe-conf.ini | |
23 endif | |
24 | |
25 define $(PKG)_BUILD | |
26 cd '$(1)' && $(PYTHON3) setup.py install --prefix='$(BUILD_TOOLS_PREFIX)' | |
27 | |
28 # create file with compilation settings | |
29 rm -f $(MESON_TOOLCHAIN_FILE) && mkdir -p '$(dir $(MESON_TOOLCHAIN_FILE))' | |
30 (echo "[binaries]"; \ | |
31 if [ x$(USE_SYSTEM_GCC) == xno ]; then \ | |
32 echo "c = '$(shell echo $(MXE_CC) | $(SED) "s/'//g")'"; \ | |
33 echo "cpp = '$(shell echo $(MXE_CXX) | $(SED) "s/'//g")'"; \ | |
34 echo "fortran = '$(shell echo $(MXE_F77) | $(SED) "s/'//g")'"; \ | |
35 echo "ar = '$(shell echo $(MXE_AR) | $(SED) "s/'//g")'"; \ | |
36 echo "strip = '$(shell echo $(MXE_STRIP) | $(SED) "s/'//g")'"; \ | |
37 fi; \ | |
38 echo "pkgconfig = '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)pkg-config'"; \ | |
39 echo "llvm-config = '$(HOST_BINDIR)/$(MXE_TOOL_PREFIX)llvm-config'";\ | |
40 if [ x$(MXE_NATIVE_BUILD) = xno ]; then \ | |
41 echo ""; \ | |
42 echo "[host_machine]"; \ | |
43 echo "system = 'windows'"; \ | |
44 if [ x$(ENABLE_WINDOWS_64) = xyes ]; then \ | |
45 echo "cpu_family = 'x86_64'"; \ | |
46 else \ | |
47 echo "cpu_family = 'x86'"; \ | |
48 fi; \ | |
49 echo "cpu = 'i686'"; \ | |
50 echo "endian = 'little'"; \ | |
51 fi) >> $(MESON_TOOLCHAIN_FILE) | |
52 endef |