feffe-portage-overlay/dev-python/pythonmagick/pythonmagick-0.9.19.ebuild

65 lines
1.3 KiB
Bash

# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python{3_6,3_7,3_8} )
inherit autotools python-r1
MY_PN="PythonMagick"
MY_P="${MY_PN}-${PV}"
DESCRIPTION="Python bindings for ImageMagick"
HOMEPAGE="http://www.imagemagick.org/script/api.php"
SRC_URI="https://www.imagemagick.org/download/python/${MY_P}.tar.xz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="${PYTHON_DEPS}
>=dev-libs/boost-1.48[python,${PYTHON_USEDEP}]
>=media-gfx/imagemagick-6.9.1
"
DEPEND="${RDEPEND}
virtual/pkgconfig
>=sys-devel/automake-1.16.1-r2
"
S="${WORKDIR}/${MY_P}"
src_prepare() {
default
eautomake
python_copy_sources
}
src_configure() {
python_configure() {
if ! python_is_python3; then
local -x CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
fi
econf \
--disable-static \
--with-boost-python=boost_python-${EPYTHON#python}
}
python_foreach_impl run_in_build_dir python_configure
}
src_compile() {
python_foreach_impl run_in_build_dir emake
}
src_test() {
python_foreach_impl run_in_build_dir emake check
}
src_install() {
python_foreach_impl run_in_build_dir emake DESTDIR="${D}" install
einstalldocs
find "${D}" -name '*.la' -delete || die
}