On 2019/09/11 23:07, Stephane Guedon wrote: > Le lundi 9 septembre 2019, 22:57:07 CEST Jeremie Courreges-Anglas a > écrit : > > On Sun, Sep 08 2019, Stephane Guedon <stephane+open...@22decembre.eu> > wrote: > > > Good day > > > > > > This is the first time I mail this mailing list. I hope not the last > > > time. > > > > > > I have managed to make PeerTube run on my OpenBSD 6.6 beta home > > > server, so I wish to try to propose a port for it. But first, > > > PeerTube has libvips as a dependency, which is not in ports. So as > > > a training for a much harder thing, here is my proposed port of > > > libvips-8.8.2, which I have been able to build on said server via > > > the port system. > > > > > > Vips is a fast image processing library, and as a result, I put it > > > in > > > multimedia category. > > > > > > The library has some optional dependencies (it can support quite a > > > lot of image formats if you have support libraries on the machine). > > > Which I don't really know how to indicate. > > > > Please add "COMPILER = base-clang ports-gcc" since some C++ code is > > built. > > > > I suspect devel/glib2 should be in LIB_DEPENDS and not RUN_DEPENDS. > > > > I would strip "libvips is licensed under the LGPL 2.1+." from DESCR. > > > > See ./configure --help, all optional dependencies (see below) you > > don't want should be disabled explicitely with --without-<lib>. > > "CONFIGURE_ARGS = --without-foo ..." > > Generally speaking all the libraries you want to use should be listed > > in LIB_DEPENDS (then don't forget to regen WANTLIB). > > Thing is... I don't care for those. But I think the users might. Will > they want or not to use cairo ? PNG ? JPG ? It should be for them to > choose. No ? (I see things this way). Or should I make flavours ? I am > not sure. :)
OpenBSD ports typically do things one of two ways: 1 (most common), pick a sane set of dependencies and avoid the options. Things that will already be installed on a typical system of a user who would use the software. 2 (I don't think this applies to libvips), in some cases there is a 'modular' build where the code relying on optional dependencies are kept in a separate file (executable or .so module), in this case sometimes the port will build a wide set but split the less common ones off to subpackages. Sometimes a port will have multiple flavours but this is relatively uncommon as it's a pain to test, upgrade, and with interactions with other ports, especially for a library. > The port builds well like that, auto detection of libraries and such, > and for what I can see, no problem running. The main purpose of having a port in OpenBSD is so that packages can be built, and those packages should not vary depending on what software is installed on the machine at the time. For faster arches we do snapshot package builds of the entire ports tree 5+ times a week and the set of packages installed on the system will change from build to build (and maybe removed at any time during the build, aka "junked", unless they are recorded as a dependency in the port). So these need to either be listed explicitly or disabled. > > Please clean up the Makefile, there's a lot of stuff commented out > > that isn't useful. :) > > Yeah, that's because I wanted to keep maximum of the template's > comments. those are just for work in progress, need cleaning before import. > But appart, I just incorporated your comments, and the build still runs > fine. No trouble (no surprise here). minor comments on the port you sent, # $OpenBSD: Makefile,v 1.84 2019/09/08 23:04:22 Stephane Guedon 22Decembre $ it's better to just leave this line as-is from wherever the Makefile was copied from, it is automatically updated by CVS as long as the syntax is correct, manual edits may possibly break the syntax and it might not be noticed before commit SHARED_LIBS += vips 53.1 # 53.1 SHARED_LIBS += vips-cpp 53.1 # 53.1 upstream's original version number (from shared_libs.log etc) should be kept in the comment, but the version number actually used by the port should start at 0.0. see www.openbsd.org/faq/ports/specialtopics.html about control of shared library versions.