From nobody Fri Dec 17 17:33:56 2021 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C11CA18E89DE; Fri, 17 Dec 2021 17:33:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JFx103WbGz4dpt; Fri, 17 Dec 2021 17:33:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5932F1FEF8; Fri, 17 Dec 2021 17:33:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BHHXufg054708; Fri, 17 Dec 2021 17:33:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BHHXuYe054707; Fri, 17 Dec 2021 17:33:56 GMT (envelope-from git) Date: Fri, 17 Dec 2021 17:33:56 GMT Message-Id: <202112171733.1BHHXuYe054707@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Alexey Dokuchaev Subject: git: 0c3409cfc37c - main - deskutils/mindforger: new port had been added (+) List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: danfe X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0c3409cfc37cfce255d0578b13805bf059a3be16 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639762436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0rW7myy9mzhhFRzp28qFtThD8EcrSP7lyZUY9IlkEXU=; b=kKexO4NMBYQ1uhZ8qVld0yaA9Qq0d1DOnJ/I9pjB7lq63vEPRzFHpdZ8FDPjApAoRutS6o r13vBBmqbB96Wa2v75S8tGkInvDrZQ8Ijm8clUd5Z22lNospLIu7fKf4OnKfU0SqaAffsW ShHuACG30NQgS7ar7iFaPrROwX+uvB+bNkQLfss+wHc7RkVtOhvlXeh8IwN6lkD3QDiMCe 0MbKLa1EFNukgMlPZcaxHqOroEJYazB1m/UepFCZjb510pH0Ri5SBfYuasHnXzzaTihTzX xDF5iu7AX+7wt1aTynU8/VkT31Z7aEcl20xFfg5OpLw9EoYdFrzpxFq8cdNn7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639762436; a=rsa-sha256; cv=none; b=GZ9gqYJjofUObNlBH6pXmikKwOtJWpkmjOfvQH8UUjLnswIi9GOT9KYxZhUzArJPsO6cNc Lo3KCVV1WOAS4CbJHW/d6Zb3rVMgPGpdQgA4A6gT6Lbip+Qz2GfSPrAnzb7P4Nw3f72rZr HwnVYFX55reZe9lBFDRrLKMr4FagxZuPSxNB4wX2W5mAgwXI5P0OG1e/wHpTEQUxk3R8rf vGH8cqRY7vLWbIWZBcBhCwbyW+V3TqNWrGWPrsq+iPycOv9ySYa7Vm31MmjejU/MFe1eZZ WPc3z4UgZ48S9mozcdzQaeKNbsKiQ2vnDAQ1gMFG/bcFk+y+zV18ZTlUPLj4nA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=0c3409cfc37cfce255d0578b13805bf059a3be16 commit 0c3409cfc37cfce255d0578b13805bf059a3be16 Author: Alexey Dokuchaev AuthorDate: 2021-12-17 17:32:56 +0000 Commit: Alexey Dokuchaev 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 + +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 /d' \ + ${WRKSRC}/lib/src/config/config.h + @${REINPLACE_CMD} -e '/path = /s,/usr,$$$$PREFIX,' \ + ${WRKSRC}/app/app.pro ${WRKSRC}/mindforger.pro + +.include 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(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(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