void-packages/srcpkgs/vips/template

77 lines
2.4 KiB
Bash

# Template file for 'vips'
pkgname=vips
version=8.14.4
revision=1
build_style=meson
build_helper=gir
# TODO: As of version 8.11 vips supports loading its support for OpenSlide,
# libheif, Poppler and libMagick backends at runtime using GModule. Consider
# taking advantage of this feature and shipping these modules as optional
# subpackages.
#
# In particular, this would make packaging the libMagick backend less of
# a compromise: vips upstream explictly recommends against enabling it if
# processing untrused image inputs and punting it to a subpackage would
# allow void users to make that choice themselves without using this
# template to build from source.
configure_args="-Dmodules=disabled -Ddoxygen=true
$(vopt_bool gir introspection) $(vopt_bool gtk_doc)"
hostmakedepends="pkg-config gettext glib-devel doxygen graphviz
$(vopt_if gtk_doc gtk-doc)"
makedepends="$(vopt_if hdf5 hdf5-devel) $(vopt_if hdf5 matio-devel)
cfitsio-devel expat-devel fftw-devel fontconfig-devel giflib-devel
glib-devel lcms2-devel libexif-devel libgsf-devel libheif-devel
libimagequant-devel libjpeg-turbo-devel libopenexr-devel libpng-devel
librsvg-devel libwebp-devel orc-devel pango-devel poppler-glib-devel
tiff-devel"
short_desc="Fast image processing with low memory needs"
maintainer="Isaac Freund <mail@isaacfreund.com>"
license="LGPL-2.1-or-later"
homepage="https://www.libvips.org/"
changelog="https://raw.githubusercontent.com/libvips/libvips/master/ChangeLog"
distfiles="https://github.com/libvips/libvips/archive/refs/tags/v${version}.tar.gz"
checksum=0638150ee5066814aa22ca89e0285f2310a539be3c39a631edeb38135a3f1f15
python_version=3
build_options="gir gtk_doc hdf5"
build_options_default="gir"
desc_option_gtk_doc="Build GTK-doc documentation"
desc_option_hdf5="HDF5 support"
if [ -z "$CROSS_BUILD" ]; then
build_options_default+=" gtk_doc hdf5"
fi
libvips_package() {
short_desc+=" - library"
pkg_install() {
vmove "usr/lib/*.so.*"
if [ "$build_option_gir" ]; then
vmove usr/lib/girepository-1.0
fi
}
}
libvips-devel_package() {
depends="${makedepends} ${sourcepkg}-${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
if [ "$build_option_gir" ]; then
vmove usr/share/gir-1.0
fi
}
}
libvips-doc_package() {
short_desc+=" - documentation"
pkg_install() {
vmove usr/share/doc
if [ "$build_option_gtk_doc" ]; then
vmove usr/share/gtk-doc
fi
}
}