Enlightenment CVS committal Author : raster Project : e17 Module : libs/epsilon
Dir : e17/libs/epsilon/src/lib Modified Files: Epsilon.c Makefile.am Log Message: check for and link to libpng by ourselves for epsilon... it relied on evas's link to png to ever work... which for evas was always optional :) caro did all the work with this patch =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/epsilon/src/lib/Epsilon.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -3 -r1.24 -r1.25 --- Epsilon.c 22 Dec 2005 09:34:15 -0000 1.24 +++ Epsilon.c 17 Jan 2006 08:50:19 -0000 1.25 @@ -1,7 +1,10 @@ #include "Epsilon.h" +#include "../config.h" #define X_DISPLAY_MISSING 1 #include <Imlib2.h> +#ifdef HAVE_PNG_H #include <png.h> +#endif #include <limits.h> #include <string.h> #include <sys/types.h> @@ -10,7 +13,6 @@ #include <stdio.h> #include <stdlib.h> #include "md5.h" -#include "../config.h" #ifndef PATH_MAX #define PATH_MAX 4096 #endif @@ -40,10 +42,12 @@ #ifdef HAVE_EPEG_H static int _epsilon_jpg_mtime_get (const char *file); #endif +#ifdef HAVE_PNG_H static FILE *_epsilon_open_png_file_reading (const char *filename); static int _epsilon_png_write (const char *file, DATA32 * ptr, int tw, int th, int sw, int sh, char *imformat, int mtime, char *uri); +#endif Epsilon * epsilon_new (const char *file) @@ -159,6 +163,7 @@ break; } #endif +#ifdef HAVE_PNG_H snprintf (buf, sizeof(buf), "%s/%s/%s.png", getenv ("HOME"), dirs[i], e->hash); if (stat (buf, &status) == 0) @@ -168,6 +173,7 @@ e->thumb = strdup (buf); break; } +#endif } return (e->thumb); } @@ -256,8 +262,11 @@ } else #endif +#ifdef HAVE_PNG_H if ((fp = _epsilon_open_png_file_reading (e->thumb))) +#endif { +#ifdef HAVE_PNG_H png_structp png_ptr = NULL; png_infop info_ptr = NULL; png_textp text_ptr; @@ -301,6 +310,7 @@ /* png_read_end(png_ptr,info_ptr); */ png_destroy_read_struct (&png_ptr, &info_ptr, (png_infopp) NULL); fclose (fp); +#endif } if ((p->eei = epsilon_exif_info_get (e))) { @@ -389,6 +399,7 @@ break; } #endif +#ifdef HAVE_PNG_H snprintf (buf, sizeof(buf), "%s/.thumbnails/%s/%s.png", home, dirs[i], e->hash); if (!stat (buf, &filestatus) && @@ -399,6 +410,7 @@ ok = 2; break; } +#endif } if (!ok) return (EPSILON_FAIL); @@ -410,7 +422,11 @@ epsilonmtime = _epsilon_jpg_mtime_get (buf); else #endif + { +#ifdef HAVE_PNG_H epsilonmtime = _epsilon_png_mtime_get (buf); +#endif + } if (filemtime == epsilonmtime) return (EPSILON_OK); } @@ -552,6 +568,7 @@ snprintf (format, sizeof(format), "image/%s", imlib_image_format ()); } +#ifdef HAVE_PNG_H if (tmp) { iw = imlib_image_get_width (); @@ -592,6 +609,7 @@ } } +#endif if (ee) ecore_evas_free(ee); } return (EPSILON_FAIL); @@ -635,6 +653,7 @@ } #endif +#ifdef HAVE_PNG_H static FILE * _epsilon_open_png_file_reading (const char *filename) { @@ -865,3 +884,4 @@ return (ret); } +#endif =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/epsilon/src/lib/Makefile.am,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- Makefile.am 2 Sep 2005 20:13:21 -0000 1.7 +++ Makefile.am 17 Jan 2006 08:50:19 -0000 1.8 @@ -6,7 +6,7 @@ MAINTAINERCLEANFILES = Makefile.in SUBDIRS = exiftags -INCLUDES = @IMLIB2_CFLAGS@ @EPEG_CFLAGS@ @ECORE_CFLAGS@ @EVAS_CFLAGS@ @EDJE_CFLAGS@ +INCLUDES = @IMLIB2_CFLAGS@ @EPEG_CFLAGS@ @PNG_CFLAGS@ @ECORE_CFLAGS@ @EVAS_CFLAGS@ @EDJE_CFLAGS@ lib_LTLIBRARIES = libepsilon.la include_HEADERS = Epsilon.h @@ -15,6 +15,6 @@ Epsilon_Exif.c \ md5.c md5.h -libepsilon_la_LIBADD = exiftags/libepsilon_exiftags.la @IMLIB2_LIBS@ @EPEG_LIBS@ @ECORE_LIBS@ @EVAS_LIBS@ @EDJE_LIBS@ +libepsilon_la_LIBADD = exiftags/libepsilon_exiftags.la @IMLIB2_LIBS@ @EPEG_LIBS@ @PNG_LIBS@ @ECORE_LIBS@ @EVAS_LIBS@ @EDJE_LIBS@ libepsilon_la_DEPENDENCIES = ../config.h libepsilon_la_LDFLAGS = $(LDFLAGS) -version-info 0:1:0 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs