# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=9 inherit autotools DESCRIPTION="A program for converting bitmaps to vector graphics" HOMEPAGE="https://github.com/autotrace/autotrace" SRC_URI="https://github.com/autotrace/autotrace/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" LICENSE="GPL-2 LGPL-2.1" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" IUSE="+imagemagick" RDEPEND=" dev-libs/glib:2 media-libs/libexif:= media-libs/libpng:= >=media-gfx/pstoedit-3.50:= imagemagick? ( >=media-gfx/imagemagick-6.6.2.5 ) " DEPEND="${RDEPEND}" BDEPEND=" sys-devel/gettext virtual/libintl virtual/pkgconfig " DOCS=( AUTHORS ChangeLog NEWS README.md ) src_prepare() { default sed -i \ -e "/^AC_INIT/s@[[:digit:]\.]\+@${PV}@" \ -e "/^MAJOR_VERSION/s@[[:digit:]]\+@$(ver_cut 1)@" \ -e "/^MINOR_VERSION/s@[[:digit:]]\+@$(ver_cut 2)@" \ -e "/^MICRO_VERSION/s@[[:digit:]]\+@$(ver_cut 3)@" \ configure.ac || die eautoreconf } src_configure() { local myeconfargs=( --with-png --with-pstoedit $(use_with imagemagick magick) ) econf "${myeconfargs[@]}" } src_install() { default find "${ED}" -type f \( -name "*.a" -o -name "*.la" \) -delete || die }