Merge pull request #6278 from Gottox/meson-build-style

common/build-style: add meson build style
This commit is contained in:
Enno Boland 2017-07-20 12:53:31 +02:00 committed by GitHub
commit 6a493a1da8
3 changed files with 30 additions and 20 deletions

View File

@ -0,0 +1,25 @@
#
# This helper is for templates using GNU configure scripts.
#
do_configure() {
: ${meson_cmd:=meson}
: ${meson_builddir:=build}
${meson_cmd} --prefix=/usr --buildtype=plain ${configure_args} . ${meson_builddir}
}
do_build() {
: ${make_cmd:=ninja}
: ${make_build_target:=all}
: ${meson_builddir:=build}
${make_cmd} -C ${meson_builddir} ${makejobs} ${make_build_args} ${make_build_target}
}
do_install() {
: ${make_cmd:=ninja}
: ${make_install_target:=install}
: ${meson_builddir:=build}
DESTDIR=${DESTDIR} ${make_cmd} -C ${meson_builddir} ${make_install_args} ${make_install_target}
}

View File

@ -8,6 +8,7 @@ makedepends="libglib-devel gtk+3-devel libpeas-devel pulseaudio-devel gnome-desk
libuuid-devel polkit-devel gettext-devel ibus-devel accountsservice-devel
upower-devel gnome-bluetooth-devel"
depends="gnome-session"
build_style="meson"
# Needs gobject-introspection and libgirepository-devel, vala, gjs ...
nocross=yes
short_desc="Budgie desktop"
@ -17,14 +18,6 @@ homepage="https://github.com/solus-project/budgie-desktop"
distfiles="https://github.com/solus-project/${pkgname}/releases/download/v${version}/${pkgname}-${version}.tar.xz"
checksum=bb37acbc6edddf64860352fac73fd968801e29ce0e66962ef2a3dd3a443d568f
do_configure() {
meson --prefix=/usr --buildtype=plain build
}
do_build() {
ninja -C build
}
do_install() {
LD=$CC DESTDIR="$DESTDIR" ninja -C build install
pre_install() {
export LD=$CC
}

View File

@ -3,6 +3,7 @@ pkgname=gnome-recipes
version=1.4.6
revision=1
_libgd_hash=97a852cdf3d37776f9c98f730d7dcbbe995bdeb7
build_style=meson
hostmakedepends="glib intltool itstool pkg-config meson git"
makedepends="gtk+3-devel gnome-autoar-devel gspell-devel libcanberra-devel
libsoup-devel"
@ -14,17 +15,8 @@ distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
checksum=792585df5cb77ee670ca9eb8e6b0fceb823fe092805c026466f01d153f3e9833
nocross=https://build.voidlinux.eu/builders/armv7l-musl_builder/builds/2155/steps/shell_3/logs/stdio
do_configure() {
pre_configure() {
# meson_post_install.py updates icon cache, desktop database etc.
# nothing that we need. It fails in this setup, so make it a nop
ln -sf /bin/true meson_post_install.py
meson --prefix=/usr --buildtype=plain build
}
do_build() {
ninja -C build
}
do_install() {
DESTDIR="$DESTDIR" ninja -C build install
}