summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAleksandr Beliaev2024-01-30 22:00:57 +1300
committerAleksandr Beliaev2024-01-30 22:00:57 +1300
commit5de277b77ee3507166e09984adb345d6fb811312 (patch)
tree42457cf75bede66d31eb4e95dfcea7982df5dff5 /PKGBUILD
parent49f169f4642967dc53aed0ba6cde44f42a4dd709 (diff)
downloadaur-5de277b77ee3507166e09984adb345d6fb811312.tar.gz
v1.4.549
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD61
1 files changed, 34 insertions, 27 deletions
diff --git a/PKGBUILD b/PKGBUILD
index f968009e5cf2..34a0d20a8f0d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,74 +1,81 @@
# Maintainer: Aleksandr Beliaev <trap000d at gmail dot com>
pkgname=quarto-cli
-pkgver=1.3.450
+pkgver=1.4.549
pkgrel=1
_pkgbasename=quarto-cli
_denodomver="0.1.35-alpha-artifacts"
_deno_arch="deno-x86_64-unknown-linux-gnu"
pkgdesc="Quarto is an open-source scientific and technical publishing system built on [Pandoc](https://pandoc.org)."
arch=('x86_64' 'i686')
-depends=('nodejs' 'deno>=1.28' 'deno<1.29' 'dart-sass' 'esbuild' 'pandoc' 'lua-lpeg')
+depends=('nodejs' 'deno' 'dart-sass' 'esbuild' 'pandoc' 'lua-lpeg' 'typst')
makedepends=('git' 'npm' 'rust')
url="https://quarto.org/"
license=('MIT')
provides=("quarto")
-conflicts=('quarto-cli-bin' 'quarto-cli' 'quarto-cli-git')
+conflicts=('quarto-cli-bin' 'quarto-cli-pre-release' 'quarto-cli-bin-pre-release' 'quarto-cli-git')
options=(!strip)
source=("${_pkgbasename}-${pkgver}.tar.gz::https://github.com/quarto-dev/quarto-cli/archive/refs/tags/v${pkgver}.tar.gz"
"https://github.com/b-fuze/deno-dom/archive/refs/tags/v${_denodomver}.tar.gz"
)
-sha256sums=('4e80d6f78c7b81c78146d5f2dafaf7fe223459f86ead625b9fd6c45fce11efd4'
+sha256sums=('9c34dac2854b1abb1b67e413366d7c66abece3d79a244b2798bb11a3d563218c'
'14fb042a6912041b9fda91fd643cf278764d075bc9539aa1e107475915cd896c')
build() {
-
cd "${srcdir}/${_pkgbasename}-${pkgver}"
source configuration
source "${srcdir}/${_pkgbasename}-${pkgver}/package/src/set_package_paths.sh"
export QUARTO_VERSION=${pkgver}
+ export QUARTO_VENDOR_BINARIES='false'
+ export DENO_DOM_PLUGIN="${srcdir}/deno-dom-${_denodomver}/target/release/libplugin.so"
if [ -z "$QUARTO_DENO" ]; then
export QUARTO_DENO=$SCRIPT_PATH/../dist/bin/tools/deno
fi
+ # keep deno cache directory out of default $home/.cache/deno
+ export DENO_DIR="${srcdir}/${_pkgbasename}-${pkgver}/package/cache"
+ # Rust optimizations
+ export CARGO_HOME="${srcdir}/${_pkgbasename}-${pkgver}/.cargo"
+ export RUSTFLAGS="-C strip=symbols"
- #mkdir -p package/dist/bin/tools/${_deno_arch}/{deno_dom,dart-sass}
- mkdir -p package/dist/bin/tools/${_deno_arch}
- #mkdir -p package/dist/bin/tools/dart-sass
+ mkdir -p package/dist/bin/tools/${arch}/dart-sass
+ mkdir -p package/dist/bin/tools/${arch}/deno_dom
cp /usr/bin/deno package/dist/bin/tools
-
- cd package/src
- ../dist/bin/tools/deno run --unstable --allow-env --allow-read --allow-write --allow-run --allow-net --allow-ffi --importmap=../../src/dev_import_map.json bld.ts configure --log-level info
- ../dist/bin/tools/deno run --unstable --allow-env --allow-read --allow-write --allow-run --allow-net --allow-ffi --importmap=../../src/import_map.json bld.ts prepare-dist --log-level info
+ 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
msg "Building Deno Stdlib..."
cd "${srcdir}/deno-dom-${_denodomver}"
cargo build --release
+ cd "${srcdir}/${_pkgbasename}-${pkgver}"
+ # unsure if it's needed at all
+ # package/dist/bin/tools/deno run --allow-all package/src/common/create-deno-config.ts > deno.jsonc
+ cd package/src
+ #../dist/bin/tools/deno run --unstable --allow-env --allow-read --allow-write --allow-run --allow-net --allow-ffi --importmap=../../src/dev_import_map.json bld.ts configure --log-level info
+ ../dist/bin/tools/deno run --unstable --allow-env --allow-read --allow-write --allow-run --allow-net --allow-ffi --importmap=../../src/import_map.json bld.ts prepare-dist --log-level info
+
}
package() {
cd "${srcdir}/${_pkgbasename}-${pkgver}"
-
- msg "Tidying up..."
- ## 1. We have got pandoc already installed in /usr/bin
- rm package/dist/bin/tools/pandoc
- ln -sfT /usr/bin/pandoc package/dist/bin/tools/pandoc
- ## And deno
- rm package/dist/bin/tools/deno
- ln -sfT /usr/bin/deno package/dist/bin/tools/${_deno_arch}/deno
- ## And dart-sass
- rm -rf package/dist/bin/tools/dart-sass/*
- ln -sfT /usr/bin/sass package/dist/bin/tools/dart-sass/sass
- ## as well as esbuild
- rm package/dist/bin/tools/esbuild
- ln -sfT /usr/bin/esbuild package/dist/bin/tools/esbuild
+ 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}/${_pkgbasename}-${pkgver}/package/pkg-working/bin/tools/${arch}/deno_dom"
+ # keep legacy pandoc location, see https://github.com/quarto-dev/quarto/issues/237
+ ln -sfT /usr/bin/pandoc package/pkg-working/bin/tools/pandoc
+ 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
## 2. Remove symlinks created by build script in ~/bin and ~/.local/bin directories
rm -f "$HOME/.local/bin/quarto"
rm -f "$HOME/bin/quarto"
install -d ${pkgdir}/usr/{bin,lib/${_pkgbasename}/{bin,share}}
- cp -R package/dist/* "${pkgdir}/usr/lib/${_pkgbasename}"
+ cp -R package/pkg-working/* "${pkgdir}/usr/lib/${_pkgbasename}"
ln -sf "/usr/lib/${_pkgbasename}/bin/quarto" "$pkgdir/usr/bin/quarto"
}