clanlib-4.0.0.ebuild 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit autotools
  5. MY_PN=ClanLib
  6. DESCRIPTION="Multi-platform game development library"
  7. HOMEPAGE="https://github.com/sphair/ClanLib"
  8. SRC_URI="https://github.com/sphair/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  9. LICENSE="ZLIB"
  10. SLOT="4.0"
  11. KEYWORDS="~amd64 ~x86" #not big endian safe #82779
  12. IUSE="cpu_flags_x86_sse2 doc examples ipv6 opengl sound static-libs X"
  13. REQUIRED_USE="opengl? ( X )"
  14. RDEPEND="
  15. sys-libs/zlib
  16. X? (
  17. media-libs/freetype:2
  18. media-libs/fontconfig
  19. x11-libs/libX11
  20. opengl? (
  21. virtual/opengl
  22. x11-libs/libXrender
  23. )
  24. )
  25. sound? ( media-libs/alsa-lib )"
  26. DEPEND="${RDEPEND}
  27. virtual/pkgconfig
  28. doc? (
  29. app-doc/doxygen
  30. dev-lang/perl
  31. media-gfx/graphviz
  32. )"
  33. S=${WORKDIR}/${MY_PN}-${PV}
  34. PATCHES=(
  35. "${FILESDIR}"/${PN}-4.0.0-fix-build-system.patch
  36. )
  37. src_prepare() {
  38. default
  39. eautoreconf
  40. }
  41. src_configure() {
  42. econf \
  43. $(use_enable doc docs) \
  44. $(use_enable cpu_flags_x86_sse2 sse2) \
  45. $(use_enable opengl clanGL) \
  46. $(use_enable opengl clanUI) \
  47. $(use_enable X clanDisplay) \
  48. $(use_enable sound clanSound) \
  49. $(use_enable ipv6 getaddr) \
  50. $(use_enable static-libs static)
  51. }
  52. src_compile() {
  53. default
  54. use doc && emake html
  55. }
  56. src_install() {
  57. default
  58. use doc && emake DESTDIR="${D}" install-html
  59. use examples && dodoc -r Examples Resources
  60. # package provides .pc files
  61. find "${D}" -name '*.la' -delete || die
  62. }