PORTNAME=	outlines-core
DISTVERSION=	0.2.14
PORTREVISION=	3
CATEGORIES=	textproc python # machine-learning
MASTER_SITES=	PYPI
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
DISTNAME=	${PORTNAME:S/-/_/g}-${DISTVERSION}
DISTFILES=	${DISTNAME}${EXTRACT_SUFX}

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	Structured Text Generation in Rust (outlines-core)
WWW=		https://dottxt-ai.github.io/outlines-core/

LICENSE=	APACHE20
LICENSE_FILE=	${WRKSRC}/LICENSE

BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}maturin>=1.0:devel/py-maturin@${PY_FLAVOR}

USES=		cargo llvm python
USE_PYTHON=	pep517 autoplist pytest

MAKE_ENV+=	LIBCLANG_PATH=${LLVM_PREFIX}/lib

CARGO_BUILD=	no
CARGO_INSTALL=	no
CARGO_TEST=	no

CARGO_CRATES=	adler2-2.0.1 \
		ahash-0.8.12 \
		aho-corasick-1.1.4 \
		atomic-waker-1.1.2 \
		autocfg-1.5.0 \
		aws-lc-rs-1.15.2 \
		aws-lc-sys-0.35.0 \
		base64-0.13.1 \
		base64-0.22.1 \
		bincode-2.0.1 \
		bincode_derive-2.0.1 \
		bitflags-2.10.0 \
		bumpalo-3.19.1 \
		byteorder-1.5.0 \
		bytes-1.11.0 \
		castaway-0.2.4 \
		cc-1.2.52 \
		cfg-if-1.0.4 \
		cfg_aliases-0.2.1 \
		cmake-0.1.57 \
		compact_str-0.9.0 \
		console-0.15.11 \
		crc32fast-1.5.0 \
		crossbeam-deque-0.8.6 \
		crossbeam-epoch-0.9.18 \
		crossbeam-utils-0.8.21 \
		darling-0.20.11 \
		darling_core-0.20.11 \
		darling_macro-0.20.11 \
		dary_heap-0.3.8 \
		derive_builder-0.20.2 \
		derive_builder_core-0.20.2 \
		derive_builder_macro-0.20.2 \
		dirs-5.0.1 \
		dirs-sys-0.4.1 \
		displaydoc-0.2.5 \
		dunce-1.0.5 \
		either-1.15.0 \
		encode_unicode-1.0.0 \
		equivalent-1.0.2 \
		esaxx-rs-0.1.10 \
		find-msvc-tools-0.1.7 \
		flate2-1.1.5 \
		fnv-1.0.7 \
		form_urlencoded-1.2.2 \
		fs_extra-1.3.0 \
		futures-channel-0.3.31 \
		futures-core-0.3.31 \
		futures-io-0.3.31 \
		futures-macro-0.3.31 \
		futures-sink-0.3.31 \
		futures-task-0.3.31 \
		futures-util-0.3.31 \
		getrandom-0.2.16 \
		getrandom-0.3.4 \
		hashbrown-0.16.1 \
		heck-0.5.0 \
		hf-hub-0.4.1 \
		http-1.4.0 \
		http-body-1.0.1 \
		http-body-util-0.1.3 \
		httparse-1.10.1 \
		hyper-1.8.1 \
		hyper-rustls-0.27.7 \
		hyper-util-0.1.19 \
		icu_collections-2.1.1 \
		icu_locale_core-2.1.1 \
		icu_normalizer-2.1.1 \
		icu_normalizer_data-2.1.1 \
		icu_properties-2.1.2 \
		icu_properties_data-2.1.2 \
		icu_provider-2.1.1 \
		ident_case-1.0.1 \
		idna-1.1.0 \
		idna_adapter-1.2.1 \
		indexmap-2.13.0 \
		indicatif-0.17.11 \
		indoc-2.0.7 \
		ipnet-2.11.0 \
		iri-string-0.7.10 \
		itertools-0.14.0 \
		itoa-1.0.17 \
		jobserver-0.1.34 \
		js-sys-0.3.83 \
		libc-0.2.180 \
		libredox-0.1.12 \
		litemap-0.8.1 \
		log-0.4.29 \
		lru-slab-0.1.2 \
		macro_rules_attribute-0.2.2 \
		macro_rules_attribute-proc_macro-0.2.2 \
		memchr-2.7.6 \
		memoffset-0.9.1 \
		minimal-lexical-0.2.1 \
		miniz_oxide-0.8.9 \
		mio-1.1.1 \
		monostate-0.1.18 \
		monostate-impl-0.1.18 \
		nom-7.1.3 \
		number_prefix-0.4.0 \
		once_cell-1.21.3 \
		onig-6.5.1 \
		onig_sys-69.9.1 \
		option-ext-0.2.0 \
		paste-1.0.15 \
		percent-encoding-2.3.2 \
		pin-project-lite-0.2.16 \
		pin-utils-0.1.0 \
		pkg-config-0.3.32 \
		portable-atomic-1.13.0 \
		potential_utf-0.1.4 \
		ppv-lite86-0.2.21 \
		proc-macro2-1.0.105 \
		pyo3-0.27.2 \
		pyo3-build-config-0.27.2 \
		pyo3-ffi-0.27.2 \
		pyo3-macros-0.27.2 \
		pyo3-macros-backend-0.27.2 \
		python3-dll-a-0.2.14 \
		quinn-0.11.9 \
		quinn-proto-0.11.13 \
		quinn-udp-0.5.14 \
		quote-1.0.43 \
		r-efi-5.3.0 \
		rand-0.8.5 \
		rand-0.9.2 \
		rand_chacha-0.3.1 \
		rand_chacha-0.9.0 \
		rand_core-0.6.4 \
		rand_core-0.9.3 \
		rayon-1.11.0 \
		rayon-cond-0.4.0 \
		rayon-core-1.13.0 \
		redox_users-0.4.6 \
		regex-1.12.2 \
		regex-automata-0.4.13 \
		regex-syntax-0.8.8 \
		reqwest-0.12.28 \
		ring-0.17.14 \
		rustc-hash-2.1.1 \
		rustls-0.23.36 \
		rustls-pki-types-1.13.2 \
		rustls-webpki-0.103.8 \
		rustversion-1.0.22 \
		ryu-1.0.22 \
		serde-1.0.228 \
		serde-pyobject-0.8.0 \
		serde_core-1.0.228 \
		serde_derive-1.0.228 \
		serde_json-1.0.149 \
		serde_urlencoded-0.7.1 \
		shlex-1.3.0 \
		simd-adler32-0.3.8 \
		slab-0.4.11 \
		smallvec-1.15.1 \
		socket2-0.6.1 \
		socks-0.3.4 \
		spm_precompiled-0.1.4 \
		stable_deref_trait-1.2.1 \
		static_assertions-1.1.0 \
		strsim-0.11.1 \
		subtle-2.6.1 \
		syn-2.0.114 \
		sync_wrapper-1.0.2 \
		synstructure-0.13.2 \
		target-lexicon-0.13.4 \
		thiserror-1.0.69 \
		thiserror-2.0.17 \
		thiserror-impl-1.0.69 \
		thiserror-impl-2.0.17 \
		tinystr-0.8.2 \
		tinyvec-1.10.0 \
		tinyvec_macros-0.1.1 \
		tokenizers-0.22.2 \
		tokio-1.49.0 \
		tokio-rustls-0.26.4 \
		tokio-util-0.7.18 \
		tower-0.5.2 \
		tower-http-0.6.8 \
		tower-layer-0.3.3 \
		tower-service-0.3.3 \
		tracing-0.1.44 \
		tracing-core-0.1.36 \
		try-lock-0.2.5 \
		unicode-ident-1.0.22 \
		unicode-normalization-alignments-0.1.12 \
		unicode-segmentation-1.12.0 \
		unicode-width-0.2.2 \
		unicode_categories-0.1.1 \
		unindent-0.2.4 \
		untrusted-0.9.0 \
		unty-0.0.4 \
		ureq-2.12.1 \
		url-2.5.8 \
		utf8_iter-1.0.4 \
		version_check-0.9.5 \
		virtue-0.0.18 \
		want-0.3.1 \
		wasi-0.11.1+wasi-snapshot-preview1 \
		wasip2-1.0.1+wasi-0.2.4 \
		wasm-bindgen-0.2.106 \
		wasm-bindgen-futures-0.4.56 \
		wasm-bindgen-macro-0.2.106 \
		wasm-bindgen-macro-support-0.2.106 \
		wasm-bindgen-shared-0.2.106 \
		wasm-streams-0.4.2 \
		web-sys-0.3.83 \
		web-time-1.1.0 \
		webpki-roots-0.26.11 \
		webpki-roots-1.0.5 \
		winapi-0.3.9 \
		winapi-i686-pc-windows-gnu-0.4.0 \
		winapi-x86_64-pc-windows-gnu-0.4.0 \
		windows-link-0.2.1 \
		windows-sys-0.48.0 \
		windows-sys-0.52.0 \
		windows-sys-0.59.0 \
		windows-sys-0.60.2 \
		windows-sys-0.61.2 \
		windows-targets-0.48.5 \
		windows-targets-0.52.6 \
		windows-targets-0.53.5 \
		windows_aarch64_gnullvm-0.48.5 \
		windows_aarch64_gnullvm-0.52.6 \
		windows_aarch64_gnullvm-0.53.1 \
		windows_aarch64_msvc-0.48.5 \
		windows_aarch64_msvc-0.52.6 \
		windows_aarch64_msvc-0.53.1 \
		windows_i686_gnu-0.48.5 \
		windows_i686_gnu-0.52.6 \
		windows_i686_gnu-0.53.1 \
		windows_i686_gnullvm-0.52.6 \
		windows_i686_gnullvm-0.53.1 \
		windows_i686_msvc-0.48.5 \
		windows_i686_msvc-0.52.6 \
		windows_i686_msvc-0.53.1 \
		windows_x86_64_gnu-0.48.5 \
		windows_x86_64_gnu-0.52.6 \
		windows_x86_64_gnu-0.53.1 \
		windows_x86_64_gnullvm-0.48.5 \
		windows_x86_64_gnullvm-0.52.6 \
		windows_x86_64_gnullvm-0.53.1 \
		windows_x86_64_msvc-0.48.5 \
		windows_x86_64_msvc-0.52.6 \
		windows_x86_64_msvc-0.53.1 \
		wit-bindgen-0.46.0 \
		writeable-0.6.2 \
		yoke-0.8.1 \
		yoke-derive-0.8.1 \
		zerocopy-0.8.33 \
		zerocopy-derive-0.8.33 \
		zerofrom-0.1.6 \
		zerofrom-derive-0.1.6 \
		zeroize-1.8.2 \
		zerotrie-0.2.3 \
		zerovec-0.11.5 \
		zerovec-derive-0.11.2 \
		zmij-1.0.12

TEST_ENV=	${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
TEST_WRKSRC=	${WRKSRC}/tests
TEST_ARGS=	--import-mode=importlib

# tests as of 0.2.14: 45 passed, 2 skipped in 16.59s

.include <bsd.port.mk>
