From edeb395a2c97179d9c14aa1b56a5cd698f3c7dac Mon Sep 17 00:00:00 2001 From: ajacoutot Date: Mon, 21 Dec 2020 13:25:28 +0000 Subject: [PATCH] Import recoll-1.27.12 Recoll is a full text search application, which means that it finds your data by content rather than by external attributes (like the file name). You specify words (terms) which should or should not appear in the text you are looking for, and receive in return a list of matching documents, ordered so that the most relevant documents will appear first. <...> ok sthen@ --- databases/recoll/Makefile | 54 ++++++++ databases/recoll/distinfo | 2 + databases/recoll/patches/patch-Makefile_in | 52 ++++++++ .../recoll/patches/patch-utils_listmem_cpp | 41 ++++++ databases/recoll/pkg/DESCR | 17 +++ databases/recoll/pkg/PLIST | 123 ++++++++++++++++++ 6 files changed, 289 insertions(+) create mode 100644 databases/recoll/Makefile create mode 100644 databases/recoll/distinfo create mode 100644 databases/recoll/patches/patch-Makefile_in create mode 100644 databases/recoll/patches/patch-utils_listmem_cpp create mode 100644 databases/recoll/pkg/DESCR create mode 100644 databases/recoll/pkg/PLIST diff --git a/databases/recoll/Makefile b/databases/recoll/Makefile new file mode 100644 index 00000000000..590ef7f5300 --- /dev/null +++ b/databases/recoll/Makefile @@ -0,0 +1,54 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2020/12/21 13:25:28 ajacoutot Exp $ + +COMMENT= full text search application + +V= 1.27.12 +DISTNAME= recoll-${V} + +SHARED_LIBS += recoll-${V} 0.0 # 0.0 +SHARED_LIBS += recoll 0.0 # 0.0 + +CATEGORIES= databases sysutils + +HOMEPAGE= https://www.lesbonscomptes.com/recoll/ + +# GPLv2 +PERMIT_PACKAGE= Yes + +MASTER_SITES= https://www.lesbonscomptes.com/recoll/ + +WANTLIB += ${COMPILER_LIBCXX} c iconv lzma m uuid xapian xml2 +WANTLIB += xslt z + +MODULES= lang/python + +MODPY_VERSION= ${MODPY_DEFAULT_VERSION_3} + +USE_GMAKE= Yes + +BUILD_DEPENDS= devel/py-setuptools${MODPY_FLAVOR} \ + textproc/aspell/core + +LIB_DEPENDS= databases/xapian-core \ + textproc/libxslt + +CONFIGURE_STYLE= gnu + +CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ + LDFLAGS="-L${LOCALBASE}/lib" \ + +CONFIGURE_ARGS= --disable-python-chm \ + --disable-qtgui \ + --disable-userdoc \ + --disable-x11mon \ + --without-inotify \ + --without-fam \ + --without-qzeitgeist + +pre-configure: + sed -i -e "s,!!LIBrecoll_VERSION_R!!,${LIBrecoll_VERSION:R}," \ + -e "s,!!LIBrecoll_VERSION_E!!,${LIBrecoll_VERSION:E}," \ + ${WRKSRC}/Makefile.in + ${SUBST_CMD} ${WRKSRC}/Makefile.in + +.include diff --git a/databases/recoll/distinfo b/databases/recoll/distinfo new file mode 100644 index 00000000000..cfe48c4e424 --- /dev/null +++ b/databases/recoll/distinfo @@ -0,0 +1,2 @@ +SHA256 (recoll-1.27.12.tar.gz) = u0QgPg1oNXRgFgnZB++idInu0r6ZKGaM5i6FcVFt6i0= +SIZE (recoll-1.27.12.tar.gz) = 3184471 diff --git a/databases/recoll/patches/patch-Makefile_in b/databases/recoll/patches/patch-Makefile_in new file mode 100644 index 00000000000..0ab9961ccca --- /dev/null +++ b/databases/recoll/patches/patch-Makefile_in @@ -0,0 +1,52 @@ +$OpenBSD: patch-Makefile_in,v 1.1.1.1 2020/12/21 13:25:28 ajacoutot Exp $ + +Index: Makefile.in +--- Makefile.in.orig ++++ Makefile.in +@@ -857,7 +857,7 @@ AM_YFLAGS = -d + # after the recoll version (e.g librecoll-1.27.1.so) + # -version-info $(VERSION_INFO) would handle ABI compat issues, we don't + # need it +-librecoll_la_LDFLAGS = -release $(VERSION) -no-undefined @NO_UNDEF_LINK_FLAG@ ++librecoll_la_LDFLAGS = -release $(VERSION) -version-info !!LIBrecoll_VERSION_R!!:!!LIBrecoll_VERSION_E!! -no-undefined @NO_UNDEF_LINK_FLAG@ + librecoll_la_LIBADD = $(XSLT_LIBS) $(LIBXAPIAN) $(LIBICONV) $(LIBTHREADS) + recollindex_SOURCES = \ + index/recollindex.cpp \ +@@ -2700,16 +2700,12 @@ PicStatic: $(librecoll_la_OBJECTS) + @MAKEPYTHON_TRUE@clean-local:: recollpython-clean + @MAKEPYTHON_TRUE@recollpython: librecoll.la + @MAKEPYTHON_TRUE@ (cd python/recoll; set -x; \ +-@MAKEPYTHON_TRUE@ for v in 2 3;do test -n "`which python$${v}`" && \ +-@MAKEPYTHON_TRUE@ libdir=$(libdir) python$${v} setup.py build; \ +-@MAKEPYTHON_TRUE@ done \ ++@MAKEPYTHON_TRUE@ libdir=$(libdir) ${MODPY_BIN} setup.py build; \ + @MAKEPYTHON_TRUE@ ) + @MAKEPYTHON_TRUE@recollpython-install: + @MAKEPYTHON_TRUE@ (cd python/recoll; set -x; \ +-@MAKEPYTHON_TRUE@ for v in 2 3;do test -n "`which python$${v}`" && \ +-@MAKEPYTHON_TRUE@ python$${v} setup.py install \ ++@MAKEPYTHON_TRUE@ ${MODPY_BIN} setup.py install \ + @MAKEPYTHON_TRUE@ --prefix=${prefix} --root=$${DESTDIR:-/} $(OPTSFORPYTHON); \ +-@MAKEPYTHON_TRUE@ done; \ + @MAKEPYTHON_TRUE@ ) + @MAKEPYTHON_TRUE@recollpython-clean: + @MAKEPYTHON_TRUE@ rm -f python/recoll/*.pyc +@@ -2725,16 +2721,12 @@ PicStatic: $(librecoll_la_OBJECTS) + @MAKEPYTHONCHM_TRUE@clean-local:: rclpychm-clean + @MAKEPYTHONCHM_TRUE@rclpychm: + @MAKEPYTHONCHM_TRUE@ (cd python/pychm; set -x; \ +-@MAKEPYTHONCHM_TRUE@ for v in 2 3;do \ +-@MAKEPYTHONCHM_TRUE@ test -n "`which python$${v}`" && python$${v} setup.py build;\ +-@MAKEPYTHONCHM_TRUE@ done \ ++@MAKEPYTHONCHM_TRUE@ ${MODPY_BIN} setup.py build;\ + @MAKEPYTHONCHM_TRUE@ ) + @MAKEPYTHONCHM_TRUE@rclpychm-install: + @MAKEPYTHONCHM_TRUE@ (cd python/pychm; set -x; \ +-@MAKEPYTHONCHM_TRUE@ for v in 2 3;do test -n "`which python$${v}`" && \ +-@MAKEPYTHONCHM_TRUE@ python$${v} setup.py install \ ++@MAKEPYTHONCHM_TRUE@ ${MODPY_BIN} setup.py install \ + @MAKEPYTHONCHM_TRUE@ --prefix=${prefix} --root=$${DESTDIR:-/} $(OPTSFORPYTHON); \ +-@MAKEPYTHONCHM_TRUE@ done \ + @MAKEPYTHONCHM_TRUE@ ) + @MAKEPYTHONCHM_TRUE@rclpychm-clean: + @MAKEPYTHONCHM_TRUE@ rm -rf python/pychm/build diff --git a/databases/recoll/patches/patch-utils_listmem_cpp b/databases/recoll/patches/patch-utils_listmem_cpp new file mode 100644 index 00000000000..54f87341d19 --- /dev/null +++ b/databases/recoll/patches/patch-utils_listmem_cpp @@ -0,0 +1,41 @@ +$OpenBSD: patch-utils_listmem_cpp,v 1.1.1.1 2020/12/21 13:25:28 ajacoutot Exp $ + +utils/listmem.cpp:31:38: error: too many arguments provided to function-like macro invocation +static void swap16(unsigned char *d, const unsigned char *s, int n) + ^ +/usr/include/sys/endian.h:70:9: note: macro 'swap16' defined here +#define swap16(x) __swap16(x) + +Index: utils/listmem.cpp +--- utils/listmem.cpp.orig ++++ utils/listmem.cpp +@@ -28,7 +28,7 @@ static char *hexa(unsigned int i) + return (asc); + } + +-static void swap16(unsigned char *d, const unsigned char *s, int n) ++static void eswap16(unsigned char *d, const unsigned char *s, int n) + { + if (n & 1) { + n >>= 1; +@@ -44,7 +44,7 @@ static void swap16(unsigned char *d, const unsigned ch + } + } + +-static void swap32(unsigned char *d, const unsigned char *s, int n) ++static void eswap32(unsigned char *d, const unsigned char *s, int n) + { + if (n & 3) { + n >>= 2; +@@ -96,9 +96,9 @@ void listmem(ostream& os, const void *_ptr, int siz, i + return; + } + if (opts & LISTMEM_SWAP16) { +- swap16(mpt, ptr, siz); ++ eswap16(mpt, ptr, siz); + } else if (opts & LISTMEM_SWAP32) { +- swap32(mpt, ptr, siz); ++ eswap32(mpt, ptr, siz); + } + } else { + mpt = (unsigned char *)ptr; diff --git a/databases/recoll/pkg/DESCR b/databases/recoll/pkg/DESCR new file mode 100644 index 00000000000..9c6d2d6f645 --- /dev/null +++ b/databases/recoll/pkg/DESCR @@ -0,0 +1,17 @@ +Recoll is a full text search application, which means that it finds your data +by content rather than by external attributes (like the file name). You specify +words (terms) which should or should not appear in the text you are looking for, +and receive in return a list of matching documents, ordered so that the most +relevant documents will appear first. + +You do not need to remember in what file or email message you stored a given +piece of information. You just ask for related terms, and the tool will return a +list of documents where these terms are prominent, in a similar way to Internet +search engines. + +Full text search applications try to determine which documents are most relevant +to the search terms you provide. Computer algorithms for determining relevance +can be very complex, and in general are inferior to the power of the human mind +to rapidly determine relevance. The quality of relevance guessing is probably +the most important aspect when evaluating a search application. Recoll relies on +the Xapian probabilistic information retrieval library to determine relevance. diff --git a/databases/recoll/pkg/PLIST b/databases/recoll/pkg/PLIST new file mode 100644 index 00000000000..0c7a77e6074 --- /dev/null +++ b/databases/recoll/pkg/PLIST @@ -0,0 +1,123 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2020/12/21 13:25:28 ajacoutot Exp $ +@bin bin/recollindex +lib/python${MODPY_VERSION}/site-packages/Recoll-1.0-py${MODPY_VERSION}.egg-info/ +lib/python${MODPY_VERSION}/site-packages/Recoll-1.0-py${MODPY_VERSION}.egg-info/PKG-INFO +lib/python${MODPY_VERSION}/site-packages/Recoll-1.0-py${MODPY_VERSION}.egg-info/SOURCES.txt +lib/python${MODPY_VERSION}/site-packages/Recoll-1.0-py${MODPY_VERSION}.egg-info/dependency_links.txt +lib/python${MODPY_VERSION}/site-packages/Recoll-1.0-py${MODPY_VERSION}.egg-info/top_level.txt +lib/python${MODPY_VERSION}/site-packages/recoll/ +lib/python${MODPY_VERSION}/site-packages/recoll/__init__.py +${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/recoll/${MODPY_PYCACHE}/ +lib/python${MODPY_VERSION}/site-packages/recoll/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/recoll/${MODPY_PYCACHE}conftree.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/recoll/${MODPY_PYCACHE}rclconfig.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/recoll/${MODPY_PYCACHE}rclextract.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/recoll/${MODPY_PYCACHE}recoll.${MODPY_PYC_MAGIC_TAG}pyc +@so lib/python${MODPY_VERSION}/site-packages/recoll/_recoll.so +lib/python${MODPY_VERSION}/site-packages/recoll/conftree.py +lib/python${MODPY_VERSION}/site-packages/recoll/rclconfig.py +lib/python${MODPY_VERSION}/site-packages/recoll/rclextract.py +lib/python${MODPY_VERSION}/site-packages/recoll/recoll.py +lib/recoll/ +@lib lib/recoll/librecoll-1.27.12.so.${LIBrecoll-1.27.12_VERSION} +@static-lib lib/recoll/librecoll.a +lib/recoll/librecoll.la +@lib lib/recoll/librecoll.so.${LIBrecoll_VERSION} +@man man/man1/recoll.1 +@man man/man1/recollindex.1 +@man man/man1/recollq.1 +@man man/man1/xadump.1 +@man man/man5/recoll.conf.5 +share/recoll/ +share/recoll/examples/ +share/recoll/examples/fields +share/recoll/examples/fragbuts.xml +share/recoll/examples/mimeconf +share/recoll/examples/mimemap +share/recoll/examples/mimeview +share/recoll/examples/rclmon.sh +share/recoll/examples/recoll-dark.css +share/recoll/examples/recoll-dark.qss +share/recoll/examples/recoll.conf +share/recoll/examples/recoll.qss +share/recoll/examples/recollindex.desktop +share/recoll/filters/ +share/recoll/filters/abiword.xsl +share/recoll/filters/cmdtalk.py +share/recoll/filters/conftree.py +share/recoll/filters/fb2.xsl +share/recoll/filters/gnumeric.xsl +share/recoll/filters/hotrecoll.py +share/recoll/filters/kosplitter.py +share/recoll/filters/msodump.zip +share/recoll/filters/okular-note.xsl +share/recoll/filters/opendoc-body.xsl +share/recoll/filters/opendoc-flat.xsl +share/recoll/filters/opendoc-meta.xsl +share/recoll/filters/openxml-meta.xsl +share/recoll/filters/openxml-word-body.xsl +share/recoll/filters/openxml-xls-body.xsl +share/recoll/filters/ppt-dump.py +share/recoll/filters/rcl7z +share/recoll/filters/rclaptosidman +share/recoll/filters/rclaudio +share/recoll/filters/rclbasehandler.py +share/recoll/filters/rclbibtex.sh +share/recoll/filters/rclcheckneedretry.sh +share/recoll/filters/rclchm +share/recoll/filters/rclconfig.py +share/recoll/filters/rcldia +share/recoll/filters/rcldjvu.py +share/recoll/filters/rcldoc.py +share/recoll/filters/rcldvi +share/recoll/filters/rclepub +share/recoll/filters/rclepub1 +share/recoll/filters/rclexec1.py +share/recoll/filters/rclexecm.py +share/recoll/filters/rclfb2.py +share/recoll/filters/rclgaim +share/recoll/filters/rclgenxslt.py +share/recoll/filters/rclhwp.py +share/recoll/filters/rclics +share/recoll/filters/rclimg +share/recoll/filters/rclimg.py +share/recoll/filters/rclinfo +share/recoll/filters/rclkar +share/recoll/filters/rclkwd +share/recoll/filters/rcllatinclass.py +share/recoll/filters/rcllatinstops.zip +share/recoll/filters/rcllyx +share/recoll/filters/rclman +share/recoll/filters/rclmidi.py +share/recoll/filters/rclocr.py +share/recoll/filters/rclocrabbyy.py +share/recoll/filters/rclocrcache.py +share/recoll/filters/rclocrtesseract.py +share/recoll/filters/rclopxml.py +share/recoll/filters/rclpdf.py +share/recoll/filters/rclppt.py +share/recoll/filters/rclps +share/recoll/filters/rclpst.py +share/recoll/filters/rclpurple +share/recoll/filters/rclpython.py +share/recoll/filters/rclrar +share/recoll/filters/rclrtf.py +share/recoll/filters/rclscribus +share/recoll/filters/rclshowinfo +share/recoll/filters/rcltar +share/recoll/filters/rcltex +share/recoll/filters/rcltext.py +share/recoll/filters/rcluncomp +share/recoll/filters/rcluncomp.py +share/recoll/filters/rclwar +share/recoll/filters/rclxls.py +share/recoll/filters/rclxml.py +share/recoll/filters/rclxmp.py +share/recoll/filters/rclxslt.py +share/recoll/filters/rclzip +share/recoll/filters/recoll-we-move-files.py +share/recoll/filters/recollepub.zip +share/recoll/filters/svg.xsl +share/recoll/filters/xls-dump.py +share/recoll/filters/xlsxmltocsv.py +share/recoll/filters/xml.xsl