From: Enlightenment S. <no-...@en...> - 2011-02-04 09:36:28
|
Log: * configure.ac: Support Evil inclusion and better pkg-config support. * src/lib/Makefile.am: Useless preprocessor flag. * src/lib/mupdf/epdf_mupdf_document.c: Use Evil for asprintf on Windows. * src/lib/mupdf/epdf_mupdf_index.c: use correctly Eina_List lists. Author: caro Date: 2011-02-04 01:36:21 -0800 (Fri, 04 Feb 2011) New Revision: 56706 Trac: http://trac.enlightenment.org/e/changeset/56706 Modified: trunk/PROTO/epdf/ChangeLog trunk/PROTO/epdf/configure.ac trunk/PROTO/epdf/src/lib/Makefile.am trunk/PROTO/epdf/src/lib/mupdf/epdf_mupdf_document.c trunk/PROTO/epdf/src/lib/mupdf/epdf_mupdf_index.c Modified: trunk/PROTO/epdf/ChangeLog =================================================================== --- trunk/PROTO/epdf/ChangeLog 2011-02-04 09:16:11 UTC (rev 56705) +++ trunk/PROTO/epdf/ChangeLog 2011-02-04 09:36:21 UTC (rev 56706) @@ -1,3 +1,17 @@ +2011-02-04 Vincent Torri <doursse at users dot sf dot net> + + * configure.ac: + Support Evil inclusion and better pkg-config support. + + * src/lib/Makefile.am: + Useless preprocessor flag. + + * src/lib/mupdf/epdf_mupdf_document.c: + Use Evil for asprintf on Windows. + + * src/lib/mupdf/epdf_mupdf_index.c: + use correctly Eina_List lists. + 2010-07-02 Vincent Torri <doursse at users dot sf dot net> * src/bin/epdf_esmart_test.c: Modified: trunk/PROTO/epdf/configure.ac =================================================================== --- trunk/PROTO/epdf/configure.ac 2011-02-04 09:16:11 UTC (rev 56705) +++ trunk/PROTO/epdf/configure.ac 2011-02-04 09:36:21 UTC (rev 56706) @@ -30,8 +30,6 @@ ### Default options with respect to host -requirements_epdf="evas >= 1.0.0 ecore >= 1.0.0" - ### Additional options to configure # mupdf @@ -105,19 +103,28 @@ ### Checks for libraries +requirements_epdf="ecore >= 1.0.0 evas >= 1.0.0" + +case "$host_os" in + mingw*) + requirements_epdf="${requirements_epdf} evil" + AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if evil package is installed]) + ;; +esac + BUILD_MUPDF_CJK_FONTS="" if test "x${want_mupdf}" = "xyes" ; then PKG_CHECK_MODULES(FREETYPE, [freetype2]) - PKG_CHECK_MODULES(EPDF, [evas >= 1.0.0 eina >= 1.0.0]) + PKG_CHECK_MODULES(EPDF, [${requirements_epdf}]) backend="mupdf" if ! test "x${want_mupdf_cjk}" = "xyes" ; then BUILD_MUPDF_CJK_FONTS="-DNOCJK" fi else - PKG_CHECK_MODULES(EPDF, [poppler evas >= 1.0.0 eina >= 1.0.0]) + requirements_epdf="poppler ${requirements_epdf}" + PKG_CHECK_MODULES(EPDF, [${requirements_epdf}]) POPPLER_VERSION=`${PKG_CONFIG} --modversion poppler` AC_DEFINE_UNQUOTED([POPPLER_VERSION], ["${POPPLER_VERSION}"], [Poppler version.]) - requirements_epdf="poppler ${requirements_epdf}" backend="poppler" fi Modified: trunk/PROTO/epdf/src/lib/Makefile.am =================================================================== --- trunk/PROTO/epdf/src/lib/Makefile.am 2011-02-04 09:16:11 UTC (rev 56705) +++ trunk/PROTO/epdf/src/lib/Makefile.am 2011-02-04 09:36:21 UTC (rev 56706) @@ -43,7 +43,6 @@ libepdf_la_CPPFLAGS = \ -I$(top_srcdir)/src/lib \ -I$(top_builddir)/src/lib \ -@EFL_EPDF_BUILD@ \ @EPDF_CFLAGS@ if BUILD_EPDF_MUPDF Modified: trunk/PROTO/epdf/src/lib/mupdf/epdf_mupdf_document.c =================================================================== --- trunk/PROTO/epdf/src/lib/mupdf/epdf_mupdf_document.c 2011-02-04 09:16:11 UTC (rev 56705) +++ trunk/PROTO/epdf/src/lib/mupdf/epdf_mupdf_document.c 2011-02-04 09:36:21 UTC (rev 56706) @@ -7,6 +7,10 @@ #include <fitz.h> #include <mupdf.h> +#ifdef HAVE_EVIL +# include <Evil.h> +#endif + #include "Epdf.h" #include "epdf_mupdf_private.h" Modified: trunk/PROTO/epdf/src/lib/mupdf/epdf_mupdf_index.c =================================================================== --- trunk/PROTO/epdf/src/lib/mupdf/epdf_mupdf_index.c 2011-02-04 09:16:11 UTC (rev 56705) +++ trunk/PROTO/epdf/src/lib/mupdf/epdf_mupdf_index.c 2011-02-04 09:36:21 UTC (rev 56706) @@ -9,7 +9,7 @@ #include "epdf_mupdf_private.h" -static void epdf_index_fill(Eina_List *items, pdf_outline *entry); +static void epdf_index_fill(Eina_List **items, pdf_outline *entry); static void epdf_index_unfill(Eina_List *items); /* Index item */ @@ -147,7 +147,7 @@ if (!doc->outline) return index; - epdf_index_fill(index, doc->outline); + epdf_index_fill(&index, doc->outline); return index; } @@ -162,21 +162,18 @@ } static void -epdf_index_fill(Eina_List *items, pdf_outline *entry) +epdf_index_fill(Eina_List **items, pdf_outline *entry) { Epdf_Index_Item *item; - if (!items || !entry) - return; - item = epdf_index_item_new(); item->title = entry->title; item->link = entry->link; - items = eina_list_append (items, item); + *items = eina_list_append (*items, item); if (entry->child) - epdf_index_fill(item->children, entry->child); + epdf_index_fill(&item->children, entry->child); if (entry->next) epdf_index_fill(items, entry->next); |