Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions package/src/common/dependencies/dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,26 @@ import { esBuild } from "./esbuild.ts";
import { pandoc } from "./pandoc.ts";
import { archiveUrl } from "../archive-binary-dependencies.ts";
import { typst } from "./typst.ts";
import { verapdf } from "./verapdf.ts";

// The list of binary dependencies for Quarto
export const kDependencies = [
deno_dom(version("DENO_DOM")),
pandoc(version("PANDOC")),
dartSass(version("DARTSASS")),
esBuild(version("ESBUILD")),
typst(version("TYPST"))
typst(version("TYPST")),
verapdf(version("VERAPDF")),
];

// Defines a binary dependency for Quarto
export interface Dependency {
name: string;
bucket: string;
version: string;
// If true, this dependency is only archived to S3 but not downloaded during configure.
// Use for optional dependencies installed separately via `quarto install`.
archiveOnly?: boolean;
architectureDependencies: Record<
string,
ArchitectureDependency
Expand Down Expand Up @@ -66,8 +71,14 @@ export async function configureDependency(
targetDir: string,
config: PlatformConfiguration,
) {
// Skip archive-only dependencies (installed separately via `quarto install`)
if (dependency.archiveOnly) {
info(`Skipping ${dependency.name} (archive-only)`);
return;
}

info(`Preparing ${dependency.name} (${config.os} - ${config.arch})`);
let archDep = dependency.architectureDependencies[config.arch];
const archDep = dependency.architectureDependencies[config.arch];

if (archDep) {
const platformDep = archDep[config.os];
Expand Down
47 changes: 47 additions & 0 deletions package/src/common/dependencies/verapdf.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* verapdf.ts
*
* Copyright (C) 2020-2022 Posit Software, PBC
*/

import { Dependency } from "./dependencies.ts";

export function verapdf(version: string): Dependency {
// VeraPDF is a Java application distributed as an installer ZIP.
// The same artifact works on all platforms.
const filename = `verapdf-greenfield-${version}-installer.zip`;
// Version format is X.Y.Z, but releases are organized under X.Y directories
const majorMinor = version.substring(0, version.lastIndexOf("."));
const url =
`https://software.verapdf.org/releases/${majorMinor}/${filename}`;

// VeraPDF is an archive-only dependency - it's uploaded to S3 for
// `quarto install verapdf` but not automatically installed during configure.
// This is because it requires Java and is only needed for PDF/A validation.
const release = {
filename,
url,
configure: async () => {
// No-op: verapdf is installed via `quarto install verapdf`, not configure.sh
},
};

return {
name: "VeraPDF",
bucket: "verapdf",
version,
archiveOnly: true,
// Same artifact for all platforms since it's Java
architectureDependencies: {
"x86_64": {
"darwin": release,
"linux": release,
"windows": release,
},
"aarch64": {
"darwin": release,
"linux": release,
},
},
};
}
Loading