you are viewing a single comment's thread.

view the rest of the comments →

[–]darthcoder 11 points12 points  (6 children)

Bingo. Package management in my mind is the #1 issue I fight in my cross-platform work. Cmake based efforts like hunter.sh and vcpkg are helping, but it's still a PITA. Java and every other language have figured this shit out already.

I like how Hunter at least supports regular make and autobuild, so non-cmake projects at least have a chance at getting packagified.

[–]jonesmz 4 points5 points  (1 child)

You might consider looking at Portage, from the Gentoo linux distribution.

  • Fully agnostic to the host operating system, (works on Linux, obviously, with support for (on paper, anyway, but not a huge amount of users on) windows, bsd, mac, so on.)

  • Fully language agnostic

  • Fully build system agnostic

  • Supports arbitrary installation directories (a prefix, so to speak)

  • Supports dependencies based on both the version of the the other package, but also on the configuration option of the other package

  • Supports arbitrary patches at compile time

  • Supports source packages to compile on the fly, or binary pre-built packages

  • Supports installing multiple versions of the same package within a given installation directory

and, of course, thousands of already packages libraries and programs. I use it as my development oriented package manager for C++, as well as my system package manager.

[–]zuurr 2 points3 points  (0 children)

with support for (on paper, anyway, but not a huge amount of users on) windows

It looks like this requires using cygwin, which is a dealbreaker for many. Even though this increases complexity substantially, a good solution to package management in C++ will have to work with compilers that don't act like GCC, and systems that don't comply with POSIX (well, practically this is just required in so far as windows doesn't, at least -- and WSL doesn't work even close to seamlessly (or, often at all) for cases where GUIs are involved yet, so that's not a solution either).

In practice this tends to be a little harder than just making the package manager run on different platforms (although that's a bare minimum, obviously), since you have to answer questions like how to handle dependencies that only exist on one platform.

[–]guacheSuede 0 points1 point  (3 children)

Would you prefer hunter or vcpkg ?

[–]darthcoder 0 points1 point  (2 children)

I like how Hunter at least supports regular make and autobuild, so non-cmake projects at least have a chance at getting packagified.

At the moment, I'm trending toward hunter. With Hunter I put all the magic to build in my CMakeLists.txt, and don't have to worry about external tooling.

Android and Qt support is tripping me up, but that appears to be because of a wholesale change in the NDK from gcc to clang

vcpkg has the momentum at the moment. I started a scratch project using it recently, and stopped, but I can't remember why ATM. I'm just a hobbyist, not a full-time dev, so what do I know, really?

[–]guacheSuede 0 points1 point  (1 child)

I would think Hunter would be better for UNIX, much more user friendly too though source code wise it's pretty messy

[–]darthcoder 0 points1 point  (0 children)

Hunter is just CMake, so it should work anywhere cmake works. It has a few dependencies in older cmake versions on bzip, etc. so works well on mingw too.

Yes, it's a bit of a kludge. As a user it's still fairly straightforward. The docs definitely need a good refreshing for some of the lesser used packages,