diff --git a/src/Makefile.am.alt b/src/Makefile.am.alt new file mode 100644 index 0000000..d718715 --- /dev/null +++ b/src/Makefile.am.alt @@ -0,0 +1,29 @@ +SUBDIRS = dependencies #\ +#zimlib \ +#ctpp2 \ +#pugixml \ +#components + +if WITH_MANAGER + SUBDIRS += manager +endif + +if (IS_POSIX && WITH_SERVER) + SUBDIRS += server +endif + +if WITH_INDEXER + SUBDIRS += indexer +endif + +if WITH_INSTALLER + SUBDIRS += installer +endif + +if WITH_SEARCHER + SUBDIRS += searcher +endif + +if WITH_READER + SUBDIRS += reader +endif diff --git a/src/Makefile.am.orig b/src/Makefile.am.orig new file mode 100644 index 0000000..db933f6 --- /dev/null +++ b/src/Makefile.am.orig @@ -0,0 +1,24 @@ +if IS_OSX +SUBDIRS = ${DEPENDENCES} \ + zimlib \ + ctpp2 \ + pugixml \ + components \ + manager \ + dependences +else +SUBDIRS = ${DEPENDENCES} \ + zimlib \ + ctpp2 \ + pugixml \ + components \ + server \ + manager +if IS_STATIC +else +SUBDIRS += indexer \ + installer \ + searcher \ + reader +endif +endif diff --git a/src/ctpp2/Makefile.am.alt b/src/ctpp2/Makefile.am.alt new file mode 100644 index 0000000..e69de29 diff --git a/src/ctpp2/Makefile.am.orig b/src/ctpp2/Makefile.am.orig new file mode 100644 index 0000000..ba43967 --- /dev/null +++ b/src/ctpp2/Makefile.am.orig @@ -0,0 +1,2 @@ +SUBDIRS=src +EXTRA_DIST=include diff --git a/src/ctpp2/src/Makefile.am.alt b/src/ctpp2/src/Makefile.am.alt new file mode 100644 index 0000000..e69de29 diff --git a/src/ctpp2/src/Makefile.am.orig b/src/ctpp2/src/Makefile.am.orig new file mode 100644 index 0000000..a555ec7 --- /dev/null +++ b/src/ctpp2/src/Makefile.am.orig @@ -0,0 +1,93 @@ +AM_CPPFLAGS=-I$(top_srcdir)/src/ctpp2/include -I$(top_srcdir)/src/ctpp2/include/functions + +noinst_LTLIBRARIES = libctpp2.la + +libctpp2_la_SOURCES = \ + CTPP2Logger.cpp \ + CTPP2VMExecutable.cpp \ + CTPP2JSONFileParser.cpp \ + CTPP2FileSourceLoader.cpp \ + CTPP2VMMemoryCore.cpp \ + CTPP2VMOpcodeCollector.cpp \ + CTPP2VMArgStack.cpp \ + CTPP2FileOutputCollector.cpp \ + CTPP2Compiler.cpp \ + CTPP2VMFileLoader.cpp \ + CTPP2BitIndex.cpp \ + CTPP2VMException.cpp \ + CTPP2StreamOutputCollector.cpp \ + CTPP2StringBuffer.cpp \ + CDTSortRoutines.cpp \ + CTPP2VMDebugInfo.cpp \ + CTPP2SyscallFactory.cpp \ + CTPP2HashTable.cpp \ + CTPP2Exception.cpp \ + CTPP2Sprintf.cpp \ + CTPP2StaticData.cpp \ + CDT.cpp \ + CTPP2VMSTDLib.cpp \ + CTPP2VMSyscall.cpp \ + CTPP2ParserException.cpp \ + CTPP2VM.cpp \ + CTPP2FileLogger.cpp \ + CTPP2Parser.cpp \ + CTPP2Error.cpp \ + CTPP2StaticText.cpp \ + CTPP2StringOutputCollector.cpp \ + CTPP2VMCodeStack.cpp \ + functions/FnBase64Encode.cpp \ + functions/FnInSet.cpp \ + functions/FnSubstring.cpp \ + functions/FnGetText.cpp \ + functions/FnMin.cpp \ + functions/FnMBSubstring.cpp \ + functions/FnVersion.cpp \ + functions/FnListElement.cpp \ + functions/FnMax.cpp \ + functions/FnConcat.cpp \ + functions/FnSize.cpp \ + functions/FnMBSize.cpp \ + functions/FnBase64Decode.cpp \ + functions/FnFormParam.cpp \ + functions/FnXMLEscape.cpp \ + functions/FnWMLEscape.cpp \ + functions/FnHMACMD5.cpp \ + functions/FnDateFormat.cpp \ + functions/FnHTMLEscape.cpp \ + functions/FnTruncate.cpp \ + functions/FnURLEscape.cpp \ + functions/FnIconv.cpp \ + functions/FnURIEscape.cpp \ + functions/FnNumFormat.cpp \ + functions/FnMD5.cpp \ + functions/FnGetText_.cpp \ + functions/FnJSEscape.cpp \ + functions/FnDefined.cpp \ + functions/FnSprintf.cpp \ + functions/FnHrefParam.cpp \ + functions/FnCast.cpp \ + functions/FnJSON.cpp \ + functions/FnRandom.cpp \ + functions/FnLog.cpp \ + functions/FnObjDump.cpp \ + functions/FnMBTruncate.cpp \ + functions/FnDefault.cpp \ + functions/FnNumeral.cpp \ + functions/FnAvg.cpp \ + functions/FnEmitter.cpp \ + functions/FnError.cpp \ + functions/FnHashElement.cpp \ + functions/FnArrayElement.cpp \ + CTPP2VMDumper.cpp \ + CTPP2JSONParser.cpp \ + CTPP2DTOA.cpp \ + CTPP2Util.cpp + +libctpp2_la_CXXFLAGS=-fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE +if IS_OSX +libctpp2_la_CXXFLAGS+= -I/opt/local/include +endif + +libctpp2_la_LDFLAGS= + +CLEANFILES=*.obj *.lib *.dll \ No newline at end of file diff --git a/src/ctype/Makefile.am.alt b/src/ctype/Makefile.am.alt new file mode 100644 index 0000000..e69de29 diff --git a/src/ctype/Makefile.am.orig b/src/ctype/Makefile.am.orig new file mode 100644 index 0000000..bb8f206 --- /dev/null +++ b/src/ctype/Makefile.am.orig @@ -0,0 +1,7 @@ +if IS_OSX +SUBDIRS = \ + zimAccessor +else +SUBDIRS = \ + zimAccessor +endif diff --git a/src/ctype/zimAccessor/Makefile.am.alt b/src/ctype/zimAccessor/Makefile.am.alt new file mode 100644 index 0000000..e69de29 diff --git a/src/ctype/zimAccessor/Makefile.am.orig b/src/ctype/zimAccessor/Makefile.am.orig new file mode 100644 index 0000000..194b2dc --- /dev/null +++ b/src/ctype/zimAccessor/Makefile.am.orig @@ -0,0 +1,23 @@ +pkglib_LTLIBRARIES=libZimAccessor.la +pkglibdir=$(libdir)/kiwix/components/ctype +AM_CPPFLAGS=-I$(top_srcdir)/src/common -I$(top_srcdir)/src/zimlib/include +libZimAccessor_la_SOURCES= \ + zimAccessor.cpp \ + zimAccessorWrapper.cpp \ + $(top_srcdir)/src/common/kiwix/reader.cpp \ + IZimAccessor.h \ + zimAccessorWrapper.h \ + $(top_srcdir)/src/common/kiwix/reader.h \ + $(top_srcdir)/src/common/pathTools.h \ + $(top_srcdir)/src/common/pathTools.cpp \ +libZimAccessor_la_CXXFLAGS=$(LIBZIM_CFLAGS) -I../../common/ +if IS_STATIC +libZimAccessor_la_LDFLAGS=$(LIBZIM_STATIC_LDFLAGS) $(LIBZIMSELF_STATIC_LDFLAGS) $(LIBLZMA_STATIC_LDFLAGS) +else +libZimAccessor_la_LDFLAGS=$(LIBZIM_LDFLAGS) +libZimAccessor_la_LIBADD=$(top_builddir)/src/zimlib/src/libzim.la +endif +if IS_OSX +libZimAccessor_la_LDFLAGS=$(LIBZIM_STATIC_LDFLAGS) $(LIBZIMSELF_STATIC_LDFLAGS) +endif +CLEANFILES=*.lib *.obj *.dll diff --git a/src/indexer/Makefile.am.alt b/src/indexer/Makefile.am.alt new file mode 100644 index 0000000..e69de29 diff --git a/src/indexer/Makefile.am.orig b/src/indexer/Makefile.am.orig new file mode 100644 index 0000000..2a2148d --- /dev/null +++ b/src/indexer/Makefile.am.orig @@ -0,0 +1,21 @@ +bin_PROGRAMS=kiwix-index +AM_CPPFLAGS=-I$(top_srcdir)/src/common -I$(top_srcdir)/src/zimlib/include -I$(top_srcdir)/src/ctpp2/include +kiwix_index_SOURCES= \ + kiwix-index.cpp \ + ../common/kiwix/xapian/myhtmlparse.cc \ + ../common/kiwix/xapian/htmlparse.cc \ + ../common/unaccent.cpp \ + ../common/kiwix/indexer.cpp \ + ../common/kiwix/xapianIndexer.cpp \ + ../common/kiwix/cluceneIndexer.cpp +include_HEADERS= \ + ../common/kiwix/xapian/myhtmlparse.h \ + ../common/kiwix/xapian/namedentities.h \ + ../common/kiwix/xapian/htmlparse.h \ + ../common/unaccent.h \ + ../common/kiwix/indexer.h \ + ../common/kiwix/xapianIndexer.h \ + ../common/kiwix/cluceneIndexer.h +kiwix_index_CXXFLAGS=$(LIBXAPIAN_CFLAGS) $(LIBCLUCENE_CFLAGS) $(LIBICU_CFLAGS) $(LIBZIM_CFLAGS) -I../common/ +kiwix_index_LDFLAGS=$(LIBXAPIAN_LDFLAGS) $(LIBCLUCENE_LDFLAGS) $(LIBICU_LDFLAGS) $(LIBZIM_LDFLAGS) +kiwix_index_LDADD=../zimlib/src/.libs/libzim.a diff --git a/src/installer/Makefile.am.alt b/src/installer/Makefile.am.alt new file mode 100644 index 0000000..e69de29 diff --git a/src/installer/Makefile.am.orig b/src/installer/Makefile.am.orig new file mode 100644 index 0000000..2dbcc47 --- /dev/null +++ b/src/installer/Makefile.am.orig @@ -0,0 +1,33 @@ +bin_PROGRAMS=kiwix-install +AM_CPPFLAGS=-I$(top_srcdir)/src/common -I$(top_srcdir)/src/zimlib/include -I$(top_srcdir)/src/pugixml +kiwix_install_SOURCES= \ + kiwix-install.cpp \ + ../common/kiwix/xapian/myhtmlparse.cc \ + ../common/kiwix/xapian/htmlparse.cc \ + ../common/kiwix/xapianIndexer.cpp \ + ../common/kiwix/cluceneIndexer.cpp \ + ../common/unaccent.cpp \ + ../common/base64.cpp \ + ../common/kiwix/indexer.cpp \ + ../common/kiwix/reader.cpp \ + ../common/kiwix/library.cpp \ + ../common/kiwix/manager.cpp \ + ../common/regexTools.cpp \ + ../common/pathTools.cpp +include_HEADERS= \ + ../common/kiwix/xapian/myhtmlparse.h \ + ../common/kiwix/xapian/namedentities.h \ + ../common/kiwix/xapian/htmlparse.h \ + ../common/kiwix/xapianIndexer.h \ + ../common/kiwix/cluceneIndexer.h \ + ../common/unaccent.h \ + ../common/base64.h \ + ../common/kiwix/indexer.h \ + ../common/kiwix/reader.h \ + ../common/kiwix/library.h \ + ../common/kiwix/manager.h \ + ../common/regexTools.h \ + ../common/pathTools.h +kiwix_install_CXXFLAGS=$(LIBXAPIAN_CFLAGS) $(LIBCLUCENE_CFLAGS) $(LIBICU_CFLAGS) $(LIBPUGIXML_CFLAGS) -I../common/ +kiwix_install_LDFLAGS=$(LIBXAPIAN_LDFLAGS) $(LIBCLUCENE_LDFLAGS) $(LIBICU_LDFLAGS) $(LIBPUGIXML_LDFLAGS) +kiwix_install_LDADD=../zimlib/src/libzim.la ../pugixml/libpugixml.la \ No newline at end of file diff --git a/src/manager/Makefile.am.alt b/src/manager/Makefile.am.alt new file mode 100644 index 0000000..e69de29 diff --git a/src/manager/Makefile.am.orig b/src/manager/Makefile.am.orig new file mode 100644 index 0000000..1d6aed0 --- /dev/null +++ b/src/manager/Makefile.am.orig @@ -0,0 +1,27 @@ +bin_PROGRAMS=kiwix-manage +AM_CPPFLAGS=-I$(top_srcdir)/src/common -I$(top_srcdir)/src/zimlib/include -I$(top_srcdir)/src/pugixml +kiwix_manage_SOURCES= \ + kiwix-manage.cpp \ + ../common/kiwix/manager.cpp \ + ../common/kiwix/library.cpp \ + ../common/kiwix/reader.cpp \ + ../common/base64.cpp \ + ../common/regexTools.cpp \ + ../common/pathTools.cpp +include_HEADERS= \ + ../common/kiwix/manager.h \ + ../common/kiwix/library.h \ + ../common/kiwix/reader.h \ + ../common/base64.h \ + ../common/regexTools.h \ + ../common/pathTools.h +kiwix_manage_CXXFLAGS=$(LIBZIM_CFLAGS) $(LIBICU_CFLAGS) -I../common/ +if IS_STATIC +kiwix_manage_LDFLAGS=$(LIBZIM_STATIC_LDFLAGS) $(LIBICU_STATIC_LDFLAGS) +else +kiwix_manage_LDFLAGS=$(LIBZIM_LDFLAGS) $(LIBICU_LDFLAGS) +kiwix_manage_LDADD=../zimlib/src/libzim.la ../pugixml/libpugixml.la +endif +if IS_OSX +kiwix_manage_LDFLAGS=$(LIBZIM_STATIC_LDFLAGS) $(LIBICU_STATIC_LDFLAGS) +endif diff --git a/src/pugixml/Makefile.am.alt b/src/pugixml/Makefile.am.alt new file mode 100644 index 0000000..e69de29 diff --git a/src/pugixml/Makefile.am.orig b/src/pugixml/Makefile.am.orig new file mode 100644 index 0000000..5c749e7 --- /dev/null +++ b/src/pugixml/Makefile.am.orig @@ -0,0 +1,13 @@ +AM_CPPFLAGS= + +noinst_LTLIBRARIES = libpugixml.la + +libpugixml_la_SOURCES = \ + pugixml.cpp \ + pugixml.hpp \ + pugiconfig.hpp + +libpugixml_la_CXXFLAGS=-fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE +libpugixml_la_LDFLAGS= + +CLEANFILES=*.obj *.lib *.dll \ No newline at end of file diff --git a/src/reader/Makefile.am.alt b/src/reader/Makefile.am.alt new file mode 100644 index 0000000..e69de29 diff --git a/src/reader/Makefile.am.orig b/src/reader/Makefile.am.orig new file mode 100644 index 0000000..4893afe --- /dev/null +++ b/src/reader/Makefile.am.orig @@ -0,0 +1,14 @@ +bin_PROGRAMS=kiwix-read +AM_CPPFLAGS=-I$(top_srcdir)/src/common -I$(top_srcdir)/src/zimlib/include +kiwix_read_SOURCES= \ + kiwix-read.cpp \ + ../common/kiwix/reader.cpp +include_HEADERS= \ + ../common/kiwix/reader.h +kiwix_read_CXXFLAGS=$(LIBZIM_CFLAGS) -I../common/ +if IS_STATIC +kiwix_read_LDFLAGS=$(LIBZIM_STATIC_LDFLAGS) $(LIBZIMSELF_STATIC_LDFLAGS) $(LIBLZMA_STATIC_LDFLAGS) +else +kiwix_read_LDFLAGS=$(LIBZIM_LDFLAGS) +kiwix_read_LDADD=$(top_builddir)/src/zimlib/src/libzim.la +endif diff --git a/src/searcher/Makefile.am.alt b/src/searcher/Makefile.am.alt new file mode 100644 index 0000000..e69de29 diff --git a/src/searcher/Makefile.am.orig b/src/searcher/Makefile.am.orig new file mode 100644 index 0000000..2ee7663 --- /dev/null +++ b/src/searcher/Makefile.am.orig @@ -0,0 +1,16 @@ +bin_PROGRAMS=kiwix-search +AM_CPPFLAGS=-I$(top_srcdir)/src/common +kiwix_search_SOURCES= \ + kiwix-search.cpp \ + ../common/unaccent.cpp \ + ../common/kiwix/searcher.cpp \ + ../common/kiwix/xapianSearcher.cpp \ + ../common/kiwix/cluceneSearcher.cpp +include_HEADERS= \ + ../common/unaccent.h \ + ../common/kiwix/searcher.h \ + ../common/kiwix/xapianSearcher.h \ + ../common/kiwix/cluceneSearcher.h +kiwix_search_CXXFLAGS=$(LIBXAPIAN_CFLAGS) $(LIBCLUCENE_CFLAGS) $(LIBICU_CFLAGS) $(LIBCTPP2_CFLAGS) -I../common/ +kiwix_search_LDFLAGS=$(LIBXAPIAN_LDFLAGS) $(LIBCLUCENE_LDFLAGS) $(LIBICU_LDFLAGS) $(LIBCTPP2_LDFLAGS) +kiwix_search_LDADD=../ctpp2/src/.libs/libctpp2.a diff --git a/src/server/Makefile.am.alt b/src/server/Makefile.am.alt new file mode 100644 index 0000000..e69de29 diff --git a/src/server/Makefile.am.orig b/src/server/Makefile.am.orig new file mode 100644 index 0000000..45917d7 --- /dev/null +++ b/src/server/Makefile.am.orig @@ -0,0 +1,34 @@ +bin_PROGRAMS=kiwix-serve +AM_CPPFLAGS=-I$(top_srcdir)/src/common -I$(top_srcdir)/src/zimlib/include -I$(top_srcdir)/src/ctpp2/include -I$(top_srcdir)/src/pugixml +kiwix_serve_SOURCES= \ + kiwix-serve.cpp \ + ../common/kiwix/reader.cpp \ + ../common/kiwix/searcher.cpp \ + ../common/kiwix/manager.cpp \ + ../common/kiwix/library.cpp \ + ../common/kiwix/xapianSearcher.cpp \ + ../common/kiwix/cluceneSearcher.cpp \ + ../common/unaccent.cpp \ + ../common/base64.cpp \ + ../common/pathTools.cpp \ + ../common/regexTools.cpp \ + ../common/splitString.cpp +include_HEADERS= \ + ../common/kiwix/reader.h \ + ../common/kiwix/searcher.h \ + ../common/kiwix/manager.h \ + ../common/kiwix/library.h \ + ../common/kiwix/xapianSearcher.h \ + ../common/kiwix/cluceneSearcher.h \ + ../common/unaccent.h \ + ../common/base64.h \ + ../common/pathTools.h \ + ../common/regexTools.h \ + ../common/splitString.cpp +kiwix_serve_CXXFLAGS=${LIBMICROHTTPD_CFLAGS} $(LIBPUGIXML_CFLAGS) $(LIBCTPP2_CFLAGS) $(LIBCLUCENE_CFLAGS) $(LIBXAPIAN_CFLAGS) $(LIBICU_CFLAGS) $(LIBZIM_CFLAGS) -I../common/ +if IS_STATIC +kiwix_serve_LDFLAGS= -ldl -lm -lpthread -luuid ${LIBMICROHTTPD_STATIC_LDFLAGS} ${LIBPUGIXML_STATIC_LDFLAGS} $(LIBCTPP2_STATIC_LDFLAGS) $(LIBCLUCENE_STATIC_LDFLAGS) $(LIBXAPIAN_STATIC_LDFLAGS) $(LIBICU_STATIC_LDFLAGS) $(LIBZIMSELF_STATIC_LDFLAGS) $(LIBLZMA_STATIC_LDFLAGS) $(LIBZ_STATIC_LDFLAGS) +else +kiwix_serve_LDFLAGS=${LIBMICROHTTPD_LDFLAGS} $(LIBPUGIXML_LDLAGS) $(LIBCTPP2_LDLAGS) $(LIBCLUCENE_LDFLAGS) $(LIBXAPIAN_LDFLAGS) $(LIBICU_LDFLAGS) $(LIBZIM_LDFLAGS) +endif +kiwix_serve_LDADD=../zimlib/src/.libs/libzim.a ../ctpp2/src/.libs/libctpp2.a ../pugixml/.libs/libpugixml.a diff --git a/src/zimlib/Makefile.am.alt b/src/zimlib/Makefile.am.alt new file mode 100644 index 0000000..e69de29 diff --git a/src/zimlib/Makefile.am.orig b/src/zimlib/Makefile.am.orig new file mode 100644 index 0000000..ba43967 --- /dev/null +++ b/src/zimlib/Makefile.am.orig @@ -0,0 +1,2 @@ +SUBDIRS=src +EXTRA_DIST=include diff --git a/src/zimlib/src/Makefile.am.alt b/src/zimlib/src/Makefile.am.alt new file mode 100644 index 0000000..e69de29 diff --git a/src/zimlib/src/Makefile.am.orig b/src/zimlib/src/Makefile.am.orig new file mode 100644 index 0000000..937f9fd --- /dev/null +++ b/src/zimlib/src/Makefile.am.orig @@ -0,0 +1,35 @@ +AM_CPPFLAGS=-I$(top_srcdir)/src/zimlib/include + +noinst_LTLIBRARIES = libzim.la + +libzim_la_SOURCES = \ + article.cpp \ + articlesearch.cpp \ + cluster.cpp \ + dirent.cpp \ + file.cpp \ + fileheader.cpp \ + fileimpl.cpp \ + indexarticle.cpp \ + ptrstream.cpp \ + search.cpp \ + template.cpp \ + unicode.cpp \ + uuid.cpp \ + zintstream.cpp \ + envvalue.cpp \ + lzmastream.cpp \ + unlzmastream.cpp \ + fstream.cpp \ + md5.cpp \ + md5stream.cpp \ + ptrstream.h \ + log.h \ + envvalue.h \ + md5stream.h \ + md5.h + +libzim_la_CXXFLAGS=${LIBLZMA_CFLAGS} -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE +libzim_la_LDFLAGS=${LIBLZMA_LDFLAGS} + +CLEANFILES=*.obj *.lib *.dll \ No newline at end of file diff --git a/static/Makefile.am.alt b/static/Makefile.am.alt new file mode 100644 index 0000000..e69de29 diff --git a/static/Makefile.am.orig b/static/Makefile.am.orig new file mode 100644 index 0000000..f4d1924 --- /dev/null +++ b/static/Makefile.am.orig @@ -0,0 +1,2 @@ +templatedir=$(pkgdatadir)/static +template_DATA=results.tmpl