slop
slop copied to clipboard
Consider dropping GLM as a dependency, if possible.
I don't know how much slop actually makes use of this library, but dropping it if possible might be a good idea if this is possible? I saw you talked about the possibility of using in-house math over glm in a previous issue. Reasons:
Since version 0.9.9.5, glm has been very hard for distros to package, because the developer removed the cmake files, I would link you various issues, but the glm dev nuked his issue tracker, more about that later. For now, instead see the arch Pkgfile for example: https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/glm#n30
With hacky hacks it is possible to circumvent this problem (again, see the Arch Pkgfile), though the majority of distros seems to stay at 0.9.9.5 (rather than 0.9.9.8, the newest version.) This in itself would not be a huge problem, but there is more: since this week, the GLM developer simply nuked the bug tracker, and removed ALL issues...
In short:
- Not being maintained by the vast majority of distros.
- Not maintainable without the use of hacks.
- Dev that removes essential files without even a mention in the change-log or any explanation.
- Removing every issue opened about this, so now you can't even see previous discussion about it.
- Removed every other issue as well.
Oh gosh that sucks, if the license allows, I don't mind including the glm files in slop. Or some math lib replacement.
The license is "GLM is licensed under The Happy Bunny License or MIT License" so it'd probably be fine to pick the MIT license and include it in slop's sources. Getting slop to build in this way was easier than I thought.
Here's what works for me (with glm's unmodified source in ./glm/ (The sources could be trimmed down when added to slop):
#!/bin/sh -e
export DESTDIR="$1"
(
cd glm
cmake -B build \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE=Release \
-DSLOP_OPENGL=False
cmake --build build
)
# Required files from glm are in `./glm/glm` so we only need to
# point slop to `./glm` as the includes are all `<glm/blabla>`
cmake -B build \
-DGLM_INCLUDE_DIR="$PWD/glm" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE=Release \
-DSLOP_OPENGL=False
cmake --build build
cmake --install build
I'd be happy to send a PR your way if you're interested in making this change. :+1: