summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2022-07-20 12:18:41 -0400
committerGravatar Chris Xiong <chirs241097@gmail.com> 2022-07-20 12:18:41 -0400
commit55cc2e0a638b007120048f5f5616e2771e2d4293 (patch)
tree132cc4d780da51cc3d87f66aa62dae5e88ba2d55
parentbb6b36eba4b6aaf79465fc894b51f11ed5c0852b (diff)
downloadppo-55cc2e0a638b007120048f5f5616e2771e2d4293.tar.xz
one day it will work, right?
-rw-r--r--dev-util/rust-analyzer/Manifest2
-rw-r--r--dev-util/rust-analyzer/rust-analyzer-20220718.ebuild8
-rw-r--r--eclass/cargox.eclass68
3 files changed, 39 insertions, 39 deletions
diff --git a/dev-util/rust-analyzer/Manifest b/dev-util/rust-analyzer/Manifest
index 45b5144..4d6baf6 100644
--- a/dev-util/rust-analyzer/Manifest
+++ b/dev-util/rust-analyzer/Manifest
@@ -1,2 +1,2 @@
DIST rust-analyzer-20220718.tar.gz 2300667 BLAKE2B a0daf1c24e682aa749364a28b891c0492440b80201cda9550dcd7d740b43d586ae76d3f02dd9677c5d8a10aef4a9737381eba3f635b7764c8a7f6e8352bbdf17 SHA512 1ae87782cc3a5131c6330c9b60a43efdaa48010be37a3acdfe35c1fd97117697aefb8a796a43799778431cc6f59678b7cdc94860fb23b4a8ceb41f981164e267
-EBUILD rust-analyzer-20220718.ebuild 1148 BLAKE2B 58b3b2ec6a919713f6d0928a1a08eb5d83c429227a8ca56b53b9064aaa9ff40474d677885fa93b6db6f99e243fac87f959f1426b7fb186ecdbc70f4cfbe74339 SHA512 1f05d5c1d0632e2a8ed24522037024679547c1173c69c47e0b447f5f0573b4d6ad08c88283884b6420e04d079c88432b612193c32e1dea10040190f60567b65e
+EBUILD rust-analyzer-20220718.ebuild 1152 BLAKE2B 8b116aa791684f7bb43d2d715ff6f1916637cd8c7c982ac5ffe800620b9c246eff42e201a9f0695e0edafc6c2110c0ebd427a9e4c9ffbed78cba4880238af29b SHA512 43e7c0b8e2a2c411f5d640121024b1598b2693cea042dbedbcf41c63a03479a1cd7d775287d2f2c81f7e42f4e50592277da15d5964955caffeceb37dfaccea1d
diff --git a/dev-util/rust-analyzer/rust-analyzer-20220718.ebuild b/dev-util/rust-analyzer/rust-analyzer-20220718.ebuild
index c6313bc..481307b 100644
--- a/dev-util/rust-analyzer/rust-analyzer-20220718.ebuild
+++ b/dev-util/rust-analyzer/rust-analyzer-20220718.ebuild
@@ -14,7 +14,7 @@ else
KEYWORDS="~amd64"
EGIT_COMMIT="${PV:0:4}-${PV:4:2}-${PV:6:2}"
EGIT_REPO_URI="https://github.com/rust-analyzer/rust-analyzer"
- SRC_URI="https://github.com/rust-analyzer/rust-analyzer/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz $(cargo_crate_uris)"
+ SRC_URI="https://github.com/rust-analyzer/rust-analyzer/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz $(cargox_crate_uris)"
fi
DESCRIPTION="An implementation of Language Server Protocol for the Rust programming language"
@@ -32,14 +32,14 @@ QA_FLAGS_IGNORED="usr/bin/rust-analyzer"
src_unpack() {
git-r3_src_unpack
- cargo_live_src_unpack
+ cargox_live_src_unpack
}
src_test() {
# Requires out of source git repo.
- cargo_src_test -- --skip "tidy::check_merge_commits"
+ cargox_src_test -- --skip "tidy::check_merge_commits"
}
src_install() {
- cargo_src_install --path "./crates/rust-analyzer"
+ cargox_src_install --path "./crates/rust-analyzer"
}
diff --git a/eclass/cargox.eclass b/eclass/cargox.eclass
index 460679b..7eaa5de 100644
--- a/eclass/cargox.eclass
+++ b/eclass/cargox.eclass
@@ -1,7 +1,7 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-# @ECLASS: cargo.eclass
+# @ECLASS: cargox.eclass
# @MAINTAINER:
# rust@gentoo.org
# @AUTHOR:
@@ -62,7 +62,7 @@ ECARGO_VENDOR="${ECARGO_HOME}/gentoo"
# @PRE_INHERIT
# @DESCRIPTION:
# bash string containing all crates package wants to download
-# used by cargo_crate_uris()
+# used by cargox_crate_uris()
# Example:
# @CODE
# CRATES="
@@ -72,7 +72,7 @@ ECARGO_VENDOR="${ECARGO_HOME}/gentoo"
# "
# inherit cargo
# ...
-# SRC_URI="$(cargo_crate_uris)"
+# SRC_URI="$(cargox_crate_uris)"
# @CODE
# @ECLASS_VARIABLE: CARGO_OPTIONAL
@@ -84,15 +84,15 @@ ECARGO_VENDOR="${ECARGO_HOME}/gentoo"
# functions will be exported.
#
# If you enable CARGO_OPTIONAL, you have to set BDEPEND on virtual/rust
-# for your package and call at least cargo_gen_config manually before using
+# for your package and call at least cargox_gen_config manually before using
# other src_ functions of this eclass.
-# note that cargo_gen_config is automatically called by cargo_src_unpack.
+# note that cargox_gen_config is automatically called by cargox_src_unpack.
# @ECLASS_VARIABLE: myfeatures
# @DEFAULT_UNSET
# @DESCRIPTION:
# Optional cargo features defined as bash array.
-# Should be defined before calling cargo_src_configure().
+# Should be defined before calling cargox_src_configure().
#
# Example package that has x11 and wayland as features, and disables default.
# @CODE
@@ -101,7 +101,7 @@ ECARGO_VENDOR="${ECARGO_HOME}/gentoo"
# $(usex X x11 '')
# $(usev wayland)
# )
-# cargo_src_configure --no-default-features
+# cargox_src_configure --no-default-features
# }
# @CODE
@@ -110,7 +110,7 @@ ECARGO_VENDOR="${ECARGO_HOME}/gentoo"
# @DEFAULT_UNSET
# @DESCRIPTION:
# Storage directory for cargo registry.
-# Used by cargo_live_src_unpack to cache downloads.
+# Used by cargox_live_src_unpack to cache downloads.
# This is intended to be set by users.
# Ebuilds must not set it.
#
@@ -121,7 +121,7 @@ ECARGO_VENDOR="${ECARGO_HOME}/gentoo"
# @DEFAULT_UNSET
# @DESCRIPTION:
# If non-empty, this variable prevents online operations in
-# cargo_live_src_unpack.
+# cargox_live_src_unpack.
# Inherits value of EVCS_OFFLINE if not set explicitly.
# @ECLASS_VARIABLE: EVCS_UMASK
@@ -134,12 +134,12 @@ ECARGO_VENDOR="${ECARGO_HOME}/gentoo"
# group, and then switch over to building with FEATURES=userpriv.
# Or vice-versa.
-# @FUNCTION: cargo_crate_uris
+# @FUNCTION: cargox_crate_uris
# @DESCRIPTION:
# Generates the URIs to put in SRC_URI to help fetch dependencies.
# Uses first argument as crate list.
# If no argument provided, uses CRATES variable.
-cargo_crate_uris() {
+cargox_crate_uris() {
local -r regex='^([a-zA-Z0-9_\-]+)-([0-9]+\.[0-9]+\.[0-9]+.*)$'
local crate crates
@@ -162,7 +162,7 @@ cargo_crate_uris() {
done
}
-# @FUNCTION: cargo_gen_config
+# @FUNCTION: cargox_gen_config
# @DESCRIPTION:
# Generate the $CARGO_HOME/config necessary to use our local registry and settings.
# Cargo can also be configured through environment variables in addition to the TOML syntax below.
@@ -172,7 +172,7 @@ cargo_crate_uris() {
# and currently only integer, boolean, and string keys are supported.
# For example the build.jobs key can also be defined by CARGO_BUILD_JOBS.
# Or setting CARGO_TERM_VERBOSE=false in make.conf will make build quieter.
-cargo_gen_config() {
+cargox_gen_config() {
debug-print-function ${FUNCNAME} "$@"
mkdir -p "${ECARGO_HOME}" || die
@@ -201,10 +201,10 @@ cargo_gen_config() {
_CARGO_GEN_CONFIG_HAS_RUN=1
}
-# @FUNCTION: cargo_src_unpack
+# @FUNCTION: cargox_src_unpack
# @DESCRIPTION:
# Unpacks the package and the cargo registry
-cargo_src_unpack() {
+cargox_src_unpack() {
debug-print-function ${FUNCNAME} "$@"
mkdir -p "${ECARGO_VENDOR}" || die
@@ -238,13 +238,13 @@ cargo_src_unpack() {
esac
done
- cargo_gen_config
+ cargox_gen_config
}
-# @FUNCTION: cargo_live_src_unpack
+# @FUNCTION: cargox_live_src_unpack
# @DESCRIPTION:
# Runs 'cargo fetch' and vendors downloaded crates for offline use, used in live ebuilds
-cargo_live_src_unpack() {
+cargox_live_src_unpack() {
debug-print-function ${FUNCNAME} "$@"
[[ "${PV}" == *9999* ]] || [[ "${SLOT}" == "live" ]] || die "${FUNCNAME} only allowed in live/9999 ebuilds"
@@ -284,7 +284,7 @@ cargo_live_src_unpack() {
pushd "${S}" > /dev/null || die
- # Respect user settings befire cargo_gen_config is called.
+ # Respect user settings befire cargox_gen_config is called.
if [[ ! ${CARGO_TERM_COLOR} ]]; then
[[ "${NOCOLOR}" = true || "${NOCOLOR}" = yes ]] && export CARGO_TERM_COLOR=never
local unset_color=true
@@ -327,10 +327,10 @@ cargo_live_src_unpack() {
# It will be forced into offline mode to prevent network access.
# But since we already vendored crates and symlinked git, it has all it needs to build.
unset CARGO_HOME
- cargo_gen_config
+ cargox_gen_config
}
-# @FUNCTION: cargo_src_configure
+# @FUNCTION: cargox_src_configure
# @DESCRIPTION:
# Configure cargo package features and arguments.
# Extra positional arguments supplied to this function
@@ -348,14 +348,14 @@ cargo_live_src_unpack() {
# barfeature
# $(usev foo)
# )
-# cargo_src_configure --bin baz
+# cargox_src_configure --bin baz
# }
# @CODE
#
# In some cases crates may need '--no-default-features' option,
# as there is no way to disable single feature, except disabling all.
-# It can be passed directly to cargo_src_configure().
-cargo_src_configure() {
+# It can be passed directly to cargox_src_configure().
+cargox_src_configure() {
debug-print-function ${FUNCNAME} "$@"
[[ -z ${myfeatures} ]] && declare -a myfeatures=()
@@ -377,14 +377,14 @@ cargo_src_configure() {
[[ ${ECARGO_ARGS[@]} ]] && einfo "Configured with: ${ECARGO_ARGS[@]}"
}
-# @FUNCTION: cargo_src_compile
+# @FUNCTION: cargox_src_compile
# @DESCRIPTION:
# Build the package using cargo build
-cargo_src_compile() {
+cargox_src_compile() {
debug-print-function ${FUNCNAME} "$@"
[[ ${_CARGO_GEN_CONFIG_HAS_RUN} ]] || \
- die "FATAL: please call cargo_gen_config before using ${FUNCNAME}"
+ die "FATAL: please call cargox_gen_config before using ${FUNCNAME}"
tc-export AR CC CXX PKG_CONFIG
@@ -393,17 +393,17 @@ cargo_src_compile() {
"${@}" || die "cargo build failed"
}
-# @FUNCTION: cargo_src_install
+# @FUNCTION: cargox_src_install
# @DESCRIPTION:
# Installs the binaries generated by cargo
# In come case workspaces need alternative --path parameter
# default is '--path ./' if nothing specified.
-# '--path ./somedir' can be passed directly to cargo_src_install()
-cargo_src_install() {
+# '--path ./somedir' can be passed directly to cargox_src_install()
+cargox_src_install() {
debug-print-function ${FUNCNAME} "$@"
[[ ${_CARGO_GEN_CONFIG_HAS_RUN} ]] || \
- die "FATAL: please call cargo_gen_config before using ${FUNCNAME}"
+ die "FATAL: please call cargox_gen_config before using ${FUNCNAME}"
set -- cargo install $(has --path ${@} || echo --path ./) \
--root "${ED}/usr" \
@@ -427,14 +427,14 @@ cargo_src_install() {
esac
}
-# @FUNCTION: cargo_src_test
+# @FUNCTION: cargox_src_test
# @DESCRIPTION:
# Test the package using cargo test
-cargo_src_test() {
+cargox_src_test() {
debug-print-function ${FUNCNAME} "$@"
[[ ${_CARGO_GEN_CONFIG_HAS_RUN} ]] || \
- die "FATAL: please call cargo_gen_config before using ${FUNCNAME}"
+ die "FATAL: please call cargox_gen_config before using ${FUNCNAME}"
set -- cargo test $(usex debug "" --release) ${ECARGO_ARGS[@]} "$@"
einfo "${@}"