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.

openmw-0.44.0.ebuild 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. # Copyright 1999-2018 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit cmake-utils gnome2-utils readme.gentoo-r1
  5. DESCRIPTION="Open source reimplementation of TES III: Morrowind"
  6. HOMEPAGE="https://openmw.org/"
  7. SRC_URI="https://gitlab.com/OpenMW/${PN}/-/archive/openmw-${PV}/openmw-${PN}-${PV}.tar.gz"
  8. LICENSE="GPL-3 MIT BitstreamVera ZLIB"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE="doc devtools +qt5"
  12. RDEPEND="
  13. dev-games/mygui
  14. >=dev-games/openscenegraph-3.5.5[ffmpeg,jpeg,png,sdl,svg,truetype,zlib]
  15. dev-games/openscenegraph-qt
  16. dev-libs/boost:=[threads]
  17. dev-libs/tinyxml[stl]
  18. media-libs/libsdl2[joystick,opengl,video,X]
  19. media-libs/openal
  20. media-video/ffmpeg:=
  21. >=sci-physics/bullet-2.86
  22. virtual/opengl
  23. qt5? (
  24. app-arch/unshield
  25. dev-qt/qtcore:5
  26. dev-qt/qtnetwork:5
  27. dev-qt/qtopengl:5
  28. dev-qt/qtwidgets:5
  29. )
  30. "
  31. DEPEND="${RDEPEND}
  32. virtual/pkgconfig
  33. doc? ( app-doc/doxygen[doc] dev-python/sphinx )"
  34. S="${WORKDIR}/${PN}-${P}"
  35. #PATCHES=( "${FILESDIR}/${P}-qt-5.11b3.patch" )
  36. src_prepare() {
  37. cmake-utils_src_prepare
  38. # We don't install license files
  39. sed -e '/LICDIR/d' \
  40. -i CMakeLists.txt || die
  41. # Use the system tinyxml headers
  42. sed -e 's/"tinyxml.h"/<tinyxml.h>/g' \
  43. -e 's/"tinystr.h"/<tinystr.h>/g' \
  44. -i extern/oics/ICSPrerequisites.h || die
  45. }
  46. src_configure() {
  47. use devtools && ! use qt5 && \
  48. elog "'qt5' USE flag is disabled, 'openmw-cs' will not be installed"
  49. local mycmakeargs=(
  50. -DBUILD_BSATOOL=$(usex devtools)
  51. -DBUILD_DOCS=$(usex doc)
  52. -DBUILD_ESMTOOL=$(usex devtools)
  53. -DBUILD_LAUNCHER=$(usex qt5)
  54. -DBUILD_NIFTEST=$(usex devtools)
  55. -DBUILD_OPENCS=$(usex devtools $(usex qt5))
  56. -DBUILD_WIZARD=$(usex qt5)
  57. -DBUILD_UNITTESTS=OFF
  58. -DGLOBAL_DATA_PATH=/usr/share
  59. -DICONDIR="/usr/share/icons/hicolor/256x256/apps"
  60. -DMORROWIND_DATA_FILES="/usr/share/morrowind-data"
  61. -DUSE_SYSTEM_TINYXML=ON
  62. -DDESIRED_QT_VERSION=5
  63. )
  64. cmake-utils_src_configure
  65. }
  66. src_compile() {
  67. cmake-utils_src_compile
  68. if use doc ; then
  69. cmake-utils_src_compile doc
  70. find "${CMAKE_BUILD_DIR}"/docs/Doxygen/html \
  71. -name '*.md5' -type f -delete || die
  72. HTML_DOCS=( "${CMAKE_BUILD_DIR}"/docs/Doxygen/html/. )
  73. fi
  74. }
  75. src_install() {
  76. cmake-utils_src_install
  77. local DOC_CONTENTS="
  78. You need the original Morrowind data files. If you haven't
  79. installed them yet, you can install them straight via the
  80. installation wizard which is the officially supported method
  81. (either by using the launcher or by calling 'openmw-wizard'
  82. directly).\n"
  83. if ! use qt5; then
  84. local DOC_CONTENTS+="\n\n
  85. USE flag 'qt5' is disabled, 'openmw-launcher' and
  86. 'openmw-wizard' are not available. You are on your own for
  87. making the Morrowind data files available and pointing
  88. openmw at them.\n\n
  89. Additionally; you must import the Morrowind.ini file before
  90. running openmw with the Morrowind data files for the first
  91. time. Typically this can be done like so:\n\n
  92. \t mkdir -p ~/.config/openmw\n
  93. \t openmw-iniimporter /path/to/Morrowind.ini ~/.config/openmw/openmw.cfg"
  94. fi
  95. readme.gentoo_create_doc
  96. }
  97. pkg_preinst() {
  98. gnome2_icon_savelist
  99. }
  100. pkg_postinst() {
  101. gnome2_icon_cache_update
  102. readme.gentoo_print_elog
  103. }
  104. pkg_postrm() {
  105. gnome2_icon_cache_update
  106. }