[gnome-continuous] Build libical 3.0



commit a0ad1ad6870086972cd4004fc004957ba4e495b1
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Thu May 16 18:21:38 2019 +0100

    Build libical 3.0
    
    Evolution-data-server is going to require a newer libical-glib soon.

 manifest.json                        |  2 +-
 patches/libical-cmake-buildapi.patch | 79 +++++++++++++++++++++++++++++++-----
 2 files changed, 70 insertions(+), 11 deletions(-)
---
diff --git a/manifest.json b/manifest.json
index 6ec207e..91366db 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1067,7 +1067,7 @@
                  "name": "gnome-online-miners"},
 
                {"src": "libical:libical.git",
-                 "branch": "2.0",
+                 "branch": "3.0",
                 "patches": ["libical-cmake-buildapi.patch"]},
 
                {"src": "gnome:evolution-data-server.git",
diff --git a/patches/libical-cmake-buildapi.patch b/patches/libical-cmake-buildapi.patch
index 3662895..05a37e2 100644
--- a/patches/libical-cmake-buildapi.patch
+++ b/patches/libical-cmake-buildapi.patch
@@ -1,24 +1,26 @@
-From c8c32842781dd144d86c3ee8973cc15fffeabe26 Mon Sep 17 00:00:00 2001
-From: Vadim Rutkovsky <vrutkovs redhat com>
+From 7745041031b045d8ae78781dedc06bb47cf55787 Mon Sep 17 00:00:00 2001
+From: Emmanuele Bassi <ebassi gnome org>
 Date: Tue, 12 Nov 2013 10:50:07 -0500
 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
+  - Add various sanity checks
+  - Update the installation paths
 ---
- configure | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 49 insertions(+)
+ configure | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 106 insertions(+)
  create mode 100755 configure
 
 diff --git a/configure b/configure
 new file mode 100755
-index 0000000..ad28740
+index 00000000..505b9ee2
 --- /dev/null
 +++ b/configure
-@@ -0,0 +1,49 @@
+@@ -0,0 +1,106 @@
 +#!/bin/bash
 +# configure script adapter for cmake
 +# Copyright 2010, 2011, 2013 Colin Walters <walters verbum org>
@@ -44,6 +46,31 @@ index 0000000..ad28740
 +    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;;
@@ -62,12 +89,44 @@ index 0000000..ad28740
 +
 +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} \
++     -G Ninja \
 +     -DSHARED_ONLY=true \
++     -DICAL_GLIB_VAPI=true \
 +     -DGOBJECT_INTROSPECTION=true \
++     -DENABLE_GTK_DOC=false \
++     -DICAL_BUILD_DOCS=false \
 +     -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
 +     -DCMAKE_INSTALL_LIBDIR:PATH=${libdir} \
++     -DBIN_INSTALL_DIR:PATH=${bindir} \
++     -DINCLUDE_INSTALL_DIR:PATH=${includedir} \
++     -DLIB_INSTALL_DIR:PATH=${libdir} \
++     -DLIBEXEC_INSTALL_DIR:PATH=${libexecdir} \
++     -DSHARE_INSTALL_PREFIX:PATH=${datadir} \
++     -DSYSCONF_INSTALL_DIR:PATH=${sysconfdir} \
 +     ${srcdir}
 -- 
-1.8.3.1
+2.21.0
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]