quakeforge-0.7.2.ebuild 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils flag-o-matic autotools games
  5. DESCRIPTION="new 3d engine based off of id Softwares's Quake and QuakeWorld game engine"
  6. HOMEPAGE="http://www.quakeforge.net/"
  7. SRC_URI="mirror://sourceforge/quake/${P}.tar.bz2"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="amd64 ppc x86"
  11. IUSE="cdinstall debug fbcon flac sdl X ncurses png vorbis zlib ipv6 xv dga alsa oss xdg wildmidi"
  12. RESTRICT="userpriv"
  13. RDEPEND="
  14. media-libs/libsamplerate
  15. net-misc/curl
  16. virtual/opengl
  17. png? ( media-libs/libpng:0 )
  18. flac? ( media-libs/flac )
  19. sdl? ( media-libs/libsdl[video] )
  20. X? (
  21. x11-libs/libX11
  22. x11-libs/libXext
  23. x11-libs/libXxf86vm
  24. )
  25. ncurses? ( sys-libs/ncurses:0 )
  26. vorbis? ( media-libs/libogg media-libs/libvorbis )
  27. zlib? ( sys-libs/zlib )
  28. xv? (
  29. x11-libs/libX11
  30. x11-libs/libXext
  31. x11-libs/libXxf86vm
  32. )
  33. dga? ( x11-libs/libXxf86dga )
  34. alsa? ( media-libs/alsa-lib )
  35. wildmidi? ( media-sound/wildmidi )"
  36. DEPEND="${RDEPEND}
  37. cdinstall? ( games-fps/quake1-data )
  38. >=sys-devel/bison-2.6
  39. sys-devel/flex
  40. virtual/pkgconfig"
  41. src_prepare() {
  42. epatch "${FILESDIR}"/${P}-gentoo.patch
  43. eautoreconf
  44. append-cflags -std=gnu89 # build with gcc5 (bug #570392)
  45. }
  46. src_configure() {
  47. local debugopts
  48. use debug \
  49. && debugopts="--enable-debug --disable-optimize --enable-profile" \
  50. || debugopts="--disable-debug --disable-profile"
  51. local clients=${QF_CLIENTS}
  52. use fbcon && clients="${clients},fbdev"
  53. use sdl && clients="${clients},sdl"
  54. use X && clients="${clients},x11"
  55. [ "${clients:0:1}" == "," ] && clients=${clients:1}
  56. local servers=${QF_SERVERS:-master,nq,qw,qtv}
  57. local tools=${QF_TOOLS:-all}
  58. egamesconf \
  59. --enable-dependency-tracking \
  60. $(use_enable ncurses curses) \
  61. $(use_enable vorbis) \
  62. $(use_enable png) \
  63. $(use_enable zlib) \
  64. $(use_with ipv6) \
  65. $(use_with fbcon fbdev) \
  66. $(use_with X x) \
  67. $(use_enable xv vidmode) \
  68. $(use_enable dga) \
  69. $(use_enable sdl) \
  70. --disable-xmms \
  71. $(use_enable alsa) \
  72. $(use_enable flac) \
  73. $(use_enable oss) \
  74. $(use_enable xdg) \
  75. $(use_enable wildmidi) \
  76. --enable-sound \
  77. --disable-optimize \
  78. --disable-Werror \
  79. --without-svga \
  80. ${debugopts} \
  81. --with-global-cfg="${GAMES_SYSCONFDIR}"/quakeforge.conf \
  82. --with-sharepath="${GAMES_DATADIR}"/quake1 \
  83. --with-clients=${clients} \
  84. --with-servers=${servers} \
  85. --with-tools=${tools}
  86. }
  87. src_install() {
  88. emake -j1 DESTDIR="${D}" install
  89. mv "${D}/${GAMES_PREFIX}"/include "${D}"/usr/ || die
  90. dodoc ChangeLog NEWS TODO
  91. prepgamesdirs
  92. }
  93. pkg_postinst() {
  94. # same warning used in quake1 / quakeforge / nprquake-sdl
  95. games_pkg_postinst
  96. echo
  97. elog "Before you can play, you must make sure"
  98. elog "${PN} can find your Quake .pak files"
  99. elog
  100. elog "You have 2 choices to do this"
  101. elog "1 Copy pak*.pak files to ${GAMES_DATADIR}/quake1/id1"
  102. elog "2 Symlink pak*.pak files in ${GAMES_DATADIR}/quake1/id1"
  103. elog
  104. elog "Example:"
  105. elog "my pak*.pak files are in /mnt/secondary/Games/Quake/Id1/"
  106. elog "ln -s /mnt/secondary/Games/Quake/Id1/pak0.pak ${GAMES_DATADIR}/quake1/id1/pak0.pak"
  107. elog
  108. elog "You only need pak0.pak to play the demo version,"
  109. elog "the others are needed for registered version"
  110. }