diff --git a/config/functions b/config/functions
index 50d9109cef..5f0862114f 100644
--- a/config/functions
+++ b/config/functions
@@ -39,6 +39,27 @@ setup_toolchain() {
echo "SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)" >> $CMAKE_CONF
echo "SET(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)" >> $CMAKE_CONF
fi
+ export MESON_CONF=$TOOLCHAIN/etc/meson-$TARGET_NAME.conf
+ if [ ! -f $MESON_CONF ] ; then
+ mkdir -p $TOOLCHAIN/etc
+ echo "[binaries]" >> $MESON_CONF
+ echo "c = '$CC'" >> $MESON_CONF
+ echo "cpp = '$CXX'" >> $MESON_CONF
+ echo "ar = '$AR'" >> $MESON_CONF
+ echo "strip = '$STRIP'" >> $MESON_CONF
+ echo "pkgconfig = '$PKG_CONFIG'" >> $MESON_CONF
+ echo "" >> $MESON_CONF
+ echo "[host_machine]" >> $MESON_CONF
+ echo "system = 'linux'" >> $MESON_CONF
+ echo "cpu_family = '$TARGET_ARCH'" >> $MESON_CONF
+ echo "cpu = '$TARGET_SUBARCH'" >> $MESON_CONF
+ echo "endian = 'little'" >> $MESON_CONF
+ echo "" >> $MESON_CONF
+ echo "[properties]" >> $MESON_CONF
+ echo "root = '$SYSROOT_PREFIX/usr'" >> $MESON_CONF
+ python -c "import os; print('c_args = {}'.format([x for x in os.getenv('CFLAGS').split()]))" >> $MESON_CONF
+ python -c "import os; print('c_link_args = {}'.format([x for x in os.getenv('LDFLAGS').split()]))" >> $MESON_CONF
+ fi
export HOST_CC="$TOOLCHAIN/bin/host-gcc"
export HOST_CXX="$TOOLCHAIN/bin/host-g++"
export HOSTCC="$HOST_CC"
@@ -91,6 +112,27 @@ setup_toolchain() {
echo "SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)" >> $CMAKE_CONF
echo "SET(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH)" >> $CMAKE_CONF
fi
+ export MESON_CONF=$TOOLCHAIN/etc/meson-$HOST_NAME.conf
+ if [ ! -f $MESON_CONF ] ; then
+ mkdir -p $TOOLCHAIN/etc
+ echo "[binaries]" >> $MESON_CONF
+ echo "c = '$CC'" >> $MESON_CONF
+ echo "cpp = '$CXX'" >> $MESON_CONF
+ echo "ar = '$AR'" >> $MESON_CONF
+ echo "strip = '$STRIP'" >> $MESON_CONF
+ echo "pkgconfig = '$PKG_CONFIG'" >> $MESON_CONF
+ echo "" >> $MESON_CONF
+ echo "[host_machine]" >> $MESON_CONF
+ echo "system = 'linux'" >> $MESON_CONF
+ echo "cpu_family = '$TARGET_ARCH'" >> $MESON_CONF
+ echo "cpu = '$TARGET_SUBARCH'" >> $MESON_CONF
+ echo "endian = 'big'" >> $MESON_CONF
+ echo "" >> $MESON_CONF
+ echo "[properties]" >> $MESON_CONF
+ echo "root = '$TOOLCHAIN'" >> $MESON_CONF
+ python -c "import os; print('c_args = {}'.format([x for x in os.getenv('CFLAGS').split()]))" >> $MESON_CONF
+ python -c "import os; print('c_link_args = {}'.format([x for x in os.getenv('LDFLAGS').split()]))" >> $MESON_CONF
+ fi
export HOST_CC="$CC"
export HOST_CXX="$CXX"
export HOSTCC="$CC"
diff --git a/packages/devel/glib/package.mk b/packages/devel/glib/package.mk
index 513c746019..2ef3081bce 100644
--- a/packages/devel/glib/package.mk
+++ b/packages/devel/glib/package.mk
@@ -30,6 +30,7 @@ PKG_SECTION="devel"
PKG_SHORTDESC="glib: C support library"
PKG_LONGDESC="GLib is a library which includes support routines for C such as lists, trees, hashes, memory allocation, and many other things."
PKG_AUTORECONF="yes"
+PKG_USE_MESON="no"
PKG_CONFIGURE_OPTS_HOST="PCRE_LIBS=-l:libpcre.a \
--enable-static \
diff --git a/packages/python/devel/meson/package.mk b/packages/python/devel/meson/package.mk
new file mode 100644
index 0000000000..7c7343d023
--- /dev/null
+++ b/packages/python/devel/meson/package.mk
@@ -0,0 +1,43 @@
+################################################################################
+# This file is part of LibreELEC - https://libreelec.tv
+# Copyright (C) 2016-present Team LibreELEC
+#
+# LibreELEC is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# LibreELEC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with LibreELEC. If not, see .
+################################################################################
+
+PKG_NAME="meson"
+PKG_VERSION="0.42.1"
+PKG_SHA256="30bdded6fefc48211d30818d96dd34aae56ee86ce9710476f501bd7695469c4b"
+PKG_ARCH="any"
+PKG_LICENSE="Apache"
+PKG_SITE="http://mesonbuild.com"
+PKG_URL="https://github.com/mesonbuild/meson/releases/download/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.gz"
+PKG_DEPENDS_HOST="Python3:host pathlib:host"
+PKG_SECTION="toolchain/devel"
+PKG_SHORTDESC="High productivity build system"
+PKG_LONGDESC="High productivity build system"
+
+make_host() {
+ python3 setup.py build
+}
+
+makeinstall_host() {
+ python3 setup.py install --prefix=$TOOLCHAIN --skip-build
+
+ # Avoid using full path to python3 that may exceed 128 byte limit.
+ # Instead use PATH as we know our toolchain is first.
+ for f in meson mesonconf mesontest mesonintrospect wraptool; do
+ sed -i '1 s/^#!.*$/#!\/usr\/bin\/env python3/' $TOOLCHAIN/bin/$f
+ done
+}
diff --git a/packages/python/devel/pathlib/package.mk b/packages/python/devel/pathlib/package.mk
new file mode 100644
index 0000000000..650ba8bcfa
--- /dev/null
+++ b/packages/python/devel/pathlib/package.mk
@@ -0,0 +1,37 @@
+################################################################################
+# This file is part of LibreELEC - https://libreelec.tv
+# Copyright (C) 2016-present Team LibreELEC
+#
+# LibreELEC is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# LibreELEC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with LibreELEC. If not, see .
+################################################################################
+
+PKG_NAME="pathlib"
+PKG_VERSION="1.0.1"
+PKG_SHA256="6940718dfc3eff4258203ad5021090933e5c04707d5ca8cc9e73c94a7894ea9f"
+PKG_ARCH="any"
+PKG_LICENSE="MIT"
+PKG_SITE="http://pathlib.readthedocs.org"
+PKG_URL="http://pypi.python.org/packages/source/p/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.gz"
+PKG_DEPENDS_HOST="Python3:host"
+PKG_SECTION="python/devel"
+PKG_SHORTDESC="This module offers a set of classes featuring all the common operations on paths in an easy, object-oriented way"
+PKG_LONGDESC="This module offers a set of classes featuring all the common operations on paths in an easy, object-oriented way"
+
+make_host() {
+ :
+}
+
+makeinstall_host() {
+ python3 setup.py install --prefix=$TOOLCHAIN
+}
diff --git a/packages/sysutils/systemd/package.mk b/packages/sysutils/systemd/package.mk
index 5dd564fa3b..7cbbc42f03 100644
--- a/packages/sysutils/systemd/package.mk
+++ b/packages/sysutils/systemd/package.mk
@@ -17,8 +17,8 @@
################################################################################
PKG_NAME="systemd"
-PKG_VERSION="233"
-PKG_SHA256="8b3e99da3d4164b66581830a7f2436c0c8fe697b5fbdc3927bdb960646be0083"
+PKG_VERSION="235"
+PKG_SHA256="25811f96f5a027bf2a4c9383495cf5b623e385d84da31e473cf375932b3e9c52"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://www.freedesktop.org/wiki/Software/systemd"
@@ -27,98 +27,94 @@ PKG_DEPENDS_TARGET="toolchain libcap kmod util-linux entropy"
PKG_SECTION="system"
PKG_SHORTDESC="systemd: a system and session manager"
PKG_LONGDESC="systemd is a system and session manager for Linux, compatible with SysV and LSB init scripts. systemd provides aggressive parallelization capabilities, uses socket and D-Bus activation for starting services, offers on-demand starting of daemons, keeps track of processes using Linux cgroups, supports snapshotting and restoring of the system state, maintains mount and automount points and implements an elaborate transactional dependency-based service control logic. It can work as a drop-in replacement for sysvinit."
-PKG_AUTORECONF="yes"
-PKG_CONFIGURE_OPTS_TARGET="ac_cv_func_malloc_0_nonnull=yes \
- ac_cv_have_decl_IFLA_BOND_AD_INFO=no \
- ac_cv_have_decl_IFLA_BRPORT_UNICAST_FLOOD=no \
- ac_cv_path_MOUNT_PATH="/usr/bin/mount"
- ac_cv_path_UMOUNT_PATH="/usr/bin/umount"
- KMOD=/usr/bin/kmod \
- --disable-nls \
- --disable-lto \
- --disable-dbus \
- --disable-utmp \
- --disable-coverage \
- --enable-kmod \
- --disable-xkbcommon \
- --enable-blkid \
- --disable-seccomp \
- --disable-ima \
- --disable-selinux \
- --disable-apparmor \
- --disable-xz \
- --disable-zlib \
- --disable-bzip2 \
- --disable-lz4 \
- --disable-pam \
- --disable-acl \
- --disable-smack \
- --disable-gcrypt \
- --disable-audit \
- --disable-elfutils \
- --disable-libcryptsetup \
- --disable-qrencode \
- --disable-microhttpd \
- --disable-gnutls \
- --disable-libcurl \
- --disable-libidn \
- --disable-libiptc \
- --disable-binfmt \
- --disable-vconsole \
- --disable-quotacheck \
- --enable-tmpfiles \
- --disable-environment-d \
- --disable-sysusers \
- --disable-firstboot \
- --disable-randomseed \
- --disable-backlight \
- --disable-rfkill \
- --enable-logind \
- --disable-machined \
- --disable-importd \
- --disable-hostnamed \
- --disable-timedated \
- --disable-timesyncd \
- --disable-localed \
- --disable-coredump \
- --disable-polkit \
- --disable-resolved \
- --disable-networkd \
- --disable-efi \
- --disable-gnuefi \
- --disable-kdbus \
- --disable-myhostname \
- --enable-hwdb \
- --disable-manpages \
- --disable-hibernate \
- --disable-ldconfig \
- --disable-split-usr \
- --disable-tests \
- --without-python \
- --with-sysvinit-path= \
- --with-sysvrcnd-path= \
- --with-tty-gid=5 \
- --with-dbuspolicydir=/etc/dbus-1/system.d \
- --with-dbussessionservicedir=/usr/share/dbus-1/services \
- --with-dbussystemservicedir=/usr/share/dbus-1/system-services \
- --with-rootprefix=/usr \
- --with-rootlibdir=/usr/lib \
- --with-default-hierarchy=hybrid"
-
-pre_build_target() {
-# broken autoreconf
- ( cd $PKG_BUILD
- intltoolize --force
- )
-}
+PKG_MESON_OPTS_TARGET="--libdir=/usr/lib \
+ -Drootprefix=/usr \
+ -Dsplit-usr=false \
+ -Ddefault-hierarchy=hybrid \
+ -Dtty-gid=5 \
+ -Dseccomp=false \
+ -Dselinux=false \
+ -Dapparmor=false \
+ -Dpolkit=false \
+ -Dacl=false \
+ -Daudit=false \
+ -Dblkid=true \
+ -Dkmod=true \
+ -Dpam=false \
+ -Dmicrohttpd=false \
+ -Dlibcryptsetup=false \
+ -Dlibcurl=false \
+ -Dlibidn=false \
+ -Dlibidn2=false \
+ -Dlibiptc=false \
+ -Dqrencode=false \
+ -Dgcrypt=false \
+ -Dgnutls=false \
+ -Delfutils=false \
+ -Dzlib=false \
+ -Dbzip2=false \
+ -Dxz=false \
+ -Dlz4=false \
+ -Dxkbcommon=false \
+ -Dglib=false \
+ -Ddbus=false \
+ -Ddefault-dnssec=no \
+ -Dimportd=false \
+ -Dremote=false \
+ -Dutmp=false \
+ -Dhibernate=false \
+ -Denvironment-d=false \
+ -Dbinfmt=false \
+ -Dcoredump=false \
+ -Dresolve=false \
+ -Dlogind=true \
+ -Dhostnamed=false \
+ -Dlocaled=false \
+ -Dmachined=false \
+ -Dnetworkd=false \
+ -Dtimedated=false \
+ -Dtimesyncd=false \
+ -Dmyhostname=false \
+ -Dfirstboot=false \
+ -Drandomseed=false \
+ -Dbacklight=false \
+ -Dvconsole=false \
+ -Dquotacheck=false \
+ -Dsysusers=false \
+ -Dtmpfiles=true \
+ -Dhwdb=true \
+ -Drfkill=false \
+ -Dldconfig=false \
+ -Defi=false \
+ -Dtpm=false \
+ -Dima=false \
+ -Dsmack=false \
+ -Dgshadow=false \
+ -Didn=false \
+ -Dnss-systemd=false \
+ -Dman=false \
+ -Dhtml=false \
+ -Dbashcompletiondir=no \
+ -Dzshcompletiondir=no \
+ -Dkill-path=/usr/bin/kill \
+ -Dkmod-path=/usr/bin/kmod \
+ -Dmount-path=/usr/bin/mount \
+ -Dumount-path=/usr/bin/umount"
pre_configure_target() {
export CFLAGS="$CFLAGS -fno-schedule-insns -fno-schedule-insns2"
+ export LC_ALL=en_US.UTF-8
+
+ # meson needs a host compiler and it's detected through the environment. meh.
+ export CC="$HOST_CC"
+ export CXX="$HOST_CXX"
}
post_makeinstall_target() {
# remove unneeded stuff
+ rm -rf $INSTALL/etc/init.d
+ rm -rf $INSTALL/etc/pam.d
rm -rf $INSTALL/etc/systemd/system
rm -rf $INSTALL/etc/xdg
rm -rf $INSTALL/etc/X11
@@ -169,6 +165,10 @@ post_makeinstall_target() {
rm -rf $INSTALL/usr/lib/systemd/system/systemd-udev-hwdb-update.service
rm -rf $INSTALL/usr/lib/systemd/system/*.target.wants/systemd-udev-hwdb-update.service
+ # remove systemd-user-sessions
+ rm -rf $INSTALL/usr/lib/systemd/system/systemd-user-sessions.service
+ rm -rf $INSTALL/usr/lib/systemd/system/*.target.wants/systemd-user-sessions.service
+
# remove nspawn
rm -rf $INSTALL/usr/bin/systemd-nspawn
rm -rf $INSTALL/usr/lib/systemd/system/systemd-nspawn@.service
diff --git a/packages/sysutils/systemd/patches/systemd-0001-move-etc-systemd-system-to-storage-.config-system.d.patch b/packages/sysutils/systemd/patches/systemd-0001-move-etc-systemd-system-to-storage-.config-system.d.patch
index f7a1242fcc..de8732f376 100644
--- a/packages/sysutils/systemd/patches/systemd-0001-move-etc-systemd-system-to-storage-.config-system.d.patch
+++ b/packages/sysutils/systemd/patches/systemd-0001-move-etc-systemd-system-to-storage-.config-system.d.patch
@@ -1,35 +1,19 @@
-From 56daac6a053159bbc5dc22d85c6ecd66b7369aae Mon Sep 17 00:00:00 2001
-From: Stefan Saraev
-Date: Thu, 19 Dec 2013 11:21:13 +0200
-Subject: [PATCH 2/8] move /etc/systemd/system to /storage/.config/system.d
+commit abce2c21148f981034acf143a3c12e5919949198
+Author: Lukas Rusak
+Date: Mon Oct 9 15:26:58 2017 -0700
----
- Makefile.am | 4 ++--
- Makefile.in | 4 ++--
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index bf04d31..36c269e 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -166,7 +166,7 @@ udevlibexec_PROGRAMS =
- AM_CPPFLAGS = \
- -include $(top_builddir)/config.h \
- -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \
-- -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
-+ -DSYSTEM_CONFIG_UNIT_PATH=\"/storage/.config/system.d\" \
- -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
- -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
- -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
-@@ -6210,7 +6210,7 @@ substitutions = \
- '|SYSTEMCTL=$(rootbindir)/systemctl|' \
- '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
- '|pkgsysconfdir=$(pkgsysconfdir)|' \
-- '|SYSTEM_CONFIG_UNIT_PATH=$(pkgsysconfdir)/system|' \
-+ '|SYSTEM_CONFIG_UNIT_PATH=/storage/.config/system.d|' \
- '|USER_CONFIG_UNIT_PATH=$(pkgsysconfdir)/user|' \
- '|pkgdatadir=$(pkgdatadir)|' \
- '|systemunitdir=$(systemunitdir)|' \
---
-1.7.10.4
+ move /etc/systemd/system to /storage/.config/system.d
+diff --git a/meson.build b/meson.build
+index f7a610a..b1144a6 100644
+--- a/meson.build
++++ b/meson.build
+@@ -146,7 +146,7 @@ if pamconfdir == ''
+ endif
+
+ conf.set_quoted('PKGSYSCONFDIR', pkgsysconfdir)
+-conf.set_quoted('SYSTEM_CONFIG_UNIT_PATH', join_paths(pkgsysconfdir, 'system'))
++conf.set_quoted('SYSTEM_CONFIG_UNIT_PATH', '/storage/.config/system.d')
+ conf.set_quoted('SYSTEM_DATA_UNIT_PATH', systemunitdir)
+ conf.set_quoted('SYSTEM_SYSVINIT_PATH', sysvinit_path)
+ conf.set_quoted('SYSTEM_SYSVRCND_PATH', sysvrcnd_path)
diff --git a/packages/sysutils/systemd/patches/systemd-0003-remove-xlocale.h.patch b/packages/sysutils/systemd/patches/systemd-0003-remove-xlocale.h.patch
deleted file mode 100644
index 7a28cc4d15..0000000000
--- a/packages/sysutils/systemd/patches/systemd-0003-remove-xlocale.h.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 0c50b8332092178378257c2de800fb6b6b4a8706 Mon Sep 17 00:00:00 2001
-From: Khem Raj
-Date: Mon, 3 Jul 2017 08:45:04 -0700
-Subject: [PATCH] parse-util: Do not include unneeded xlocale.h
-
-Signed-off-by: Khem Raj
----
-Upstream-Status: Backport [ partial https://github.com/systemd/systemd/commit/284d1cd0a12cad96a5ea61d1afb0dd677dbd147e]
-
- src/basic/parse-util.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c
-index c98815b9b..a0eb45805 100644
---- a/src/basic/parse-util.c
- b/src/basic/parse-util.c
-@@ -23,7 +23,6 @@
- #include
- #include
- #include
--#include
-
- #include "alloc-util.h"
- #include "extract-word.h"
---
-2.13.2
-
diff --git a/packages/sysutils/util-linux/package.mk b/packages/sysutils/util-linux/package.mk
index 99ffc7dca4..480e7e0b30 100644
--- a/packages/sysutils/util-linux/package.mk
+++ b/packages/sysutils/util-linux/package.mk
@@ -17,11 +17,11 @@
################################################################################
PKG_NAME="util-linux"
-PKG_VERSION="2.29.2"
-PKG_SHA256="accea4d678209f97f634f40a93b7e9fcad5915d1f4749f6c47bee6bf110fe8e3"
+PKG_VERSION="2.31"
+PKG_SHA256="f9be7cdcf4fc5c5064a226599acdda6bdf3d86c640152ba01ea642d91108dc8a"
PKG_ARCH="any"
PKG_LICENSE="GPL"
-PKG_URL="http://www.kernel.org/pub/linux/utils/util-linux/v2.29/$PKG_NAME-$PKG_VERSION.tar.xz"
+PKG_URL="http://www.kernel.org/pub/linux/utils/util-linux/v${PKG_VERSION%-*}/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS_HOST="toolchain"
PKG_DEPENDS_TARGET="toolchain"
PKG_DEPENDS_INIT="toolchain"
diff --git a/packages/sysutils/util-linux/patches/util-linux-blkid_swapon_mkfs_uuidgen.patch b/packages/sysutils/util-linux/patches/util-linux-blkid_swapon_mkfs_uuidgen.patch
index 7504670e15..a44eb4900e 100644
--- a/packages/sysutils/util-linux/patches/util-linux-blkid_swapon_mkfs_uuidgen.patch
+++ b/packages/sysutils/util-linux/patches/util-linux-blkid_swapon_mkfs_uuidgen.patch
@@ -1,7 +1,7 @@
-diff -Naur util-linux-2.27/configure.ac util-linux-2.27.patch/configure.ac
---- util-linux-2.27/configure.ac 2015-09-07 09:59:25.000000000 +0200
-+++ util-linux-2.27.patch/configure.ac 2015-09-12 10:35:53.576532786 +0200
-@@ -1051,11 +1051,19 @@
+diff -Naur a/configure.ac b/configure.ac
+--- a/configure.ac 2017-10-03 08:53:23.956354391 -0700
++++ b/configure.ac 2017-10-09 16:39:14.213671977 -0700
+@@ -1156,7 +1156,11 @@
AM_CONDITIONAL([BUILD_UUIDD], [test "x$build_uuidd" = xyes])
@@ -14,6 +14,10 @@ diff -Naur util-linux-2.27/configure.ac util-linux-2.27.patch/configure.ac
UL_REQUIRES_BUILD([uuidgen], [libuuid])
AM_CONDITIONAL([BUILD_UUIDGEN], [test "x$build_uuidgen" = xyes])
+@@ -1165,7 +1169,11 @@
+ UL_REQUIRES_BUILD([uuidparse], [libsmartcols])
+ AM_CONDITIONAL([BUILD_UUIDPARSE], [test "x$build_uuidparse" = xyes])
+
-UL_BUILD_INIT([blkid], [check])
+AC_ARG_ENABLE([blkid],
+ AS_HELP_STRING([--disable-blkid], [do not build blkid(8)]),
@@ -23,11 +27,10 @@ diff -Naur util-linux-2.27/configure.ac util-linux-2.27.patch/configure.ac
UL_REQUIRES_BUILD([blkid], [libblkid])
AM_CONDITIONAL([BUILD_BLKID], [test "x$build_blkid" = xyes])
-@@ -1242,21 +1250,26 @@
- UL_REQUIRES_HAVE([hwclock], [io, linuxdummy], [ioperm iopl function or Linux])
+@@ -1403,7 +1411,11 @@
AM_CONDITIONAL([BUILD_HWCLOCK], [test "x$build_hwclock" = xyes])
--
+
-UL_BUILD_INIT([mkfs], [yes])
+AC_ARG_ENABLE([mkfs],
+ AS_HELP_STRING([--disable-mkfs], [do not build mkfs(8)]),
@@ -37,15 +40,10 @@ diff -Naur util-linux-2.27/configure.ac util-linux-2.27.patch/configure.ac
AM_CONDITIONAL([BUILD_MKFS], [test "x$build_mkfs" = xyes])
UL_BUILD_INIT([isosize], [yes])
- AM_CONDITIONAL([BUILD_ISOSIZE], [test "x$build_isosize" = xyes])
-
--
- UL_BUILD_INIT([fstrim], [check])
- UL_REQUIRES_LINUX([fstrim])
- UL_REQUIRES_BUILD([fstrim], [libmount])
+@@ -1416,7 +1428,11 @@
AM_CONDITIONAL([BUILD_FSTRIM], [test "x$build_fstrim" = xyes])
--
+
-UL_BUILD_INIT([swapon], [check])
+AC_ARG_ENABLE([swapon],
+ AS_HELP_STRING([--disable-swapon], [do not build swapon(8) and swapoff(8)]),
diff --git a/packages/virtual/toolchain/package.mk b/packages/virtual/toolchain/package.mk
index 5a83ca1a6c..74c774c39f 100644
--- a/packages/virtual/toolchain/package.mk
+++ b/packages/virtual/toolchain/package.mk
@@ -22,7 +22,7 @@ PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://libreelec.tv"
PKG_URL=""
-PKG_DEPENDS_TARGET="configtools:host make:host xz:host sed:host pkg-config:host autoconf:host automake:host intltool:host libtool:host autoconf-archive:host gcc:host bison:host flex:host cmake:host xmlstarlet:host yasm:host p7zip:host ninja:host"
+PKG_DEPENDS_TARGET="configtools:host make:host xz:host sed:host pkg-config:host autoconf:host automake:host intltool:host libtool:host autoconf-archive:host gcc:host bison:host flex:host cmake:host xmlstarlet:host yasm:host p7zip:host ninja:host meson:host"
PKG_SECTION="virtual"
PKG_SHORTDESC="toolchain: LibreELEC.tv' toolchain"
PKG_LONGDESC="a crosscompiling toolchain to compile all packages"
diff --git a/scripts/build b/scripts/build
index 196b227241..68bba6f6af 100755
--- a/scripts/build
+++ b/scripts/build
@@ -148,6 +148,22 @@ if [ ! -f $STAMP ]; then
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE"
+ if [ "$DEBUG" = "yes" ]; then
+ MESON_BUILD_TYPE="debug"
+ else
+ MESON_BUILD_TYPE="plain"
+ fi
+
+ TARGET_MESON_OPTS="--prefix=/usr \
+ --bindir=/usr/bin \
+ --sbindir=/usr/sbin \
+ --sysconfdir=/etc \
+ --libdir=/usr/lib \
+ --libexecdir=/usr/lib \
+ --localstatedir=/var \
+ --buildtype=$MESON_BUILD_TYPE \
+ --cross-file=$MESON_CONF"
+
# configure HOST build defaults
HOST_CONFIGURE_OPTS="--host=$HOST_NAME \
--build=$HOST_NAME \
@@ -164,13 +180,25 @@ if [ ! -f $STAMP ]; then
-DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF \
-DCMAKE_INSTALL_PREFIX=$TOOLCHAIN"
+ HOST_MESON_OPTS="--prefix=$TOOLCHAIN \
+ --bindir=$TOOLCHAIN/bin \
+ --sbindir=$TOOLCHAIN/sbin \
+ --sysconfdir=$TOOLCHAIN/etc \
+ --libdir=$TOOLCHAIN/lib \
+ --libexecdir=$TOOLCHAIN/lib \
+ --localstatedir=$TOOLCHAIN/var \
+ --buildtype=plain \
+ --cross-file=$MESON_CONF"
+
# configure INIT build defaults
INIT_CONFIGURE_OPTS="$TARGET_CONFIGURE_OPTS"
INIT_CMAKE_OPTS="$TARGET_CMAKE_OPTS"
+ INIT_MESON_OPTS="$TARGET_MESON_OPTS"
# configure BOOTSTRAP build defaults
BOOTSTRAP_CONFIGURE_OPTS="$HOST_CONFIGURE_OPTS"
BOOTSTRAP_CMAKE_OPTS="$HOST_CMAKE_OPTS"
+ BOOTSTRAP_MESON_OPTS="$HOST_MESON_OPTS"
# include buildfile
. $PKG_DIR/package.mk
@@ -233,6 +261,10 @@ if [ ! -f $STAMP ]; then
PKG_CMAKE_SCRIPT="$PKG_BUILD/CMakeLists.txt"
fi
+ if [ -z "$PKG_MESON_SCRIPT" ]; then
+ PKG_MESON_SCRIPT="$PKG_BUILD/meson.build"
+ fi
+
# include build template and build
if [ "$(type -t pre_build_$TARGET)" = "function" ]; then
pre_build_$TARGET
@@ -246,22 +278,22 @@ if [ ! -f $STAMP ]; then
cd $PKG_BUILD
if [ "$TARGET" = "target" ]; then
- if [ -f "$PKG_CONFIGURE_SCRIPT" -o -f "$PKG_CMAKE_SCRIPT" ]; then
+ if [ -f "$PKG_CONFIGURE_SCRIPT" -o -f "$PKG_CMAKE_SCRIPT" -o -f "$PKG_MESON_SCRIPT" ]; then
mkdir -p .$TARGET_NAME
cd .$TARGET_NAME
fi
elif [ "$TARGET" = "host" ]; then
- if [ -f "$PKG_CONFIGURE_SCRIPT" -o -f "$PKG_CMAKE_SCRIPT" ]; then
+ if [ -f "$PKG_CONFIGURE_SCRIPT" -o -f "$PKG_CMAKE_SCRIPT" -o -f "$PKG_MESON_SCRIPT" ]; then
mkdir -p .$HOST_NAME
cd .$HOST_NAME
fi
elif [ "$TARGET" = "init" ]; then
- if [ -f "$PKG_CONFIGURE_SCRIPT" -o -f "$PKG_CMAKE_SCRIPT" ]; then
+ if [ -f "$PKG_CONFIGURE_SCRIPT" -o -f "$PKG_CMAKE_SCRIPT" -o -f "$PKG_MESON_SCRIPT" ]; then
mkdir -p .$TARGET_NAME-$TARGET
cd .$TARGET_NAME-$TARGET
fi
elif [ "$TARGET" = "bootstrap" ]; then
- if [ -f "$PKG_CONFIGURE_SCRIPT" -o -f "$PKG_CMAKE_SCRIPT" ]; then
+ if [ -f "$PKG_CONFIGURE_SCRIPT" -o -f "$PKG_CMAKE_SCRIPT" -o -f "$PKG_MESON_SCRIPT" ]; then
mkdir -p .$HOST_NAME-$TARGET
cd .$HOST_NAME-$TARGET
fi
@@ -273,6 +305,20 @@ if [ ! -f $STAMP ]; then
fi
if [ "$(type -t configure_$TARGET)" = "function" ]; then
configure_$TARGET
+ elif [ -f "$PKG_MESON_SCRIPT" -a ! "$PKG_USE_MESON" = "no" ]; then
+ if [ "$TARGET" = "target" ]; then
+ echo "Executing (target): meson $TARGET_MESON_OPTS $PKG_MESON_OPTS_TARGET $(dirname $PKG_MESON_SCRIPT)" | tr -s " "
+ meson $TARGET_MESON_OPTS $PKG_MESON_OPTS_TARGET $(dirname $PKG_MESON_SCRIPT)
+ elif [ "$TARGET" = "host" ]; then
+ echo "Executing (host): meson $HOST_MESON_OPTS $PKG_MESON_OPTS_HOST $(dirname $PKG_MESON_SCRIPT)" | tr -s " "
+ meson $HOST_MESON_OPTS $PKG_MESON_OPTS_HOST $(dirname $PKG_MESON_SCRIPT)
+ elif [ "$TARGET" = "init" ]; then
+ echo "Executing (init): meson $INIT_MESON_OPTS $PKG_MESON_OPTS_INIT $(dirname $PKG_MESON_SCRIPT)" | tr -s " "
+ meson $INIT_MESON_OPTS $PKG_MESON_OPTS_INIT $(dirname $PKG_MESON_SCRIPT)
+ elif [ "$TARGET" = "bootstrap" ]; then
+ echo "Executing (bootstrap): meson $BOOTSTRAP_MESON_OPTS $PKG_MESON_OPTS_BOOTSTRAP $(dirname $PKG_MESON_SCRIPT)" | tr -s " "
+ meson $BOOTSTRAP_MESON_OPTS $PKG_MESON_OPTS_BOOTSTRAP $(dirname $PKG_MESON_SCRIPT)
+ fi
elif [ -f "$PKG_CMAKE_SCRIPT" -a ! "$PKG_USE_CMAKE" = "no" ]; then
if [ "$TARGET" = "target" ]; then
echo "Executing (target): cmake $TARGET_CMAKE_OPTS $PKG_CMAKE_OPTS_TARGET $(dirname $PKG_CMAKE_SCRIPT)" | tr -s " "
@@ -312,7 +358,7 @@ if [ ! -f $STAMP ]; then
fi
if [ "$(type -t make_$TARGET)" = "function" ]; then
make_$TARGET
- elif [ -f "$PKG_CMAKE_SCRIPT" -a ! "$PKG_USE_CMAKE" = "no" -a ! "$PKG_USE_NINJA" = "no" ]; then
+ elif [ \( -f "$PKG_CMAKE_SCRIPT" -a ! "$PKG_USE_CMAKE" = "no" -a ! "$PKG_USE_NINJA" = "no" \) -o \( -f "$PKG_MESON_SCRIPT" -a ! "$PKG_USE_MESON" = "no" \) ]; then
if [ "$TARGET" = "target" ]; then
echo "Executing (target): ninja $PKG_MAKE_OPTS_TARGET" | tr -s " "
ninja $PKG_MAKE_OPTS_TARGET
@@ -351,7 +397,7 @@ if [ ! -f $STAMP ]; then
fi
if [ "$(type -t makeinstall_$TARGET)" = "function" ]; then
makeinstall_$TARGET
- elif [ -f "$PKG_CMAKE_SCRIPT" -a ! "$PKG_USE_CMAKE" = "no" -a ! "$PKG_USE_NINJA" = "no" ]; then
+ elif [ \( -f "$PKG_CMAKE_SCRIPT" -a ! "$PKG_USE_CMAKE" = "no" -a ! "$PKG_USE_NINJA" = "no" \) -o \( -f "$PKG_MESON_SCRIPT" -a ! "$PKG_USE_MESON" = "no" \) ]; then
if [ "$TARGET" = "target" ]; then
DESTDIR=$SYSROOT_PREFIX ninja install $PKG_MAKEINSTALL_OPTS_TARGET
DESTDIR=$INSTALL ninja install $PKG_MAKEINSTALL_OPTS_TARGET