[gitg] Patch Gitg-1.0.gir for configure time webkit dependency



commit 58e2d6e2b544f6a6a9e775faae2cc4b282e27c4c
Author: Jesse van den Kieboom <jessevdk gnome org>
Date:   Sat Aug 8 10:54:29 2015 +0200

    Patch Gitg-1.0.gir for configure time webkit dependency
    
    https://bugzilla.gnome.org/show_bug.cgi?id=735299

 configure.ac        |    4 ++++
 libgitg/Makefile.am |   17 +++++++++++++----
 2 files changed, 17 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 2ad98ed..0b36511 100644
--- a/configure.ac
+++ b/configure.ac
@@ -88,10 +88,14 @@ AC_CHECK_LIB([m], [sinf])
 # Pick from supported API versions of WebKit2
 PKG_CHECK_EXISTS([webkit2gtk-4.0], [
        WEBKIT_PKGCONFIG=webkit2gtk-4.0
+       WEBKIT_MAJOR_VERSION=4
        AC_SUBST([WEBKIT_PKGCONFIG])
+       AC_SUBST([WEBKIT_MAJOR_VERSION])
 ], [
        WEBKIT_PKGCONFIG=webkit2gtk-3.0
+       WEBKIT_MAJOR_VERSION=3
        AC_SUBST([WEBKIT_PKGCONFIG])
+       AC_SUBST([WEBKIT_MAJOR_VERSION])
 ])
 
 GLIB_REQUIRED_VERSION=2.38
diff --git a/libgitg/Makefile.am b/libgitg/Makefile.am
index 772fdbf..6b22903 100644
--- a/libgitg/Makefile.am
+++ b/libgitg/Makefile.am
@@ -21,6 +21,8 @@ libgitg_libgitg_1_0_la_LDFLAGS =      \
 libgitg_libgitg_1_0_la_LIBADD =        \
        $(LIBGITG_LIBS)
 
+GITG_GIR_IN = Gitg_in-1.0.gir
+
 libgitg_libgitg_1_0_la_VALAFLAGS =     \
        --pkg ggit-1.0                  \
        --pkg gtk+-3.0                  \
@@ -37,12 +39,18 @@ libgitg_libgitg_1_0_la_VALAFLAGS =  \
        --vapidir $(top_srcdir)/vapi    \
        --includedir libgitg            \
        --basedir $(top_srcdir)         \
-       --gir Gitg-1.0.gir              \
+       --gir $(GITG_GIR_IN)            \
        --vapi libgitg/libgitg-1.0.vapi \
        --library libgitg/libgitg-1.0   \
        --header libgitg/libgitg.h      \
        --gresources "$(top_srcdir)/libgitg/resources/resources.xml"
 
+Gitg-1.0.gir: $(GITG_GIR_IN)
+       $(SED) \
+               -e 's/<include name="WebKit2" version="[34].0"\/>/<include name="WebKit2" 
version="$(WEBKIT_MAJOR_VERSION).0"\/>/g' \
+               -e 's/Gitg_in/Gitg/g' \
+               $< >$@
+
 libgitg_libgitg_1_0_la_VALASOURCES =                   \
        libgitg/gitg-assembly-info.vala                 \
        libgitg/gitg-async.vala                         \
@@ -107,17 +115,18 @@ libgitg_resources_deps = $(call GRESDEPS,libgitg/resources/resources.xml)
 libgitg/gitg-resources.c: $(libgitg_resources_deps)
        $(GRESGEN)
 
-GITIGNOREFILES +=                                              \
-       $(libgitg_libgitg_1_0_la_gir_DATA)                      \
+GITIGNOREFILES +=                                      \
+       $(GITG_GIR_IN)                                  \
        libgitg/libgitg.h
 
 CLEANFILES +=                                          \
        $(libgitg_libgitg_1_0_la_typelib_DATA)          \
+       $(libgitg_libgitg_1_0_la_gir_DATA)              \
        libgitg/gitg-resources.c
 
 EXTRA_DIST +=                                          \
        $(libgitg_libgitg_1_0_la_pkgconfig_DATA)        \
-       $(libgitg_libgitg_1_0_la_gir_DATA)              \
+       $(GITG_GIR_IN)                                  \
        $(libgitg_resources_deps)
 
 # vi:ts=8:noet


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