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

Consider dropping GLM as a dependency, if possible. #130

Open
CamilleScholtz opened this issue Apr 14, 2020 · 2 comments
Open

Consider dropping GLM as a dependency, if possible. #130

CamilleScholtz opened this issue Apr 14, 2020 · 2 comments

Comments

@CamilleScholtz
Copy link
Contributor

CamilleScholtz commented Apr 14, 2020

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.
@naelstrof
Copy link
Owner

Oh gosh that sucks, if the license allows, I don't mind including the glm files in slop. Or some math lib replacement.

@dylanaraps
Copy link

dylanaraps commented May 1, 2020

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. 👍

dylanaraps added a commit to dylanaraps/community that referenced this issue Jul 23, 2020
jedahan pushed a commit to jedahan/community that referenced this issue Sep 10, 2020
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

No branches or pull requests

3 participants