From nobody Thu Aug 08 20:01:12 2024 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 4WfybY0Dd4z5S8Ch; Thu, 08 Aug 2024 20:01:13 +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 4WfybX4SlSz4nwc; Thu, 8 Aug 2024 20:01:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723147272; 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=/PafqcFYZiwwVVHvFHaImdnfaz/0JV2ohOa1hTMemBQ=; b=dQPh57yU6/4+W4mNYerdwmO1z7H8X+JEhW/NWnZ7dWBWuUDCwXHDinULhMrenm2wrKDNYH VJ80U6FdJ7me+DC5BMZfv8WOE9OV0fsUqj4ZPI7elx4gP4yIdc538PjWAKu3ZZVSosDf/T oBjluRtlQEL8eqqgukC7v2t0egv4PHTcmwBvxfT+HL1gq1kp4OBBMwqcIB0U/V0sh19tqq c/fDXDM6kYgSaPMdUdFpFCK+L9fGXh8AwhtH59inuZFHOYge+KrFP6kEaH4IvHS+1TeKnQ 2ryY3bCHPh+Mr/5LZzj+/Gbmuk8fVg9JWvwpta6M9X91Uz+dgtw2YRGUp6Obmw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723147272; a=rsa-sha256; cv=none; b=XISPsZ9tVPtiGYHevn8BTpdTQ4J6OCHCiGMA9oLfWYn0gOaC1kMNos2+uNXTZioghXnzyl 9weVV7HbJ6chVRd6w4/eL3o7AD7uFV4gbnHjMLwzi8n5c53Gpl+Lz70kbie6iPfkUnYmdx OABuz8hXA5JhmTIFcCTeS1IrguQD/u8y6OyHmoMHWIOYdBpurCD70zOo8pUyutfswjYuxw YKnffFVfNq1M3UyWzCoqVTXgfEfpTkTnEyyHP1hbTt/kJXfdTSrBq/fJsR71lgRqGSG0jX C9jhMa5BnAYgagW6K8GKQ5p4TiuAfku67c7GwfZ3MCZ1TB6a9V7tz2PHDhAJrQ== 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=1723147272; 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=/PafqcFYZiwwVVHvFHaImdnfaz/0JV2ohOa1hTMemBQ=; b=G8uggBMj4AmsgCP+4qvJ+sAv4LVSC7pxmF/2oVIu7yc0qEnHCM52nT9+qDwkvDWtak2kCH oZGioGEV5YdKgeKTOmNx9x4ucViL4f1Q6AaMh5iCAmGMybiaXIM46kyNtun5I8I8iHlZLa hHGHJgp7cOJvk0u9XCod7zilAG4m2L7YL8DzlAW5qY0p7iuZq5OY/Ntem3VMczqWCzHbVB YuAsNjNxb7q0ajyIRdolU9qsvsJBMiHEpsGeGqeq+ZqScuJUJFo+5emQl/rov2oYmu18qP 43ivU6tRs1DOvRaErWzlxo7QyJO7p2Yo6GAIqwTng38bl/mP42NEPSzLPsFuYw== 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 4WfybX3mkszmcT; Thu, 8 Aug 2024 20:01:12 +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 478K1CkL014339; Thu, 8 Aug 2024 20:01:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 478K1CeY014336; Thu, 8 Aug 2024 20:01:12 GMT (envelope-from git) Date: Thu, 8 Aug 2024 20:01:12 GMT Message-Id: <202408082001.478K1CeY014336@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: b5bb445feab3 - main - misc/ollama: Fix inference; Add ONLY_FOR_ARGHxx lines; Add pkg-message 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: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b5bb445feab3021d3e09b963be2afeb9082e5497 Auto-Submitted: auto-generated The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=b5bb445feab3021d3e09b963be2afeb9082e5497 commit b5bb445feab3021d3e09b963be2afeb9082e5497 Author: Yuri Victorovich AuthorDate: 2024-08-08 19:59:51 +0000 Commit: Yuri Victorovich CommitDate: 2024-08-08 20:01:10 +0000 misc/ollama: Fix inference; Add ONLY_FOR_ARGHxx lines; Add pkg-message --- misc/ollama/Makefile | 17 ++++++++++++++--- misc/ollama/pkg-message | 24 ++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/misc/ollama/Makefile b/misc/ollama/Makefile index 2989a5229b2e..d388e976d172 100644 --- a/misc/ollama/Makefile +++ b/misc/ollama/Makefile @@ -1,7 +1,7 @@ PORTNAME= ollama DISTVERSIONPREFIX= v DISTVERSION= 0.3.4 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= misc # machine-learning MAINTAINER= yuri@FreeBSD.org @@ -11,11 +11,13 @@ WWW= https://ollama.com/ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE +ONLY_FOR_ARCHS= amd64 +ONLY_FOR_ARCHS_REASON= bundled patched llama-cpp is placed into the arch-specific path + BUILD_DEPENDS= bash:shells/bash \ cmake:devel/cmake-core \ vulkan-headers>0:graphics/vulkan-headers -LIB_DEPENDS= libllama.so:misc/llama-cpp \ - libvulkan.so:graphics/vulkan-loader +LIB_DEPENDS= libvulkan.so:graphics/vulkan-loader USES= go:1.22,modules pkgconfig @@ -27,6 +29,15 @@ GH_TUPLE= ggerganov:llama.cpp:6eeaeba:llama_cpp/llm/llama.cpp PLIST_FILES= bin/${PORTNAME} +post-patch: # workaround for https://github.com/ollama/ollama/issues/6259 (use of extenral libllama.so) + @${REINPLACE_CMD} \ + -e '\ + s| llama | llama omp |; \ + s| llama | ${WRKSRC}/llm/build/bsd/x86_64_static/src/libllama.a |; \ + s| ggml | ${WRKSRC}/llm/build/bsd/x86_64_static/ggml/src/libggml.a |; \ + ' \ + ${WRKSRC}/llm/ext_server/CMakeLists.txt + pre-build: @${CP} ${WRKSRC}/app/store/store_linux.go ${WRKSRC}/app/store/store_bsd.go @cd ${GO_WRKSRC} && \ diff --git a/misc/ollama/pkg-message b/misc/ollama/pkg-message new file mode 100644 index 000000000000..90096ac82cef --- /dev/null +++ b/misc/ollama/pkg-message @@ -0,0 +1,24 @@ +[ +{ type: install + message: <