From nobody Thu Aug 08 15:38:47 2024 X-Original-To: dev-commits-ports-all@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 4Wfrml56fVz5T4wF; Thu, 08 Aug 2024 15:38:47 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wfrml4c78z4H6c; Thu, 8 Aug 2024 15:38:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723131527; 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=ZpDBS7DgbPTKuOBreVK3N9WEQv3nAzOcTHX7wgBsIfI=; b=JnNj45JhFuLHyV+qppxNBEqosVG2ZdSj6kSnLVdK+4llXvKVpRntefMQ4pie+CMXSljJUJ 3TcBGVzv+4ARI964Tv+mFluCUeDveNwZXCXI4XIR7llAryhphIDGsbVi3JR7hUux870ntU jK+6rc9YW8QjJxF2S01erA32H6ngF62rA8JHOlJHzrfjwirut453sWdNlIetTTrwXwk/OL RQczfqst9unVF0Y6OZ5SovYkkQFl4bOk4Pe4AcnPzI8Hq4iheHr9+i3JQkAC09hLOKeR+w Wd0ctsj8SvRYRTve0tkU89OMpyD3M/7cuL7/vmJYpoKhDSvNdRmvTyiftspOUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723131527; a=rsa-sha256; cv=none; b=b7FWSwN5fAYHy9Xz7bUx7VpzywIJHdzO8f+y9bAt/OSNCXXYwCpRQdRpb6nbJp7Dxi6eOg 798VNWptsUpAdn/58xz1VMvJTA5KmD1DKRezzS0Luv9OGzxi1zsfSKzD8SMLtGnN3lEYKF DwS5Am7K76d92CNF+dYGjtA2ZNIki4tKmnDm9g3ygxsGhmNVFAFMn2rF68jz6ncrUeyZTM 2keG94PmtAszegJOP7TDgw9ui2TW6itwz+TgFcQoammyXmM9YWeZafcQBaaa185gdhxY7l wuURQ41CFyUbZG8ln6F5nT5Qg1CjhvB4RzXJ54i233RAMWUiyUG76QvTxHUnIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723131527; 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=ZpDBS7DgbPTKuOBreVK3N9WEQv3nAzOcTHX7wgBsIfI=; b=G4jXrhuk/Jx/rV1gX4lTCLu5YZ0hnDVHBP5Kf8myRXGUNhxWlkBiXrhPvcwWbgBxYRVAaZ RZggPWhv/ktAlPhtxnluOauTXKBcy3yPuWex3K8tPQ0Rx3uXgEaV+vtb+UgSZuLxSb2hz3 rjx3oO+x0/25a5mCSifdll8+P8t4fdQSO4b0Gs4o585uhxntxBv37ss8q/yUCFRmko6Oid Gty0EeHyNNqhO3h5xf957JkP39xZkrkDHKcr1d1Cxg5iar20fRDbdZxcWrsIlYhtm81e5U 9x657GLkt2EFez027p/gsvGSVbMXv98R8RI8Af9hcJ4UFKUr+qp3/M64CXWn3A== 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 4Wfrml4CfQzfkC; Thu, 8 Aug 2024 15:38:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 478FclMj058396; Thu, 8 Aug 2024 15:38:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 478FclPV058393; Thu, 8 Aug 2024 15:38:47 GMT (envelope-from git) Date: Thu, 8 Aug 2024 15:38:47 GMT Message-Id: <202408081538.478FclPV058393@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Nicola Vitale Subject: git: 5c2606d85f13 - main - misc/oterm: Add new port List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nivit X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c2606d85f13cdb4b1401985a54446ce5d474c0f Auto-Submitted: auto-generated The branch main has been updated by nivit: URL: https://cgit.FreeBSD.org/ports/commit/?id=5c2606d85f13cdb4b1401985a54446ce5d474c0f commit 5c2606d85f13cdb4b1401985a54446ce5d474c0f Author: Nicola Vitale AuthorDate: 2024-08-08 15:37:29 +0000 Commit: Nicola Vitale CommitDate: 2024-08-08 15:38:37 +0000 misc/oterm: Add new port Oterm is a text-based terminal client for Ollama. Features - intuitive and simple terminal UI, no need to run servers, frontends, just type oterm in your terminal. - multiple persistent chat sessions, stored together with the context embeddings and system prompt customizations in sqlite. - can use any of the models you have pulled in Ollama, or your own custom models. - allows for easy customization of the model's system prompt and parameters. https://github.com/ggozad/oterm --- misc/Makefile | 1 + misc/py-oterm/Makefile | 32 ++++++++++++++++++++++++++++++++ misc/py-oterm/distinfo | 3 +++ misc/py-oterm/files/patch-oterm_utils.py | 26 ++++++++++++++++++++++++++ misc/py-oterm/pkg-descr | 11 +++++++++++ 5 files changed, 73 insertions(+) diff --git a/misc/Makefile b/misc/Makefile index 246769ca9f23..22b7c0d472bc 100644 --- a/misc/Makefile +++ b/misc/Makefile @@ -476,6 +476,7 @@ SUBDIR += py-orange3-educational SUBDIR += py-orange3-network SUBDIR += py-orange3-timeseries + SUBDIR += py-oterm SUBDIR += py-palettable SUBDIR += py-papermill SUBDIR += py-pexpect diff --git a/misc/py-oterm/Makefile b/misc/py-oterm/Makefile new file mode 100644 index 000000000000..844590d4d1ff --- /dev/null +++ b/misc/py-oterm/Makefile @@ -0,0 +1,32 @@ +PORTNAME= oterm +DISTVERSION= 0.2.9 +CATEGORIES= misc python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= nivit@FreeBSD.org +COMMENT= Text-based terminal client for Ollama +WWW= https://github.com/ggozad/oterm + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}poetry-core>=1.9.0:devel/py-poetry-core@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}aiosql>=10.1:databases/py-aiosql@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}aiosqlite>=0.19.0:databases/py-aiosqlite@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}linkify-it-py>=2.0.3:textproc/py-linkify-it-py@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}mdit-py-plugins>=0.4.1:textproc/py-mdit-py-plugins@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}ollama>=0.2.0:devel/py-ollama@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}packaging>=24.1:devel/py-packaging@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pillow>=10.3.0:graphics/py-pillow@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pyperclip>=1.7.0:devel/py-pyperclip@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}python-dotenv>=1.0.1:www/py-python-dotenv@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}rich-pixels>=3.0.1:graphics/py-rich-pixels@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}textual>=0.59.0:textproc/py-textual@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}typer>=0.12.3:devel/py-typer@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}uc-micro-py>=1.0.3:textproc/py-uc-micro-py@${PY_FLAVOR} + +USES= python:3.10+ +USE_PYTHON= autoplist pep517 + +.include diff --git a/misc/py-oterm/distinfo b/misc/py-oterm/distinfo new file mode 100644 index 000000000000..7902e93a3e1d --- /dev/null +++ b/misc/py-oterm/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1723108230 +SHA256 (oterm-0.2.9.tar.gz) = 776aa5c87ce09e2c5ef3384e13e3ef31a9fa22a2b8a1b15e3a2ef5a89bb0bf67 +SIZE (oterm-0.2.9.tar.gz) = 20019 diff --git a/misc/py-oterm/files/patch-oterm_utils.py b/misc/py-oterm/files/patch-oterm_utils.py new file mode 100644 index 000000000000..6df624e298c6 --- /dev/null +++ b/misc/py-oterm/files/patch-oterm_utils.py @@ -0,0 +1,26 @@ +--- oterm/utils.py.orig 2024-05-15 16:35:57 UTC ++++ oterm/utils.py +@@ -1,4 +1,4 @@ +-import sys ++import platform + from pathlib import Path + + +@@ -16,12 +16,13 @@ def get_default_data_dir() -> Path: + home = Path.home() + + system_paths = { +- "win32": home / "AppData/Roaming/oterm", +- "linux": home / ".local/share/oterm", +- "darwin": home / "Library/Application Support/oterm", ++ "Darwin": home / "Library/Application Support/oterm", ++ "FreeBSD": home / ".local/share/oterm", ++ "Linux": home / ".local/share/oterm", ++ "Windows": home / "AppData/Roaming/oterm", + } + +- data_path = system_paths[sys.platform] ++ data_path = system_paths[platform.system()] + return data_path + + diff --git a/misc/py-oterm/pkg-descr b/misc/py-oterm/pkg-descr new file mode 100644 index 000000000000..b1759d017fa4 --- /dev/null +++ b/misc/py-oterm/pkg-descr @@ -0,0 +1,11 @@ +Oterm is a text-based terminal client for Ollama. + +Features + + - intuitive and simple terminal UI, no need to run servers, frontends, just + type oterm in your terminal. + - multiple persistent chat sessions, stored together with the context + embeddings and system prompt customizations in sqlite. + - can use any of the models you have pulled in Ollama, or your own custom + models. + - allows for easy customization of the model's system prompt and parameters.