diff options
-rw-r--r-- | pdfcrop.bzl | 8 | ||||
-rw-r--r-- | pdfcrop.sh | 10 | ||||
-rw-r--r-- | repositories.bzl | 8 |
3 files changed, 5 insertions, 21 deletions
diff --git a/pdfcrop.bzl b/pdfcrop.bzl index b463f98..ed6bb81 100644 --- a/pdfcrop.bzl +++ b/pdfcrop.bzl @@ -9,14 +9,12 @@ def _pdf_crop_impl(ctx): use_default_shell_env = True, arguments = [ ctx.files._pdf_crop_wrapper[0].path, - ctx.files._pdf_crop_script[0].path, texlive_path, uncropped.path, ctx.outputs.output.path, ], inputs = depset( - direct = (ctx.files._pdf_crop_script + ctx.files._pdf_crop_wrapper + - [uncropped]), + direct = (ctx.files._pdf_crop_wrapper + [uncropped]), ), outputs = [ctx.outputs.output], ) @@ -31,10 +29,6 @@ _pdf_crop = rule( allow_files = True, default = "@bazel_latex//:pdfcrop.sh", ), - "_pdf_crop_script": attr.label( - allow_files = True, - default = "@pdfcrop//:pdfcrop.pl", - ), }, implementation = _pdf_crop_impl, ) @@ -1,14 +1,12 @@ #!/bin/bash -pdfcrop=$1 -texlive=$2 +texlive=$1 if [[ $texlive =~ ^[^/].*$ ]]; then texlive=$PWD/$texlive fi echo "Using TeXLive installation: $texlive" -uncropped=$3 -output=$4 +uncropped=$2 +output=$3 PATH=$texlive/bin/x86_64:$PATH -PDFCROP=$PWD/$pdfcrop -$PDFCROP $uncropped $output --pdftex +pdfcrop $uncropped $output --pdftex diff --git a/repositories.bzl b/repositories.bzl index d277c76..45c0e0e 100644 --- a/repositories.bzl +++ b/repositories.bzl @@ -19,14 +19,6 @@ def latex_repositories(): ) http_archive( - name = "pdfcrop", - build_file_content = "exports_files([\"pdfcrop.pl\"])", - sha256 = "4226acd990b3a6db6f9e3bf8949e308b97fa74f8c404023bfb3ce598400a72a4", - strip_prefix = "pdfcrop", - url = "http://mirrors.ctan.org/support/pdfcrop.zip", - ) - - http_archive( name = "arxiv_latex_cleaner", build_file_content = """filegroup(name = "all", srcs = glob(["**"]), visibility = ["//visibility:public"])""", sha256 = "770c65993c964405bb5362ee75039970434ef395872356980e470b6b044ac427", |