logo

overlay

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

iortcw-1.51c.ebuild (1414B)


  1. # Copyright 2023 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. inherit xdg-utils
  5. DESCRIPTION="Return to Castle Wolfenstein with ioquake3 improvements"
  6. HOMEPAGE="https://github.com/iortcw/iortcw/"
  7. SRC_URI="
  8. https://github.com/iortcw/iortcw/archive/${PV}.tar.gz -> ${P}.tar.gz
  9. https://github.com/iortcw/iortcw/releases/download/${PV}/patch-data-141.zip
  10. "
  11. LICENSE="GPL-3"
  12. SLOT="0"
  13. KEYWORDS="~amd64 ~x86"
  14. DEPEND="
  15. virtual/opengl
  16. media-libs/libsdl2
  17. games-fps/rtcw-data-gog
  18. "
  19. RDEPEND="${DEPEND}"
  20. my_make() {
  21. emake \
  22. ARCH="$(uname -m)" \
  23. USE_INTERNAL_LIBS=0 \
  24. USE_OPENAL_DLOPEN=0 \
  25. USE_CURL_DLOPEN=0 \
  26. FULLBINEXT='' \
  27. SHLIBNAME='.so' \
  28. CLIENTBIN="${PN}-sp" \
  29. SERVERBIN="${PN}-mp" \
  30. TOOLS_CC="${CC}" \
  31. "$@"
  32. }
  33. src_prepare() {
  34. default
  35. # remove blobs
  36. rm -r SP/code/libs MP/code/libs || die
  37. sed -i \
  38. -e 's;BR=.*;BR=$(BUILD_DIR)/release;' \
  39. -e 's;COPYDIR=.*;COPYDIR="/usr/share/wolf";' \
  40. MP/Makefile SP/Makefile || die
  41. }
  42. src_compile() {
  43. # singleplayer client
  44. my_make -C SP
  45. # multiplayer client + dedicated server
  46. my_make -C MP
  47. }
  48. src_install() {
  49. pushd SP/build/release || die
  50. dobin ${PN}-sp
  51. dolib \
  52. renderer_sp_opengl1.so renderer_sp_rend2.so \
  53. main/cgame.mp.so main/qagame.sp.so main/ui.sp.so
  54. popd || die
  55. dobin MP/build/release/${PN}-mp
  56. }
  57. pkg_postinst() {
  58. xdg_icon_cache_update
  59. }
  60. pkg_postrm() {
  61. xdg_icon_cache_update
  62. }