[gexiv2] Fix dist tarball



commit 687ed13556aed2ebdf0bdef82d7691fab5035511
Author: Jens Georg <mail jensge org>
Date:   Mon Jul 18 23:06:03 2016 +0200

    Fix dist tarball
    
    Signed-off-by: Jens Georg <mail jensge org>

 Makefile.am  |   17 ++++++++++++-----
 configure.ac |   45 +++++++++++++++++++++++++++++++++------------
 2 files changed, 45 insertions(+), 17 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 072d21d..d2baa9a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,11 +4,17 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 pkgconfigdir     = $(libdir)/pkgconfig
 GEXIV2_publicdir = $(includedir)/gexiv2
 girdir           = $(datadir)/gir-1.0
-typelibdir       = $(INTROSPECTION_TYPELIBDIR)
+typelibdir       = $(datadir)/gir-1.0
 py2gidir         = $(PYTHON2_GIDIR)
 py3gidir         = $(PYTHON3_GIDIR)
 vapidir          = $(datadir)/vala/vapi
 
+DISTCHECK_CONFIGURE_FLAGS = \
+       --enable-gtk-doc \
+       --with-python2-girdir='$${libdir}/python2/dist-packages/gi/overrides' \
+       --with-python3-girdir='$${libdir}/python3/dist-packages/gi/overrides' \
+       --enable-introspection
+
 # Extra package files. #
 EXTRA_DIST = \
        @PACKAGE_NAME  pc in    \
@@ -41,15 +47,16 @@ vapi: gexiv2.vapi
 gexiv2.vapi: gexiv2_vapi.stamp
        @true
 
-gexiv2_vapi.stamp: $(top_builddir)/GExiv2-0.10.gir $(top_srcdir)/vapi/GExiv2-0.10.metadata 
$(top_srcdir)/vapi/gexiv2-custom.vala
+gexiv2_vapi.stamp: $(top_builddir)/GExiv2-0.10.gir $(abs_top_srcdir)/vapi/GExiv2-0.10.metadata 
$(abs_top_srcdir)/vapi/gexiv2-custom.vala
        rm -f $(@F)
-       $(AM_V_GEN)$(VAPIGEN) --metadatadir=$(top_srcdir)/vapi \
+       $(AM_V_GEN)$(VAPIGEN) --metadatadir=$(abs_top_srcdir)/vapi \
                              --library=gexiv2 \
-                             $(top_builddir)/GExiv2-0.10.gir $(srcdir)/vapi/gexiv2-custom.vala
+                             $(top_builddir)/GExiv2-0.10.gir $(abs_top_srcdir)/vapi/gexiv2-custom.vala
        echo timestmap > $(@F)
 
 dist_vapi_DATA = gexiv2.vapi
-EXTRA_DIST += $(top_srcdir)/vala/GExiv2-0.10.metadata gexiv2.vapi gexiv2.stamp
+EXTRA_DIST += $(top_srcdir)/vapi/GExiv2-0.10.metadata gexiv2.vapi gexiv2_vapi.stamp 
$(top_srcdir)/vapi/gexiv2-custom.vala
+DISTCLEANFILES = gexiv2.vapi gexiv2_vapi.stamp
 
 GEXIV2_GIRHEADERS = \
        $(srcdir)/gexiv2/gexiv2.h \
diff --git a/configure.ac b/configure.ac
index da6e7a3..bc389e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -120,26 +120,47 @@ fi
 
 GOBJECT_INTROSPECTION_CHECK([0.6.4])
 
+AC_ARG_WITH([python2-girdir],
+            AS_HELP_STRING([--with-python2-girdir],
+                             [Set the GI override file install dir]),
+            [ac_py2girdir=$withval],
+            [ac_py2girdir=""])
+
+AC_ARG_WITH([python3-girdir],
+            AS_HELP_STRING([--with-python3-girdir],
+                             [Set the GI override file install dir]),
+            [ac_py3girdir=$withval],
+            [ac_py3girdir=""])
+
 enable_python2="no (introspection disabled)"
 enable_python3="no (introspection disabled)"
 if test "x$found_introspection" = "xyes"; then
     # Used to determine where Python wants the .gi file to be installed ...
     # if Python is not installed, PYTHON2 and PYTHON3 will be empty
     PYTHON="import gi; print(gi._overridesdir)"
-    PYTHON2_GIDIR=$(python2 -c "$PYTHON")
+    AS_IF([test "x$ac_py2girdir" = "x"],
+    [
+        PYTHON2_GIDIR=$(python2 -c "$PYTHON")
+    ],
+    [
+        PYTHON2_GIDIR=$ac_py2girdir
+    ])
     AC_MSG_RESULT([Python2 GObject Introspection directory: $PYTHON2_GIDIR])
-    PYTHON3_GIDIR=$(python3 -c "$PYTHON")
+
+    AS_IF([test "x$ac_py3girdir" = "x"],
+    [
+        PYTHON3_GIDIR=$(python3 -c "$PYTHON")
+    ],
+    [
+        PYTHON3_GIDIR=$ac_py3girdir
+    ])
     AC_MSG_RESULT([Python3 GObject Introspection directory: $PYTHON3_GIDIR])
-    if test "x$PYTHON2_GIDIR" != "x"; then
-        enable_python2=yes
-    else
-        enable_python2=no
-    fi
-    if test "x$PYTHON3_GIDIR" != "x"; then
-        enable_python3=yes
-    else
-        enable_python3=no
-    fi
+
+    AS_IF([test "x$PYTHON2_GIDIR" != "x"],
+          [enable_python2=yes],[enable_python2=no])
+    AS_IF([test "x$PYTHON3_GIDIR" != "x"],
+          [enable_python3=yes],[enable_python3=no])
+
     AC_SUBST(PYTHON2_GIDIR)
     AC_SUBST(PYTHON3_GIDIR)
 fi


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