pdfio icon indicating copy to clipboard operation
pdfio copied to clipboard

Add pdfio to vcpkg ports

Open phrrngtn opened this issue 1 year ago • 4 comments

Thank you very much for pdfio and especially the cross-platform support and the unrestrictive license.

It would be great if there were a vcpkg port of pdfio available as vcpkg really makes it easy for dependency management. Before I put more work into this, I wanted to check with you if this is something that you would welcome or reject. I learned C programming in the late 1980's and your Makefile is delightfully old school.

I would like to incorporate pdfio into a SQLite extension to perform field-extraction from PDF documents by using spatial querying techniques. My interest in the area has renewed recently after the release of a really nice geometry library https://github.com/tidwall/tg . I am not at all skilled in CMake but I would like to use github actions and releases to build and host my extensions so am biting the bullet and trying to learn enough of the toolchain to allow me to concentrate on the extensions themselves.

I tried to a portfile.cmake that called the Makefile but I could not get it to work because it (vcpkg) expects to use configure to generate the Makefile. I hand-crafted a CMakeList.txt file from the Makefile and did a very rough portfile.cmake and now have something that can build from my fork.

phrrngtn avatar Oct 11 '23 23:10 phrrngtn

I forgot to mention that I have been using a perfectly fine workaround which is to add pdfio as a git submodule for my project. While experimenting with my main CMake, adding entries to compile the pdfio C source files, it looked like it would just be a bit more work to make a standalone CMakeLists.txt for pdfio and in turn provide a portfile.cmake that works with that. I did a basic version but it does not have all the installation targets (just the libraries, executables and the headers).

If making pdfio available via vcpkg is not incompatible with the project style guides, then I will put some more effort into the fit and finish and submit a PR.

thanks!

phrrngtn avatar Oct 12 '23 21:10 phrrngtn

So I don't have strong feelings either way about getting PDFio added to vcpkg. I don't personally use it, and I already include PDFio in Microsoft's NuGet package collection which works for Visual Studio projects...

michaelrsweet avatar Oct 12 '23 21:10 michaelrsweet

Oh and I should mention the submodule approach is usually what I recommend when using PDFio...

michaelrsweet avatar Oct 12 '23 21:10 michaelrsweet

That makes sense. I will continue with the submodule approach.

I am a fairly recent user of vcpkg but I have to say that I have been very pleased with the benefits of it for the multi-platform support and the fact that it works nicely with github actions.

phrrngtn avatar Oct 13 '23 02:10 phrrngtn