logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

xmoto-0.6.2.ebuild (1741B)


  1. # Copyright 1999-2023 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=7
  4. LUA_COMPAT=( lua5-{1..4} )
  5. inherit cmake lua-single
  6. DESCRIPTION="A challenging 2D motocross platform game, where physics play an important role"
  7. HOMEPAGE="https://xmoto.tuxfamily.org"
  8. SRC_URI="https://github.com/xmoto/xmoto/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
  9. LICENSE="GPL-2+"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~x86"
  12. IUSE="double-precision +nls"
  13. REQUIRED_USE="${LUA_REQUIRED_USE}"
  14. RDEPEND="app-arch/bzip2
  15. dev-db/sqlite:3
  16. dev-games/ode[double-precision=]
  17. ${LUA_DEPS}
  18. dev-libs/libxdg-basedir
  19. dev-libs/libxml2
  20. media-fonts/dejavu
  21. media-libs/libpng:0=
  22. media-libs/libsdl2[joystick,opengl]
  23. media-libs/sdl2-mixer[vorbis]
  24. media-libs/sdl2-net
  25. media-libs/sdl2-ttf
  26. net-misc/curl
  27. sys-libs/zlib:=
  28. virtual/jpeg:0
  29. virtual/glu
  30. virtual/opengl
  31. nls? ( virtual/libintl )"
  32. DEPEND="${RDEPEND}"
  33. BDEPEND="app-arch/xz-utils
  34. nls? ( sys-devel/gettext )"
  35. src_prepare() {
  36. sed -i -e "/^Icon/s/.xpm//" extra/xmoto.desktop || die
  37. sed -i -e "/add_subdirectory.*\(bzip2\|libccd\|lua\|ode\|xdgbasedir\)/d" \
  38. -e 's;OpenGL REQUIRED;OpenGL COMPONENTS OpenGL REQUIRED;' \
  39. src/CMakeLists.txt || die
  40. rm -rf vendor/{bzip2,lua,ode,xdgbasedir} || die
  41. cmake_src_prepare
  42. }
  43. src_configure() {
  44. local mycmakeargs=(
  45. -DUSE_GETTEXT=$(usex nls)
  46. -DOpenGL_GL_PREFERENCE=GLVND
  47. -DLUA_VERSION=$(lua_get_version)
  48. )
  49. cmake_src_configure
  50. }
  51. src_install() {
  52. cmake_src_install
  53. rm -f "${ED}/usr/share/xmoto"/Textures/Fonts/DejaVuSans{Mono,}.ttf || die
  54. dosym ../../../fonts/dejavu/DejaVuSans.ttf /usr/share/xmoto/Textures/Fonts/DejaVuSans.ttf
  55. dosym ../../../fonts/dejavu/DejaVuSansMono.ttf /usr/share/xmoto/Textures/Fonts/DejaVuSansMono.ttf
  56. }