diff --git a/misc/Makefile b/misc/Makefile index 51624dd375e1..f51be8805059 100644 --- a/misc/Makefile +++ b/misc/Makefile @@ -55,6 +55,7 @@ SUBDIR += cinnamon-translations SUBDIR += claude-code SUBDIR += claude-code-legacy + SUBDIR += claude-science SUBDIR += clawhub SUBDIR += clex SUBDIR += clifm diff --git a/misc/claude-science/Makefile b/misc/claude-science/Makefile new file mode 100644 index 000000000000..00a970f67ae5 --- /dev/null +++ b/misc/claude-science/Makefile @@ -0,0 +1,67 @@ +PORTNAME= claude-science +DISTVERSION= 0.1.43 +CATEGORIES= misc science +MASTER_SITES= https://downloads.claude.ai/claude-science/${DISTVERSION}/ +DISTNAME= linux-x64 +EXTRACT_SUFX= +DIST_SUBDIR= ${PORTNAME}-${DISTVERSION} +EXTRACT_ONLY= + +MAINTAINER= chris.longros@gmail.com +COMMENT= AI workbench for scientists +WWW= https://claude.com/science + +LICENSE= Proprietary +LICENSE_NAME= Anthropic terms of service +LICENSE_TEXT= Full terms can be found at https://www.anthropic.com/legal +LICENSE_PERMS= auto-accept + +ONLY_FOR_ARCHS= amd64 +ONLY_FOR_ARCHS_REASON= is a Linux binary and upstream ships x86-64 only + +USES= linux:rl9 +USE_LINUX= base + +STRIP= # elftoolchain strip fails on these Linux binaries +NO_BUILD= yes +SUB_FILES= claude-science + +NO_WRKSUBDIR= yes + +MANIFEST_URL= https://downloads.claude.ai/claude-science/latest/manifest.json + +PLIST_FILES= bin/claude-science \ + libexec/claude-science + +# Upstream offers no directory index, but latest/manifest.json names the current +# version and the per-platform checksums, so neither check needs a download. +find-new-version: + @TAB=$$(printf '\t'); \ + manifest=$$(fetch -qo - ${MANIFEST_URL}); \ + new_ver=$$(printf '%s\n' "$$manifest" | \ + ${SED} -n 's/.*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p'); \ + new_sha=$$(printf '%s\n' "$$manifest" | \ + ${SED} -n 's/.*"linux-x64"[[:space:]]*:[[:space:]]*"\([0-9a-f]*\)".*/\1/p'); \ + cur_sha=$$(${AWK} '$$1 == "SHA256" { print $$NF }' ${.CURDIR}/distinfo); \ + if [ -z "$$new_ver" ] || [ -z "$$new_sha" ]; then \ + ${ECHO_MSG} "=> Could not read ${MANIFEST_URL}"; \ + exit 1; \ + fi; \ + if [ "$$new_ver" != "${DISTVERSION}" ]; then \ + ${SED} -i '' "s/^DISTVERSION=.*/DISTVERSION=$${TAB}$$new_ver/" \ + ${.CURDIR}/Makefile; \ + ${ECHO_MSG} "=> New version available: ${DISTVERSION} -> $$new_ver"; \ + ${ECHO_MSG} "=> DISTVERSION updated, now run: make makesum"; \ + elif [ "$$new_sha" != "$$cur_sha" ]; then \ + ${ECHO_MSG} "=> Upstream rebuilt ${DISTVERSION}, new checksum: $$new_sha"; \ + else \ + ${ECHO_MSG} "=> No new version available (current: ${DISTVERSION})"; \ + fi + +do-install: + ${INSTALL_PROGRAM} \ + ${DISTDIR}/${DIST_SUBDIR}/linux-x64 \ + ${STAGEDIR}${PREFIX}/libexec/claude-science + ${INSTALL_SCRIPT} ${WRKDIR}/claude-science ${STAGEDIR}${PREFIX}/bin/claude-science + +.include diff --git a/misc/claude-science/distinfo b/misc/claude-science/distinfo new file mode 100644 index 000000000000..2c8ae34e40f6 --- /dev/null +++ b/misc/claude-science/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1788634764 +SHA256 (claude-science-0.1.43/linux-x64) = bd67456d23a70f4ca13c31c910bb4fbb5cf16ecb30919f6bbdeba55bf2e7a528 +SIZE (claude-science-0.1.43/linux-x64) = 142890184 diff --git a/misc/claude-science/files/claude-science.in b/misc/claude-science/files/claude-science.in new file mode 100644 index 000000000000..b267c2d94777 --- /dev/null +++ b/misc/claude-science/files/claude-science.in @@ -0,0 +1,47 @@ +#!/bin/sh +# +# FreeBSD ports wrapper for Claude Science (Linux ELF via Linuxulator) +# + +if [ ! -e /compat/linux/proc/version ]; then + echo "claude-science: error: linprocfs is not mounted on /compat/linux/proc" >&2 + echo "claude-science: enable with: sysrc linux_enable=YES && service linux start" >&2 + exit 1 +fi +if [ ! -d /compat/linux/dev/fd ]; then + echo "claude-science: error: fdescfs is not mounted on /compat/linux/dev/fd" >&2 + echo "claude-science: enable with: sysrc linux_enable=YES && service linux start" >&2 + exit 1 +fi +if ! [ -L /compat/linux/dev/fd/2 ]; then + echo "claude-science: error: fdescfs must be mounted with linrdlnk (it will hang otherwise)" >&2 + echo "claude-science: /etc/fstab: fdescfs /compat/linux/dev/fd fdescfs rw,linrdlnk 0 0" >&2 + echo "claude-science: then: umount /compat/linux/dev/fd && mount /compat/linux/dev/fd" >&2 + echo "claude-science: (or: sysrc linux_enable=YES && service linux start)" >&2 + exit 1 +fi + +# +# The binary knows no DISABLE_AUTOUPDATER or DISABLE_UPDATES variable, it reads +# --no-auto-update out of argv and stores it as update.auto_update. A +# self-update would replace the pkg-managed binary in libexec, so keep the +# background check off for the daemon and let pkg do the updating. +# +case "$1" in +serve) + set -- "$@" --no-auto-update + ;; +update) + case " $* " in + *" --check "*) + ;; + *) + echo "claude-science: self-update would overwrite the installed package" >&2 + echo "claude-science: use pkg upgrade instead, or 'update --check' to only report" >&2 + exit 1 + ;; + esac + ;; +esac + +exec %%PREFIX%%/libexec/claude-science "$@" diff --git a/misc/claude-science/pkg-descr b/misc/claude-science/pkg-descr new file mode 100644 index 000000000000..96813f22a8a7 --- /dev/null +++ b/misc/claude-science/pkg-descr @@ -0,0 +1,10 @@ +Claude Science is an AI workbench for scientists. It integrates the tools and +packages that researchers most commonly use, produces auditable artifacts, and +provides flexible access to computing resources. + +Users have access to over 60 skills and connectors that are pre-configured for +genomics, single-cell, proteomics, structural biology, cheminformatics, and +more. A reviewer agent checks citations and calculations, flagging and +correcting errors. + +claude-science is a closed source Linux binary working through Linuxulator. diff --git a/misc/claude-science/pkg-message b/misc/claude-science/pkg-message new file mode 100644 index 000000000000..aec4b4902733 --- /dev/null +++ b/misc/claude-science/pkg-message @@ -0,0 +1,33 @@ +[ +{ type: install + message: <