Commit 9027a6e8 authored by Kartik Mistry's avatar Kartik Mistry 🇮🇳

New upstream version 1.25.5

parent d9203d02
......@@ -2,7 +2,7 @@
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
......@@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
......
# Conditionally enable building the small test drivers, but don't
# distribute them, they are not generally useful
if COND_TESTMAINS
MAYBE_TESTMAINS = testmains
endif
SUBDIRS = . $(MAYBE_TESTMAINS)
DIST_SUBDIRS = .
CXXFLAGS ?= @CXXFLAGS@
LIBXAPIAN=@LIBXAPIAN@
XAPIANCXXFLAGS=@XAPIANCXXFLAGS@
XSLT_CFLAGS=@XSLT_CFLAGS@
XSLT_LINKADD=@XSLT_LINKADD@
LIBICONV=@LIBICONV@
INCICONV=@INCICONV@
LIBFAM = @LIBFAM@
......@@ -29,8 +39,10 @@ AM_CPPFLAGS = -Wall -Wno-unused -std=c++11 \
$(COMMONCPPFLAGS) \
$(INCICONV) \
$(XAPIANCXXFLAGS) \
$(XSLT_CFLAGS) \
$(X_CFLAGS) \
-DRECOLL_DATADIR=\"${pkgdatadir}\" \
-DREADFILE_ENABLE_ZLIB -DREADFILE_ENABLE_MINIZ -DREADFILE_ENABLE_MD5 \
-D_GNU_SOURCE \
$(DEFS)
......@@ -121,6 +133,8 @@ internfile/mh_symlink.h \
internfile/mh_text.cpp \
internfile/mh_text.h \
internfile/mh_unknown.h \
internfile/mh_xslt.cpp \
internfile/mh_xslt.h \
internfile/mimehandler.cpp \
internfile/mimehandler.h \
internfile/myhtmlparse.cpp \
......@@ -224,6 +238,8 @@ utils/md5ut.cpp \
utils/md5ut.h \
utils/mimeparse.cpp \
utils/mimeparse.h \
utils/miniz.cpp \
utils/miniz.h \
utils/netcon.cpp \
utils/netcon.h \
utils/pathut.cpp \
......@@ -242,6 +258,7 @@ utils/strmatcher.cpp \
utils/strmatcher.h \
utils/transcode.cpp \
utils/transcode.h \
utils/utf8iter.cpp \
utils/utf8iter.h \
utils/wipedir.cpp \
utils/wipedir.h \
......@@ -262,7 +279,7 @@ AM_YFLAGS = -d
librecoll_la_LDFLAGS = -release $(VERSION) \
-Wl,--no-undefined -Wl,--warn-unresolved-symbols
librecoll_la_LIBADD = $(LIBXAPIAN) $(LIBICONV) $(LIBTHREADS)
librecoll_la_LIBADD = $(XSLT_LINKADD) $(LIBXAPIAN) $(LIBICONV) $(LIBTHREADS)
# There is probably a better way to do this. The KIO needs to be linked
# with librecoll, but librecoll is installed into a non-standard place
......@@ -392,10 +409,12 @@ qtgui/idxsched.ui \
qtgui/images/asearch.png \
qtgui/images/cancel.png \
qtgui/images/close.png \
qtgui/images/clock.png \
qtgui/images/code-block.png \
qtgui/images/down.png \
qtgui/images/firstpage.png \
qtgui/images/history.png \
qtgui/images/interro.png \
qtgui/images/nextpage.png \
qtgui/images/prevpage.png \
qtgui/images/recoll.icns \
......@@ -442,6 +461,7 @@ qtgui/preview_plaintorich.cpp \
qtgui/preview_plaintorich.h \
qtgui/preview_w.cpp \
qtgui/preview_w.h \
qtgui/preview.ui \
qtgui/ptrans.ui \
qtgui/ptrans_w.cpp \
qtgui/ptrans_w.h \
......@@ -506,11 +526,29 @@ qtgui/xmltosd.cpp \
qtgui/xmltosd.h \
\
python/README.txt \
python/recoll/Makefile.in \
python/pychm/AUTHORS \
python/pychm/COPYING \
python/pychm/MANIFEST.in \
python/pychm/README-RECOLL.txt \
python/pychm/pychm.egg-info \
python/pychm/pychm.egg-info/PKG-INFO \
python/pychm/pychm.egg-info/SOURCES.txt \
python/pychm/pychm.egg-info/dependency_links.txt \
python/pychm/pychm.egg-info/top_level.txt \
python/pychm/recollchm \
python/pychm/recollchm/__init__.py \
python/pychm/recollchm/chm.py \
python/pychm/recollchm/chmlib.py \
python/pychm/recollchm/extra.c \
python/pychm/recollchm/swig_chm.c \
python/pychm/recollchm/swig_chm.i \
python/pychm/setup.py.in \
python/recoll/Makefile \
python/recoll/pyrclextract.cpp \
python/recoll/pyrecoll.cpp \
python/recoll/pyrecoll.h \
python/recoll/recoll/__init__.py \
python/recoll/recoll/conftree.py \
python/recoll/recoll/rclconfig.py \
python/recoll/setup.py.in \
python/samples/docdups.py \
......@@ -537,34 +575,67 @@ VERSION
# php/00README.txt php/recoll/config.m4 php/recoll/make.sh
# php/recoll/php_recoll.h php/recoll/recoll.cpp php/sample/shell.php
OPTSFORPYTHON = $(shell test -f /etc/debian_version && echo --install-layout=deb)
if MAKEPYTHON
all-local: recollpython
all-local:: recollpython
install-exec-local:: recollpython-install
clean-local:: recollpython-clean
recollpython: librecoll.la
${MAKE} -C python/recoll libdir=$(libdir)
install-exec-local: recollpython-install
(cd python/recoll; set -x; \
for v in 2 3;do test -n "`which python$${v}`" && \
libdir=$(libdir) python$${v} setup.py build; \
done \
)
recollpython-install:
(cd python/recoll; \
if test -f /etc/debian_version ; then \
OPTSFORPYTHON=--install-layout=deb; \
fi; \
set -x; \
python setup.py install \
--prefix=${prefix} --root=$${DESTDIR:-/} $${OPTSFORPYTHON})
clean-local: recollpython-clean
(cd python/recoll; set -x; \
for v in 2 3;do test -n "`which python$${v}`" && \
python$${v} setup.py install \
--prefix=${prefix} --root=$${DESTDIR:-/} $(OPTSFORPYTHON); \
done; \
)
recollpython-clean:
rm -f python/recoll/*.pyc
rm -rf python/pychm/build
rm -rf python/pychm/recollchm.egg-info
rm -rf python/pychm/setup.py
rm -rf python/recoll/Recoll.egg-info
rm -rf python/recoll/__pycache__
rm -rf python/recoll/build
endif
if MAKEPYTHONCHM
all-local:: rclpychm
install-exec-local:: rclpychm-install
clean-local:: rclpychm-clean
rclpychm:
(cd python/pychm; set -x; \
for v in 2 3;do \
test -n "`which python$${v}`" && python$${v} setup.py build;\
done \
)
rclpychm-install:
(cd python/pychm; set -x; \
for v in 2 3;do test -n "`which python$${v}`" && \
python$${v} setup.py install \
--prefix=${prefix} --root=$${DESTDIR:-/} $(OPTSFORPYTHON); \
done \
)
rclpychm-clean:
rm -rf python/pychm/build
rm -rf python/pychm/dist/*
endif
if MAKEQT
all-local: recollqt
all-local:: recollqt
recollqt: librecoll.la
(cd $(QTGUI); ${QMAKE} PREFIX=${prefix} recoll.pro)
$(MAKE) -C $(QTGUI) LFLAGS="$(LDFLAGS)" prefix=$(prefix) \
exec_prefix=$(exec_prefix) libdir=$(libdir)
clean-local: recollqt-clean
clean-local:: recollqt-clean
recollqt-clean:
-$(MAKE) -C $(QTGUI) clean
install-exec-local: recollqt-install
install-exec-local:: recollqt-install
recollqt-install:
$(MAKE) -C $(QTGUI) LFLAGS="$(LDFLAGS)" INSTALL_ROOT=$(DESTDIR) \
prefix=$(prefix) exec_prefix=$(exec_prefix) libdir=$(libdir) \
......@@ -586,10 +657,23 @@ sampleconf/mimeview
filterdir = $(pkgdatadir)/filters
filter_DATA = \
desktop/hotrecoll.py \
filters/abiword.xsl \
filters/fb2.xsl \
filters/gnumeric.xsl \
filters/msodump.zip \
filters/okular-note.xsl \
filters/opendoc-body.xsl \
filters/opendoc-flat.xsl \
filters/opendoc-meta.xsl \
filters/openxml-xls-body.xsl \
filters/openxml-word-body.xsl \
filters/openxml-meta.xsl \
filters/ppt-dump.py \
filters/rcl7z \
filters/rclabw \
filters/rclabw.py \
filters/rclaptosidman \
filters/rclaudio \
filters/rclbasehandler.py \
filters/rclbibtex.sh \
filters/rclcheckneedretry.sh \
filters/rclchm \
......@@ -601,9 +685,10 @@ filters/rclepub \
filters/rclepub1 \
filters/rclexec1.py \
filters/rclexecm.py \
filters/rclfb2 \
filters/rclfb2.py \
filters/rclgaim \
filters/rclgnm \
filters/rclgenxslt.py \
filters/rclgnm.py \
filters/rclics \
filters/rclimg \
filters/rclimg.py \
......@@ -615,9 +700,9 @@ filters/rcllatinstops.zip \
filters/rcllyx \
filters/rclman \
filters/rclmidi.py \
filters/rclpdf.py \
filters/rclokulnote \
filters/rclokulnote.py \
filters/rclopxml.py \
filters/rclpdf.py \
filters/rclppt.py \
filters/rclps \
filters/rclpurple \
......@@ -626,9 +711,8 @@ filters/rclrar \
filters/rclrtf.py \
filters/rclscribus \
filters/rclshowinfo \
filters/rclsiduxman \
filters/rclsoff.py \
filters/rclsoff-flat.py \
filters/rclsoff.py \
filters/rclsvg.py \
filters/rcltar \
filters/rcltex \
......@@ -636,25 +720,26 @@ filters/rcltext.py \
filters/rcluncomp \
filters/rcluncomp.py \
filters/rclwar \
filters/rclwpd \
filters/rclxls.py \
filters/rclxml.py \
filters/rclxmp.py \
filters/rclxslt.py \
filters/rclzip \
filters/recoll-we-move-files.py \
filters/ppt-dump.py \
filters/recollepub.zip \
filters/svg.xsl \
filters/xls-dump.py \
filters/xlsxmltocsv.py \
filters/msodump.zip \
filters/recollepub.zip \
filters/xml.xsl \
python/recoll/recoll/conftree.py \
python/recoll/recoll/rclconfig.py
install-data-hook:
(cd $(DESTDIR)/$(filterdir); \
chmod a+x rcl* ppt-dump.py xls-dump.py xlsxmltocsv.py hotrecoll.py; \
chmod a+x recoll-we-move-files.py; \
chmod 0644 msodump.zip recollepub.zip rclexecm.py rcllatinstops.zip rclconfig.py rclmidi.py)
chmod a+x recoll-we-move-files.py ../examples/rclmon.sh; \
chmod 0644 msodump.zip recollepub.zip rclexecm.py rcllatinstops.zip \
rclconfig.py conftree.py rclmidi.py rclexec1.py rcluncomp.py rclxslt.py)
if MAKEUSERDOC
rdocdir = $(pkgdatadir)/doc
......@@ -666,7 +751,8 @@ doc/user/usermanual.html: doc/user/usermanual.xml
$(MAKE) -C doc/user VPATH=$(VPATH):$(VPATH)/doc/user usermanual.html
endif
dist_man1_MANS = doc/man/recoll.1 doc/man/recollq.1 doc/man/recollindex.1
dist_man1_MANS = doc/man/recoll.1 doc/man/recollq.1 \
doc/man/recollindex.1 doc/man/xadump.1
dist_man5_MANS = doc/man/recoll.conf.5
dist-hook:
......
This diff is collapsed.
......@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifdef HAVE_CONFIG_H
#include "autoconfig.h"
......@@ -71,12 +71,16 @@ static std::mutex o_aapi_mutex;
badnames += #NM + string(" "); \
}
static const char *aspell_lib_suffixes[] = {
".so",
".so.15",
".so.16"
static const vector<string> aspell_lib_suffixes {
#if defined(__APPLE__)
".15.dylib",
".dylib",
#else
".so",
".so.15",
".so.16",
#endif
};
static const unsigned int nlibsuffs = sizeof(aspell_lib_suffixes) / sizeof(char *);
// Stuff that we don't wish to see in the .h (possible sysdeps, etc.)
class AspellData {
......@@ -160,16 +164,39 @@ bool Aspell::init(string &reason)
return false;
}
// Don't know what with Apple and (DY)LD_LIBRARY_PATH. Does not work
// So we look in all ../lib in the PATH...
#if defined(__APPLE__)
vector<string> path;
const char *pp = getenv("PATH");
if (pp) {
stringToTokens(pp, path, ":");
}
#endif
reason = "Could not open shared library ";
string libbase("libaspell");
string lib;
for (unsigned int i = 0; i < nlibsuffs; i++) {
lib = libbase + aspell_lib_suffixes[i];
for (const auto& suff : aspell_lib_suffixes) {
lib = libbase + suff;
reason += string("[") + lib + "] ";
if ((m_data->m_handle = dlopen(lib.c_str(), RTLD_LAZY)) != 0) {
reason.erase();
goto found;
}
#if defined(__APPLE__)
// Above was the normal lookup: let dlopen search the directories.
// Here is for Apple. Also look at all ../lib along the PATH
for (const auto& dir : path) {
string lib1 = path_canon(dir + "/../lib/" + lib);
if ((m_data->m_handle = dlopen(lib1.c_str(), RTLD_LAZY)) != 0) {
reason.erase();
lib=lib1;
goto found;
}
}
#endif
}
found:
......
......@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef _RCLASPELL_H_INCLUDED_
#define _RCLASPELL_H_INCLUDED_
......
......@@ -18,7 +18,7 @@ statement from your version.
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
......
......@@ -20,7 +20,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* --------------------------------------------------------------------
*/
#include "convert.h"
......
......@@ -20,7 +20,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* --------------------------------------------------------------------
*/
#ifndef convert_h_included
......
......@@ -20,7 +20,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* --------------------------------------------------------------------
*/
#ifndef mime_inputsource_h_included
......
......@@ -20,7 +20,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* --------------------------------------------------------------------
*/
#include <string.h>
......
......@@ -20,7 +20,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* --------------------------------------------------------------------
*/
#include "mime.h"
......
......@@ -20,7 +20,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* --------------------------------------------------------------------
*/
......
......@@ -20,7 +20,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* --------------------------------------------------------------------
*/
#ifndef mime_utils_h_included
......
......@@ -20,7 +20,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* --------------------------------------------------------------------
*/
#include <string.h>
......
......@@ -20,7 +20,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* --------------------------------------------------------------------
*/
#ifndef mime_h_included
......
......@@ -33,6 +33,9 @@
/* Define to 1 if you have the `kqueue' function. */
#undef HAVE_KQUEUE
/* Define to 1 if you have the `chm' library (-lchm). */
#undef HAVE_LIBCHM
/* Define to 1 if you have the `dl' library (-ldl). */
#undef HAVE_LIBDL
......
/* Copyright (C) 2011 J.F.Dockes
/* Copyright (C) 2011-2018 J.F.Dockes
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
......@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef _CSTR_H_INCLUDED_
......@@ -27,7 +27,6 @@
// when they are used in a fast loop or are shared.
#include <string>
using std::string;
// The following slightly hacky preprocessing directives and the
// companion code in the cpp file looks complicated, but it just
......@@ -35,9 +34,9 @@ using std::string;
// extern declaration and the definition.
#ifdef RCLIN_CSTR_CPPFILE
#undef DEF_CSTR
#define DEF_CSTR(NM, STR) const string cstr_##NM(STR)
#define DEF_CSTR(NM, STR) const std::string cstr_##NM(STR)
#else
#define DEF_CSTR(NM, STR) extern const string cstr_##NM
#define DEF_CSTR(NM, STR) extern const std::string cstr_##NM
#endif
DEF_CSTR(caption, "caption");
......@@ -63,24 +62,35 @@ DEF_CSTR(fldhtm, "\007");
DEF_CSTR(wildSpecStChars, "*?[");
DEF_CSTR(regSpecStChars, "(.[{");
// Values used as keys inside Dijon::Filter::metaData[]. This structure is
// used to store all data generated by format-translating filters. It is
// different from Rcl::Doc for mostly historical reasons. The translation
// from Filter to Doc occurs inside internfile.cpp
// Values used as keys inside Dijon::Filter::metaData[].
// The document data.
DEF_CSTR(dj_keycontent, "content");
// These fields go from the topmost handler (text/plain) into the
// Rcl::Doc::meta, possibly with some massaging.
DEF_CSTR(dj_keyanc, "rclanc");
DEF_CSTR(dj_keyorigcharset, "origcharset");
DEF_CSTR(dj_keyds, "description");
DEF_CSTR(dj_keyabstract, "abstract");
// Built or inherited along the handler stack, then copied to doc
DEF_CSTR(dj_keyipath, "ipath");
DEF_CSTR(dj_keyfn, "filename");
DEF_CSTR(dj_keyauthor, "author");
DEF_CSTR(dj_keymd, "modificationdate");
DEF_CSTR(dj_keyorigcharset, "origcharset");
// charset and mimetype are explicitely blocked from going into the doc meta
DEF_CSTR(dj_keycharset, "charset");
DEF_CSTR(dj_keymt, "mimetype");
// All other meta fields are directly copied from
// Dijon::Filter::metaData to Rcl::Doc::meta. The defininitions which
// follow are just for well-known names, with no particular processing
// in internfile.
DEF_CSTR(dj_keytitle, "title");
DEF_CSTR(dj_keyrecipient, "recipient");
DEF_CSTR(dj_keymsgid, "msgid");
DEF_CSTR(dj_keyabstract, "abstract");
DEF_CSTR(dj_keyauthor, "author");
DEF_CSTR(dj_keycharset, "charset");
DEF_CSTR(dj_keycontent, "content");
DEF_CSTR(dj_keyipath, "ipath");
DEF_CSTR(dj_keymd5, "md5");
DEF_CSTR(dj_keymt, "mimetype");