[gnome-continuous] Build GTK+ master with Meson
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous] Build GTK+ master with Meson
- Date: Mon, 10 Jul 2017 08:30:56 +0000 (UTC)
commit 5c5386f2dfbc644c13d9194f66d1bff987aa51ab
Author: Emmanuele Bassi <ebassi gnome org>
Date: Mon Jul 10 09:29:59 2017 +0100
Build GTK+ master with Meson
Speed up the build times, and ensure that the Meson build does not go
out of sync.
manifest.json | 1 +
patches/gtk-build-api.patch | 178 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 179 insertions(+), 0 deletions(-)
---
diff --git a/manifest.json b/manifest.json
index cb69660..a334f2d 100644
--- a/manifest.json
+++ b/manifest.json
@@ -661,6 +661,7 @@
{"src": "gnome:gtk+",
"name": "gtk4",
+ "patches": ["gtk-build-api.patch"],
"config-opts": ["--enable-installed-tests",
"--enable-wayland-backend",
"--enable-x11-backend"],
diff --git a/patches/gtk-build-api.patch b/patches/gtk-build-api.patch
new file mode 100644
index 0000000..1aea8f1
--- /dev/null
+++ b/patches/gtk-build-api.patch
@@ -0,0 +1,178 @@
+From 92b756286ec0a0b8bdcd9c08303a1c1e9d7d2971 Mon Sep 17 00:00:00 2001
+From: Emmanuele Bassi <ebassi gnome org>
+Date: Wed, 3 May 2017 16:41:49 +0100
+Subject: [PATCH] Add build-api wrapper for Meson
+
+---
+ configure | 159 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 159 insertions(+)
+ create mode 100755 configure
+
+diff --git a/configure b/configure
+new file mode 100755
+index 0000000000..f1b8550926
+--- /dev/null
++++ b/configure
+@@ -0,0 +1,159 @@
++#!/bin/bash
++# configure script adapter for Meson
++# Based on build-api: https://github.com/cgwalters/build-api
++# Copyright 2010, 2011, 2013 Colin Walters <walters verbum org>
++# Copyright 2016, 2017 Emmanuele Bassi
++# Licensed under the new-BSD license (http://www.opensource.org/licenses/bsd-license.php)
++
++# Build API variables:
++
++# Little helper function for reading args from the commandline.
++# it automatically handles -a b and -a=b variants, and returns 1 if
++# we need to shift $3.
++read_arg() {
++ # $1 = arg name
++ # $2 = arg value
++ # $3 = arg parameter
++ local rematch='^[^=]*=(.*)$'
++ if [[ $2 =~ $rematch ]]; then
++ read "$1" <<< "${BASH_REMATCH[1]}"
++ else
++ read "$1" <<< "$3"
++ # There is no way to shift our callers args, so
++ # return 1 to indicate they should do it instead.
++ return 1
++ fi
++}
++
++sanitycheck() {
++ # $1 = arg name
++ # $1 = arg command
++ # $2 = arg alternates
++ local cmd=$( which $2 2>/dev/null )
++
++ if [ -x "$cmd" ]; then
++ read "$1" <<< "$cmd"
++ return 0
++ fi
++
++ test -z $3 || {
++ for alt in $3; do
++ cmd=$( which $alt 2>/dev/null )
++
++ if [ -x "$cmd" ]; then
++ read "$1" <<< "$cmd"
++ return 0
++ fi
++ done
++ }
++
++ echo -e "\e[1;31mERROR\e[0m: Command '$2' not found"
++ exit 1
++}
++
++sanitycheck MESON 'meson'
++sanitycheck MESONTEST 'mesontest'
++sanitycheck NINJA 'ninja' 'ninja-build'
++
++enable_docs='-Denable-documentation=false'
++enable_man=''
++enable_introspection=''
++
++while (($# > 0)); do
++ case "${1%%=*}" in
++ --prefix) read_arg prefix "$@" || shift;;
++ --bindir) read_arg bindir "$@" || shift;;
++ --sbindir) read_arg sbindir "$@" || shift;;
++ --libexecdir) read_arg libexecdir "$@" || shift;;
++ --datarootdir) read_arg datarootdir "$@" || shift;;
++ --datadir) read_arg datadir "$@" || shift;;
++ --sysconfdir) read_arg sysconfdir "$@" || shift;;
++ --libdir) read_arg libdir "$@" || shift;;
++ --mandir) read_arg mandir "$@" || shift;;
++ --includedir) read_arg includedir "$@" || shift;;
++ --enable-gtk-doc) enable_docs='-Denable-documentation=true';;
++ --disable-gtk-doc) enable_docs='-Denable-documentation=false';;
++ --enable-man) enable_man='';;
++ --disable-man) enable_man='';;
++ --enable-introspection) enable_introspection='';;
++ --disable-introspection) enable_introspection='';;
++ *) echo -e "\e[1;33mINFO\e[0m: Ignoring unknown option '$1'";;
++ esac
++ shift
++done
++
++# Defaults
++test -z ${prefix} && prefix="/usr/local"
++test -z ${bindir} && bindir=${prefix}/bin
++test -z ${sbindir} && sbindir=${prefix}/sbin
++test -z ${libexecdir} && libexecdir=${prefix}/bin
++test -z ${datarootdir} && datarootdir=${prefix}/share
++test -z ${datadir} && datadir=${datarootdir}
++test -z ${sysconfdir} && sysconfdir=${prefix}/etc
++test -z ${libdir} && libdir=${prefix}/lib
++test -z ${mandir} && mandir=${prefix}/share/man
++test -z ${includedir} && includedir=${prefix}/include
++
++# The source directory is the location of this file
++srcdir=$(dirname $0)
++
++# The build directory is the current location
++builddir=`pwd`
++
++# If we're calling this file from the source directory then
++# we automatically create a build directory and ensure that
++# both Meson and Ninja invocations are relative to that
++# location
++if [[ -f "${builddir}/meson.build" ]]; then
++ mkdir -p _build
++ builddir="${builddir}/_build"
++ NINJA_OPT="-C ${builddir}"
++fi
++
++# Wrapper Makefile for Ninja
++cat > Makefile <<END
++# Generated by configure; do not edit
++
++all:
++ CC="\$(CC)" CXX="\$(CXX)" ${NINJA} ${NINJA_OPT}
++
++install:
++ DESTDIR="\$(DESTDIR)" ${NINJA} ${NINJA_OPT} install
++
++check:
++ ${MESONTEST} ${NINJA_OPT}
++END
++
++echo "Summary:"
++echo " meson:....... ${MESON}"
++echo " ninja:....... ${NINJA}"
++echo " prefix:...... ${prefix}"
++echo " bindir:...... ${bindir}"
++echo " sbindir:..... ${sbindir}"
++echo " libexecdir:.. ${libexecdir}"
++echo " datarootdir:. ${datarootdir}"
++echo " datadir:..... ${datadir}"
++echo " sysconfdir:.. ${sysconfdir}"
++echo " libdir:...... ${libdir}"
++echo " mandir:...... ${mandir}"
++echo " includedir:.. ${includedir}"
++echo " additional:.."
++echo " - ${enable_docs} ${enable_man} ${enable_introspection}"
++
++exec ${MESON} \
++ --prefix=${prefix} \
++ --libdir=${libdir} \
++ --libexecdir=${libexecdir} \
++ --datadir=${datadir} \
++ --sysconfdir=${sysconfdir} \
++ --bindir=${bindir} \
++ --includedir=${includedir} \
++ --mandir=${mandir} \
++ --default-library shared \
++ ${enable_docs} \
++ ${enable_man} \
++ ${enable_introspection} \
++ ${builddir} \
++ ${srcdir}
++
++# vim: ai ts=8 noet sts=2 ft=sh
+--
+2.12.2
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]