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 pandoc-crossref #2667

Merged
merged 3 commits into from
Mar 10, 2021
Merged
Changes from 2 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
50 changes: 50 additions & 0 deletions P/pandoc_crossref/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
using BinaryBuilder

# Collection of pre-build pandoc binaries
name = "pandoc-crossref"

# Actually, this should be v"0.3.6.4".
version = v"0.3.6"
crossref_ver = "0.3.6.4"
pandoc_ver = "2.9.2.1"

url_prefix = "https://github.com/lierdakil/pandoc-crossref/releases/download/v$crossref_ver/pandoc-crossref"
sources = [
ArchiveSource("$url_prefix-Linux-$pandoc_ver.tar.xz", "57e8f71d46c401daf0a3247b7405b49503b836e93893730e6e5907f6cb2c0885"; unpack_target = "x86_64-linux-gnu"),
ArchiveSource("$url_prefix-macOS-$pandoc_ver.tar.xz", "b63ac830d7164279eb80041cd5f793e6b611ce1a701a86308ce5b2a3a99d33b2"; unpack_target = "x86_64-apple-darwin14"),
# Unknown archive format.
# ArchiveSource("$url_prefix-Windows-$pandoc_ver.7z", "3e943fcdd3f91951fe18f9900e136ccb9ea810b2582f4bd929760357eaf83ef4"; unpack_target = "x86_64-w64-mingw32"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be downloaded as

Suggested change
# ArchiveSource("$url_prefix-Windows-$pandoc_ver.7z", "3e943fcdd3f91951fe18f9900e136ccb9ea810b2582f4bd929760357eaf83ef4"; unpack_target = "x86_64-w64-mingw32"),
FileSource("$url_prefix-Windows-$pandoc_ver.7z", "3e943fcdd3f91951fe18f9900e136ccb9ea810b2582f4bd929760357eaf83ef4"; unpack_target = "x86_64-w64-mingw32"),

but you'll need to unpack it manually in the recipe with 7z

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check. I'll do that.

FileSource("https://raw.githubusercontent.com/lierdakil/pandoc-crossref/65858c01a76f75990e7e30bcdb571cd84a69d47c/LICENSE", "39db8f9acf036595a2566ea3fe560bc7bd65d8749f088e0f4a4ef2f8a6cb4b34"),
]

# Bash recipe for building across all platforms
script = raw"""
cd ${WORKSPACE}/srcdir/
mkdir -p "${bindir}"
if [[ "${target}" != *-mingw* ]]; then
subdir="bin/"
fi
cp ${target}/pandoc-crossref/${subdir}pandoc-crossref${exeext} ${bindir}
chmod +x ${bindir}/pandoc-crossref
install_license LICENSE
"""

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = [
Platform("x86_64", "linux"),
Platform("x86_64", "macos"),
# Platform("x86_64", "windows"),
]

# The products that we will ensure are always built
products = [
ExecutableProduct("pandoc-crossref", :pandoc_crossref),
]

# Dependencies that must be installed before this package can be built
dependencies = Dependency[
]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies)