Opened 17 months ago

Last modified 17 months ago

#66428 closed enhancement

helix 22.12: Budle runtime directory — at Initial Version

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

Description

I suggest you raise this as a

We recently revived a bug report upstream (helix-editor/helix#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 (0)

Note: See TracTickets for help on using tickets.