giflib-4.1.6-r3.ebuild 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils libtool multilib-minimal
  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. RDEPEND="
  13. rle? ( media-libs/urt )
  14. X? ( >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] )
  15. abi_x86_32? (
  16. !<=app-emulation/emul-linux-x86-baselibs-20140406-r1
  17. !app-emulation/emul-linux-x86-baselibs[-abi_x86_32]
  18. )"
  19. DEPEND="${RDEPEND}"
  20. src_prepare() {
  21. epatch "${FILESDIR}"/${P}-gif2rle.patch
  22. epatch "${FILESDIR}"/${P}-giffix-null-Extension-fix.patch
  23. sed -i '/X_PRE_LIBS/s:-lSM -lICE::' configure || die #483258
  24. elibtoolize
  25. epunt_cxx
  26. }
  27. multilib_src_configure() {
  28. local myconf=()
  29. # prevent circular depend #111455
  30. if multilib_is_native_abi && has_version media-libs/urt ; then
  31. myconf+=( $(use_enable rle) )
  32. else
  33. myconf+=( --disable-rle )
  34. fi
  35. ECONF_SOURCE=${S} \
  36. econf \
  37. --disable-gl \
  38. $(use_enable static-libs static) \
  39. $(use_enable X x11) \
  40. "${myconf[@]}"
  41. }
  42. multilib_src_install_all() {
  43. # for static libs the .la file is required if build with +rle or +X
  44. use static-libs || prune_libtool_files --all
  45. dodoc AUTHORS BUGS ChangeLog NEWS ONEWS README TODO doc/*.txt
  46. dohtml -r doc
  47. }