port libvips

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

port libvips

Stephane Guedon
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.

I am waiting for comments.

libvips.tar.gz (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: port libvips

Jeremie Courreges-Anglas-2
On Sun, Sep 08 2019, Stephane Guedon <[hidden email]> 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).

Please clean up the Makefile, there's a lot of stuff commented out that
isn't useful. :)

--8<--

[...]

checking for REQUIRED... yes
checking for BASE64_ENCODE... yes
checking for CONTEXT_GET_HELP... yes
checking for MONOTONIC... yes
checking for THREADS... yes
checking for TYPE_INIT... no
checking for WIN32_GET_COMMAND_LINE... yes
checking for STR_TO_ASCII... yes
checking for HAVE_CHECKED_MUL... yes
checking for gtk-doc... no
configure: WARNING:
  You will not be able to create source packages with 'make dist'
  because gtk-doc >= 1.14 is not found.
checking for gtkdoc-check... no
checking for gtkdoc-check... no
checking for gtkdoc-rebase... (cached) no
checking for gtkdoc-mkpdf... (cached) no
checking whether to build gtk-doc documentation... no
checking for GTKDOC_DEPS... yes
checking for XML_ParserCreate in -lexpat... yes
checking expat.h usability... yes
checking expat.h presence... yes
checking for expat.h... yes
checking for GSF... no
configure: WARNING: libgsf-1 not found; disabling dzsave support
checking for GSF_ZIP64... no
checking for FFTW... no
configure: WARNING: fftw not found; disabling fftw support
checking for MAGICK_WAND... no
checking for IMAGE_MAGICK... no
configure: WARNING: neither MagickCore nor ImageMagick found; disabling Magick support
checking for ImportImagePixels... no
checking for ImagesToBlob... no
checking for ORC... no
configure: WARNING: orc-0.4.11 or later not found; disabling orc support
checking for LCMS... no
configure: WARNING: lcms2 not found; disabling ICC profile support
checking for OPENEXR... no
configure: WARNING: OpenEXR not found; disabling OpenEXR support
checking for X... (cached) libraries /usr/X11R6/lib, headers /usr/X11R6/include
checking whether -R must be followed by a space... neither works
checking for gethostbyname... (cached) yes
checking for connect... (cached) yes
checking for remove... (cached) yes
checking for shmat... (cached) yes
checking for IceConnectionNumber in -lICE... (cached) yes
checking for NIFTI... libraries (none), headers (none)
checking for HEIF... no
configure: WARNING: libheif not found; disabling HEIF support
checking for PDFIUM... libraries (none), headers (none)
checking for POPPLER... no
configure: WARNING: poppler-glib >= 0.16.0 or cairo >= 1.2 not found; disabling PDF load via poppler
checking for RSVG... no
configure: WARNING: librsvg-2.0 >= 2.34.0 or cairo >= 1.2 not found; disabling SVG load via rsvg
checking for ZLIB... yes
checking for OPENSLIDE... no
configure: OpenSlide >= 3.4.0 not found; checking for >= 3.3.0
checking for OPENSLIDE... no
configure: WARNING: OpenSlide >= 3.3.0 not found; disabling virtual slide support
checking for MATIO... no
configure: WARNING: matio not found; disabling matio support
checking for CFITSIO... no
configure: WARNING: cfitsio not found; disabling cfitsio support
checking for LIBWEBP... no
configure: WARNING: libwebp, mux, demux not found; disabling WEBP support
checking for PANGOFT2... no
configure: WARNING: pangoft2 not found; disabling pangoft2 support
checking for TIFF... no
checking for TIFF... libraries (none), headers (none)
configure: WARNING: libtiff not found; disabling TIFF support
checking for giflib... libraries (none), headers (none)
configure: WARNING: giflib not found; disabling direct GIF support
checking for PNG... no
checking for libpng... libraries (none), headers (none)
configure: WARNING: libpng not found; disabling PNG support
checking for JPEG... no
checking for JPEG... libraries (none), headers (none)
configure: WARNING: libjpeg not found; disabling JPEG support
checking for EXIF... no
configure: WARNING: libexif >= 0.6 not found; disabling exif support
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating vips.pc
config.status: creating vips-cpp.pc
config.status: creating Makefile
config.status: creating libvips/include/vips/version.h
config.status: creating libvips/include/Makefile
config.status: creating libvips/include/vips/Makefile
config.status: creating libvips/Makefile
config.status: creating libvips/arithmetic/Makefile
config.status: creating libvips/colour/Makefile
config.status: creating libvips/conversion/Makefile
config.status: creating libvips/convolution/Makefile
config.status: creating libvips/deprecated/Makefile
config.status: creating libvips/foreign/Makefile
config.status: creating libvips/freqfilt/Makefile
config.status: creating libvips/histogram/Makefile
config.status: creating libvips/draw/Makefile
config.status: creating libvips/iofuncs/Makefile
config.status: creating libvips/morphology/Makefile
config.status: creating libvips/mosaicing/Makefile
config.status: creating libvips/create/Makefile
config.status: creating libvips/resample/Makefile
config.status: creating cplusplus/include/Makefile
config.status: creating cplusplus/include/vips/Makefile
config.status: creating cplusplus/Makefile
config.status: creating tools/Makefile
config.status: creating tools/batch_crop
config.status: creating tools/batch_image_convert
config.status: creating tools/batch_rubber_sheet
config.status: creating tools/light_correct
config.status: creating tools/shrink_width
config.status: creating test/Makefile
config.status: creating test/variables.sh
config.status: creating test/test-suite/Makefile
config.status: creating test/test-suite/helpers/Makefile
config.status: creating man/Makefile
config.status: creating doc/Makefile
config.status: creating doc/libvips-docs.xml
config.status: creating po/Makefile.in
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing default-1 commands
config.status: executing libtool commands
* build options
native win32: no
native OS X: no
open files in binary mode: no
enable debug: no
enable deprecated library components: yes
enable docs with gtkdoc: no
gobject introspection: no
enable radiance support: yes
enable analyze support: yes
enable PPM support: yes

* optional dependencies
use fftw3 for FFT: no
Magick package: none
Magick API version: none
load with libMagick: no
save with libMagick: no
accelerate loops with orc: no
  (requires orc-0.4.11 or later)
ICC profile support with lcms: no
file import with niftiio: no
file import with libheif: no
file import with OpenEXR: no
file import with OpenSlide: no
  (requires openslide-3.3.0 or later)
file import with matio: no
PDF import with PDFium no
PDF import with poppler-glib: no
  (requires poppler-glib 0.16.0 or later)
SVG import with librsvg-2.0: no
  (requires librsvg-2.0 2.34.0 or later)
zlib: yes
file import with cfitsio: no
file import/export with libwebp: no
  (requires libwebp, libwebpmux, libwebpdemux 0.5.0 or later)
text rendering with pangoft2: no
file import/export with libpng: no
  (requires libpng-1.2.9 or later)
support 8bpp PNG quantisation: no
  (requires libimagequant)
file import/export with libtiff: no
file import/export with giflib: no
file import/export with libjpeg: no
image pyramid export: no
  (requires libgsf-1 1.14.26 or later)
use libexif to load/save JPEG metadata: no

-->8--


--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply | Threaded
Open this post in threaded view
|

Re: port libvips

Stephane Guedon
Le lundi 9 septembre 2019, 22:57:07 CEST Jeremie Courreges-Anglas a
écrit :
> On Sun, Sep 08 2019, Stephane Guedon <[hidden email]>
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. :)

The port builds well like that, auto detection of libraries and such,
and for what I can see, no problem running.

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

But appart, I just incorporated your comments, and the build still runs
fine. No trouble (no surprise here).

libvips.tar.gz (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: port libvips

Stuart Henderson
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 <[hidden email]>
> 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.


Reply | Threaded
Open this post in threaded view
|

Re: port libvips

Stephane Guedon
Le mercredi 11 septembre 2019, 23:30:30 CEST Stuart Henderson a écrit :


> > >
> > > 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.
> > >
> > >
> > > 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.
>
>
> 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.
Is it better ? :)

Thanks for help and comments

libvips.tar.gz (2K) Download Attachment