Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Feb 2023 19:24:31 GMT
From:      Gleb Popov <arrowd@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 21285a889b4d - main - textproc/obsidian: + Markdown-based knowledge database.
Message-ID:  <202302241924.31OJOVBl065432@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by arrowd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=21285a889b4d19e9ac7e84d567e2f3cc75b77f02

commit 21285a889b4d19e9ac7e84d567e2f3cc75b77f02
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2023-02-15 17:02:45 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2023-02-24 19:24:05 +0000

    textproc/obsidian: + Markdown-based knowledge database.
    
    Differential Revision: https://reviews.freebsd.org/D38691
    
    Sponsored by:   Serenity Cybersecurity, LLC
---
 textproc/Makefile                        |  1 +
 textproc/obsidian/Makefile               | 96 ++++++++++++++++++++++++++++++++
 textproc/obsidian/distinfo               |  5 ++
 textproc/obsidian/files/obsidian.desktop | 10 ++++
 textproc/obsidian/files/obsidian.in      | 14 +++++
 textproc/obsidian/pkg-descr              |  3 +
 textproc/obsidian/pkg-plist              | 80 ++++++++++++++++++++++++++
 7 files changed, 209 insertions(+)

diff --git a/textproc/Makefile b/textproc/Makefile
index 370f3f6c9fe2..4da768f5eb2f 100644
--- a/textproc/Makefile
+++ b/textproc/Makefile
@@ -503,6 +503,7 @@
     SUBDIR += nuspell
     SUBDIR += nux
     SUBDIR += ny-aspell
+    SUBDIR += obsidian
     SUBDIR += ocaml-csv
     SUBDIR += ocaml-expat
     SUBDIR += ocaml-text
diff --git a/textproc/obsidian/Makefile b/textproc/obsidian/Makefile
new file mode 100644
index 000000000000..3f5a1c6a4c79
--- /dev/null
+++ b/textproc/obsidian/Makefile
@@ -0,0 +1,96 @@
+# This port will not be packaged by the official FreeBSD build cluster, because
+# its license doesn't permit redistribution.
+#
+# To build this port locally with minimal effort use
+# cd <PORTSDIR>/textproc/obsidian
+# pkg install -A `make -V 'electron${ELECTRON_VERSION}'`
+# make USE_PACKAGE_DEPENDS_ONLY=yes install clean
+
+PORTNAME=	obsidian
+PORTVERSION=	1.1.9
+CATEGORIES=	textproc
+# Icon is taken from the Nix build recipe
+# https://github.com/NixOS/nixpkgs/blob/de5448dab588ad41aef40f8c7c0c230981656698/pkgs/applications/misc/obsidian/default.nix#L31-L34
+MASTER_SITES=	https://github.com/obsidianmd/obsidian-releases/releases/download/v${PORTVERSION}/ \
+		https://forum.obsidian.md/uploads/default/original/1X/:icon
+DISTFILES=	${DISTNAME}${EXTRACT_SUFX} \
+		bf119bd48f748f4fd2d65f2d1bb05d3c806883b5.png:icon
+EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
+
+MAINTAINER=	arrowd@FreeBSD.org
+COMMENT=	Powerful and extensible knowledge base application
+WWW=		https://obsidian.md
+
+LICENSE=	EULA
+LICENSE_NAME=	End User License Agreement
+LICENSE_TEXT=	See https://obsidian.md/terms
+LICENSE_PERMS=
+
+BUILD_DEPENDS=	electron${ELECTRON_VERSION}:devel/electron${ELECTRON_VERSION}
+RUN_DEPENDS=	electron${ELECTRON_VERSION}:devel/electron${ELECTRON_VERSION}
+
+# All deps below are there only to please stage-qa
+
+LIB_DEPENDS=	libatk-bridge-2.0.so:accessibility/at-spi2-atk \
+		libatspi.so:accessibility/at-spi2-core \
+		libsnappy.so:archivers/snappy \
+		libopus.so:audio/opus \
+		libdbus-1.so:devel/dbus \
+		libicuuc.so:devel/icu \
+		libevent.so:devel/libevent \
+		libnspr4.so:devel/nspr \
+		libFLAC.so:audio/flac \
+		libpci.so:devel/libpci \
+		libdrm.so:graphics/libdrm \
+		libpng.so:graphics/png \
+		libwayland-client.so:graphics/wayland \
+		libwebp.so:graphics/webp \
+		libopenh264.so:multimedia/openh264 \
+		libharfbuzz.so:print/harfbuzz \
+		libexpat.so:textproc/expat2 \
+		libnss3.so:security/nss \
+		libxkbcommon.so:x11/libxkbcommon \
+		libxshmfence.so:x11/libxshmfence \
+		libfontconfig.so:x11-fonts/fontconfig \
+		libcups.so:print/cups \
+		libasound.so:audio/alsa-lib
+
+USES=		desktop-file-utils gettext-runtime gl gnome iconv jpeg xorg
+
+USE_GL=		gbm gl glesv2
+USE_GNOME=	cairo gdkpixbuf2 glib20 gtk30 libxml2 libxslt
+USE_XORG=	x11 xcb xcomposite xcursor xdamage xext xfixes xi xrandr \
+		xrender xscrnsaver xtst
+
+SUB_FILES=	obsidian
+NO_BUILD=	yes
+STRIP=
+
+ELECTRON_VERSION=	21
+ELECTRON_FILES=		chromedriver \
+			libEGL.so \
+			libGLESv2.so \
+			libffmpeg.so \
+			libvk_swiftshader.so \
+			libvulkan.so \
+			resources.pak \
+			snapshot_blob.bin \
+			v8_context_snapshot.bin
+
+do-install:
+	cd ${WRKSRC} && ${COPYTREE_SHARE} \* ${STAGEDIR}${DATADIR}
+	${INSTALL_PROGRAM} ${WRKDIR}/obsidian ${STAGEDIR}${PREFIX}/bin
+	${INSTALL_DATA} ${PATCHDIR}/obsidian.desktop ${STAGEDIR}${DESKTOPDIR}/obsidian.desktop
+	${INSTALL_DATA} ${DISTDIR}/bf119bd48f748f4fd2d65f2d1bb05d3c806883b5.png ${STAGEDIR}${PREFIX}/share/pixmaps/obsidian.png
+
+post-install:
+	${RM} ${STAGEDIR}${DATADIR}/chrome-sandbox
+	${RM} ${STAGEDIR}${DATADIR}/libvulkan.so.1
+.for f in ${ELECTRON_FILES}
+	${RM} ${STAGEDIR}${DATADIR}/${f}
+	${RLN} ${LOCALBASE}/share/electron${ELECTRON_VERSION}/${f} ${STAGEDIR}${DATADIR}/${f}
+.endfor
+# We have to copy the electron binary instead of symlinking
+	${CP} ${LOCALBASE}/share/electron${ELECTRON_VERSION}/electron ${STAGEDIR}${DATADIR}/obsidian
+
+.include <bsd.port.mk>
diff --git a/textproc/obsidian/distinfo b/textproc/obsidian/distinfo
new file mode 100644
index 000000000000..09b4340d34b3
--- /dev/null
+++ b/textproc/obsidian/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1676894388
+SHA256 (obsidian-1.1.9.tar.gz) = 74547b2da0d1270a71acdc8f36c7868baea02001ce29fe40bb655797b4811921
+SIZE (obsidian-1.1.9.tar.gz) = 93057094
+SHA256 (bf119bd48f748f4fd2d65f2d1bb05d3c806883b5.png) = 4227a64156df4043395183dc7b9b23b809df79292d44c208e9649adcf7b2d4a3
+SIZE (bf119bd48f748f4fd2d65f2d1bb05d3c806883b5.png) = 11970
diff --git a/textproc/obsidian/files/obsidian.desktop b/textproc/obsidian/files/obsidian.desktop
new file mode 100644
index 000000000000..317f4a0fd9a2
--- /dev/null
+++ b/textproc/obsidian/files/obsidian.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Type=Application
+Version=1.0
+Name=Obsidian
+GenericName=Knowledge base
+Comment=Knowledge base
+Icon=obsidian
+Exec=obsidian %u
+Categories=Office;
+MimeType=x-scheme-handler/obsidian
diff --git a/textproc/obsidian/files/obsidian.in b/textproc/obsidian/files/obsidian.in
new file mode 100644
index 000000000000..53de60edc6a8
--- /dev/null
+++ b/textproc/obsidian/files/obsidian.in
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# workaround Chromium bug https://bugs.chromium.org/p/chromium/issues/detail?id=918234
+if [ "$DBUS_SESSION_BUS_ADDRESS" = "" ]; then
+    export DBUS_SESSION_BUS_ADDRESS="autolaunch:"
+fi
+
+# disable auto updater on first run
+if [ ! -f $HOME/.config/obsidian/obsidian.json ]; then
+    mkdir -p $HOME/.config/obsidian/
+    echo '{"updateDisabled":true}' > $HOME/.config/obsidian/obsidian.json
+fi
+
+exec %%DATADIR%%/obsidian "$@"
diff --git a/textproc/obsidian/pkg-descr b/textproc/obsidian/pkg-descr
new file mode 100644
index 000000000000..8ee5a9f5c176
--- /dev/null
+++ b/textproc/obsidian/pkg-descr
@@ -0,0 +1,3 @@
+Obsidian is an Electron-based desktop application that allows creating a
+knowledge base from Markdown-formatted notes. Notes can be connected and
+visualized as a graph.
diff --git a/textproc/obsidian/pkg-plist b/textproc/obsidian/pkg-plist
new file mode 100644
index 000000000000..0fc034317637
--- /dev/null
+++ b/textproc/obsidian/pkg-plist
@@ -0,0 +1,80 @@
+bin/obsidian
+share/applications/obsidian.desktop
+%%DATADIR%%/LICENSE.electron.txt
+%%DATADIR%%/LICENSES.chromium.html
+%%DATADIR%%/chrome_100_percent.pak
+%%DATADIR%%/chrome_200_percent.pak
+%%DATADIR%%/chrome_crashpad_handler
+%%DATADIR%%/chromedriver
+%%DATADIR%%/icudtl.dat
+%%DATADIR%%/libEGL.so
+%%DATADIR%%/libGLESv2.so
+%%DATADIR%%/libffmpeg.so
+%%DATADIR%%/libvk_swiftshader.so
+%%DATADIR%%/libvulkan.so
+%%DATADIR%%/locales/af.pak
+%%DATADIR%%/locales/am.pak
+%%DATADIR%%/locales/ar.pak
+%%DATADIR%%/locales/bg.pak
+%%DATADIR%%/locales/bn.pak
+%%DATADIR%%/locales/ca.pak
+%%DATADIR%%/locales/cs.pak
+%%DATADIR%%/locales/da.pak
+%%DATADIR%%/locales/de.pak
+%%DATADIR%%/locales/el.pak
+%%DATADIR%%/locales/en-GB.pak
+%%DATADIR%%/locales/en-US.pak
+%%DATADIR%%/locales/es-419.pak
+%%DATADIR%%/locales/es.pak
+%%DATADIR%%/locales/et.pak
+%%DATADIR%%/locales/fa.pak
+%%DATADIR%%/locales/fi.pak
+%%DATADIR%%/locales/fil.pak
+%%DATADIR%%/locales/fr.pak
+%%DATADIR%%/locales/gu.pak
+%%DATADIR%%/locales/he.pak
+%%DATADIR%%/locales/hi.pak
+%%DATADIR%%/locales/hr.pak
+%%DATADIR%%/locales/hu.pak
+%%DATADIR%%/locales/id.pak
+%%DATADIR%%/locales/it.pak
+%%DATADIR%%/locales/ja.pak
+%%DATADIR%%/locales/kn.pak
+%%DATADIR%%/locales/ko.pak
+%%DATADIR%%/locales/lt.pak
+%%DATADIR%%/locales/lv.pak
+%%DATADIR%%/locales/ml.pak
+%%DATADIR%%/locales/mr.pak
+%%DATADIR%%/locales/ms.pak
+%%DATADIR%%/locales/nb.pak
+%%DATADIR%%/locales/nl.pak
+%%DATADIR%%/locales/pl.pak
+%%DATADIR%%/locales/pt-BR.pak
+%%DATADIR%%/locales/pt-PT.pak
+%%DATADIR%%/locales/ro.pak
+%%DATADIR%%/locales/ru.pak
+%%DATADIR%%/locales/sk.pak
+%%DATADIR%%/locales/sl.pak
+%%DATADIR%%/locales/sr.pak
+%%DATADIR%%/locales/sv.pak
+%%DATADIR%%/locales/sw.pak
+%%DATADIR%%/locales/ta.pak
+%%DATADIR%%/locales/te.pak
+%%DATADIR%%/locales/th.pak
+%%DATADIR%%/locales/tr.pak
+%%DATADIR%%/locales/uk.pak
+%%DATADIR%%/locales/ur.pak
+%%DATADIR%%/locales/vi.pak
+%%DATADIR%%/locales/zh-CN.pak
+%%DATADIR%%/locales/zh-TW.pak
+%%DATADIR%%/obsidian
+%%DATADIR%%/resources.pak
+%%DATADIR%%/resources/app.asar
+%%DATADIR%%/resources/app.asar.unpacked/node_modules/btime/binding.node
+%%DATADIR%%/resources/app.asar.unpacked/node_modules/get-fonts/binding.node
+%%DATADIR%%/resources/app.asar.unpacked/node_modules/vibrancy-win/binding.node
+%%DATADIR%%/resources/obsidian.asar
+%%DATADIR%%/snapshot_blob.bin
+%%DATADIR%%/v8_context_snapshot.bin
+%%DATADIR%%/vk_swiftshader_icd.json
+share/pixmaps/obsidian.png



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302241924.31OJOVBl065432>