Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add typst-fmt #16663

Open
6 tasks done
Freed-Wu opened this issue Apr 5, 2023 · 1 comment · May be fixed by #21817
Open
6 tasks done

Add typst-fmt #16663

Freed-Wu opened this issue Apr 5, 2023 · 1 comment · May be fixed by #21817

Comments

@Freed-Wu
Copy link
Contributor

Freed-Wu commented Apr 5, 2023

Package name

typst-fmt

Brief description of package

A formatter for the Typst language

URL for package's homepage

https://github.com/astrale-sharp/typst-fmt/

Provide a basic test case to validate the package's functionality.

No response

MINGW environments where you need the package

  • MINGW64
  • MINGW32
  • UCRT64
  • CLANG64
  • CLANG32
  • CLANGARM64

Are you willing to submit a PR?

No

@Freed-Wu
Copy link
Contributor Author

Freed-Wu commented Sep 1, 2024

Failed due to typst-syntax

# Maintainer: Wu, Zhenyu <wuzhenyu@ustc.edu>

_realname=typstfmt
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=0.2.9
pkgrel=1
pkgdesc="formatter for the Typst language"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt32' 'ucrt64' 'clang32' 'clang64' 'clangarm64')
url=https://github.com/astrale-sharp/$_realname
license=('LICENSE')
makedepends=("${MINGW_PACKAGE_PREFIX}-rust")
source=("$url/archive/$pkgver.tar.gz")
sha256sums=('fa24ee1705ff5fec4db45e301d38439d0bd3d6d4ee04b280ba997b2f94ba16d9')

prepare() {
  cd "${srcdir}/${_realname}-${pkgver}"

  # if cargo wants to make an http request at build stage, use `cargo fetch --locked` instead
  cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

build() {
  cd "${srcdir}/${_realname}-${pkgver}"

  cargo build --release --frozen
}

check() {
  cd "${srcdir}/${_realname}-${pkgver}"

  cargo test --release --frozen
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"

  cargo install \
    --offline \
    --no-track \
    --frozen \
    --path . \
    --root "${pkgdir}${MINGW_PREFIX}"

  install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
}

Freed-Wu added a commit to Freed-Wu/MINGW-packages that referenced this issue Sep 1, 2024
@Freed-Wu Freed-Wu linked a pull request Sep 1, 2024 that will close this issue
Freed-Wu added a commit to Freed-Wu/MINGW-packages that referenced this issue Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant