I’m getting rawproc to a 1.0, and one of the things I want to fully support is lens correction. I have a new camera with a lens that is apparently designed to trade distortion for other qualities, and distortion correction is actually hard-coded into it’s Lightroom processing. Seems to be the way of the world, these days; software will save us all…
Anyway, to support lensfun integration I wrote a hacky C++ function to do what the update-lensfun-database utility does so I could include the function in some rawproc menu invocation. Surrounded it with 25 lines of main (), and tink-poof, got a program. Thinking it to be useful, or at least humorous, I’ve posted a Github repository here:
GPL2-licensed, like rawproc (if you look real soon, it may be before I post the license file, have to find a copy somewhere…). You can fork it, copy it, screen-scrape it, whatever, just use it under GPL2 terms.
It needs libcurl and libarchive. It almost needed some JSON parser, but I decided to just do a stupid-std::string-pet-trick to parse the versions.json file you need to figure out what to download next. I inserted step-by-step comments to document the sequence of operations, so one might just study that and write their own thing, fine with me.
It compiles nicely with gcc, and the MSYS2 flavor, and the Makefile is set up accordingly. There’s no install target, I left that as an exercise for the student.
Anyhoo, have fun!