Merge branch 'helix' into 'master'

move helix to tools, with working recipe, plus fix COOKBOOK_DEBUG

See merge request redox-os/cookbook!346
This commit is contained in:
Jeremy Soller 2024-01-27 13:23:27 +00:00
commit 68a472e07c
3 changed files with 21 additions and 11 deletions

View File

@ -0,0 +1,16 @@
#TODO signal handling is disabled, it should be re-enabled when Redox is ready
#TODO language files are not built, only the "hx" editor is built
#TODO Consider adding `export RUSTFLAGS+="-C target-feature=-crt-static"` when adding language support
#TODO configuration - https://docs.helix-editor.com/install.html#configuring-helixs-runtime-files
[source]
git = "https://gitlab.redox-os.org/redox-os/helix.git"
branch = "redox"
[build]
template = "custom"
script = """
export HELIX_DISABLE_AUTO_GRAMMAR_BUILD=1
COOKBOOK_SOURCE+="/helix-term"
cookbook_cargo
"""

View File

@ -1,9 +0,0 @@
#TODO program source code error
#TODO configuration - https://docs.helix-editor.com/install.html#configuring-helixs-runtime-files
[source]
tar = "https://github.com/helix-editor/helix/releases/download/23.10/helix-23.10-source.tar.xz"
[build]
template = "custom"
script = """
cookbook_cargo_packages helix-term
"""

View File

@ -453,9 +453,12 @@ export PKG_CONFIG_SYSROOT_DIR="${COOKBOOK_SYSROOT}"
# to not strip symbols from the final package, add COOKBOOK_NOSTRIP=true to the recipe
# (or to your environment) before calling cookbook_cargo or cookbook_cargo_packages
build_type=release
install_flags=
build_flags=--release
if [ ! -z "${COOKBOOK_DEBUG}" ]
then
install_flags=--debug
build_flags=
build_type=debug
fi
@ -479,7 +482,7 @@ function cookbook_cargo_examples {
"${COOKBOOK_CARGO}" build \
--manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
--example "${example}" \
--${build_type}
${build_flags}
mkdir -pv "${COOKBOOK_STAGE}/usr/bin"
cp -v \
"target/${TARGET}/${build_type}/examples/${example}" \
@ -495,7 +498,7 @@ function cookbook_cargo_packages {
"${COOKBOOK_CARGO}" build \
--manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
--package "${package}" \
--${build_type}
${build_flags}
mkdir -pv "${COOKBOOK_STAGE}/usr/bin"
cp -v \
"target/${TARGET}/${build_type}/${package}" \