gimp-help-2 r2591 - trunk



Author: romanofski
Date: Sat Nov  1 18:12:44 2008
New Revision: 2591
URL: http://svn.gnome.org/viewvc/gimp-help-2?rev=2591&view=rev

Log:

2008-11-01  Roman Joost  <romanofski gimp org>

	* configure.ac
	* Makefile.am: test if pngcrush and pngnq is installed, so it is
	used to optimize the image files during distribution creation


Modified:
   trunk/ChangeLog
   trunk/Makefile.am
   trunk/configure.ac

Modified: trunk/Makefile.am
==============================================================================
--- trunk/Makefile.am	(original)
+++ trunk/Makefile.am	Sat Nov  1 18:12:44 2008
@@ -411,11 +411,21 @@
 ##  Note that number of images is *huge*, and if we stick image files in
 ##  EXTRA_DIST we get an "Argument list too long" error. So we handle it here.
 
+
 dist-copy-images:
 	test -d "$(top_srcdir)/images" && test -d "$(distdir)"
 	@echo "Copying images into distdir $(distdir) ..."
 	@(cd $(top_srcdir) && tar -cf- --exclude=.svn images) \
 	| (cd $(distdir) && tar -xf-)
+if HAVE_PNGOPTIMIZERS
+	@echo "Optimizing images. This could take while."
+	@find "$(distdir)/images" $(image_find_predicates) | \
+	while read file; do \
+	 	$(PNGNQ) -e ".png.mod" -n 256 $$file; \
+		$(PNGCRUSH) -q $$file.mod $$file; \
+		rm $$file.mod; \
+	done
+endif
 	test -d "$(distdir)/images" && test ! -d "$(distdir)/images/.svn"
 
 

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Sat Nov  1 18:12:44 2008
@@ -140,6 +140,25 @@
 
 AC_SUBST(XSLTFLAGS)
 
+#  Optionally search for pngnq and pngcrush, which are helpful for
+#  creating distributions
+
+AC_PATH_PROG(PNGNQ, pngnq)
+if test -z "$PNGNQ"; then
+  AC_MSG_WARN([cannot find pngnq(1),
+Images are not optimized during distribution creation])
+fi
+
+
+
+AC_PATH_PROG(PNGCRUSH, pngcrush)
+if test -z "$PNGCRUSH"; then
+  AC_MSG_WARN([cannot find pngcrush(1),
+Images are not optimized during distribution creation])
+fi
+
+AM_CONDITIONAL(HAVE_PNGOPTIMIZERS, test -n "$PNGNQ" && test -n "$PNGCRUSH")
+
 
 #  Default to the correct way of identifying stylesheets.
 #  People need an XML catalog to resolve this to a local file.



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