Jannis234 / jm-overlay

A portage overlay for gentoo users
14 stars 7 forks source link

New packages for OSM in Gentoo #5

Closed wmyrda closed 7 years ago

wmyrda commented 7 years ago

Hi, I would be glad to see packages from my personal overlay reviewed and added in this overlay. I host my files here - http://bigvo.hopto.org/osm-extra/overlay/ They all relate to OpenStreetMap project in one way or another. Reason I believe that jm-overlay would be appropriate place for them is that one of those packages which still has to be done namely kosmitik [https://github.com/kosmtik/kosmtik] require quite a lot of the dev-nodejs stuff and I have very little experience preparing ebuilds requiring that and even when I did add some of them required for it I am not all to sure if I have done it right as running locally "npm install kosmtik" gave quite a few conflicting results like dependencies for nopt-3.0.6 where one time there was abbrev@1.1.0 and other abbrev@1.0.9 . Having that said here is the patch adding some stuff that is missing in jm-overlay at the moment in order to facilitate having ebuild for kosmitik done http://bigvo.hopto.org/osm-extra/js_overlay-2017-03-03.patch

There is still several packages required to have it done see: http://bigvo.hopto.org/osm-extra/kosmitik_deps.txt . All those without # in the start of the line are not present in the patch and I would be glad if You could prepare those as I am just not sure if I would do it right.

Jannis234 commented 7 years ago

I'd love to help here but maintaining node.js packages with such a large amount of dependencies takes quite a bit of work and I don't think that I really have the time for that right now. (In fact, I was thinking about removing some packages because maintaining them is taking much more time than I wanted to spend originally). I don't really think that splitting dependencies into their own packages is the best solution for packages as large as kosmtik. P.S.: The conflicting dependencies are quite common, because some packages depend on exact versions of other packages. That's why I'm using separate SLOTs for each version.

wmyrda commented 7 years ago

OK. I will do my best to maintain it myself, however I do require few pointers as of how to proceed in certain cases. 1) If you look at the results of running manually "npm install kosmitik" http://bigvo.hopto.org/osm-extra/kosmitik_deps.txt file you will notice same exact package version of nopt-3.0.6 in one place list abbrev@1.1.0 and other abbrev@1.0.9 . Normally I would link to the newer one, but update from 1.0 to 1.1 might not be all that trivial so maybe adding both should possible? 2) 4 packages or so do not have binary version in repository and have to be build from source. How does one approach this obstacle? 3) Some ebuilds use uglifyjs. Is that required? If not than how do you know if package requires compression or beautification?

Hopefully with that information I would be able to maintain it myself. Thanks!

Jannis234 commented 7 years ago
  1. It's pretty common to see two different packages depending on two different versions of the same package and node has no problem with that. You might want to check the official documentation: https://nodejs.org/api/modules.html I'd recommend manually installing each module into an empty directory to get the complete list of dependencies.
  2. You'll need to figure out how the packages build their extensions and do that in src_compile. The only package I've ever worked with that needs compiling is dev-nodejs/buffertools. That one used node-gyp, which generated a Makefile that I modified and bundled with the ebuild. I haven't looked into any other build systems though.
  3. All those packages already include a minified version when you "npm install" them, I'm just regenerating them in the ebuild. Not sure if anything actually uses the minified script, but it's possible.

Hope that helps, let me know if you have any other questions!