summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrootavish <[email protected]>2014-05-30 21:57:13 +0530
committerrootavish <[email protected]>2014-05-30 22:23:05 +0530
commit415b008bff9de46176ed39daa2ffece45cdd2506 (patch)
tree53d6b70cd67eda8cf79b84809db90fef5ddc80aa
parent7f33c3425aae32d1dd5d2d7b912f8d4eac1cf85d (diff)
downloadatril-415b008bff9de46176ed39daa2ffece45cdd2506.tar.bz2
atril-415b008bff9de46176ed39daa2ffece45cdd2506.tar.xz
Created a Makefile for minizip, modified epub Makefile
I created a Makefile for the minizip backend, since i am only using part of that library and modified the epub backend to work with the library. Also modified the configure script to suit our purpose. The epub backend can now be compiled using the make command in the epub directory, although it cannot still be compiled as a part of atril.
-rw-r--r--backend/epub/Makefile.am10
-rw-r--r--backend/epub/epub-document.c1
-rw-r--r--backend/epub/minizip/Makefile.am14
-rw-r--r--configure.ac3
4 files changed, 22 insertions, 6 deletions
diff --git a/backend/epub/Makefile.am b/backend/epub/Makefile.am
index 252fea2a..a40f5ff1 100644
--- a/backend/epub/Makefile.am
+++ b/backend/epub/Makefile.am
@@ -1,25 +1,25 @@
AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/libdocument \
+ -I$(srcdir)/minizip \
-DMATELOCALEDIR=\"$(datadir)/locale\" \
-DATRIL_COMPILATION \
$(BACKEND_CFLAGS) \
$(WARN_CXXFLAGS) \
+ $(WEBKIT_CFLAGS) \
$(DISABLE_DEPRECATED)
backend_LTLIBRARIES = libepubdocument.la
libepubdocument_la_SOURCES = \
epub-document.c \
- epub-document.h \
- ioapi.c \
- ioapi.h \
- unzip.c \
- unzip.h
+ epub-document.h
libepubdocument_la_LDFLAGS = $(BACKEND_LIBTOOL_FLAGS)
libepubdocument_la_LIBADD = \
$(top_builddir)/libdocument/libatrildocument.la \
+ minizip/libminizip.la \
+ $(WEBKIT_LIBS) \
$(BACKEND_LIBS)
diff --git a/backend/epub/epub-document.c b/backend/epub/epub-document.c
index 3154072f..ec40a3b9 100644
--- a/backend/epub/epub-document.c
+++ b/backend/epub/epub-document.c
@@ -4,6 +4,7 @@
#include <libxml/parser.h>
#include <libxml/xmlmemory.h>
#include <config.h>
+#include <glib/gi18n.h>
/* A variable to hold the path where we extact our ePub */
static gchar* tmp_dir ;
diff --git a/backend/epub/minizip/Makefile.am b/backend/epub/minizip/Makefile.am
new file mode 100644
index 00000000..315fada0
--- /dev/null
+++ b/backend/epub/minizip/Makefile.am
@@ -0,0 +1,14 @@
+AM_CPPFLAGS = \
+ $(WARN_CFLAGS) \
+ $(ZLIB_CFLAGS)
+
+noinst_LTLIBRARIES = libminizip.la
+
+libminizip_la_SOURCES = \
+ unzip.c \
+ ioapi.c
+
+libminizip_la_LIBADD = \
+ $(ZLIB_LIBS)
+
+-include $(top_srcdir)/git.mk
diff --git a/configure.ac b/configure.ac
index baa7ffd2..e4365af8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -699,7 +699,7 @@ AC_ARG_ENABLE(epub,
if test "x$enable_epub" = "xyes"; then
WEBKIT_REQUIRED=2.4.2
- PKG_CHECK_MODULES(WEBKIT, webkit2gtk-3.0 >= $WEBKIT_REQUIRED,enable_epub=yes,enable_epub=no)
+ PKG_CHECK_MODULES(WEBKIT, webkit2gtk-3.0 >= $WEBKIT_REQUIRED libxml-2.0 >= $LIBXML_REQUIRED zlib,enable_epub=yes,enable_epub=no)
if test "x$enable_epub" = "xyes"; then
AC_DEFINE([ENABLE_EPUB], [1], [Enable support for ePub documents.])
@@ -796,6 +796,7 @@ backend/djvu/Makefile
backend/dvi/Makefile
backend/dvi/mdvi-lib/Makefile
backend/epub/Makefile
+backend/epub/minizip/Makefile
backend/pdf/Makefile
backend/pixbuf/Makefile
backend/ps/Makefile