summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrootavish <[email protected]>2014-05-18 21:57:45 +0530
committerrootavish <[email protected]>2014-05-18 22:16:11 +0530
commit28b2c08f60f54a78596746e204f4d0092587a09a (patch)
tree0e16fb815affc19c6047dcec87d812c745c37b26
parentff8c5fca03211db8f58368ecf35c3ab63ed876fd (diff)
downloadatril-28b2c08f60f54a78596746e204f4d0092587a09a.tar.bz2
atril-28b2c08f60f54a78596746e204f4d0092587a09a.tar.xz
adding epub support : created Makefiles,modified configuration script
kickoff commit to add ePub support , creating a subdirectory structure and modified makefiles and configure script to accomodate for ePub . As the sources are done , these will be further changed accordingly .
-rw-r--r--backend/Makefile.am4
-rw-r--r--backend/epub/Makefile.am30
-rw-r--r--backend/epub/epubdocument.atril-backend.in4
-rw-r--r--configure.ac31
4 files changed, 69 insertions, 0 deletions
diff --git a/backend/Makefile.am b/backend/Makefile.am
index ef76c4ee..1c042067 100644
--- a/backend/Makefile.am
+++ b/backend/Makefile.am
@@ -34,6 +34,10 @@ if ENABLE_XPS
SUBDIRS += xps
endif
+if ENABLE_EPUB
+ SUBDIRS += epub
+endif
+
EXTRA_DIST = \
backend.symbols
diff --git a/backend/epub/Makefile.am b/backend/epub/Makefile.am
new file mode 100644
index 00000000..6ecbdb2a
--- /dev/null
+++ b/backend/epub/Makefile.am
@@ -0,0 +1,30 @@
+AM_CPPFLAGS = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/libdocument \
+ -DMATELOCALEDIR=\"$(datadir)/locale\" \
+ -DATRIL_COMPILATION \
+ $(BACKEND_CFLAGS) \
+ $(WARN_CXXFLAGS) \
+ $(DISABLE_DEPRECATED)
+
+backend_LTLIBRARIES = libepubdocument.la
+
+libepubdocument_la_SOURCES =
+
+
+libepubdocument_la_LDFLAGS = $(BACKEND_LIBTOOL_FLAGS)
+libepubdocument_la_LIBADD = \
+ $(top_builddir)/libdocument/libatrildocument.la \
+ $(BACKEND_LIBS)
+
+
+backend_in_files = epubdocument.atril-backend.in
+backend_DATA = $(backend_in_files:.atril-backend.in=.atril-backend)
+
+EXTRA_DIST = $(backend_in_files)
+
+CLEANFILES = $(backend_DATA)
+
+@EV_INTLTOOL_ATRIL_BACKEND_RULE@
+
+-include $(top_srcdir)/git.mk
diff --git a/backend/epub/epubdocument.atril-backend.in b/backend/epub/epubdocument.atril-backend.in
new file mode 100644
index 00000000..fe97354b
--- /dev/null
+++ b/backend/epub/epubdocument.atril-backend.in
@@ -0,0 +1,4 @@
+[Atril Backend]
+Module=epubdocument
+_TypeDescription=ePub Documents
+MimeType=application/epub+zip;
diff --git a/configure.ac b/configure.ac
index 13203bbf..e0df6cf0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -688,6 +688,31 @@ AM_CONDITIONAL(ENABLE_XPS, test x$enable_xps = xyes)
dnl ================== End of XPS checks ===================================================
+
+dnl ================== EPUB checks ===================================================
+dnl TODO : complete this once library dependencies are added and finalized
+AC_ARG_ENABLE(epub,
+ [AS_HELP_STRING([--enable-epub],
+ [Compile with support for ePub documents.])],
+ [enable_epub=$enableval],
+ [enable_epub=yes])
+
+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)
+
+ if test "x$enable_epub" = "xyes"; then
+ AC_DEFINE([ENABLE_EPUB], [1], [Enable support for ePub documents.])
+ else
+ enable_epub="no"
+ AC_MSG_WARN(["ePub support is disabled since webkit2gtk-3.0( version >= $WEBKIT_REQUIRED ) is needed"])
+ fi
+fi
+
+AM_CONDITIONAL(ENABLE_EPUB, test x$enable_epub = xyes)
+
+dnl ================== End of EPUB checks ===================================================
+
dnl =================== Mime types list ====================================================
if test "x$enable_pdf" = "xyes" ; then
@@ -714,6 +739,10 @@ fi
if test "x$enable_xps" = "xyes"; then
ATRIL_MIME_TYPES="${ATRIL_MIME_TYPES}application/oxps;application/vnd.ms-xpsdocument;"
fi
+if test "x$enable_epub" = "xyes"; then
+ ATRIL_MIME_TYPES="${ATRIL_MIME_TYPES}application/epub+zip"
+fi
+
AC_SUBST(ATRIL_MIME_TYPES)
AC_CHECK_FUNC(localtime_r, AC_DEFINE(HAVE_LOCALTIME_R, 1, [Defines if localtime_r is available on your system]))
@@ -766,6 +795,7 @@ backend/comics/Makefile
backend/djvu/Makefile
backend/dvi/Makefile
backend/dvi/mdvi-lib/Makefile
+backend/epub/Makefile
backend/pdf/Makefile
backend/pixbuf/Makefile
backend/ps/Makefile
@@ -854,4 +884,5 @@ Configure summary:
Pixbuf Backend.....: $enable_pixbuf
Comics Backend.....: $enable_comics
XPS Backend........: $enable_xps
+ EPUB Backend.......: $enable_epub
"