#66428 closed enhancement (fixed)

helix 22.12: Budle runtime directory

Reported by: pascalkuthe (Pascal Kuthe) Owned by: herbygillot (Herby Gillot)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: esbugz
Port: helix

Description (last modified by pascalkuthe (Pascal Kuthe))

We recently revived a bug report upstream (https://github.com/helix-editor/helix/issues/5090) from a user that was confused by the need to manually symlink the runtime directory and asked us to improve our documentation in that regard.

We only document this requirement for manual builds because package manager usually provide a wrapper script that sets HELIX_RUNTIME. I wanted to submit a PR to fix the package but found myself unable to full fill all requirements as I do not own a mac and can not actually test this. Instead I attached an improved version below.

Please not that I also readded the removed --frozen flag. We track the Cargo.lock in git and use it during testing for every commit. This should not be causing any issues.

# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           cargo   1.0
PortGroup           github  1.0

github.setup        helix-editor helix 22.12
revision            0

homepage            https://helix-editor.com

description         A post-modern text editor.

long_description    \
    {*}${description}. ${name} is a kakoune / neovim inspired editor, written \
    in Rust.

categories          editors
installs_libs       no
license             MPL-2
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

# Helix's build process requires bit
fetch.type          git

post-extract {
    system -W ${worksrcpath} "git submodule update --init"
}

destroot {
    xinstall -d ${destroot}${prefix}/share/${name}/
    xinstall -m 0755 \
        ${worksrcpath}/target/[cargo.rust_platform]/release/hx \
        ${destroot}${prefix}/share/${name}/

    copy ${worksrcpath}/runtime ${destroot}${prefix}/share/${name}/
	
	# Wrapper script that sets HELIX_RUNTIME directory
	touch ${worksrcpath}/hx
	cat >> ${worksrcpath}/hx <<EOF
	#!/usr/bin/env sh

	HELIX_RUNTIME="${destroot}${prefix}/share/${name}/runtime" exec ${destroot}${prefix}/share/${name}/hx "\$@"
	EOF
	chmod +x ${worksrcpath}/hx
    xinstall -m 0755 \
        ${worksrcpath}/hx \
        ${destroot}${prefix}/bin/
}

Change History (4)

comment:1 Changed 17 months ago by pascalkuthe (Pascal Kuthe)

Description: modified (diff)

comment:2 Changed 16 months ago by jmroot (Joshua Root)

Owner: set to herbygillot
Status: newassigned

comment:3 Changed 16 months ago by esbugz

Cc: esbugz added

comment:4 Changed 16 months ago by herbygillot (Herby Gillot)

Resolution: fixed
Status: assignedclosed

In 3b1ebcfd1530187205e5b2ea6783e61db5c22fc1/macports-ports (master):

helix: install wrapper script to set HELIX_RUNTIME

  • stop including grammar source and debugging symbols by default; these can still be installed through the "devel" variant if needed.

Fixes: #66428
Fixes: #66525

Note: See TracTickets for help on using tickets.