Files
guru/net-im/gurk-rs/gurk-rs-0.7.1.ebuild
T
ingenarel (NeoJesus) d56f4baa37 */*: Use [[ ${PV} ... ]] instead of POSIX [ ${PV} ... ]
as per the coding style guide:
https://projects.gentoo.org/qa/policy-guide/ebuild-format.html#pg0101

if it previously used [ ${PV} ... ] it uses [[ ${PV} ... ]] now
if it previously used [[ ${PV} = b ]] or [ ${PV} = b ], it uses
[[ ${PV} == b ]] now

the changes were generated using these two commands:

```
find -name '*.ebuild' -exec sed -i -E \
's|([^[])\[+(\s+)(\S*\$\S*PV\S*)(\s+)(\S+)(\s+)(\S+)(\s+)\]+([^]])|\1\[\[\2\3\4\5\6\7\8\]\]\9|g' \
{} \+

find -name '*.ebuild' -exec sed -i -E \
's|\[(\s+)(\S*\$\S*PV\S*)(\s+)==?(\s+)(\S+)(\s+)\]|\[\1\2\3==\4\5\6\]|g' \
{} \+
```

this is aimed to be a series of commits meant to replace all instance of
POSIX [ ... ] to bash's [[ ... ]], to make guru up to date with the
coding style guide

this process is divided up into a series of commits in order to make
review and testing more easy

Signed-off-by: ingenarel (NeoJesus) <ingenarel_neojesus@disroot.org>
Part-of: https://codeberg.org/gentoo/guru/pulls/6
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2026-09-25 18:48:54 +02:00

105 lines
3.1 KiB
Bash

# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Autogenerated by pycargoebuild 0.15.0
EAPI=8
if [[ "${PV}" != "9999" ]]; then
declare -A GIT_CRATES=(
[curve25519-dalek-derive]='https://github.com/signalapp/curve25519-dalek;7c6d34756355a3566a704da84dce7b1c039a6572;curve25519-dalek-%commit%/curve25519-dalek-derive'
[curve25519-dalek]='https://github.com/signalapp/curve25519-dalek;7c6d34756355a3566a704da84dce7b1c039a6572;curve25519-dalek-%commit%/curve25519-dalek'
[libsignal-core]='https://github.com/signalapp/libsignal;e46841ea2c1ad03bc5113eba267ac1543689d031;libsignal-%commit%/rust/core'
[libsignal-protocol]='https://github.com/signalapp/libsignal;e46841ea2c1ad03bc5113eba267ac1543689d031;libsignal-%commit%/rust/protocol'
[libsignal-service]='https://github.com/whisperfish/libsignal-service-rs;f94d55bf8d742699024c26ca3965e85fc9946e23;libsignal-service-rs-%commit%'
[poksho]='https://github.com/signalapp/libsignal;e46841ea2c1ad03bc5113eba267ac1543689d031;libsignal-%commit%/rust/poksho'
[presage-store-sqlite]='https://github.com/whisperfish/presage;0da7b57746b827bfb310f98a10a29e73d508e742;presage-%commit%/presage-store-sqlite'
[presage]='https://github.com/whisperfish/presage;0da7b57746b827bfb310f98a10a29e73d508e742;presage-%commit%/presage'
[signal-crypto]='https://github.com/signalapp/libsignal;e46841ea2c1ad03bc5113eba267ac1543689d031;libsignal-%commit%/rust/crypto'
[zkcredential]='https://github.com/signalapp/libsignal;e46841ea2c1ad03bc5113eba267ac1543689d031;libsignal-%commit%/rust/zkcredential'
[zkgroup]='https://github.com/signalapp/libsignal;e46841ea2c1ad03bc5113eba267ac1543689d031;libsignal-%commit%/rust/zkgroup'
)
fi
inherit cargo check-reqs
DESCRIPTION="Signal messenger client for terminal"
HOMEPAGE="https://github.com/boxdot/gurk-rs/"
if [[ "${PV}" == "9999" ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/boxdot/gurk-rs.git"
else
SRC_URI="
https://github.com/boxdot/gurk-rs/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
https://github.com/beatussum/gentoo-tarballs/releases/download/latest/gurk-${PV}-crates.tar.xz
${CARGO_CRATE_URIS}
"
KEYWORDS="~amd64"
fi
LICENSE="AGPL-3"
# Dependent crate licenses
LICENSE+="
AGPL-3
Apache-2.0
BSD-2
BSD
Boost-1.0
ISC
MIT
MPL-2.0
Unicode-3.0
ZLIB
"
SLOT="0"
DOCS=(
CHANGELOG.md
README.md
chat-qr.png
screenshot.png
)
RUST_MIN_VER="1.85.0"
CHECKREQS_DISK_BUILD="2400M"
pkg_setup() {
check-reqs_pkg_setup
rust_pkg_setup
}
src_unpack() {
if [[ "${PV}" == "9999" ]]; then
git-r3_src_unpack
cargo_live_src_unpack
else
cargo_src_unpack
local crate_patches
for crate in curve25519-dalek{,-derive}; do
IFS=';' read -r crate_uri commit crate_dir host \
<<< "${GIT_CRATES["${crate}"]}"
: "${crate_dir:=${crate}-%commit%}"
crate_patches+="${crate} = { path = \"${WORKDIR}/${crate_dir//%commit%/${commit}}\" };;"
done
printf -- "[patch.crates-io]\\n%s" "${crate_patches//;;/$'\n'}" \
>> "${CARGO_HOME}/config.toml"
fi
}
src_configure() {
cargo_src_configure --frozen
}
src_install() {
einstalldocs
cargo_src_install
}