Closed yurivict closed 5 months ago
The problem with using git submodules is that it requires everyone to run git submodule update --init
before building, while cmake's FetchContent
'just works'. Is there a middle road that I am not aware of and which works better in combination with FreeBSD?
Is there a middle road that I am not aware of and which works better in combination with FreeBSD?
It's not only FreeBSD. It is any sane packaging system that rebuilds packages: Debian, RedHat, OpenBSD, etc. FetchContent is fundamentally not compatible with package builder because downloads aren't allowed during the package build process for security reasons.
One way around it is to patch the project to use pre-downloaded binaries or pre-downloaded source tarballs. Another way is to patch the project to use external dependencies.
In your case MicroTex should be an external dependency. I am going to create a port for it on FreeBSD. IMO it's best to enhance your cmake scripts to first check for the pre-installed package. This is what I suggested in my original message.
Ok, can you please try HEAD
and let me know? You will need to git submodule update --init --recursive
, after which the build process should pick up that submodule instead of trying to FetchContent
it.
Please do not package MicroTeX from my repo: I am not the maintainer/author, I only provided a few patches and wanted a stable URL from which to pull it.
Please do not package MicroTeX from my repo: I am not the maintainer/author, I only provided a few patches and wanted a stable URL from which to pull it.
I've packaged https://github.com/NanoMichael/MicroTeX: https://cgit.freebsd.org/ports/tree/print/microtex
Please consider upstreaming your patches so that the users of NanoMichael/MicroTeX can also benefit from them.
I won't be able to use that unless you package the openmath
branch of that repo and include my patches to make it build static libraries. I would advise against doing that without consulting with NanoMichael about their plans.
The latest HEAD revision builds and works fine.
here
cmake's FectContent can never work in the package builder, because downloads aren't allowed during package building. Dependencies should be either external, or bundled as git submodules.