summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2021-02-27 13:19:40 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2021-02-28 13:26:09 +0100
commit8b9117bf57a2958cef57ae65f6fc1ad3461d240a (patch)
treefadbf72824aee0955c76e14b23d9249c99913529 /games-engines
parentgames-engines/solarus: Drop 1.3.1-r1 (diff)
downloadgentoo-8b9117bf57a2958cef57ae65f6fc1ad3461d240a.tar.gz
gentoo-8b9117bf57a2958cef57ae65f6fc1ad3461d240a.tar.bz2
gentoo-8b9117bf57a2958cef57ae65f6fc1ad3461d240a.zip
games-engines/openxcom: EAPI-7, cmake.eclass, man install dir
Package-Manager: Portage-3.0.15, Repoman-3.0.2 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'games-engines')
-rw-r--r--games-engines/openxcom/files/openxcom-9999-mandir.patch9
-rw-r--r--games-engines/openxcom/openxcom-1.0.0_p20180317-r1.ebuild65
-rw-r--r--games-engines/openxcom/openxcom-9999.ebuild52
3 files changed, 104 insertions, 22 deletions
diff --git a/games-engines/openxcom/files/openxcom-9999-mandir.patch b/games-engines/openxcom/files/openxcom-9999-mandir.patch
new file mode 100644
index 000000000000..44d01fae9fe8
--- /dev/null
+++ b/games-engines/openxcom/files/openxcom-9999-mandir.patch
@@ -0,0 +1,9 @@
+--- a/docs/CMakeLists.txt 2021-02-27 13:15:37.168240019 +0100
++++ b/docs/CMakeLists.txt 2021-02-27 13:16:28.640486232 +0100
+@@ -38,5 +38,5 @@
+
+ # Only useful for make install/package under *nix OSes, but not macOS.
+ if ( UNIX AND NOT APPLE )
+- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/openxcom.6 DESTINATION ${CMAKE_INSTALL_PREFIX}/man/man6)
++ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/openxcom.6 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man6)
+ endif ()
diff --git a/games-engines/openxcom/openxcom-1.0.0_p20180317-r1.ebuild b/games-engines/openxcom/openxcom-1.0.0_p20180317-r1.ebuild
new file mode 100644
index 000000000000..699360f3785c
--- /dev/null
+++ b/games-engines/openxcom/openxcom-1.0.0_p20180317-r1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake xdg-utils
+
+DESCRIPTION="Open-source reimplementation of the popular UFO: Enemy Unknown"
+HOMEPAGE="https://openxcom.org/"
+
+if [[ ${PV} == *9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/SupSuper/OpenXcom.git"
+else
+ COMMIT="ea9ac466221f8b4f8974d2db1c42dc4ad6126564"
+ SRC_URI="https://github.com/SupSuper/OpenXcom/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm64 ~x86"
+ S="${WORKDIR}/OpenXcom-${COMMIT}"
+fi
+
+LICENSE="GPL-3+ CC-BY-SA-4.0"
+SLOT="0"
+IUSE="doc"
+
+RDEPEND="
+ >=dev-cpp/yaml-cpp-0.5.1
+ media-libs/libsdl[opengl,video]
+ media-libs/sdl-gfx
+ media-libs/sdl-image[png]
+ media-libs/sdl-mixer[flac,mikmod,vorbis]"
+DEPEND="${RDEPEND}"
+BDEPEND="doc? ( app-doc/doxygen )"
+
+DOCS=( README.md )
+
+src_compile() {
+ cmake_src_compile
+ use doc && cmake_build doxygen
+}
+
+src_install() {
+ use doc && local HTML_DOCS=( "${BUILD_DIR}"/docs/html/. )
+ cmake_src_install
+}
+
+pkg_postinst() {
+ xdg_icon_cache_update
+
+ elog "In order to play you need copy GEODATA, GEOGRAPH, MAPS, ROUTES, SOUND,"
+ elog "TERRAIN, UFOGRAPH, UFOINTRO, UNITS folders from original X-COM game to"
+ elog "/usr/share/${PN}/UFO"
+ elog
+ elog "If you want to play the TFTD mod, you need to copy ANIMS, FLOP_INT,"
+ elog "GEODATA, GEOGRAPH, MAPS, ROUTES, SOUND, TERRAIN, UFOGRAPH, UNITS folders"
+ elog "from the original Terror from the Deep game to"
+ elog "/usr/share/${PN}/TFTD"
+ elog
+ elog "If you need or want text in some language other than english, download:"
+ elog "https://openxcom.org/translations/latest.zip and uncompress it in"
+ elog "/usr/share/${PN}/common/Language"
+}
+
+pkg_postrm() {
+ xdg_icon_cache_update
+}
diff --git a/games-engines/openxcom/openxcom-9999.ebuild b/games-engines/openxcom/openxcom-9999.ebuild
index 7726841e5584..511bec55bed0 100644
--- a/games-engines/openxcom/openxcom-9999.ebuild
+++ b/games-engines/openxcom/openxcom-9999.ebuild
@@ -1,59 +1,67 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
-inherit cmake-utils gnome2-utils git-r3
+EAPI=7
-DESCRIPTION="An open-source reimplementation of the popular UFO: Enemy Unknown"
+inherit cmake xdg-utils
+
+DESCRIPTION="Open-source reimplementation of the popular UFO: Enemy Unknown"
HOMEPAGE="https://openxcom.org/"
-EGIT_REPO_URI="https://github.com/SupSuper/OpenXcom.git"
+
+if [[ ${PV} == *9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/SupSuper/OpenXcom.git"
+else
+ COMMIT="ea9ac466221f8b4f8974d2db1c42dc4ad6126564"
+ SRC_URI="https://github.com/SupSuper/OpenXcom/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm64 ~x86"
+ S="${WORKDIR}/OpenXcom-${COMMIT}"
+fi
LICENSE="GPL-3+ CC-BY-SA-4.0"
SLOT="0"
-KEYWORDS=""
IUSE="doc"
-RDEPEND=">=dev-cpp/yaml-cpp-0.5.1
+RDEPEND="
+ >=dev-cpp/yaml-cpp-0.5.1
media-libs/libsdl[opengl,video]
media-libs/sdl-gfx
media-libs/sdl-image[png]
media-libs/sdl-mixer[flac,mikmod,vorbis]"
-DEPEND="${RDEPEND}
- doc? ( app-doc/doxygen )"
+DEPEND="${RDEPEND}"
+BDEPEND="doc? ( app-doc/doxygen )"
DOCS=( README.md )
+PATCHES=( "${FILESDIR}/${P}-mandir.patch" ) # TODO: GNUInstallDirs
+
src_compile() {
- use doc && cmake-utils_src_compile doxygen
- cmake-utils_src_compile
+ cmake_src_compile
+ use doc && cmake_build doxygen
}
src_install() {
- cmake-utils_src_install
- use doc && dodoc -r "${CMAKE_BUILD_DIR}"/docs/html/*
-}
-
-pkg_preinst() {
- gnome2_icon_savelist
+ use doc && local HTML_DOCS=( "${BUILD_DIR}"/docs/html/. )
+ cmake_src_install
}
pkg_postinst() {
- gnome2_icon_cache_update
- echo
+ xdg_icon_cache_update
+
elog "In order to play you need copy GEODATA, GEOGRAPH, MAPS, ROUTES, SOUND,"
elog "TERRAIN, UFOGRAPH, UFOINTRO, UNITS folders from original X-COM game to"
elog "/usr/share/${PN}/UFO"
- echo
+ elog
elog "If you want to play the TFTD mod, you need to copy ANIMS, FLOP_INT,"
elog "GEODATA, GEOGRAPH, MAPS, ROUTES, SOUND, TERRAIN, UFOGRAPH, UNITS folders"
elog "from the original Terror from the Deep game to"
elog "/usr/share/${PN}/TFTD"
- echo
+ elog
elog "If you need or want text in some language other than english, download:"
elog "https://openxcom.org/translations/latest.zip and uncompress it in"
elog "/usr/share/${PN}/common/Language"
}
pkg_postrm() {
- gnome2_icon_cache_update
+ xdg_icon_cache_update
}