git: 0c3409cfc37c - main - deskutils/mindforger: new port had been added (+)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 17 Dec 2021 17:33:56 UTC
The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=0c3409cfc37cfce255d0578b13805bf059a3be16 commit 0c3409cfc37cfce255d0578b13805bf059a3be16 Author: Alexey Dokuchaev <danfe@FreeBSD.org> AuthorDate: 2021-12-17 17:32:56 +0000 Commit: Alexey Dokuchaev <danfe@FreeBSD.org> CommitDate: 2021-12-17 17:32:56 +0000 deskutils/mindforger: new port had been added (+) MindForger is a markdown editor and a thinking notebook. WWW: https://www.mindforger.com/ --- deskutils/Makefile | 1 + deskutils/mindforger/Makefile | 30 +++++++++++++++ deskutils/mindforger/distinfo | 3 ++ deskutils/mindforger/files/patch-lib_lib.pro | 31 +++++++++++++++ .../files/patch-lib_src_gear_string__utils.h | 17 +++++++++ ...utolinking_naive__autolinking__preprocessor.cpp | 23 +++++++++++ .../mindforger/files/patch-lib_src_mind_mind.cpp | 30 +++++++++++++++ deskutils/mindforger/pkg-descr | 7 ++++ deskutils/mindforger/pkg-plist | 44 ++++++++++++++++++++++ 9 files changed, 186 insertions(+) diff --git a/deskutils/Makefile b/deskutils/Makefile index b20c2d78f6e6..49d861b1b96a 100644 --- a/deskutils/Makefile +++ b/deskutils/Makefile @@ -171,6 +171,7 @@ SUBDIR += mencal SUBDIR += menumaker SUBDIR += meteo + SUBDIR += mindforger SUBDIR += moregroupware SUBDIR += mozo SUBDIR += myitcrm diff --git a/deskutils/mindforger/Makefile b/deskutils/mindforger/Makefile new file mode 100644 index 000000000000..fc84ee3fc04b --- /dev/null +++ b/deskutils/mindforger/Makefile @@ -0,0 +1,30 @@ +# Created by: Alexey Dokuchaev <danfe@FreeBSD.org> + +PORTNAME= mindforger +PORTVERSION= 1.52.0 +CATEGORIES= deskutils + +MAINTAINER= danfe@FreeBSD.org +COMMENT= Thinking notebook and markdown editor + +LICENSE= GPLv2+ + +USES= qmake qt:5 +USE_GITHUB= yes +GH_ACCOUNT= dvorka +USE_QT= buildtools_build core declarative gui location network \ + printsupport webchannel webengine widgets + +QMAKE_ARGS= CONFIG+="mfwebengine mfnocxx mfnomd2html" + +post-patch: + @${REINPLACE_CMD} -e '/_WIN32/s,_APPLE,_${OPSYS},' \ + ${WRKSRC}/app/src/qt/note_view_presenter.cpp \ + ${WRKSRC}/app/src/qt/note_view_presenter.h \ + ${WRKSRC}/app/src/qt/outline_header_view_presenter.cpp + @${REINPLACE_CMD} -e '/#include <sys\/dir\.h>/d' \ + ${WRKSRC}/lib/src/config/config.h + @${REINPLACE_CMD} -e '/path = /s,/usr,$$$$PREFIX,' \ + ${WRKSRC}/app/app.pro ${WRKSRC}/mindforger.pro + +.include <bsd.port.mk> diff --git a/deskutils/mindforger/distinfo b/deskutils/mindforger/distinfo new file mode 100644 index 000000000000..9d5feabe5669 --- /dev/null +++ b/deskutils/mindforger/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1583687032 +SHA256 (dvorka-mindforger-1.52.0_GH0.tar.gz) = d0fc9469e932a27f93b13acb6b708e2cfac37858083e0572a4c39b01b8202773 +SIZE (dvorka-mindforger-1.52.0_GH0.tar.gz) = 1775600 diff --git a/deskutils/mindforger/files/patch-lib_lib.pro b/deskutils/mindforger/files/patch-lib_lib.pro new file mode 100644 index 000000000000..8661ce6487d3 --- /dev/null +++ b/deskutils/mindforger/files/patch-lib_lib.pro @@ -0,0 +1,31 @@ +--- lib/lib.pro.orig 2020-03-08 17:03:52 UTC ++++ lib/lib.pro +@@ -136,9 +136,13 @@ SOURCES += \ + src/mind/ai/autolinking/naive_autolinking_preprocessor.cpp \ + src/representations/markdown/cmark_gfm_markdown_transcoder.cpp \ + src/mind/ai/autolinking/autolinking_mind.cpp \ +- src/mind/ai/autolinking/cmark_aho_corasick_block_autolinking_preprocessor.cpp \ + src/mind/limbo.cpp + ++!mfnomd2html { ++ SOURCES += \ ++ src/mind/ai/autolinking/cmark_aho_corasick_block_autolinking_preprocessor.cpp ++} ++ + mfner { + SOURCES += \ + src/mind/ai/nlp/named_entity_recognition.cpp \ +@@ -256,8 +260,12 @@ HEADERS += \ + src/config/config.h \ + src/representations/markdown/cmark_gfm_markdown_transcoder.h \ + src/mind/ai/autolinking/autolinking_mind.h \ +- src/mind/ai/autolinking/cmark_aho_corasick_block_autolinking_preprocessor.h \ + src/mind/limbo.h ++ ++!mfnomd2html { ++ HEADERS += \ ++ src/mind/ai/autolinking/cmark_aho_corasick_block_autolinking_preprocessor.h ++} + + mfner { + HEADERS += \ diff --git a/deskutils/mindforger/files/patch-lib_src_gear_string__utils.h b/deskutils/mindforger/files/patch-lib_src_gear_string__utils.h new file mode 100644 index 000000000000..65a3b2159cc7 --- /dev/null +++ b/deskutils/mindforger/files/patch-lib_src_gear_string__utils.h @@ -0,0 +1,17 @@ +--- lib/src/gear/string_utils.h.orig 2020-03-08 17:03:52 UTC ++++ lib/src/gear/string_utils.h +@@ -114,12 +114,12 @@ static inline char *stringTrim(const char *s) { + } + + static inline std::string &stringLeftTrim(std::string& s) { +- s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun<int, int>(isspace)))); ++ s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int c) { return !std::isspace(c); })); + return s; + } + + static inline std::string &stringRightTrim(std::string& s) { +- s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<int, int>(isspace))).base(), s.end()); ++ s.erase(std::find_if(s.rbegin(), s.rend(), [](int c) { return !std::isspace(c); }).base(), s.end()); + return s; + } + diff --git a/deskutils/mindforger/files/patch-lib_src_mind_ai_autolinking_naive__autolinking__preprocessor.cpp b/deskutils/mindforger/files/patch-lib_src_mind_ai_autolinking_naive__autolinking__preprocessor.cpp new file mode 100644 index 000000000000..c71c909f5a64 --- /dev/null +++ b/deskutils/mindforger/files/patch-lib_src_mind_ai_autolinking_naive__autolinking__preprocessor.cpp @@ -0,0 +1,23 @@ +--- lib/src/mind/ai/autolinking/naive_autolinking_preprocessor.cpp.orig 2020-03-08 17:03:52 UTC ++++ lib/src/mind/ai/autolinking/naive_autolinking_preprocessor.cpp +@@ -60,6 +60,11 @@ bool NaiveAutolinkingPreprocessor::containsLinkCodeMat + return false; + } + ++static bool aliasSizeComparator(const Thing* t1, const Thing* t2) ++{ ++ return t1->getAutolinkingAlias().size() > t2->getAutolinkingAlias().size(); ++} ++ + void NaiveAutolinkingPreprocessor::updateThingsIndex() + { + // IMPROVE update indices only if an O/N is modified (except writing read timestamps) +@@ -145,7 +150,7 @@ void NaiveAutolinkingPreprocessor::process(const vecto + // IMPROVE loop to be changed to Aho-Corasic trie + + // inject Os, then Ns +- for(Thing* t:mind.autolink()->getThings()) { ++ for(Thing* t:things) { + size_t found; + bool match, insensitiveMatch; + string lowerAlias{}; diff --git a/deskutils/mindforger/files/patch-lib_src_mind_mind.cpp b/deskutils/mindforger/files/patch-lib_src_mind_mind.cpp new file mode 100644 index 000000000000..8fbd1b81fcde --- /dev/null +++ b/deskutils/mindforger/files/patch-lib_src_mind_mind.cpp @@ -0,0 +1,30 @@ +--- lib/src/mind/mind.cpp.orig 2020-03-08 17:03:52 UTC ++++ lib/src/mind/mind.cpp +@@ -43,7 +43,7 @@ Mind::Mind(Configuration &configuration) + #ifdef MF_MD_2_HTML_CMARK + autolinking{new AutolinkingMind{*this}}, + #else +- autolinking{nullptr} ++ autolinking{nullptr}, + #endif + exclusiveMind{}, + timeScopeAspect{}, +@@ -279,7 +279,7 @@ bool Mind::autolinkFindLongestPrefixWord(std::string& + { + #ifdef MF_MD_2_HTML_CMARK + return autolinking->findLongestPrefixWord(s, r); +-#elif ++#else + return false; + #endif + } +@@ -1079,7 +1079,9 @@ void Mind::noteDemote(Note* note, Outline::Patch* patc + + void Mind::noteOnRename(const std::string& oldName, const std::string& newName) + { ++#ifdef MF_MD_2_HTML_CMARK + autolinking->update(oldName, newName); ++#endif + } + + void Mind::onRemembering() diff --git a/deskutils/mindforger/pkg-descr b/deskutils/mindforger/pkg-descr new file mode 100644 index 000000000000..b817118d39fe --- /dev/null +++ b/deskutils/mindforger/pkg-descr @@ -0,0 +1,7 @@ +MindForger is open, free, well performing Markdown editor which respects your +privacy and enables security. + +MindForger is actually more than an editor or IDE -- it's human mind inspired +personal knowledge management tool. + +WWW: https://www.mindforger.com/ diff --git a/deskutils/mindforger/pkg-plist b/deskutils/mindforger/pkg-plist new file mode 100644 index 000000000000..69e11d024ba4 --- /dev/null +++ b/deskutils/mindforger/pkg-plist @@ -0,0 +1,44 @@ +bin/mindforger +share/applications/mindforger.desktop +share/icons/mindforger/adapt.svg +share/icons/mindforger/back.svg +share/icons/mindforger/dashboard.svg +share/icons/mindforger/find-fts.svg +share/icons/mindforger/find-n-name.svg +share/icons/mindforger/find-n-tag.svg +share/icons/mindforger/find-o-name.svg +share/icons/mindforger/find-o-tag.svg +share/icons/mindforger/flat-adapt.svg +share/icons/mindforger/flat-dashboard.svg +share/icons/mindforger/flat-find-fts.svg +share/icons/mindforger/flat-help.svg +share/icons/mindforger/flat-home.svg +share/icons/mindforger/flat-new.svg +share/icons/mindforger/flat-open-file.svg +share/icons/mindforger/flat-open-repository.svg +share/icons/mindforger/flat-scope.svg +share/icons/mindforger/flat-think.svg +share/icons/mindforger/flat-view-eisenhower.svg +share/icons/mindforger/flat-view-navigator.svg +share/icons/mindforger/flat-view-outlines.svg +share/icons/mindforger/flat-view-recent-notes.svg +share/icons/mindforger/flat-view-tags.svg +share/icons/mindforger/forward.svg +share/icons/mindforger/help.svg +share/icons/mindforger/home.svg +share/icons/mindforger/mindforger-logo-inkscape.svg +share/icons/mindforger/mindforger.icns +share/icons/mindforger/mindforger.ico +share/icons/mindforger/mindforger.png +share/icons/mindforger/mindforger128x128.png +share/icons/mindforger/new.svg +share/icons/mindforger/open-file.svg +share/icons/mindforger/open-repository.svg +share/icons/mindforger/scope.svg +share/icons/mindforger/think.svg +share/icons/mindforger/view-eisenhower.svg +share/icons/mindforger/view-navigator.svg +share/icons/mindforger/view-outlines.svg +share/icons/mindforger/view-recent-notes.svg +share/icons/mindforger/view-tags.svg +share/man/man1/mindforger.1.gz