Updated macport to 1.24.3

This commit is contained in:
Jean-Francois Dockes 2018-11-29 19:07:24 +01:00
parent 503719f666
commit 9a9e10c7d6
5 changed files with 133 additions and 46 deletions

View File

@ -4,7 +4,7 @@ PortSystem 1.0
PortGroup app 1.0
name recoll
version 1.19.11p1
version 1.24.3
categories textproc
platforms darwin
license GPL-2+
@ -22,14 +22,15 @@ checksums rmd160 2518c8ce8cf5661985283c153c20b1caec9e5860 \
size 2675171
depends_lib port:xapian-core \
port:qt4-mac \
port:qt5 \
port:qt5-qtwebkit \
port:aspell \
port:libiconv \
port:zlib
depends_run port:antiword \
port:catdoc \
port:libxslt \
port:py27-libxml2 \
port:py27-libxslt \
port:poppler \
port:unrtf \
port:unzip
@ -39,10 +40,17 @@ patchfiles patch-sampleconf-mimeview.diff \
patch-rclaspell-dylib.diff \
patch-netcon-traces.diff
configure.args --without-x \
--disable-x11mon
# 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
build.args CC=${configure.cc} CXX=${configure.cxx}
pre-destroot {
xinstall -m 755 ${worksrcpath}/qtgui/recoll.app/Contents/MacOS/recoll ${destroot}${prefix}/bin/${name}
}
# g++-4.2: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
universal_variant no

View File

@ -0,0 +1,12 @@
--- Makefile.in 2018-11-15 19:07:37.000000000 +0100
+++ Makefile.in.new 2018-11-29 17:08:19.000000000 +0100
@@ -720,8 +720,7 @@
# We use -release: the lib is only shared
# between recoll programs from the same release.
# -version-info $(VERSION_INFO)
-librecoll_la_LDFLAGS = -release $(VERSION) \
- -Wl,--no-undefined -Wl,--warn-unresolved-symbols
+librecoll_la_LDFLAGS = -release $(VERSION)
librecoll_la_LIBADD = $(LIBXAPIAN) $(LIBICONV) $(LIBTHREADS)
recollindex_SOURCES = \

View File

@ -0,0 +1,25 @@
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<struct kevent> 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");

View File

@ -0,0 +1,68 @@
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<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:

View File

@ -1,5 +1,5 @@
--- sampleconf/mimeview 2013-09-30 18:45:06.000000000 +0200
+++ sampleconf/mimeview.mac 2013-09-30 18:45:06.000000000 +0200
--- sampleconf/mimeview 2018-11-29 13:33:09.000000000 +0100
+++ sampleconf/mimeview.mac 2018-11-29 16:38:52.000000000 +0100
@@ -2,7 +2,8 @@
## ##########################################
@ -10,13 +10,17 @@
# Mime types which we should not uncompress if they are found gzipped or
# bzipped because the native viewer knows how to handle. These would be
@@ -16,20 +17,17 @@
@@ -16,22 +17,17 @@
# search string
# - For pages of CHM and EPUB documents where we can choose to open the
# parent document instead of a temporary html file.
-# Use xallexcepts- and xallexcepts+ in a user file to add or remove from
-# the default xallexcepts list
-
-xallexcepts = application/pdf application/postscript application/x-dvi \
- text/html|gnuinfo text/html|chm text/html|epub \
- application/x-fsdirectory|parentopen inode/directory|parentopen
-
+#xallexcepts = application/pdf application/postscript application/x-dvi \
+# text/html|gnuinfo text/html|chm text/html|epub
@ -29,50 +33,22 @@
-# Open the parent epub document for epub parts instead of opening them as
-# html documents. This is almost always what we want.
-text/html|epub = ebook-viewer %F;ignoreipath=1
-
-application/x-gnote = gnote %f
+# If you want to open the parent epub document for epub parts instead of
+# opening them as html documents:
+#text/html|epub = ebook-viewer %F;ignoreipath=1
application/x-mobipocket-ebook = ebook-viewer %f
application/x-gnote = gnote %f
@@ -76,13 +74,9 @@
application/vnd.wordperfect = libreoffice %f
text/rtf = libreoffice %f
+application/x-chm = kchmviewer %f
application/x-dia-diagram = dia %f
-
application/x-fsdirectory = dolphin %f
-inode/directory = dolphin %f
-application/x-fsdirectory|parentopen = dolphin --select %(childurl) %f
-inode/directory|parentopen = dolphin --select %(childurl) %f
-
application/x-gnuinfo = xterm -e "info -f %f"
application/x-gnumeric = gnumeric %f
@@ -102,11 +96,6 @@
image/x-ms-bmp = gwenview %f
image/x-xpmi = gwenview %f
-# Opening mail messages not always works.
-# - Thunderbird will only open a single-message file if it has an .emf
-# extension
-# - "sylpheed %f" seems to work ok as of version 3.3
-# - "kmail --view %u" works
message/rfc822 = thunderbird -file %f
text/x-mail = thunderbird -file %f
application/x-mimehtml = thunderbird -file %f
@@ -119,11 +108,11 @@
application/x-tar = ark %f
@@ -146,12 +142,11 @@
application/zip = ark %f
application/x-7z-compressed = ark %f
-application/x-awk = emacsclient --no-wait %f
-application/x-perl = emacsclient --no-wait %f
-text/x-perl = emacsclient --no-wait %f
-application/x-shellscript = emacsclient --no-wait %f
-text/x-shellscript = emacsclient --no-wait %f
-text/x-srt = emacsclient --no-wait %f
+application/x-awk = emacsclient %f
+application/x-perl = emacsclient %f
+text/x-perl = emacsclient %f
@ -81,7 +57,7 @@
# Or firefox -remote "openFile(%u)"
text/html = firefox %u
@@ -135,41 +124,39 @@
@@ -163,16 +158,15 @@
application/x-webarchive = konqueror %f
text/x-fictionbook = ebook-viewer %f
@ -92,6 +68,7 @@
-text/plain = emacsclient --no-wait %f
-text/x-awk = emacsclient --no-wait %f
-text/x-c = emacsclient --no-wait %f
-text/x-lua = emacsclient --no-wait %f
-text/x-c+ = emacsclient --no-wait %f
-text/x-c++ = emacsclient --no-wait %f
+application/x-tex = emacsclient %f
@ -106,10 +83,7 @@
text/x-csv = libreoffice %f
text/x-html-sidux-man = konqueror %f
text/x-html-aptosid-man = iceweasel %f
-application/x-chm = kchmviewer %f
# Html pages inside a chm have a chm rclaptg set by the filter. Kchmviewer
# knows how to use the ipath (which is the internal chm path) to open the
@@ -183,22 +177,21 @@
# file at the right place
text/html|chm = kchmviewer --url %i %F