You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
1.9 KiB

  1. # Copyright 1999-2021 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=7
  4. inherit desktop flag-o-matic prefix toolchain-funcs xdg
  5. MY_PN=SearchAndRescue
  6. DESCRIPTION="Helicopter based air rescue flight simulator"
  7. HOMEPAGE="http://searchandrescue.sourceforge.net/"
  8. SRC_URI="mirror://sourceforge/searchandrescue/${MY_PN}-${PV}.tar.gz -> ${MY_PN}-${PV}.tar
  9. mirror://sourceforge/searchandrescue/${MY_PN}-data-${PV}.tar.gz -> ${MY_PN}-data-${PV}.tar
  10. mirror://sourceforge/searchandrescue/${MY_PN}-data-guadarrama-${PV}.tar.gz -> ${MY_PN}-data-guadarrama-${PV}.tar"
  11. S="${WORKDIR}"/${PN}_${PV}
  12. LICENSE="GPL-2"
  13. SLOT="0"
  14. KEYWORDS="~amd64 ~x86"
  15. RDEPEND="
  16. media-libs/libsdl[joystick]
  17. media-libs/sdl-mixer
  18. virtual/glu
  19. virtual/opengl
  20. x11-libs/libICE
  21. x11-libs/libSM
  22. x11-libs/libXi
  23. x11-libs/libXmu
  24. x11-libs/libXpm
  25. x11-libs/libXxf86vm
  26. "
  27. DEPEND="${RDEPEND}
  28. x11-base/xorg-proto"
  29. src_unpack() {
  30. unpack ${MY_PN}-${PV}.tar
  31. mkdir data || die
  32. cd data || die
  33. unpack ${MY_PN}-data-${PV}.tar
  34. unpack ${MY_PN}-data-guadarrama-${PV}.tar
  35. bunzip2 "${S}"/sar/man/${MY_PN}.6.bz2 || die
  36. }
  37. src_prepare() {
  38. xdg_src_prepare
  39. chmod +x configure || die
  40. rm pconf/pconf || die
  41. sed -i "/PlatformSearchPathLib/s:/lib/:/$(get_libdir)/:g" sar/platforms.ini || die
  42. hprefixify sar/platforms.ini
  43. }
  44. src_configure() {
  45. export CC="$(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" \
  46. CPP="$(tc-getCXX) ${LDFLAGS}"
  47. append-flags -DNEW_GRAPHICS -DHAVE_SDL_MIXER
  48. # Needed for the configure script
  49. emake -C pconf pconf CC="${CC}"
  50. # NOTE: not an autoconf script
  51. ./configure Linux --prefix="${EPREFIX}/usr" || die
  52. sed -i -r 's/^(\s+)@/\1/' sar/Makefile || die
  53. }
  54. src_compile() {
  55. emake -C sar LIB_DIRS=
  56. }
  57. src_install() {
  58. dobin sar/${MY_PN}
  59. doman sar/man/${MY_PN}.6
  60. dodoc AUTHORS HACKING README
  61. doicon sar/icons/${MY_PN}.xpm
  62. insinto /usr/share/games/${PN}
  63. doins -r ../data/*
  64. make_desktop_entry ${MY_PN} "Search and Rescue" ${MY_PN}
  65. }