legends-0.4.1.43-r2.ebuild 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit eutils unpacker
  5. MY_P=${PN}_linux-${PV}
  6. dir=/opt/${PN}
  7. DESCRIPTION="Fast-paced first-person-shooter online multiplayer game, similar to Tribes"
  8. HOMEPAGE="http://legendsthegame.net/"
  9. SRC_URI="http://legendsthegame.net/files/${MY_P}.run
  10. mirror://gentoo/${PN}.png"
  11. LICENSE="Legends LGPL-2.1+"
  12. SLOT="0"
  13. KEYWORDS="-* ~amd64 ~x86"
  14. IUSE="+dedicated"
  15. RESTRICT="strip"
  16. QA_TEXTRELS="${dir:1}/libSDL-1.3.so.0"
  17. QA_FLAGS_IGNORED="${dir:1}/libSDL-1.3.so.0 ${dir:1}/LinLegends ${dir:1}/lindedicated"
  18. DEPEND=""
  19. RDEPEND="sys-libs/glibc
  20. amd64? ( sys-libs/glibc[multilib] )
  21. media-fonts/font-adobe-75dpi
  22. media-libs/libsdl[video,sound,opengl,abi_x86_32(-)]
  23. x11-libs/libX11[abi_x86_32(-)]
  24. x11-libs/libXext[abi_x86_32(-)]
  25. media-libs/libogg[abi_x86_32(-)]
  26. media-libs/libvorbis[abi_x86_32(-)]
  27. media-libs/openal[abi_x86_32(-)]"
  28. S=${WORKDIR}
  29. src_unpack() {
  30. unpack_makeself ${MY_P}.run
  31. cd "${S}"
  32. # keep libSDL-1.3.so because legends requires it as of 0.4.0, and
  33. # 1.2.6 is highest in portage
  34. # rm libSDL-*.so*
  35. rm runlegends libSDL-1.2.so.0 libopenal.so libogg.so.0 libvorbis.so.0 *.DLL || die
  36. }
  37. src_install() {
  38. insinto "${dir}"
  39. doins -r * || die "doins * failed"
  40. rm "${D}/${dir}/"/{lindedicated,LinLegends,*.so.0}
  41. exeinto "${dir}"
  42. doexe lindedicated LinLegends *.so.0 || die "doexe failed"
  43. make_wrapper ${PN} "./LinLegends" "${dir}" "${dir}"
  44. if use dedicated ; then
  45. make_wrapper ${PN}-ded "./lindedicated" "${dir}" "${dir}"
  46. fi
  47. doicon "${DISTDIR}"/${PN}.png || die "doicon failed"
  48. make_desktop_entry legends "Legends"
  49. }
  50. pkg_postinst() {
  51. ewarn "Version ${PV} of ${PN} may give problems if there are"
  52. ewarn "config-files from earlier versions. Removing the ~/.legends dir"
  53. ewarn "and restarting will solve this."
  54. echo
  55. }