2024-12-20 16:11:08 +00:00
|
|
|
# Maintainer: Harriet O'Brien <harrietobrien at protonmail dot com>
|
|
|
|
# Contributor: Aleksandr Beliaev <trap000d at gmail dot com>
|
2024-01-31 01:22:57 +00:00
|
|
|
|
|
|
|
pkgname=quarto-cli
|
2024-12-20 16:11:08 +00:00
|
|
|
pkgver=1.6.39
|
2024-12-21 01:04:24 +00:00
|
|
|
pkgrel=10
|
2024-12-20 16:11:08 +00:00
|
|
|
#_pkgbasename=quarto-cli
|
|
|
|
_denodomver="0.1.41-alpha-artifacts"
|
|
|
|
_denover="2.0.4-1"
|
|
|
|
_deno_commit=b7c282d
|
2024-01-31 01:22:57 +00:00
|
|
|
_deno_arch="deno-x86_64-unknown-linux-gnu"
|
2024-12-20 16:11:08 +00:00
|
|
|
pkgdesc="Quarto is an open-source scientific and technical publishing system built on [Pandoc](https://pandoc.org)"
|
|
|
|
arch=('x86_64')
|
|
|
|
depends=("nodejs"
|
|
|
|
"deno"
|
|
|
|
"dart-sass"
|
|
|
|
"esbuild"
|
|
|
|
"pandoc"
|
|
|
|
"lua-lpeg"
|
|
|
|
"typst")
|
|
|
|
makedepends=("git"
|
|
|
|
"npm"
|
|
|
|
"rust")
|
2024-01-31 01:22:57 +00:00
|
|
|
url="https://quarto.org/"
|
2024-12-20 16:11:08 +00:00
|
|
|
license=("MIT")
|
2024-01-31 01:22:57 +00:00
|
|
|
provides=("quarto")
|
2024-12-20 16:11:08 +00:00
|
|
|
conflicts=("quarto-cli-bin"
|
|
|
|
"quarto-cli-pre-release"
|
|
|
|
"quarto-cli-bin-pre-release"
|
|
|
|
"quarto-cli-git")
|
2024-01-31 01:22:57 +00:00
|
|
|
options=(!strip)
|
2024-12-20 16:11:08 +00:00
|
|
|
source=("https://github.com/quarto-dev/$pkgname/releases/download/v$pkgver/$provides-$pkgver-linux-amd64.tar.gz"
|
|
|
|
"https://archive.archlinux.org/packages/d/deno/deno-$_denover-x86_64.pkg.tar.zst"
|
|
|
|
"https://github.com/b-fuze/deno-dom/archive/refs/tags/v$_denodomver.tar.gz"
|
|
|
|
"000_pandoc_lua.diff")
|
|
|
|
sha256sums=("d797c796713a57c14d8115f49a45d626a16478697096a0421f2d2d980e5f9d4a"
|
|
|
|
"897c81da3ca3cb1c236f111d237abfcc973cc0e7a4089ca3f21997e17cb0a9a2"
|
|
|
|
"5ab1a73e73b9edf9d2c81e655658d970e6212497a5368d8f0bc8613bbdf8d91d"
|
|
|
|
"0f27dff1e1b16e4f2f21c43b838aaae18bf9f82339eb65878b24de128f89450f")
|
2024-01-31 01:22:57 +00:00
|
|
|
|
|
|
|
build() {
|
2024-12-20 16:11:08 +00:00
|
|
|
cd "$srcdir/$provides-$pkgver/"
|
|
|
|
# source configuration
|
|
|
|
# source "$srcdir/$provides-$pkgver/pkg/src/set_package_paths.sh"
|
|
|
|
export QUARTO_VERSION=$pkgver
|
|
|
|
export QUARTO_VENDOR_BINARIES="false"
|
|
|
|
export QUARTO_NO_SYMLINK="true"
|
|
|
|
export DENO_DOM_PLUGIN="$srcdir/deno-dom-$_denodomver/target/release/libplugin.so"
|
2024-01-31 01:22:57 +00:00
|
|
|
if [ -z "$QUARTO_DENO" ]; then
|
|
|
|
export QUARTO_DENO=$SCRIPT_PATH/../dist/bin/tools/deno
|
|
|
|
fi
|
2024-12-20 16:11:08 +00:00
|
|
|
# Keep deno cache directory out of default $home/.cache/deno
|
|
|
|
export DENO_DIR="$srcdir/$provides-$pkgver/package/cache"
|
2024-01-31 01:22:57 +00:00
|
|
|
# Rust optimizations
|
2024-12-20 16:11:08 +00:00
|
|
|
export CARGO_HOME="$srcdir/$provides-$pkgver/.cargo"
|
2024-01-31 01:22:57 +00:00
|
|
|
export RUSTFLAGS="-C strip=symbols"
|
|
|
|
|
2024-12-20 16:11:08 +00:00
|
|
|
mkdir -p package/dist/bin/tools/$arch/dart-sass
|
|
|
|
mkdir -p package/dist/bin/tools/$arch/deno_dom
|
|
|
|
cp $srcdir/usr/bin/deno package/dist/bin/tools
|
|
|
|
ln -sfT /usr/bin/pandoc package/dist/bin/tools/$arch/pandoc
|
|
|
|
ln -sfT /usr/bin/sass package/dist/bin/tools/$arch/dart-sass/sass
|
|
|
|
ln -sfT /usr/bin/esbuild package/dist/bin/tools/$arch/esbuild
|
2024-01-31 01:22:57 +00:00
|
|
|
|
|
|
|
msg "Building Deno Stdlib..."
|
2024-12-20 16:11:08 +00:00
|
|
|
cd "$srcdir/deno-dom-$_denodomver"
|
2024-01-31 01:22:57 +00:00
|
|
|
cargo build --release
|
|
|
|
|
2024-12-20 16:11:08 +00:00
|
|
|
cd "$srcdir/$provides-$pkgver/package/dist/bin/tools"
|
|
|
|
deno run --unstable --allow-env --allow-read --allow-write --allow-run --allow-net --allow-ffi --importmap=../../../../share/conf/jsx-import-map.json ../../../../share/conf/jsx-runtime.ts prepare-dist --log-level info
|
2024-01-31 01:22:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2024-12-20 16:11:08 +00:00
|
|
|
cd "$srcdir/$provides-$pkgver"
|
|
|
|
mkdir -p package/pkg-working/bin/tools/$arch/dart-sass
|
|
|
|
mkdir -p package/pkg-working/bin/tools/$arch/deno_dom
|
|
|
|
cp "$srcdir/deno-dom-$_denodomver/target/release/libplugin.so" "$srcdir/$provides-$pkgver/package/pkg-working/bin/tools/$arch/deno_dom"
|
2024-01-31 01:22:57 +00:00
|
|
|
# keep legacy pandoc location, see https://github.com/quarto-dev/quarto/issues/237
|
|
|
|
ln -sfT /usr/bin/pandoc package/pkg-working/bin/tools/pandoc
|
2024-12-20 16:11:08 +00:00
|
|
|
ln -sfT /usr/bin/pandoc package/pkg-working/bin/tools/$arch/pandoc
|
|
|
|
ln -sfT /usr/bin/deno package/pkg-working/bin/tools/$arch/deno
|
|
|
|
ln -sfT /usr/bin/sass package/pkg-working/bin/tools/$arch/dart-sass/sass
|
|
|
|
ln -sfT /usr/bin/esbuild package/pkg-working/bin/tools/$arch/esbuild
|
|
|
|
ln -sfT /usr/bin/typst package/pkg-working/bin/tools/$arch/typst
|
2024-01-31 01:22:57 +00:00
|
|
|
|
2024-12-20 16:11:08 +00:00
|
|
|
install -d $pkgdir/usr/{bin,lib/$pkgname/{bin,share}}
|
|
|
|
cp -R package/pkg-working/* "$pkgdir/usr/lib/$pkgname"
|
|
|
|
ln -sf "/usr/lib/$pkgname/bin/quarto" "$pkgdir/usr/bin/quarto"
|
2024-01-31 01:22:57 +00:00
|
|
|
}
|