logo

overlay

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

assaultcube-reloaded-2.18.2.ebuild (1910B)


  1. # Copyright 2023 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. inherit flag-o-matic
  5. DESCRIPTION="AssaultCube Reloaded"
  6. HOMEPAGE="https://acr.victorz.ca/"
  7. SRC_URI="
  8. https://github.com/acreloaded/acr/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
  9. https://github.com/acreloaded/acr/pull/201/commits/7dad5c8a1a66ade36ca9d8612b3f0b93f6c990a4.patch -> ${PN}-PR201-system-enet.patch
  10. "
  11. S="${WORKDIR}/acr-${PV}/source/src"
  12. LICENSE="ZLIB"
  13. SLOT="0"
  14. KEYWORDS="~amd64"
  15. IUSE="system-enet +X"
  16. DEPEND="
  17. media-libs/libsdl
  18. media-libs/sdl-image
  19. media-libs/openal
  20. media-libs/libvorbis
  21. net-misc/curl
  22. system-enet? ( net-libs/enet )
  23. "
  24. RDEPEND="${DEPEND}"
  25. src_prepare() {
  26. default
  27. # Remove windows and MacOS blobs
  28. rm -r "${WORKDIR}/acr-${PV}/source/lib" "${WORKDIR}/acr-${PV}/bin_win32" "${WORKDIR}/acr-${PV}/source/xcode/Frameworks" || die
  29. if use system-enet; then
  30. rm -r ../enet || die
  31. eapply -p3 "${DISTDIR}/${PN}-PR201-system-enet.patch"
  32. #sed -i \
  33. # -e 's;-L../enet/.libs ;;' \
  34. # -e 's;-I../enet/include;;' \
  35. # -e 's;client: libenet;client: ;' \
  36. # -e 's;server: libenet;server: ;' \
  37. # -e 's;master: libenet;master: ;' \
  38. # Makefile || die
  39. fi
  40. sed -i 's;-lGL;-lOpenGL;' Makefile || die
  41. # Pulls <execinfo.h> which is glibc-specific
  42. sed -i 's;#elif defined(linux) .*;#elif defined(__GLIBC__);' tools.cpp || die
  43. # Uses std::basic_string with no CPP includes
  44. sed -i '1a#include <string>' console.h || die
  45. # Breaks due to features like std::clamp added in C++17
  46. append-cxxflags -std=c++14
  47. # clipboard
  48. if use !X; then
  49. sed -i 's;-lX11;;' Makefile || die
  50. sed -i \
  51. -e '/^#if !defined(WIN32) && !defined(__APPLE__)$/,/#endif/d' \
  52. -e '/^void pasteconsole/,/^}$/d' \
  53. -e '/struct hline/ivoid pasteconsole(char *) { }\n' \
  54. console.cpp || die
  55. fi
  56. }
  57. src_install() {
  58. default
  59. dobin ac_server ac_client
  60. }