supertuxkart-0.9.2.ebuild 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit cmake-utils eutils gnome2-utils
  5. DESCRIPTION="A kart racing game starring Tux, the linux penguin (TuxKart fork)"
  6. HOMEPAGE="http://supertuxkart.sourceforge.net/"
  7. SRC_URI="mirror://sourceforge/${PN}/SuperTuxKart/${PV}/${P}-src.tar.xz
  8. mirror://gentoo/${PN}.png"
  9. LICENSE="GPL-2 GPL-3 CC-BY-SA-3.0 CC-BY-2.0 public-domain ZLIB"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~ppc ~x86"
  12. IUSE="debug fribidi wiimote"
  13. # don't unbundle irrlicht and bullet
  14. # both are modified and system versions will break the game
  15. # https://sourceforge.net/tracker/?func=detail&aid=3454889&group_id=74339&atid=540679
  16. RDEPEND="
  17. media-libs/glew:0=
  18. media-libs/libpng:0=
  19. media-libs/libvorbis
  20. media-libs/openal
  21. net-libs/enet:1.3=
  22. net-misc/curl
  23. sys-libs/zlib
  24. virtual/glu
  25. virtual/jpeg:0
  26. virtual/libintl
  27. virtual/opengl
  28. x11-libs/libX11
  29. x11-libs/libXxf86vm
  30. fribidi? ( dev-libs/fribidi )
  31. wiimote? ( net-wireless/bluez )"
  32. DEPEND="${RDEPEND}
  33. sys-devel/gettext
  34. virtual/pkgconfig"
  35. PATCHES=(
  36. "${FILESDIR}"/${PN}-0.9.2-unbundle-enet.patch
  37. "${FILESDIR}"/${PN}-0.9.2-unbundle-libs.patch
  38. "${FILESDIR}"/${PN}-0.9.2-fix-angelscript.patch
  39. "${FILESDIR}"/${PN}-0.9.2-irrlicht-arch-support.patch
  40. "${FILESDIR}"/${PN}-0.9.2-irrlicht-as-needed.patch
  41. "${FILESDIR}"/${PN}-0.9.2-irrlicht-bundled-libs.patch
  42. "${FILESDIR}"/${PN}-0.9.2-irrlicht-system-libs.patch
  43. "${FILESDIR}"/${PN}-0.9.2-fix-buildsystem.patch
  44. )
  45. src_prepare() {
  46. cmake-utils_src_prepare
  47. # remove bundled libraries, just to be sure
  48. rm -r lib/{enet,glew,jpeglib,libpng,zlib} || die
  49. }
  50. src_configure() {
  51. local mycmakeargs=(
  52. # system dev-libs/angelscript leads
  53. # to failed assert segfaults
  54. -DUSE_SYSTEM_ANGELSCRIPT=OFF
  55. -DUSE_FRIBIDI=$(usex fribidi)
  56. -DUSE_WIIUSE=$(usex wiimote)
  57. -DSTK_INSTALL_BINARY_DIR=bin
  58. -DSTK_INSTALL_DATA_DIR=share/${PN}
  59. )
  60. cmake-utils_src_configure
  61. }
  62. src_install() {
  63. cmake-utils_src_install
  64. dodoc CHANGELOG.md TODO.md
  65. doicon -s 64 "${DISTDIR}"/${PN}.png
  66. }
  67. pkg_preinst() {
  68. gnome2_icon_savelist
  69. }
  70. pkg_postinst() {
  71. gnome2_icon_cache_update
  72. }
  73. pkg_postrm() {
  74. gnome2_icon_cache_update
  75. }