[gegl] Fix more issues with seamless clone build



commit 73c5eba7ce11beba0e164fd27156ee224774da18
Author: Daniel Sabo <DanielSabo gmail com>
Date:   Wed May 15 18:16:57 2013 -0700

    Fix more issues with seamless clone build
    
    * Fix link flags for libgegl-sc.so.
    * Change default error string from NULL to "", NULL is not a
      valid value for a chant string.

 configure.ac                                       |    2 +-
 operations/common/seamless-clone/Makefile.am       |   17 ++++++++++++-----
 .../common/seamless-clone/seamless-clone-compose.c |    6 +++---
 operations/common/seamless-clone/seamless-clone.c  |    8 ++++----
 4 files changed, 20 insertions(+), 13 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index fc6bfff..0cbeef0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1022,7 +1022,7 @@ AC_SUBST(UMFPACK_LIBS)
 have_p2tc="no"
 PKG_CHECK_MODULES(P2TC, poly2tri-c >= poly2tri-c_required_version,
   have_p2tc="yes",
-  have_p2tc="yes  (installed poly2tri-c not found, using local version)")
+  have_p2tc="yes (internal)")
 
 AM_CONDITIONAL(HAVE_P2TC, test "$have_p2tc" = "yes")
 
diff --git a/operations/common/seamless-clone/Makefile.am b/operations/common/seamless-clone/Makefile.am
index bd570d8..36e2464 100644
--- a/operations/common/seamless-clone/Makefile.am
+++ b/operations/common/seamless-clone/Makefile.am
@@ -1,8 +1,5 @@
 include $(top_srcdir)/operations/Makefile-common.am
 
-AM_LDFLAGS += $(P2TC_LIBS)
-AM_CFLAGS  += $(P2TC_CFLAGS)
-
 ##################################################################
 # A shared library for direct access to the seamless cloning API #
 ##################################################################
@@ -26,6 +23,12 @@ libgegl_sc_ GEGL_API_VERSION@_la_SOURCES = \
        $(GEGL_SC_public_HEADERS)       \
        $(GEGL_SC_SOURCES)
 
+libgegl_sc_ GEGL_API_VERSION@_la_LDFLAGS = \
+       -avoid-version -export-dynamic $(no_undefined) $(P2TC_LIBS)
+
+libgegl_sc_ GEGL_API_VERSION@_la_CFLAGS = \
+  $(AM_CFLAGS) $(P2TC_CFLAGS)
+
 lib_LTLIBRARIES = libgegl-sc- GEGL_API_VERSION@.la
 
 libgegl_sc_ GEGL_API_VERSION@_la_LIBADD = \
@@ -38,16 +41,20 @@ pkgconfig_DATA = gegl-sc-$(GEGL_API_VERSION).pc
 # Seamless cloning operations #
 ###############################
 
-AM_LDFLAGS += $(op_libs)
-AM_CFLAGS  += $(op_cflags)
+AM_LDFLAGS += $(P2TC_LDLAGS)
+AM_CFLAGS += $(P2TC_CFLAGS)
+
+LIBS = $(op_libs)
 
 # A simple seamless cloning operation
 seamless_clone_la_SOURCES = seamless-clone.c
 seamless_clone_la_LIBADD = libgegl-sc- GEGL_API_VERSION@.la
+seamless_clone_la_DEPENDENCIES = libgegl-sc- GEGL_API_VERSION@.la
 
 # A composing operation for using the seamless cloning
 seamless_clone_compose_la_SOURCES = seamless-clone-compose.c
 seamless_clone_compose_la_LIBADD = libgegl-sc- GEGL_API_VERSION@.la
+seamless_clone_compose_la_DEPENDENCIES = libgegl-sc- GEGL_API_VERSION@.la
 
 # Install both the operations in the op dir
 #
diff --git a/operations/common/seamless-clone/seamless-clone-compose.c 
b/operations/common/seamless-clone/seamless-clone-compose.c
index 17af2c5..3b767af 100644
--- a/operations/common/seamless-clone/seamless-clone-compose.c
+++ b/operations/common/seamless-clone/seamless-clone-compose.c
@@ -21,13 +21,13 @@
 gegl_chant_int (max_refine_steps, _("Refinement Steps"), 0, 100000.0, 2000,
                 _("Maximal amount of refinement points to be used for the interpolation mesh"))
 
-gegl_chant_int (xoff, _("X offset"), -100000, +100000, 0,
+gegl_chant_int (xoff, _("X offset"), -100000, 100000, 0,
                 _("How much horizontal offset should applied to the paste"))
 
-gegl_chant_int (yoff, _("Y offset"), -100000, +100000, 0,
+gegl_chant_int (yoff, _("Y offset"), -100000, 100000, 0,
                 _("How much vertical offset should applied to the paste"))
 
-gegl_chant_string (error_msg, _("Error message"), NULL, _("An error message in case of a failure"))
+gegl_chant_string (error_msg, _("Error message"), "", _("An error message in case of a failure"))
 #else
 
 #define GEGL_CHANT_TYPE_META
diff --git a/operations/common/seamless-clone/seamless-clone.c 
b/operations/common/seamless-clone/seamless-clone.c
index adbf056..9fec9f1 100644
--- a/operations/common/seamless-clone/seamless-clone.c
+++ b/operations/common/seamless-clone/seamless-clone.c
@@ -21,13 +21,13 @@
 gegl_chant_int (max_refine_steps, _("Refinement Steps"), 0, 100000.0, 2000,
                 _("Maximal amount of refinement points to be used for the interpolation mesh"))
 
-gegl_chant_int (xoff, _("X offset"), -100000, +100000, 0,
+gegl_chant_int (xoff, _("X offset"), -100000, 100000, 0,
                 _("How much horizontal offset should applied to the paste"))
 
-gegl_chant_int (yoff, _("Y offset"), -100000, +100000, 0,
+gegl_chant_int (yoff, _("Y offset"), -100000, 100000, 0,
                 _("How much vertical offset should applied to the paste"))
 
-gegl_chant_string (error_msg, _("Error message"), NULL, _("An error message in case of a failure"))
+gegl_chant_string (error_msg, _("Error message"), "", _("An error message in case of a failure"))
 #else
 
 #define GEGL_CHANT_TYPE_COMPOSER
@@ -154,7 +154,7 @@ process (GeglOperation       *operation,
       switch (error)
         {
           case GEGL_SC_CREATION_ERROR_NONE:
-            o->error_msg = NULL;
+            o->error_msg = "";
             props->is_valid = TRUE;
             break;
           case GEGL_SC_CREATION_ERROR_EMPTY:


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