pdfalto
pdfalto copied to clipboard
Use provided xpdf_objs library and disable default targets in xpdf
This should allow the usage of a plain xpdf
mirror, without the need of touching the CMakeLists.txt
file.
https://cmake.org/cmake/help/latest/command/add_subdirectory.html#command:add_subdirectory
add_subdirectory(source_dir [binary_dir] [EXCLUDE_FROM_ALL])
- Use automatic xpdf mirror repo
- https://gitlab.com/xpdf-mirror/xpdf
- Add build/ and install/ to gitignore
- Upgrade osx_image to the current default (9.4)
- the version 8.3 is deprecated
- Upgrade cmake to version 3.12.*
- this allows the usage of the
OBJECT
library inside atarget_link_libraries()
- this allows the usage of the
- Add PATH to use the updated cmake
- Patch xpdf mirror
- make Qt optional
- disable fontconfig
- Add missing
codeToGID
argument toXmlAltoOutputDev::getSplashFont()
Closes #99
This code (or a very similar one) works locally with cmake 3.13.4, the restrictions seems to be relaxed with https://gitlab.kitware.com/cmake/cmake/commit/3e774ad78c49cde1f47e1d7285bffef622859d64 that seems to be supported in the release 3.12
Regarding the Add missing codeToGID
argument to XmlAltoOutputDev::getSplashFont()
I used the already present codeToGID
variable, but I have not investigated any further after obtaining a successful build.
cc @kermitt2 or @lfoppiano for a mode detailed review.
Rebased on the current master
Hi @naufraghi !
First I am very sorry to be so slow to react to your PR... it seems that I have some difficulties to work more than 2-3 days per year on pdfalto :D Thank you very much for the PR and all the improvements it brings.
In between I prepared another mirror for xpdf-4.03 containing additional patch for supporting xpdf language packages with relative paths -> https://github.com/kermitt2/xpdf-4.03 (I think that there were anyway a bit more patch changes to the official xpdf than what you included)
From there I will use this mirror first and then include your PR changes manually with this new mirror version. I am also going to check the codeToGID
thingy !
Update to xpdf-4.03 was actually a bit complicated: new usage of fontconfig (if detected), updated form classes, and the codeToGID
parameter required non-trivial specific init (https://github.com/kermitt2/pdfalto/commit/96bec4396819b3716bd4c4e2789a5109ccdcde9f#diff-4a663af7fcefc0e10a654736ff3a8d6184763165c567b28be0321b38167c639b)
Normally everything is good now.
I have not yet updated to cmake version 3.12
Thanks @kermitt2 , let me know if you'd like a minimal PR extracted from this one