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

Use provided xpdf_objs library and disable default targets in xpdf #98

Closed

Conversation

naufraghi
Copy link

@naufraghi naufraghi commented Jul 20, 2020

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
  • 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 a target_link_libraries()
  • Add PATH to use the updated cmake
  • Patch xpdf mirror
    • make Qt optional
    • disable fontconfig
  • Add missing codeToGID argument to XmlAltoOutputDev::getSplashFont()

Closes #99

@naufraghi naufraghi changed the title Use provided xpdf_objs library and disable default targets in xpdf WIP: Use provided xpdf_objs library and disable default targets in xpdf Jul 20, 2020
@naufraghi
Copy link
Author

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

@naufraghi naufraghi force-pushed the use-default-xpdf-cmakelists branch 5 times, most recently from 647e45a to 5579d9e Compare July 24, 2020 08:25
@naufraghi naufraghi changed the title WIP: Use provided xpdf_objs library and disable default targets in xpdf Use provided xpdf_objs library and disable default targets in xpdf Jul 27, 2020
@naufraghi
Copy link
Author

naufraghi commented Jul 27, 2020

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.

@naufraghi
Copy link
Author

Rebased on the current master

- 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 a `target_link_libraries()`
- add PATH to use the updated cmake
- patch xpdf mirror
  - make Qt optional
  - disable fontconfig
@kermitt2
Copy link
Owner

kermitt2 commented Apr 7, 2021

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 !

@kermitt2
Copy link
Owner

kermitt2 commented Apr 7, 2021

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 (96bec43#diff-4a663af7fcefc0e10a654736ff3a8d6184763165c567b28be0321b38167c639b)

Normally everything is good now.

I have not yet updated to cmake version 3.12

@naufraghi
Copy link
Author

Thanks @kermitt2 , let me know if you'd like a minimal PR extracted from this one

@naufraghi
Copy link
Author

I'm closing this PR to clean up the list. Thanks for your work in pdfalto!

@naufraghi naufraghi closed this Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build with upstream xpdf sources
2 participants