[gimp] Disabled the build of the metadata plugin if libexif is disabled.



commit 75484699da6698db862df2df5814541ec55ae2a3
Author: Roman Joost <romanofski gimp org>
Date:   Mon Jul 6 10:20:39 2009 +1000

    Disabled the build of the metadata plugin if libexif is disabled.
    
    Relates to Bug 587172 - Merge Exif data with XMP model.

 configure.ac                    |    2 ++
 plug-ins/Makefile.am            |    6 +++++-
 plug-ins/metadata/exif-decode.c |    4 ----
 plug-ins/metadata/metadata.c    |    7 +------
 4 files changed, 8 insertions(+), 11 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index f987d8a..bbb81b1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1188,6 +1188,8 @@ fi
 AC_SUBST(EXIF_CFLAGS)
 AC_SUBST(EXIF_LIBS)
 
+AM_CONDITIONAL(BUILD_METADATA, test "x$have_libexif" = xyes)
+
 
 #################
 # Check for libaa
diff --git a/plug-ins/Makefile.am b/plug-ins/Makefile.am
index 25eab53..fd62823 100644
--- a/plug-ins/Makefile.am
+++ b/plug-ins/Makefile.am
@@ -47,6 +47,10 @@ if BUILD_XJT
 file_xjt = file-xjt
 endif
 
+if BUILD_METADATA
+metadata = metadata
+endif
+
 
 SUBDIRS = \
 	$(script_fu)		\
@@ -74,7 +78,7 @@ SUBDIRS = \
 	lighting		\
 	map-object		\
 	maze			\
-	metadata		\
+	$(metadata)		\
 	pagecurl		\
 	$(print)		\
 	selection-to-path	\
diff --git a/plug-ins/metadata/exif-decode.c b/plug-ins/metadata/exif-decode.c
index de1e6ad..8123ad0 100644
--- a/plug-ins/metadata/exif-decode.c
+++ b/plug-ins/metadata/exif-decode.c
@@ -30,15 +30,11 @@
 
 #include "xmp-model.h"
 #include "xmp-schemas.h"
-
 #include "exif-decode.h"
 
 
 /*  local function prototypes  */
 
-gboolean            xmp_merge_from_exifbuffer   (XMPModel    *xmp_model,
-                                                 gint32       image_ID,
-                                                 GError     **error);
 static void         exif_foreach_content_cb     (ExifContent *content,
                                                  XMPModel    *xmp_model);
 static void         exif_foreach_entry_cb       (ExifEntry   *entry,
diff --git a/plug-ins/metadata/metadata.c b/plug-ins/metadata/metadata.c
index 6010b3e..8e59a2f 100644
--- a/plug-ins/metadata/metadata.c
+++ b/plug-ins/metadata/metadata.c
@@ -29,7 +29,6 @@
 
 #include "metadata.h"
 #include "xmp-encode.h"
-
 #include "interface.h"
 #include "exif-decode.h"
 /* FIXME: uncomment when these are working
@@ -438,17 +437,13 @@ run (const gchar      *name,
     }
   else if (! strcmp (name, DECODE_EXIF_PROC))
     {
-#ifdef HAVE_EXIF
         GError      *error         = NULL;
 
-        if (! xmp_merge_from_exifbuffer (xmp_model,
-                                         image_ID,
-                                         &error))
+        if (! xmp_merge_from_exifbuffer (xmp_model, image_ID, &error))
           {
             status = GIMP_PDB_EXECUTION_ERROR;
             g_printerr ("\nExif to XMP merge failed.\n");
           }
-#endif
     }
   else if (! strcmp (name, GET_PROC))
     {



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