dankamongmen / notcurses

blingful character graphics/TUI library. definitely not curses.
https://nick-black.com/dankwiki/index.php/Notcurses
Other
3.61k stars 114 forks source link

Get packaged into Conan #1098

Open dankamongmen opened 4 years ago

dankamongmen commented 4 years ago

Conan is one of several emerging C/C++ "package managers" ala those used by node, go, and rust. We should get Notcurses in there early (NCURSES is already present):

https://conan.io/center/ https://github.com/conan-io/conan-center-index/blob/master/docs/how_to_add_packages.md

dankamongmen commented 4 years ago

I've been added to the Conan EAP by @jgsogo. He's a good man, and thorough.

dankamongmen commented 3 years ago

https://github.com/dankamongmen/conan-center-index/tree/dankamongmen/notcurses has some progress.

dankamongmen commented 3 years ago

hey @grendello just wondering if you've ever wrapped something up for conan

grendello commented 3 years ago

Nope, I prefer to use direct dependencies in the form of distro provided packages. At least on Linux, which has a number of very decent packaging solutions. Conan (or others) would be useful if we want to target distros which have no decent package management system (Slack...?) or for Windows. For macOS (when it works) we'll probably want to write a Homebrew recipe (I did that for other software before) and be done with it.

jgsogo commented 3 years ago

Hi!

Using dependencies installed in the system via any system package manager is suitable if there aren't conflicts or you don't want to test the library/application using different versions of those dependencies (assuming those dependencies can be installed system-wide).

With Conan (or any other package manager) it is really easy to override dependencies in the graph and check if they work as expected... or to cross-compile for other architectures, or use different compiler versions. Basically it makes it possible to isolate the project from the running machine, dependencies of this project won't interfere with any other running application or any other project being developed in the same machine.

Of course, you get these advantages paying a bit of complexity... but IMHO, it is worth it.

grendello commented 3 years ago

@jgsogo using package manager like Conan can easily get you in trouble when you want to package your app using a distro packaging approach. Using Conan et.al. is fine when you statically link against those libraries, but then again you get in trouble with projects like Debian which practically requires linking against the provided libraries. And if the library doesn't exist, it needs to be packaged for Debian before your software can be included in the repository. I'm not saying Conan and friends are bad, they do have their uses (especially on systems without any real package management or with software that's not intended to be distributed in a distro-specific manner) - but caution should be taken not to make your software non-distributable in a "standard" way.

jgsogo commented 3 years ago

That's really good feedback, @grendello. It is possible to proxy a system library using a Conan recipe, but those are not the kind of Conan recipes that are gathering attention from our community right now. I totally agree Conan et al. are more useful for development than distribution right now.

dankamongmen commented 3 years ago

@jgsogo i'm definitely looking to get a conan recipe up and going. i spent two hours or so on it back about a month ago, and put it aside as it seemed more complex than any other packaging i'd been doing. i fully intend to get back on it, though i would absolutely love for someone else to do it, too =].

jgsogo commented 3 years ago

If you submit a PR with a first version of the recipe to https://github.com/conan-io/conan-center-index we can help you with the details, or we can merge it if it is good enough and then improve it in the future. We have a very active community of users 😺 .

dankamongmen commented 3 years ago

If you submit a PR with a first version of the recipe to https://github.com/conan-io/conan-center-index we can help you with the details, or we can merge it if it is good enough and then improve it in the future. We have a very active community of users .

i will take advantage of this friendly offer today!

dankamongmen commented 3 years ago

I now have a recipe which builds notcurses and a test program, and successfully launches the latter. We require "libunistring/0.9.10" and "openimageio/2.2.7.0" (i didn't see ffmpeg/libav). i'm gonna go ahead and submit this, and get some feedback.

dankamongmen commented 3 years ago

Just did a bunch of work on our conan recipe, and we're almost there. Just need to break libnotcurses and libnotcurses++ into different Components, and we ought be done.

dankamongmen commented 3 years ago

We might as well wait for 2.1.6 to drop, since we'll need a third Component for notcurses-core at that point. Once 2.1.6 is cut, though, let's add the two new Components and request a fresh review.

dankamongmen commented 3 years ago

ok @jgsogo , i've got two problems left:

dankamongmen commented 3 years ago

went ahead and updated our outstanding patch to 2.3.1, and let's see what happens.