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

ghostscript 10.0.0 #111494

Closed
wants to merge 5 commits into from
Closed

ghostscript 10.0.0 #111494

wants to merge 5 commits into from

Conversation

cho-m
Copy link
Member

@cho-m cho-m commented Sep 23, 2022

Created with brew bump-formula-pr.

resource blocks may require updates.

@BrewTestBot BrewTestBot added the bump-formula-pr PR was created using `brew bump-formula-pr` label Sep 23, 2022
@cho-m cho-m added CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. long build Needs CI-long-timeout labels Sep 23, 2022
else
system "./configure", *std_configure_args, *args
end
libs = %w[expat freetype jbig2dec jpeg lcms2mt libpng openjpeg tiff zlib]
Copy link
Member

Choose a reason for hiding this comment

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

No system tesseract or leptonica? Maybe we could just manually pass the right -I, -L and -l flags directly to configure or make.

Copy link
Member Author

@cho-m cho-m Sep 23, 2022

Choose a reason for hiding this comment

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

Configure script will check for local source code and auto-disable feature if it doesn't exist https://git.ghostscript.com/?p=ghostpdl.git;a=blob;f=configure.ac;h=bb578250c2a3ba40c3479e57fd59e07f2c52e968;hb=f9673cbc87df8331c5b3928d91fde25d0f111e9c#l981

May be able to workaround, but not sure if worth the effort.


Some Linux repositories just disable OCR support, e.g. Arch https://github.com/archlinux/svntogit-packages/blob/packages/ghostscript/trunk/PKGBUILD#L34-L41

  # 1) inclusion of the tesseract/leptonica sources for OCR capabilities
  # at the moment we do not support linking with tesseract/leptonica shared libraries. 
  # As is normal with such included libraries, deleting those directories and (re)running
  # configure (on Unix like systems) will automatically build without the OCR functionality.
  # increases package size ghostpcl 2.7->4.9MB | ghostscript 18->23MB | ghostxps 2,7->4.9MB
  # https://www.ghostscript.com/doc/9.54.0/VectorDevices.htm#UseOCR - 
  # this doesn't seem to be worth to keep enabled until linking with shared libs is supported
  rm -r tesseract leptonica

Copy link
Member

Choose a reason for hiding this comment

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

Ok, let me see about filing an issue upstream then.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, someone beat us to it by a month: https://bugs.ghostscript.com/show_bug.cgi?id=705764

url :stable
regex(/href=.*?ghostpdl[._-]v?(\d+(?:\.\d+)+)\.t/i)
strategy :github_latest
url :head
regex(/^ghostpdl[._-]v?(\d+(?:\.\d+)+)$/i)
Copy link
Member Author

@cho-m cho-m Sep 24, 2022

Choose a reason for hiding this comment

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

Livecheck was failing, which I think was due to number of uploaded files. They don't show up on detected release page https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/tag/gs1000. They do show up on https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/expanded_assets/gs1000

Went and reverted livecheck to previous one, which the comment was for. This may cause issues given it had issues with 9.56.1 release #98910.

Copy link
Member

Choose a reason for hiding this comment

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

This failure is due to the changes described in Homebrew/brew#13853 (i.e., GitHub doesn't include the asset list in the HTML now). I was about to create a PR to update this livecheck block but I'll add some suggestions here instead.

url :stable
regex(/href=.*?ghostpdl[._-]v?(\d+(?:\.\d+)+)\.t/i)
strategy :github_latest
url :head
regex(/^ghostpdl[._-]v?(\d+(?:\.\d+)+)$/i)
Copy link
Member

Choose a reason for hiding this comment

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

This failure is due to the changes described in Homebrew/brew#13853 (i.e., GitHub doesn't include the asset list in the HTML now). I was about to create a PR to update this livecheck block but I'll add some suggestions here instead.

Comment on lines 8 to 9
# We check the tags from the `head` repository because the GitHub tags are
# formatted ambiguously, like `gs9533` (corresponding to version 9.53.3).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# We check the tags from the `head` repository because the GitHub tags are
# formatted ambiguously, like `gs9533` (corresponding to version 9.53.3).
# We identify the latest version from the first-party website because the
# GitHub tags are formatted ambiguously (e.g. `gs9533` for version 9.53.3).

Comment on lines +11 to +12
url :head
regex(/^ghostpdl[._-]v?(\d+(?:\.\d+)+)$/i)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
url :head
regex(/^ghostpdl[._-]v?(\d+(?:\.\d+)+)$/i)
url "https://www.ghostscript.com/json/settings.json"
regex(/["']GS_VER["']:\s*?["']v?(\d+(?:\.\d+)+)["']/i)

Checking the Git tags technically works but the release tarball may not be available yet when the tag is created (i.e., this is the reason behind using the GithubLatest strategy here). The first-party download page links to the latest GhostPDL tarball on GitHub but the link is generated using JavaScript from a JSON file. The suggestion above matches the version from the JSON file, so we shouldn't have issues with livecheck surfacing a new version before the tarball is available.

In the future, I'll update this to use a Json strategy (which will properly parse the JSON and extract the value for the GS_VER field) but I still have to work my way to creating that PR (i.e., the work's done but I have some other brew PRs to tackle first).

@carlocab
Copy link
Member

This will need a rebase for imagemagick[@6].

Also, this should probably be reported upstream:

❯ ls -la "$(brew --prefix ghostscript)/lib"
lrwxr-xr-x  19 carlocab  4 Apr 21:48 libgpcl6.dylib -> libgpcl6.dylib.9.56
lrwxr-xr-x  19 carlocab  4 Apr 21:48 libgpcl6.dylib.9 -> libgpcl6.dylib.9.56
.rw-r--r-- 17M carlocab 28 Jul 16:28 libgpcl6.dylib.9.56
lrwxr-xr-x  18 carlocab  4 Apr 21:48 libgpdl.dylib -> libgpdl.dylib.9.56
lrwxr-xr-x  18 carlocab  4 Apr 21:48 libgpdl.dylib.9 -> libgpdl.dylib.9.56
.rw-r--r-- 20M carlocab 28 Jul 16:28 libgpdl.dylib.9.56
lrwxr-xr-x  16 carlocab  4 Apr 21:48 libgs.dylib -> libgs.dylib.9.56
lrwxr-xr-x  16 carlocab  4 Apr 21:48 libgs.dylib.9 -> libgs.dylib.9.56
.r--r--r-- 19M carlocab 28 Jul 16:28 libgs.dylib.9.56
lrwxr-xr-x  18 carlocab  4 Apr 21:48 libgxps.dylib -> libgxps.dylib.9.56
lrwxr-xr-x  18 carlocab  4 Apr 21:48 libgxps.dylib.9 -> libgxps.dylib.9.56
.rw-r--r-- 17M carlocab 28 Jul 16:28 libgxps.dylib.9.56

This used to be fixed by a patch we were carrying.

@carlocab carlocab added CI-long-timeout Use longer GitHub Actions CI timeout. no long build conflict Do not allow merging other pull requests when files conflict with this one labels Sep 25, 2022
Copy link
Member

@carlocab carlocab left a comment

Choose a reason for hiding this comment

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

Linux failures are unrelated.

@carlocab carlocab removed the CI-long-timeout Use longer GitHub Actions CI timeout. label Sep 25, 2022
@BrewTestBot
Copy link
Member

:shipit: @carlocab has triggered a merge.

@cho-m cho-m deleted the bump-ghostscript-10.0.0 branch September 25, 2022 18:28
@samford samford mentioned this pull request Sep 26, 2022
6 tasks
@github-actions github-actions bot added the outdated PR was locked due to age label Oct 26, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bump-formula-pr PR was created using `brew bump-formula-pr` CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. long build Needs CI-long-timeout no long build conflict Do not allow merging other pull requests when files conflict with this one outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants