giflib-4.1.6-r2.ebuild 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. inherit eutils libtool
  5. DESCRIPTION="Library to handle, display and manipulate GIF images"
  6. HOMEPAGE="https://sourceforge.net/projects/giflib/"
  7. SRC_URI="mirror://sourceforge/giflib/${P}.tar.bz2"
  8. LICENSE="MIT"
  9. SLOT="0"
  10. KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
  11. IUSE="rle static-libs X"
  12. DEPEND="X? (
  13. x11-libs/libXt
  14. x11-libs/libX11
  15. x11-libs/libICE
  16. x11-libs/libSM
  17. )
  18. rle? ( media-libs/urt )"
  19. RDEPEND="${DEPEND}"
  20. src_prepare() {
  21. epatch "${FILESDIR}"/${P}-gif2rle.patch
  22. epatch "${FILESDIR}"/${P}-giffix-null-Extension-fix.patch
  23. elibtoolize
  24. epunt_cxx
  25. }
  26. src_configure() {
  27. local myconf=""
  28. # prevent circular depend #111455
  29. if has_version media-libs/urt ; then
  30. myconf="${myconf} $(use_enable rle)"
  31. else
  32. myconf="${myconf} --disable-rle"
  33. fi
  34. econf \
  35. --disable-gl \
  36. $(use_enable static-libs static) \
  37. $(use_enable X x11) \
  38. ${myconf}
  39. }
  40. src_install() {
  41. default
  42. # for static libs the .la file is required if build with +rle or +X
  43. use static-libs || find "${ED}" -name '*.la' -exec rm -f {} +
  44. dodoc AUTHORS BUGS ChangeLog NEWS ONEWS README TODO doc/*.txt
  45. dohtml -r doc
  46. }