jbig2dec-0.13-r1.ebuild 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. DESCRIPTION="A decoder implementation of the JBIG2 image compression format"
  5. HOMEPAGE="http://ghostscript.com/jbig2dec.html"
  6. SRC_URI="http://downloads.ghostscript.com/public/${PN}/${P}.tar.gz
  7. test? ( http://jbig2dec.sourceforge.net/ubc/jb2streams.zip )"
  8. LICENSE="AGPL-3"
  9. SLOT="0"
  10. KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x86-solaris"
  11. IUSE="png static-libs test"
  12. RDEPEND="png? ( media-libs/libpng:0= )"
  13. DEPEND="${RDEPEND}
  14. test? ( app-arch/unzip )"
  15. RESTRICT="test"
  16. # bug 324275
  17. DOCS="CHANGES README"
  18. PATCHES=(
  19. "${FILESDIR}/${P}-CVE-2016-9601.patch"
  20. )
  21. src_prepare() {
  22. default
  23. if use test; then
  24. mkdir "${WORKDIR}/ubc" || die
  25. mv -v "${WORKDIR}"/*.jb2 "${WORKDIR}/ubc/" || die
  26. mv -v "${WORKDIR}"/*.bmp "${WORKDIR}/ubc/" || die
  27. fi
  28. }
  29. src_configure() {
  30. econf \
  31. $(use_enable static-libs static) \
  32. $(use_with png libpng)
  33. }
  34. src_install() {
  35. default
  36. find "${ED}" -name '*.la' -exec rm {} + || die
  37. }