diff --git a/packages/recoll/Makefile.in.patch b/packages/recoll/Makefile.in.patch new file mode 100644 index 000000000000000..4c238bb041694ab --- /dev/null +++ b/packages/recoll/Makefile.in.patch @@ -0,0 +1,27 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -1145,7 +1145,7 @@ + # someone fixes it: + # 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) ++OPTSFORPYTHON = + defconfdir = $(pkgdatadir)/examples + defconf_DATA = \ + desktop/recollindex.desktop \ +@@ -2802,13 +2802,13 @@ + @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@ for v in 3;do test -n "`command -v python$${v}`" && \ + @MAKEPYTHON_TRUE@ libdir=$(libdir) python$${v} setup.py build; \ + @MAKEPYTHON_TRUE@ done \ + @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@ for v in 3;do test -n "`command -v python$${v}`" && \ + @MAKEPYTHON_TRUE@ python$${v} setup.py install \ + @MAKEPYTHON_TRUE@ --prefix=${prefix} --root=$${DESTDIR:-/} $(OPTSFORPYTHON); \ + @MAKEPYTHON_TRUE@ done; \ diff --git a/packages/recoll/build.sh b/packages/recoll/build.sh index dc8cff33db90ddc..1433a7ced2823e8 100644 --- a/packages/recoll/build.sh +++ b/packages/recoll/build.sh @@ -3,15 +3,29 @@ TERMUX_PKG_DESCRIPTION="Full-text search for your desktop" TERMUX_PKG_LICENSE="GPL-2.0" TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_VERSION=1.33.1 -TERMUX_PKG_SRCURL=http://www.lesbonscomptes.com/recoll/recoll-${TERMUX_PKG_VERSION}.tar.gz +TERMUX_PKG_REVISION=2 +TERMUX_PKG_SRCURL=https://www.lesbonscomptes.com/recoll/recoll-${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_SHA256=025dec0b9745e1ddacd86ee5478f9c52b2da2e5c307f831aaa5b2c7f9d7e8db9 -TERMUX_PKG_DEPENDS="aspell, libxapian, libxslt, zlib, python" +TERMUX_PKG_DEPENDS="aspell, libiconv, libxapian, libxml2, libxslt, zlib" TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" --disable-userdoc --disable-python-chm --disable-x11mon --disable-qtgui" -TERMUX_PKG_REVISION=1 termux_step_pre_configure() { LDFLAGS+=" $($CC -print-libgcc-file-name)" CXXFLAGS+=" -fPIC" _PYTHON_VERSION=$(source $TERMUX_SCRIPTDIR/packages/python/build.sh; echo $_MAJOR_VERSION) CPPFLAGS+=" -I${TERMUX_PREFIX}/include/python${_PYTHON_VERSION}/" + + termux_setup_python_crossenv + pushd $TERMUX_PYTHON_CROSSENV_SRCDIR + _CROSSENV_PREFIX=$TERMUX_PKG_BUILDDIR/python-crossenv-prefix + python${_PYTHON_VERSION} -m crossenv \ + $TERMUX_PREFIX/bin/python${_PYTHON_VERSION} \ + ${_CROSSENV_PREFIX} + popd + . ${_CROSSENV_PREFIX}/bin/activate + + echo "Applying python-recoll-setup.py.in.diff" + sed "s|@PYTHON_VERSION@|${_PYTHON_VERSION}|g" \ + $TERMUX_PKG_BUILDER_DIR/python-recoll-setup.py.in.diff \ + | patch --silent -p1 } diff --git a/packages/recoll/python-recoll-setup.py.in.diff b/packages/recoll/python-recoll-setup.py.in.diff new file mode 100644 index 000000000000000..cbc6fb957ad0826 --- /dev/null +++ b/packages/recoll/python-recoll-setup.py.in.diff @@ -0,0 +1,22 @@ +--- a/python/recoll/setup.py.in ++++ b/python/recoll/setup.py.in +@@ -13,8 +13,8 @@ + localtop = os.path.join(os.path.dirname(__file__), '..', '..') + + library_dirs = [os.path.join(localtop, '.libs')] +-if "CYGWIN" in os.environ: +- libraries = ['recoll', 'xapian', 'iconv', 'z'] ++if True: ++ libraries = ['recoll', 'python@PYTHON_VERSION@', 'xslt', 'xml2', 'xapian', 'iconv', 'z'] + else: + libraries = ['recoll'] + +@@ -31,7 +31,7 @@ + define_macros = [ + ('RECOLL_DATADIR', '"@RECOLL_DATADIR@"') + ], +- include_dirs = ['/usr/local/include', ++ include_dirs = [ + os.path.join(top, 'utils'), + os.path.join(top, 'common'), + os.path.join(localtop, 'common'), diff --git a/packages/recoll/recoll-python.subpackage.sh b/packages/recoll/recoll-python.subpackage.sh new file mode 100644 index 000000000000000..1d215105dc84f2e --- /dev/null +++ b/packages/recoll/recoll-python.subpackage.sh @@ -0,0 +1,3 @@ +TERMUX_SUBPKG_INCLUDE="lib/python*" +TERMUX_SUBPKG_DESCRIPTION="Python interface for Recoll" +TERMUX_SUBPKG_DEPENDS="python"