[gimp] tools: invert-svg is a build-only tool.
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] tools: invert-svg is a build-only tool.
- Date: Sun, 12 Jun 2016 12:11:29 +0000 (UTC)
commit 18b0468cc9fb577ce50e6faf9188b36c57a6968a
Author: Jehan <jehan girinstud io>
Date: Sun Jun 12 04:25:53 2016 +0200
tools: invert-svg is a build-only tool.
It must be built with a native compiler and native libs only.
configure.ac | 16 ++++++++++++++++
icons/Symbolic-Inverted/Makefile.am | 8 ++++----
tools/Makefile.am | 11 +++++------
3 files changed, 25 insertions(+), 10 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 36d0999..ce00b8a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2073,6 +2073,22 @@ if test "x$enable_vector_icons" = "xyes"; then
fi
fi
fi
+
+if test "x$enable_vector_icons" = "xyes"; then
+ AX_PROG_CC_FOR_BUILD
+
+ # We must not use $PKG_CONFIG nor PKG_CHECK_* macros because we need
+ # to make sure we use the native pkg-config (in case we cross-compile).
+ if pkg-config --atleast-version=glib_required_version glib-2.0 &&
+ pkg-config gio-2.0; then
+ NATIVE_GLIB_LIBS=`pkg-config --libs gio-2.0 glib-2.0`
+ NATIVE_GLIB_CFLAGS=`pkg-config --cflags gio-2.0 glib-2.0`
+ else
+ enable_vector_icons="no (missing native glib > glib_required_version or gio)"
+ fi
+fi
+AC_SUBST(NATIVE_GLIB_LIBS)
+AC_SUBST(NATIVE_GLIB_CFLAGS)
AM_CONDITIONAL(ENABLE_VECTOR_ICONS, test "x$enable_vector_icons" = "xyes")
if test "x$enable_vector_icons" = "xyes"; then
diff --git a/icons/Symbolic-Inverted/Makefile.am b/icons/Symbolic-Inverted/Makefile.am
index a44397b..6fd7a9c 100644
--- a/icons/Symbolic-Inverted/Makefile.am
+++ b/icons/Symbolic-Inverted/Makefile.am
@@ -32,13 +32,13 @@ scalable/gimp-color-picker-white.svg: $(top_builddir)/icons/Symbolic/scalable/gi
mkdir -p scalable && $(top_builddir)/tools/invert-svg $< $@
# Rule for all other scalable icons.
-scalable/%.svg: ../Symbolic/scalable/%.svg ../../tools/invert-svg
+scalable/%.svg: ../Symbolic/scalable/%.svg $(top_builddir)/tools/invert-svg$(BUILD_EXEEXT)
mkdir -p scalable && \
- $(top_builddir)/tools/invert-svg $< $@
+ $(top_builddir)/tools/invert-svg$(BUILD_EXEEXT) $< $@
-24/%.svg: ../Symbolic/24/%.svg ../../tools/invert-svg
+24/%.svg: $(top_srcdir)/icons/Symbolic/24/%.svg $(top_builddir)/tools/invert-svg$(BUILD_EXEEXT)
mkdir -p scalable && \
- $(top_builddir)/tools/invert-svg $< $@
+ $(top_builddir)/tools/invert-svg$(BUILD_EXEEXT) $< $@
# We are basically repeating the same rule for every subdirectory, which
# is very dirty. But this is the only way we found to have a rule
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 4de2be2..4505e4b 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -3,7 +3,7 @@
libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la
if ENABLE_VECTOR_ICONS
-svg_icon_tools = invert-svg compute-svg-viewbox
+svg_icon_tools = compute-svg-viewbox
else
svg_icon_tools =
endif
@@ -50,11 +50,8 @@ test_clipboard_LDADD = \
$(GTK_LIBS)
if ENABLE_VECTOR_ICONS
-invert_svg_SOURCES = invert-svg.c
-
-invert_svg_LDADD = \
- $(GLIB_LIBS) \
- $(GIO_LIBS)
+invert-svg$(BUILD_EXEEXT): invert-svg.c
+ $(CC_FOR_BUILD) -o $@ $< $(NATIVE_GLIB_LIBS) $(NATIVE_GLIB_CFLAGS)
compute_svg_viewbox_SOURCES = compute-svg-viewbox.c
@@ -63,6 +60,8 @@ compute_svg_viewbox_CFLAGS = \
compute_svg_viewbox_LDADD = \
$(SVG_LIBS)
+
+all: invert-svg$(BUILD_EXEEXT)
endif
AM_CPPFLAGS = \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]