# Copyright 2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 POSTGRES_COMPAT=( {16..18} ) # config section below POSTGRES_USEDEP="server" CRATES=" adler2@2.0.1 aho-corasick@1.1.4 annotate-snippets@0.11.5 anstream@0.6.21 anstyle-parse@0.2.7 anstyle-query@1.1.4 anstyle-wincon@3.0.10 anstyle@1.0.13 anyhow@1.0.100 arrayvec@0.7.6 bindgen@0.71.1 bitflags@2.10.0 bitvec@1.0.1 bumpalo@3.19.0 cargo_toml@0.22.3 cc@1.2.44 cee-scape@0.2.0 cexpr@0.6.0 cfg-if@1.0.4 clang-sys@1.8.1 clap@4.5.51 clap_builder@4.5.51 clap_derive@4.5.49 clap_lex@0.7.6 codepage@0.1.2 colorchoice@1.0.4 convert_case@0.8.0 crc32fast@1.5.0 crossbeam-channel@0.5.15 crossbeam-deque@0.8.6 crossbeam-epoch@0.9.18 crossbeam-utils@0.8.21 crunchy@0.2.4 darling@0.20.11 darling_core@0.20.11 darling_macro@0.20.11 dary_heap@0.3.8 displaydoc@0.2.5 either@1.15.0 encoding_rs@0.8.35 enum-map-derive@0.17.0 enum-map@2.7.3 env_home@0.1.0 equivalent@1.0.2 errno@0.3.14 eyre@0.6.12 fallible-iterator@0.3.0 fallible-streaming-iterator@0.1.9 fastrand@2.3.0 find-msvc-tools@0.1.4 fixedbitset@0.5.7 flate2@1.1.5 fnv@1.0.7 foldhash@0.1.5 form_urlencoded@1.2.2 funty@2.0.0 getrandom@0.3.4 glob@0.3.3 half@1.8.3 half@2.7.1 hashbrown@0.15.5 hashbrown@0.16.0 hashlink@0.10.0 heck@0.5.0 humansize@2.1.3 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.1 icu_properties_data@2.1.1 icu_provider@2.1.1 ident_case@1.0.1 idna@1.1.0 idna_adapter@1.2.1 indenter@0.3.4 indexmap@2.12.0 is_ci@1.2.0 is_terminal_polyfill@1.70.2 itertools@0.13.0 itoa@1.0.15 js-sys@0.3.82 libc@0.2.177 libloading@0.8.9 libm@0.2.15 libmimalloc-sys@0.1.44 libsqlite3-sys@0.35.0 linux-raw-sys@0.11.0 litemap@0.8.1 memchr@2.7.6 mimalloc@0.1.48 min-max-heap@1.3.0 minimal-lexical@0.2.1 miniz_oxide@0.8.9 nom@7.1.3 object@0.37.3 once_cell@1.21.3 once_cell_polyfill@1.70.2 owo-colors@4.2.3 paste@1.0.15 pathsearch@0.2.0 percent-encoding@2.3.2 petgraph@0.8.3 pgrx-bindgen@0.16.1 pgrx-catalog@0.3.1 pgrx-macros@0.16.1 pgrx-pg-config@0.16.1 pgrx-pg-sys@0.16.1 pgrx-sql-entity-graph@0.16.1 pgrx@0.16.1 pin-project-internal@1.1.10 pin-project@1.1.10 pkg-config@0.3.32 potential_utf@0.1.4 ppv-lite86@0.2.21 proc-macro-error-attr2@2.0.0 proc-macro-error2@2.0.1 proc-macro2@1.0.103 quote@1.0.42 r-efi@5.3.0 radium@0.7.0 rand@0.9.2 rand_chacha@0.9.0 rand_core@0.9.3 rayon-core@1.13.0 rayon@1.11.0 regex-automata@0.4.13 regex-syntax@0.8.8 regex@1.12.2 rusqlite@0.37.0 rustc-hash@2.1.1 rustix@1.1.2 rustversion@1.0.22 ruzstd@0.8.2 ryu@1.0.20 same-file@1.0.6 seahash@4.1.0 seq-macro@0.3.6 serde@1.0.228 serde_cbor@0.11.2 serde_core@1.0.228 serde_derive@1.0.228 serde_json@1.0.145 serde_spanned@1.0.3 shlex@1.3.0 simd-adler32@0.3.7 smallvec@1.15.1 stable_deref_trait@1.2.1 strsim@0.11.1 supports-color@3.0.2 syn@2.0.109 synstructure@0.13.2 tap@1.0.1 target-triple@1.0.0 tempfile@3.23.0 thiserror-impl@2.0.17 thiserror@2.0.17 tinystr@0.8.2 toml@0.9.8 toml_datetime@0.7.3 toml_parser@1.0.4 toml_writer@1.0.4 twox-hash@2.1.2 unescape@0.1.0 unicode-ident@1.0.22 unicode-segmentation@1.12.0 unicode-width@0.2.2 url@2.5.7 utf8_iter@1.0.4 utf8parse@0.2.2 uuid@1.18.1 validator@0.20.0 validator_derive@0.20.0 vcpkg@0.2.15 walkdir@2.5.0 wasip2@1.0.1+wasi-0.2.4 wasm-bindgen-macro-support@0.2.105 wasm-bindgen-macro@0.2.105 wasm-bindgen-shared@0.2.105 wasm-bindgen@0.2.105 wasmparser@0.236.1 which@8.0.0 winapi-i686-pc-windows-gnu@0.4.0 winapi-util@0.1.11 winapi-x86_64-pc-windows-gnu@0.4.0 winapi@0.3.9 windows-link@0.2.1 windows-sys@0.60.2 windows-sys@0.61.2 windows-targets@0.53.5 windows_aarch64_gnullvm@0.53.1 windows_aarch64_msvc@0.53.1 windows_i686_gnu@0.53.1 windows_i686_gnullvm@0.53.1 windows_i686_msvc@0.53.1 windows_x86_64_gnu@0.53.1 windows_x86_64_gnullvm@0.53.1 windows_x86_64_msvc@0.53.1 winnow@0.7.13 winsafe@0.0.19 wit-bindgen@0.46.0 writeable@0.6.2 wyhash@0.6.0 wyz@0.5.1 yoke-derive@0.8.1 yoke@0.8.1 zerocopy-derive@0.8.27 zerocopy@0.8.27 zerofrom-derive@0.1.6 zerofrom@0.1.6 zerotrie@0.2.3 zerovec-derive@0.11.2 zerovec@0.11.5 " RUST_REQ_USE="rustfmt" RUST_MIN_VER="1.91.0" inherit postgres-multi autotools cargo DESCRIPTION="Scalable, fast, and disk-friendly vector search in Postgres, the successor of pgvecto.rs" HOMEPAGE=" https://docs.vectorchord.ai/vectorchord/getting-started/overview.html https://github.com/tensorchord/VectorChord " SRC_URI=" https://github.com/tensorchord/VectorChord/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz ${CARGO_CRATE_URIS} " LICENSE="AGPL-3" # Dependent crate licenses LICENSE+=" Apache-2.0 BSD ISC MIT Unicode-3.0 ZLIB" RDEPEND=" ${POSTGRES_DEP} dev-db/pgvector " BDEPEND=" dev-util/cargo-pgrx " DEPEND=" ${BDEPEND} ${RDEPEND} " SLOT="0" KEYWORDS="~amd64" S=${WORKDIR}/VectorChord-${PV} export PGRX_HOME=${WORKDIR}/pgrx_home pkg_setup() { postgres-multi_pkg_setup rust_pkg_setup use postgres_targets_postgres16 && ( cargo pgrx init --pg16=/usr/bin/pg_config || die ) use postgres_targets_postgres17 && ( cargo pgrx init --pg17=/usr/bin/pg_config || die ) use postgres_targets_postgres18 && ( cargo pgrx init --pg18=/usr/bin/pg_config || die ) } src_configure() { local myfeatures=( $(usev postgres_targets_postgres16 pg16) $(usev postgres_targets_postgres17 pg17) $(usev postgres_targets_postgres18 pg18) ) cargo_src_configure } src_compile() { make build } src_install() { default DESTDIR=${T} make install }