1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python2_7 )
7 inherit eutils multilib python-single-r1 toolchain-funcs
9 DESCRIPTION="A fast, modern and generic image processing library"
10 HOMEPAGE="http://www.exactcode.de/site/open_source/exactimage/"
11 SRC_URI="http://dl.exactcode.de/oss/${PN}/${P}.tar.bz2"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="expat jpeg lua openexr php perl png python ruby swig tiff truetype X"
17 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
19 RDEPEND="x11-libs/agg[truetype]
21 expat? ( dev-libs/expat )
22 jpeg? ( virtual/jpeg )
24 openexr? ( media-libs/openexr )
26 perl? ( dev-lang/perl )
27 png? ( >=media-libs/libpng-1.2.43 )
28 python? ( ${PYTHON_DEPS} )
29 ruby? ( dev-lang/ruby )
30 tiff? ( media-libs/tiff )
31 truetype? ( >=media-libs/freetype-2 )
40 swig? ( dev-lang/swig )"
43 use python && python-single-r1_pkg_setup
48 "${FILESDIR}"/${PN}-0.7.5-libpng14.patch \
49 "${FILESDIR}"/${P}-libpng15.patch \
50 "${FILESDIR}"/${P}-gcc6.patch
53 # fix python hardcoded path wrt bug #327171
54 sed -i -e "s:python2.5:${EPYTHON}:" \
55 -e "s:\$(libdir):usr/$(get_libdir):" \
56 "${S}"/api/python/Makefile || die
58 # Respect user CFLAGS/CXXFLAGS.
60 -e '/C\(XX\)\?FLAGS =/s/-O2//' \
61 -e "\$aCFLAGS += ${CFLAGS}\nCXXFLAGS += ${CXXFLAGS}" \
64 # Show commands. Use qualified CC/CXX.
68 -e "\$aCC:=$(tc-getCC)\nCXX:=$(tc-getCXX)" \
69 build/bottom.make || die
71 # The copied string fits exactly. Use memcpy to reflect that a null
72 # terminator is not needed.
74 -e 's/strcpy(\([^,]*\)\(,["a-zA-Z -]*\))/memcpy(\1\2, sizeof(\1))/' \
79 # evas -> enlightenment overlay
80 # bardecode -> protected by custom license
81 # libungif -> not supported anymore
85 --libdir=/usr/$(get_libdir) \
87 $(use_with truetype freetype) \
89 $(use_with jpeg libjpeg) \
90 $(use_with tiff libtiff) \
91 $(use_with png libpng) \
103 $(use_with ruby) || die