logo

overlay

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

openmw-0.44.0.ebuild (3126B)


  1. # Copyright 1999-2018 Gentoo Authors
  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://github.com/OpenMW/openmw/archive/${P}.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/qtgui:5
  27. dev-qt/qtnetwork:5
  28. dev-qt/qtopengl:5
  29. dev-qt/qtwidgets:5
  30. )
  31. "
  32. DEPEND="${RDEPEND}
  33. virtual/pkgconfig
  34. doc? (
  35. app-doc/doxygen[doc]
  36. dev-python/sphinx
  37. )
  38. "
  39. S="${WORKDIR}/${PN}-${P}"
  40. src_prepare() {
  41. cmake-utils_src_prepare
  42. # We don't install license files
  43. sed -e '/LICDIR/d' \
  44. -i CMakeLists.txt || die
  45. # Use the system tinyxml headers
  46. sed -e 's/"tinyxml.h"/<tinyxml.h>/g' \
  47. -e 's/"tinystr.h"/<tinystr.h>/g' \
  48. -i extern/oics/ICSPrerequisites.h || die
  49. }
  50. src_configure() {
  51. use devtools && ! use qt5 && \
  52. elog "'qt5' USE flag is disabled, 'openmw-cs' will not be installed"
  53. local mycmakeargs=(
  54. -DBUILD_BSATOOL=$(usex devtools)
  55. -DBUILD_DOCS=$(usex doc)
  56. -DBUILD_ESMTOOL=$(usex devtools)
  57. -DBUILD_LAUNCHER=$(usex qt5)
  58. -DBUILD_NIFTEST=$(usex devtools)
  59. -DBUILD_OPENCS=$(usex devtools $(usex qt5))
  60. -DBUILD_WIZARD=$(usex qt5)
  61. -DBUILD_UNITTESTS=OFF
  62. -DGLOBAL_DATA_PATH=/usr/share
  63. -DICONDIR="/usr/share/icons/hicolor/256x256/apps"
  64. -DMORROWIND_DATA_FILES="/usr/share/morrowind-data"
  65. -DUSE_SYSTEM_TINYXML=ON
  66. -DDESIRED_QT_VERSION=5
  67. )
  68. cmake-utils_src_configure
  69. }
  70. src_compile() {
  71. cmake-utils_src_compile
  72. if use doc ; then
  73. cmake-utils_src_compile doc
  74. find "${CMAKE_BUILD_DIR}"/docs/Doxygen/html \
  75. -name '*.md5' -type f -delete || die
  76. HTML_DOCS=( "${CMAKE_BUILD_DIR}"/docs/Doxygen/html/. )
  77. fi
  78. }
  79. src_install() {
  80. cmake-utils_src_install
  81. local DOC_CONTENTS="
  82. You need the original Morrowind data files. If you haven't
  83. installed them yet, you can install them straight via the
  84. installation wizard which is the officially supported method
  85. (either by using the launcher or by calling 'openmw-wizard'
  86. directly).\n"
  87. if ! use qt5; then
  88. local DOC_CONTENTS+="\n\n
  89. USE flag 'qt5' is disabled, 'openmw-launcher' and
  90. 'openmw-wizard' are not available. You are on your own for
  91. making the Morrowind data files available and pointing
  92. openmw at them.\n\n
  93. Additionally; you must import the Morrowind.ini file before
  94. running openmw with the Morrowind data files for the first
  95. time. Typically this can be done like so:\n\n
  96. \t mkdir -p ~/.config/openmw\n
  97. \t openmw-iniimporter /path/to/Morrowind.ini ~/.config/openmw/openmw.cfg"
  98. fi
  99. readme.gentoo_create_doc
  100. }
  101. pkg_postinst() {
  102. gnome2_icon_cache_update
  103. readme.gentoo_print_elog
  104. }
  105. pkg_postrm() {
  106. gnome2_icon_cache_update
  107. }