[gnome-continuous] Update the e-d-s build-api patch
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous] Update the e-d-s build-api patch
- Date: Sat, 18 Feb 2017 11:17:59 +0000 (UTC)
commit 17bbc1f39f743db1d89164f1ff7d59da955bd507
Author: Emmanuele Bassi <ebassi gnome org>
Date: Sat Feb 18 11:16:43 2017 +0000
Update the e-d-s build-api patch
Use the Ninja generator for CMake, instead of the Make one. Ninja is
faster and generally better at using multi-core resources.
patches/eds-cmake-buildapi.patch | 74 +++++++++++++++++++++++++++++++------
1 files changed, 62 insertions(+), 12 deletions(-)
---
diff --git a/patches/eds-cmake-buildapi.patch b/patches/eds-cmake-buildapi.patch
index 5f99e10..6c1304e 100644
--- a/patches/eds-cmake-buildapi.patch
+++ b/patches/eds-cmake-buildapi.patch
@@ -1,31 +1,31 @@
-From 036536d42d0c0d718d61bfa008a409369af6e11a Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Javier=20Jard=C3=B3n?= <jjardon gnome org>
+From 6f2b7a5d7753deaeb9189323721d1247001ca0ab Mon Sep 17 00:00:00 2001
+From: Emmanuele Bassi <ebassi gnome org>
Date: Fri, 21 Oct 2016 04:13:24 +0530
Subject: [PATCH] build: Add a "configure" script implementing the GNOME Build
API
See http://people.gnome.org/~walters/docs/build-api.txt
-Hopefully this will turn into a generic copy/paste-able adapter for
-cmake.
+v2:
+ - Use the Ninja generator for CMake
+ - Perform various sanity checks
---
- configure | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 52 insertions(+)
+ configure | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 101 insertions(+)
create mode 100755 configure
diff --git a/configure b/configure
new file mode 100755
-index 0000000..7fa671b
+index 0000000..fd3dfbb
--- /dev/null
+++ b/configure
-@@ -0,0 +1,52 @@
+@@ -0,0 +1,101 @@
+#!/bin/bash
+# configure script adapter for cmake
+# Copyright 2010, 2011, 2013 Colin Walters <walters verbum org>
++# Copyright 2017 Emmanuele Bassi <ebassi gnome org>
+# Licensed under the new-BSD license (http://www.opensource.org/licenses/bsd-license.php)
+
-+prefix=/usr
-+
+# 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.
@@ -44,6 +44,31 @@ index 0000000..7fa671b
+ 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 CMAKE 'cmake'
++sanitycheck NINJA 'ninja' 'ninja-build'
++
+while (($# > 0)); do
+ case "${1%%=*}" in
+ --prefix) read_arg prefix "$@" || shift;;
@@ -55,6 +80,7 @@ index 0000000..7fa671b
+ --sysconfdir) read_arg sysconfdir "$@" || shift;;
+ --libdir) read_arg libdir "$@" || shift;;
+ --mandir) read_arg mandir "$@" || shift;;
++ --includedir) read_arg includedir "$@" || shift;;
+ *) echo "Ignoring unknown option '$1'";;
+ esac
+ shift
@@ -62,7 +88,30 @@ index 0000000..7fa671b
+
+srcdir=$(dirname $0)
+
-+exec cmake \
++# 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
++
++cat > Makefile <<END
++# Generated by configure; do not edit
++
++all:
++ ${NINJA}
++
++install:
++ DESTDIR="\$(DESTDIR)" ${NINJA} install
++END
++
++
++exec ${CMAKE} \
+ -DENABLE_INTROSPECTION=true \
+ -DENABLE_VALA_BINDINGS=ON \
+ -DENABLE_UOA=OFF \
@@ -70,7 +119,8 @@ index 0000000..7fa671b
+ -DENABLE_INSTALLED_TESTS=ON \
+ -DWITH_OPENLDAP=OFF \
+ -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
++ -GNinja \
+ ${srcdir}
--
-2.10.0
+2.9.3
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]