logo

overlay

My (experimental) gentoo overlay

vips-8.6.4.ebuild (2836B)


      1 # Copyright 1999-2018 Gentoo Foundation
      2 # Distributed under the terms of the GNU General Public License v2
      3 
      4 EAPI=6
      5 PYTHON_COMPAT=( python2_7 )
      6 inherit eutils autotools python-single-r1 multilib-minimal
      7 
      8 DESCRIPTION="VIPS Image Processing Library"
      9 SRC_URI="https://github.com/jcupitt/libvips/releases/download/v8.6.4/vips-8.6.4.tar.gz -> ${P}.tar.gz"
     10 HOMEPAGE="https://jcupitt.github.io/libvips/"
     11 
     12 RESTRICT="mirror"
     13 LICENSE="LGPL-2.1"
     14 SLOT="1"
     15 KEYWORDS="~amd64 ~x86"
     16 IUSE="cxx doc debug exif fits fftw graphicsmagick imagemagick jpeg lcms matio openexr openslide +orc png python svg static-libs tiff webp"
     17 
     18 RDEPEND="
     19 	debug? ( dev-libs/dmalloc )
     20 	dev-util/gtk-doc
     21 	>=dev-libs/glib-2.6:2
     22 	dev-libs/libxml2
     23 	sys-libs/zlib
     24 	>=x11-libs/pango-1.8
     25 	fftw? ( sci-libs/fftw:3.0= )
     26 	imagemagick? (
     27 		graphicsmagick? ( media-gfx/graphicsmagick )
     28 		!graphicsmagick? ( media-gfx/imagemagick )
     29 	)
     30 	lcms? ( media-libs/lcms )
     31 	svg? ( gnome-base/librsvg )
     32 	matio? ( >=sci-libs/matio-1.3.4 )
     33 	openexr? ( >=media-libs/openexr-1.2.2 )
     34 	exif? ( >=media-libs/libexif-0.6 )
     35 	tiff? ( media-libs/tiff:0= )
     36 	jpeg? ( virtual/jpeg:0= )
     37 	fits? ( sci-libs/cfitsio )
     38 	png? ( >=media-libs/libpng-1.2.9:0= )
     39 	python? ( ${PYTHON_DEPS} )
     40 	webp? ( media-libs/libwebp )
     41 	orc? ( >=dev-lang/orc-0.4.11 )
     42 	openslide? ( media-libs/openslide )
     43 "
     44 DEPEND="
     45 	${RDEPEND}
     46 	dev-util/gtk-doc-am
     47 	doc? ( dev-util/gtk-doc )
     48 "
     49 
     50 REQUIRED_USE="
     51 	python? ( ${PYTHON_REQUIRED_USE} )
     52 "
     53 
     54 DOCS=(ChangeLog NEWS THANKS TODO README.md)
     55 
     56 pkg_setup() {
     57 	use python && python-single-r1_pkg_setup
     58 }
     59 
     60 src_prepare() {
     61 	sed -r \
     62 		-e '/define VIPS_VERSION_STRING/s#@VIPS_VERSION_STRING@#@VIPS_VERSION@#' \
     63 		-i "${S}"/libvips/include/vips/version.h.in || die
     64 
     65 	default
     66 
     67 	gtkdocize --copy --docdir doc --flavour no-tmpl
     68 	# ^ the way portage calling it doesn't work, so let's call manually
     69 	# Needs dev-util/gtk-doc in the dependencies
     70 
     71 	eautoreconf
     72 
     73 	multilib_copy_sources
     74 }
     75 
     76 multilib_src_configure() {
     77 	local magick="--without-magick";
     78 	use imagemagick && magick="--with-magickpackage=MagickCore"
     79 	use graphicsmagick && magick="--with-magickpackage=GraphicsMagick"
     80 
     81 	econf \
     82 		${magick} \
     83 		$(multilib_native_use_enable doc gtk-doc) \
     84 		$(use_enable debug) \
     85 		$(use_with debug dmalloc) \
     86 		$(use cxx || echo "--disable-cxx") \
     87 		$(use_with fftw) \
     88 		$(use_with lcms) \
     89 		$(use_with openexr OpenEXR) \
     90 		$(use_with matio ) \
     91 		$(use_with exif libexif) \
     92 		$(use_with png) \
     93 		$(use_with svg rsvg) \
     94 		$(use_with tiff) \
     95 		$(use_with fits cfitsio) \
     96 		$(use_with jpeg) \
     97 		$(use_with orc) \
     98 		$(use_with python) \
     99 		$(use_with webp libwebp) \
    100 		$(use_with openslide) \
    101 		$(use_enable static-libs static) \
    102 		--with-html-dir="/usr/share/gtk-doc/html"
    103 }
    104 
    105 multilib_src_install() {
    106 	emake DESTDIR="${D}" install
    107 }
    108 multilib_src_install_all() {
    109 	einstalldocs
    110 	use python && python_optimize
    111 	prune_libtool_files
    112 }