summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Marc-Antoine Perennou <keruspe@exherbo.org> 2017-10-02 13:08:50 +0200
committerAvatar Marc-Antoine Perennou <keruspe@exherbo.org> 2017-10-02 15:05:49 +0200
commitae41048507ad85ee773cb954885eef3ac617a5d5 (patch)
treeaff5140b7c0be2746da3059de1d384f3370cb0a3
parent1b7265f718bc5363e34c2e028b7c559cb5d070cc (diff)
downloadarbor-ae41048507ad85ee773cb954885eef3ac617a5d5.tar.gz
arbor-ae41048507ad85ee773cb954885eef3ac617a5d5.tar.xz
systemd: switch to meson
Signed-off-by: Marc-Antoine Perennou <keruspe@exherbo.org>
-rw-r--r--packages/sys-apps/systemd/systemd-234-r4.exheres-0 (renamed from packages/sys-apps/systemd/systemd-234-r3.exheres-0)0
-rw-r--r--packages/sys-apps/systemd/systemd.exlib278
2 files changed, 129 insertions, 149 deletions
diff --git a/packages/sys-apps/systemd/systemd-234-r3.exheres-0 b/packages/sys-apps/systemd/systemd-234-r4.exheres-0
index 747877e..747877e 100644
--- a/packages/sys-apps/systemd/systemd-234-r3.exheres-0
+++ b/packages/sys-apps/systemd/systemd-234-r4.exheres-0
diff --git a/packages/sys-apps/systemd/systemd.exlib b/packages/sys-apps/systemd/systemd.exlib
index 5387cc2..c7372a5 100644
--- a/packages/sys-apps/systemd/systemd.exlib
+++ b/packages/sys-apps/systemd/systemd.exlib
@@ -1,18 +1,18 @@
# Copyright 2010-2016 Wulf C. Krueger <philantrop@exherbo.org>
# Distributed under the terms of the GNU General Public License v2
-require autotools [ supported_autoconf=[ 2.5 ] supported_automake=[ 1.15 ] ] \
- github [ tag=v${PV} ] \
+require github [ tag=v${PV} ] \
+ meson \
alternatives \
kernel \
test-dbus-daemon \
udev-rules \
pam \
option-renames [ renames=[ 'journal-push libcurl' ] ] \
- python [ blacklist="2" multibuild=false with_opt=true option_name="man-index" ] \
+ python [ blacklist="2" multibuild=false ] \
toolchain-funcs
-export_exlib_phases pkg_pretend pkg_setup src_prepare src_configure src_test src_install pkg_postinst
+export_exlib_phases pkg_pretend pkg_setup src_prepare src_test src_install pkg_postinst
SUMMARY="${PN} System and Service Manager"
DESCRIPTION="
@@ -57,7 +57,6 @@ MYOPTIONS="
journal-gateway [[ description = [ Enable journal gateway daemon to access the journal via HTTP and JSON ] ]]
libcurl [[ description = [ Support pushing journal data to a remote system ] ]]
lz4 [[ description = [ Use LZ4 compression for longer journal fields ] ]]
- man-index [[ description = [ Build the man page index ] ]]
nat [[ description = [ Enable minimal firewall support for NAT ] ]]
polkit [[ description = [ Use PolicyKit for privileged operations ] ]]
qrencode [[ description = [ For transferring the journal verification key to a smartphone ] ]]
@@ -72,15 +71,13 @@ DEPENDENCIES="
build:
app-text/docbook-xml-dtd:4.5 [[ note = [ for creating the man pages (used in {less-variables,standard-options}.xml) ] ]]
dev-libs/libxslt [[ note = [ for creating the man pages ] ]]
+ dev-python/lxml[python_abis:*(-)?]
dev-util/gperf[>=3.0.4] [[ note = [ for keymap ] ]]
dev-util/intltool[>=0.51.0]
sys-devel/gcc:*[>=4.9] [[ note = [ Older gcc have some issues building systemd ] ]]
sys-devel/gettext
sys-kernel/linux-headers[>=3.10]
virtual/pkg-config[>=0.20]
- man-index? (
- dev-python/lxml[python_abis:*(-)?]
- )
build+run:
app-arch/xz
dev-util/elfutils[>=0.158]
@@ -177,6 +174,8 @@ systemd_pkg_pretend() {
}
systemd_pkg_setup() {
+ meson_pkg_setup
+
exdirectory --allow /etc/binfmt.d
exdirectory --allow /etc/modules-load.d
exdirectory --allow /etc/sysctl.d
@@ -186,152 +185,133 @@ systemd_pkg_setup() {
}
systemd_src_prepare() {
+ meson_src_prepare
+
if [[ -d ${FILES}/patches-${PV} ]]; then
expatch -p1 "${FILES}"/patches-${PV}
fi
- if ! option gcrypt ; then
- edo sed -i -e "/man page index/ a AC_DEFUN([AM_PATH_LIBGCRYPT],/bin/false)" configure.ac
- fi
-
- # Put pkgconfig files in the correct location
- edo sed -i -e '/pkgconfigdatadir/s:$(datadir):$(libdir):' Makefile.am
-
- # Architecture independent factory files shouldn't go into $(prefix)/
- edo sed -i -e '/factory_etcdir/s:$(prefix):/usr:' Makefile.am
- edo sed -i -e '/factory_pamdir/s:$(prefix):/usr:' Makefile.am
-
- # Paludis really hates the progress bar so let's disable it.
- edo sed -i -e "/journal_file_verify/s:true:false:" src/journal/test-journal-verify.c
-
- # Disable tests that need root privs.
- edo sed -i -e '/test-unit-name/s:test-unit-name:$(NULL):' Makefile.am
- edo sed -i -e '/test-unit-file/s:test-unit-file:$(NULL):' Makefile.am
- edo sed -i -e '/test-sched-prio/s:test-sched-prio:$(NULL):' Makefile.am
-
- # Broken.
- edo sed -i -e '/test-util/s:test-util:$(NULL):' Makefile.am
- edo sed -i -e '/test-bus-gvariant/s:test-bus-gvariant:$(NULL):' Makefile.am
- edo sed -i -e '/test-bus-cleanup/s:test-bus-cleanup:$(NULL):' Makefile.am
- edo sed -i -e '/test-compress/s:test-compress[^ ]*:$(NULL):' Makefile.am
- edo sed -i -e '/test-rtnl/s:test-rtnl[^ ]*:$(NULL):' Makefile.am
- edo sed -i -e '/test-cgroup-mask/s:test-cgroup-mask:$(NULL):' Makefile.am
- edo sed -i -e '/test-engine/s:test-engine:$(NULL):' Makefile.am
- edo sed -i -e '/test-cap-list/s:test-cap-list:$(NULL):' Makefile.am
- edo sed -i -e '/sysv-generator-test.py/s:sysv-generator-test.py:$(NULL):' Makefile.am
- edo sed -i -e '/test-condition/s:test-condition:$(NULL):' Makefile.am
- edo sed -i -e '/test-path/s:test-path[^ ]*:$(NULL):' Makefile.am
- edo sed -i -e '/test-pty/s:test-pty[^ ]*:$(NULL):' Makefile.am
- edo sed -i -e '/test\/$(NULL) \\/d' Makefile.am
-
- edo intltoolize --force --automake
- autotools_src_prepare
+ edo sed -e "s/(prefixdir, 'lib/(rootprefixdir, 'lib/" -i meson.build
+ edo sed -e "s:doc/${PN}:doc/${PNVR}:" -i meson.build
+ edo sed -e "s/'objcopy'/'${OBJCOPY}'/" -i src/boot/efi/meson.build
}
-systemd_src_configure() {
- local myconfig=(
- # Disable -fuse-ld=gold
- # Works around a bug in binutils[<2.26].
- cc_cv_LDFLAGS__Wl__fuse_ld_gold=no
-
- --with-rootprefix=/usr/$(exhost --target)
- --libexecdir=/usr/$(exhost --target)/lib
- --localstatedir=/var
- --enable-backlight
- --enable-binfmt
- --enable-blkid
- --enable-bzip2
- --enable-coredump
- --enable-dbus
- --enable-elfutils
- --enable-environment-d
- --enable-firstboot
- --enable-hibernate
- --enable-hostnamed
- --enable-hwdb
- --enable-kmod
- --enable-ldconfig
- --enable-localed
- --enable-logind
- --enable-machined
- --enable-manpages
- --enable-myhostname
- --enable-networkd
- --enable-nss-systemd
- --enable-pam
- --enable-quotacheck
- --enable-randomseed
- --enable-resolved
- --enable-rfkill
- --enable-sysusers
- --enable-tmpfiles
- --enable-timedated
- --enable-timesyncd
- --enable-utmp
- --enable-vconsole
- --enable-wheel-group
- --enable-xz
- --enable-zlib
- --disable-adm-group
- --disable-audit
- --disable-apparmor
- --disable-glib
- --disable-ima
- --disable-libidn2
- --disable-smack
- --disable-tpm
- --with-certificate-root=/etc/ssl
- --with-debug-tty=/dev/tty9
- --with-default-dnssec=allow-downgrade
- --with-default-hierarchy=hybrid
- --with-efi-includedir=/usr/$(exhost --target)/include
- --with-efi-libdir=/usr/$(exhost --target)/lib
- --with-fallback-hostname=localhost
- --with-kbd-loadkeys=/bin/loadkeys
- --with-kbd-setfont=/bin/setfont
- --with-nobody-group=nobody
- --with-nobody-user=nobody
- --with-pamconfdir=/etc/pam.d
- --with-pamlibdir=/usr/$(exhost --target)/lib/security
- # Disable SysV init compatibility.
- --with-rc-local-script-path-start=""
- --with-rc-local-script-path-stop=""
- --with-sysvinit-path=""
- --with-sysvrcnd-path=""
- --with-tty-gid=5
- --with-ntp-servers="0.exherbo.pool.ntp.org 1.exherbo.pool.ntp.org 2.exherbo.pool.ntp.org 3.exherbo.pool.ntp.org"
- # Keep lingering processes (e. g. tmux, screen) after the user logs out
- --without-kill-user-processes
- --without-rpmmacrosdir
- $(option_enable acl)
- $(option_enable cryptsetup libcryptsetup)
- $(option_enable efi)
- $(option_enable efi gnuefi)
- $(option_enable gcrypt)
- $(option_enable gnutls)
- $(option_enable idn idn)
- $(option_enable idn libidn)
- $(option_enable importd)
- $(option_enable journal-gateway microhttpd)
- $(option_enable libcurl)
- $(option_enable lz4)
- $(option_enable nat libiptc)
- $(option_enable polkit)
- $(option_enable qrencode)
- $(option_enable seccomp)
- $(option_enable selinux)
- $(option_enable xkbcommon)
- $(option_with bash-completion bashcompletiondir /usr/share/bash-completion/completions)
- $(option_with gcrypt libgcrypt-prefix /usr/$(exhost --target))
- $(option_with man-index python)
- $(option_with zsh-completion zshcompletiondir /usr/share/zsh/site-functions)
- )
-
- # Let systemd's configure get the gcc provided ones for slim lto objects
- unset AR NM RANLIB
+MESON_SRC_CONFIGURE_PARAMS=(
+ -Dlibexecdir=/usr/$(exhost --target)/lib
+ -Dlocalstatedir=/var
+
+ -Dsplit-usr=false
+ -Drootlibdir=/usr/$(exhost --target)/lib
+ -Drootprefix=/usr/$(exhost --target)
+ -Dlink-udev-shared=true
+
+ -Dsysvinit-path=""
+ -Dsysvrcnd-path=""
+ -Dtelinit-path=""
+ -Drc-local=""
+ -Dhalt-local=""
+
+ -Ddebug-tty=/dev/tty9
+
+ -Dutmp=true
+ -Dhibernate=true
+ -Dldconfig=true
+ -Dresolved=true
+ -Dtpm=true
+ -Denvironment-d=true
+ -Dbinfmt=true
+ -Dcoredump=true
+ -Dlogind=true
+ -Dhostnamed=true
+ -Dlocaled=true
+ -Dmachined=true
+ -Dnetworkd=true
+ -Dtimedated=true
+ -Dtimesyncd=true
+ -Dmyhostname=true
+ -Dfirstboot=true
+ -Drandomseed=true
+ -Dbacklight=true
+ -Dvconsole=true
+ -Dquotacheck=true
+ -Dsysusers=true
+ -Dtmpfiles=true
+ -Dhwdb=true
+ -Drfkill=true
+ -Dman=true
+ -Dhtml=false
+
+ -Dcertificate-root=/etc/ssl
+ -Dpkgconfigdatadir=/usr/$(exhost --target)/lib/pkgconfig
+ -Drpmmacrosdir=no
+ -Dpamconfdir=/etc/pam.d
+ -Dpamlibdir=/usr/$(exhost --target)/lib/security
+
+ -Dfallback-hostname=localhost
+ -Ddefault-hierarchy=hybrid
+ -Dtty-gid=5
+ -Dadm-group=false
+ -Dwheel-group=true
+ -Dnobody-user=nobody
+ -Dnobody-group=nobody
+ -Ddefault-kill-user-processes=false
+ -Dgshadow=true
+
+ -Ddefault-dnssec=allow-downgrade
+ -Dntp-servers="0.exherbo.pool.ntp.org 1.exherbo.pool.ntp.org 2.exherbo.pool.ntp.org 3.exherbo.pool.ntp.org"
+
+ -Dapparmor=false
+ -Dsmack=false
+ -Dima=false
+
+ -Daudit=false
+ -Dblkid=true
+ -Dkmod=true
+ -Dpam=true
+ -Dlibidn2=false
+ -Dnss-systemd=true
+ -Delfutils=true
+ -Dzlib=true
+ -Dbzip2=true
+ -Dxz=true
+ -Dglib=false
+ -Ddbus=true
+
+ -Defi-cc=${CC}
+ -Defi-ld=${LD}
+ -Defi-libdir=/usr/$(exhost --target)/lib
+ -Defi-includedir=/usr/$(exhost --target)/include/efi
+
+ -Dtests=true
+)
+
+MESON_SRC_CONFIGURE_OPTION_SWITCHES=(
+ efi
+ 'journal-gateway remote'
+ importd
+
+ seccomp
+ selinux
+ polkit
- econf "${myconfig[@]}"
-}
+ acl
+ 'journal-gateway microhttpd'
+ 'cryptsetup libcryptsetup'
+ libcurl
+ idn
+ 'idn libidn'
+ 'nat libiptc'
+ qrencode
+ gcrypt
+ gnutls
+ lz4
+ xkbcommon
+
+ 'efi gnu-efi'
+
+ 'bash-completion bashcompletiondir /usr/share/bash-completion/completions no'
+ 'zsh-completion zshcompletiondir /usr/share/zsh/site-functions no'
+)
systemd_src_test() {
if exhost --is-native -q; then
@@ -369,7 +349,7 @@ systemd_src_install() {
)
done
- default
+ meson_src_install
# alternatives
local a
@@ -406,7 +386,7 @@ systemd_src_install() {
# Install the legacy.conf tmpdirs.d config file.
# systemd does not install it itself if SysV compatibility is not enabled.
insinto /usr/${host}/lib/tmpfiles.d
- doins "${WORK}"/tmpfiles.d/legacy.conf
+ doins "${MESON_SOURCE}"/tmpfiles.d/legacy.conf
insinto /etc