From 254131baaa8ae2604b06ccc9ee5e7c415bd616e9 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Sat, 1 Dec 2018 14:19:20 +0100 Subject: [PATCH] macports: prepare for 1.25 --- packaging/macports/textproc/recoll/Portfile | 15 +- .../recoll/files/patch-netcon-traces.diff | 25 -- .../recoll/files/patch-py2-to-27.diff | 340 ------------------ .../recoll/files/patch-rclaspell-dylib.diff | 68 ---- 4 files changed, 7 insertions(+), 441 deletions(-) delete mode 100644 packaging/macports/textproc/recoll/files/patch-netcon-traces.diff delete mode 100644 packaging/macports/textproc/recoll/files/patch-py2-to-27.diff delete mode 100644 packaging/macports/textproc/recoll/files/patch-rclaspell-dylib.diff diff --git a/packaging/macports/textproc/recoll/Portfile b/packaging/macports/textproc/recoll/Portfile index 7de790d1..3aade3c9 100644 --- a/packaging/macports/textproc/recoll/Portfile +++ b/packaging/macports/textproc/recoll/Portfile @@ -4,7 +4,7 @@ PortSystem 1.0 PortGroup app 1.0 name recoll -version 1.24.3 +version 1.25.0 categories textproc platforms darwin license GPL-2+ @@ -36,15 +36,14 @@ depends_run port:antiword \ port:unzip patchfiles patch-sampleconf-mimeview.diff \ - patch-mkin-no-no-undefined.diff \ - patch-rclaspell-dylib.diff \ - patch-netcon-traces.diff + patch-mkin-no-no-undefined.diff # Note: this is probably not the right way to configure QMAKE -configure.args QMAKE=${prefix}/libexec/qt5/bin/qmake \ - --without-x \ - --disable-x11mon \ - --disable-python-module +configure.args QMAKE=${prefix}/libexec/qt5/bin/qmake \ + --without-x \ + --disable-x11mon \ + --disable-python-module \ + --disable-python-chm build.args CC=${configure.cc} CXX=${configure.cxx} diff --git a/packaging/macports/textproc/recoll/files/patch-netcon-traces.diff b/packaging/macports/textproc/recoll/files/patch-netcon-traces.diff deleted file mode 100644 index d721d93b..00000000 --- a/packaging/macports/textproc/recoll/files/patch-netcon-traces.diff +++ /dev/null @@ -1,25 +0,0 @@ -diff --git utils/netcon.cpp utils/netcon.cpp-new -index 02492e91..fb8eaa0c 100644 ---- utils/netcon.cpp -+++ utils/netcon.cpp-new -@@ -422,9 +422,9 @@ int SelectLoop::doLoop() - // Wait for something to happen - vector events; - events.resize(nfds); -- LOGDEB("Netcon::selectloop: kevent(), nfds = " << nfds << "\n"); -+ LOGDEB1("Netcon::selectloop: kevent(), nfds = " << nfds << "\n"); - int ret = kevent(m->kq, 0, 0, &events[0], events.size(), &ts); -- LOGDEB("Netcon::selectloop: nfds " << nfds << -+ LOGDEB1("Netcon::selectloop: nfds " << nfds << - " kevent returns " << ret << "\n"); - if (ret < 0) { - LOGSYSERR("Netcon::selectloop", "kevent", ""); -@@ -449,7 +449,7 @@ int SelectLoop::doLoop() - int canread = ev.filter == EVFILT_READ; - int canwrite = ev.filter == EVFILT_WRITE; - bool none = !canread && !canwrite; -- LOGDEB("Netcon::selectloop: fd " << int(ev.ident) << " " << -+ LOGDEB1("Netcon::selectloop: fd " << int(ev.ident) << " " << - (none ? "blocked" : "can") << " " << - (canread ? "read" : "") << " " << - (canwrite ? "write" : "") << "\n"); diff --git a/packaging/macports/textproc/recoll/files/patch-py2-to-27.diff b/packaging/macports/textproc/recoll/files/patch-py2-to-27.diff deleted file mode 100644 index 31d97acd..00000000 --- a/packaging/macports/textproc/recoll/files/patch-py2-to-27.diff +++ /dev/null @@ -1,340 +0,0 @@ -diff --git filters/ppt-dump.py filters/ppt-dump.py -index f41a9f39..dc3085a4 100755 ---- filters/ppt-dump.py -+++ filters/ppt-dump.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - # - # This Source Code Form is subject to the terms of the Mozilla Public - # License, v. 2.0. If a copy of the MPL was not distributed with this -diff --git filters/rcl7z filters/rcl7z -index c68c8bcb..ac50c4ec 100755 ---- filters/rcl7z -+++ filters/rcl7z -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - - # 7-Zip file filter for Recoll - -diff --git filters/rclaudio filters/rclaudio -index 94ca0be7..08d6375a 100755 ---- filters/rclaudio -+++ filters/rclaudio -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - - # Audio tag filter for Recoll, using mutagen - -diff --git filters/rclchm filters/rclchm -index f9811c37..3bc9b16d 100755 ---- filters/rclchm -+++ filters/rclchm -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - """Extract Html files from a Microsoft Compiled Html Help file (.chm) - Needs at least python 2.2 for HTMLParser (chmlib needs 2.2 too)""" - -diff --git filters/rcldia filters/rcldia -index 282148eb..a480294b 100755 ---- filters/rcldia -+++ filters/rcldia -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - # -*- coding: utf-8 -*- - from __future__ import print_function - -diff --git filters/rcldjvu.py filters/rcldjvu.py -index c5397195..0be01452 100755 ---- filters/rcldjvu.py -+++ filters/rcldjvu.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - # Copyright (C) 2016 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 -diff --git filters/rcldoc.py filters/rcldoc.py -index e8fa1831..b92b185d 100755 ---- filters/rcldoc.py -+++ filters/rcldoc.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - from __future__ import print_function - - import rclexecm -diff --git filters/rclepub filters/rclepub -index 8042d7f9..51786af1 100755 ---- filters/rclepub -+++ filters/rclepub -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - """Extract Html content from an EPUB file (.epub)""" - from __future__ import print_function - -diff --git filters/rclepub1 filters/rclepub1 -index bd44f635..a7ea6c06 100755 ---- filters/rclepub1 -+++ filters/rclepub1 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - """Extract Html content from an EPUB file (.chm), concatenating all sections""" - from __future__ import print_function - -diff --git filters/rclics filters/rclics -index 0ef04f2d..de177024 100755 ---- filters/rclics -+++ filters/rclics -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - from __future__ import print_function - - # Read an ICS file, break it into "documents" which are events, todos, -diff --git filters/rclimg.py filters/rclimg.py -index 7eb1da91..4eb6c9b0 100755 ---- filters/rclimg.py -+++ filters/rclimg.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - - # Python-based Image Tag extractor for Recoll. This is less thorough - # than the Perl-based rclimg script, but useful if you don't want to -diff --git filters/rclinfo filters/rclinfo -index f353d19e..36cf34e0 100755 ---- filters/rclinfo -+++ filters/rclinfo -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - - # Read a file in GNU info format and output its nodes as subdocs, - # interfacing with recoll execm -diff --git filters/rclkar filters/rclkar -index d6570dd5..34b8d2a2 100755 ---- filters/rclkar -+++ filters/rclkar -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - - # Read a .kar midi karaoke file and translate to recoll indexable format - # This does not work with Python3 yet because python:midi doesn't -diff --git filters/rcllatinclass.py filters/rcllatinclass.py -index 3f8b8634..e6b0fbee 100755 ---- filters/rcllatinclass.py -+++ filters/rcllatinclass.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - """Try to guess a text's language and character set by checking how it matches lists of - common words. This is not a primary method of detection because it's slow and unreliable, but it - may be a help in discrimating, for exemple, before european languages using relatively close -diff --git filters/rclopxml.py filters/rclopxml.py -index b7f7fe83..4f1803c1 100755 ---- filters/rclopxml.py -+++ filters/rclopxml.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - # Copyright (C) 2015 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 -diff --git filters/rclpdf.py filters/rclpdf.py -index 1e6852ea..47b09534 100755 ---- filters/rclpdf.py -+++ filters/rclpdf.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - # Copyright (C) 2014 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 -diff --git filters/rclppt.py filters/rclppt.py -index a4e50265..993bc56c 100755 ---- filters/rclppt.py -+++ filters/rclppt.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - - # Recoll PPT text extractor - # Mso-dumper is not compatible with Python3. We use sys.executable to -diff --git filters/rclpython filters/rclpython -index 615455b3..1e411890 100755 ---- filters/rclpython -+++ filters/rclpython -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - # -*- coding: iso-8859-1 -*- - """ - MoinMoin - Python source parser and colorizer -diff --git filters/rclrar filters/rclrar -index 8f723fa5..5f6adfb0 100755 ---- filters/rclrar -+++ filters/rclrar -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - - # Rar file filter for Recoll - # Adapted from the Zip archive filter by mroark. -diff --git filters/rclrtf.py filters/rclrtf.py -index e4b56d54..ffd0560e 100755 ---- filters/rclrtf.py -+++ filters/rclrtf.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - from __future__ import print_function - - import rclexecm -diff --git filters/rclsoff-flat.py filters/rclsoff-flat.py -index 337a5f94..65bfa73a 100755 ---- filters/rclsoff-flat.py -+++ filters/rclsoff-flat.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - # Copyright (C) 2014 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 -diff --git filters/rclsoff.py filters/rclsoff.py -index 5730d97c..4404a14b 100755 ---- filters/rclsoff.py -+++ filters/rclsoff.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - # Copyright (C) 2014 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 -diff --git filters/rclsvg.py filters/rclsvg.py -index 8c1b8aea..cee17324 100755 ---- filters/rclsvg.py -+++ filters/rclsvg.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - # Copyright (C) 2014 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 -diff --git filters/rcltar filters/rcltar -index d8bf100d..ab4b306e 100755 ---- filters/rcltar -+++ filters/rcltar -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - - # Tar-file filter for Recoll - # Thanks to Recoll user Martin Ziegler -diff --git filters/rcltext.py filters/rcltext.py -index 77359ff6..be410984 100755 ---- filters/rcltext.py -+++ filters/rcltext.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - - # Wrapping a text file. Recoll does it internally in most cases, but - # this is for use by another filter. -diff --git filters/rcltxtlines.py filters/rcltxtlines.py -index 220151fd..b2907364 100755 ---- filters/rcltxtlines.py -+++ filters/rcltxtlines.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - """Index text lines as document (execm handler sample). This exists - to demonstrate the execm interface and is not meant to be useful or - efficient""" -diff --git filters/rcluncomp.py filters/rcluncomp.py -index 32a11c1a..eab3b257 100644 ---- filters/rcluncomp.py -+++ filters/rcluncomp.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - from __future__ import print_function - - import rclexecm -diff --git filters/rclwar filters/rclwar -index b654f3b3..301e28e9 100755 ---- filters/rclwar -+++ filters/rclwar -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - - # WAR web archive filter for recoll. War file are gzipped tar files - -diff --git filters/rclxls.py filters/rclxls.py -index c7b2343a..f8f10f8b 100755 ---- filters/rclxls.py -+++ filters/rclxls.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - - # Extractor for Excel files. - # Mso-dumper is not compatible with Python3. We use sys.executable to -diff --git filters/rclxml.py filters/rclxml.py -index 33ae8e3e..507851db 100755 ---- filters/rclxml.py -+++ filters/rclxml.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - # Copyright (C) 2014 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 -diff --git filters/rclxmp.py filters/rclxmp.py -index 158e1222..602769af 100755 ---- filters/rclxmp.py -+++ filters/rclxmp.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - # Copyright (C) 2016 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 -diff --git filters/rclzip filters/rclzip -index 35739625..0c597fbd 100755 ---- filters/rclzip -+++ filters/rclzip -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - # Copyright (C) 2014 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 -diff --git filters/xls-dump.py filters/xls-dump.py -index abffa330..57a8f113 100755 ---- filters/xls-dump.py -+++ filters/xls-dump.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - # - # This Source Code Form is subject to the terms of the Mozilla Public - # License, v. 2.0. If a copy of the MPL was not distributed with this -diff --git filters/xlsxmltocsv.py filters/xlsxmltocsv.py -index 0c9a5047..90ab06f2 100755 ---- filters/xlsxmltocsv.py -+++ filters/xlsxmltocsv.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python2.7 - # Copyright (C) 2015 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 diff --git a/packaging/macports/textproc/recoll/files/patch-rclaspell-dylib.diff b/packaging/macports/textproc/recoll/files/patch-rclaspell-dylib.diff deleted file mode 100644 index 802a6b53..00000000 --- a/packaging/macports/textproc/recoll/files/patch-rclaspell-dylib.diff +++ /dev/null @@ -1,68 +0,0 @@ -diff --git aspell/rclaspell.cpp aspell/rclaspell.cpp-new -index 698832df..4fd8b6b8 100644 ---- aspell/rclaspell.cpp -+++ aspell/rclaspell.cpp-new -@@ -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 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 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: