HenrikBengtsson / CBI-software

A Scientific Software Stack for HPC (CentOS oriented)
https://wynton.ucsf.edu/hpc/software/software-repositories.html
5 stars 2 forks source link

SOFTWARE: pdfcrop #56

Closed HenrikBengtsson closed 1 year ago

HenrikBengtsson commented 2 years ago

Background: Needed to build the Pigengene vignette, e.g. from R CMD check:

Error(s) in re-building vignettes:
  ...
--- re-building ‘Pigengene_inference.Rnw’ using knitr
Warning in has_utility("pdfcrop") :
  pdfcrop not installed or not in PATH
sh: pdfcrop: command not found
Warning in system2("pdfcrop", shQuote(c(x, x)), stdout = if (quiet) FALSE else "") :
  error in running command
sh: pdfcrop: command not found
Warning in system2("pdfcrop", shQuote(c(x, x)), stdout = if (quiet) FALSE else "") :
...
HenrikBengtsson commented 1 year ago

The installed version is very old:

$ head -15 "$(command -v pdfcrop)"
#!/usr/bin/env perl

##    PDFCrop  version 0.4b
##    -------  ------- ----
## 
##  Copyright 2011 -- Eric Doviak <eric@doviak.net>
##  Copyright 2011 -- Tomas Janousek <tomi@nomi.cz>
## 
##  Eric Doviak wrote most of this Perl script, but Tomas Janousek wrote 
##  the template for the PDFedit script. Eric Doviak's work is copyrighted 
##  under the terms of the GPL v3. Janousek's work is copyrighted under 
##  the terms of the BSD license. The BSD licensed portions are denoted 
##  in the text of this script and the PDFedit script that this script
##  generates.

Compare this with the version that comes with the Ubuntu 22.04 package texlive-extra-utils;

$ head -15 "$(command -v pdfcrop)"
#!/usr/bin/perl
# Debian required shebang above
# Original shebang below
# #!/usr/bin/env perl
use strict;
$^W=1; # turn warning on
#
# pdfcrop.pl
#
# Copyright (C) 2002, 2004, 2005, 2008-2012 Heiko Oberdiek.
#               2020                        Oberdiek Package Support Group
#
# This program may be distributed and/or modified under the
# conditions of the LaTeX Project Public License, version 1.3c or later.
HenrikBengtsson commented 1 year ago

Both Wynton and C4 have

$ pdfcrop --version
pdfcrop 2023/04/15 v1.42