diff options
author | Richard Nespithal <richard@nespithal.com> | 2018-12-13 19:09:10 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2018-12-16 17:00:50 +0100 |
commit | 95d33bd615f6c64a8c2fe7bf674738790b4a2289 (patch) | |
tree | 734f42791677b82cd91d195c0ec7846bc08cea30 /games-simulation/openrct2/openrct2-0.2.1.ebuild | |
parent | dev-python/django-cms: Remove last-rited pkg (diff) | |
download | gentoo-95d33bd615f6c64a8c2fe7bf674738790b4a2289.tar.gz gentoo-95d33bd615f6c64a8c2fe7bf674738790b4a2289.tar.bz2 gentoo-95d33bd615f6c64a8c2fe7bf674738790b4a2289.zip |
games-simulation/openrct2: Bump to 0.2.1, bug #669226
Closes: https://bugs.gentoo.org/669226
Package-Manager: Portage-2.3.51, Repoman-2.3.11
Signed-off-by: Richard Nespithal <richard@nespithal.com>
Closes: https://github.com/gentoo/gentoo/pull/10633
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'games-simulation/openrct2/openrct2-0.2.1.ebuild')
-rw-r--r-- | games-simulation/openrct2/openrct2-0.2.1.ebuild | 121 |
1 files changed, 121 insertions, 0 deletions
diff --git a/games-simulation/openrct2/openrct2-0.2.1.ebuild b/games-simulation/openrct2/openrct2-0.2.1.ebuild new file mode 100644 index 000000000000..95681d9a2ce6 --- /dev/null +++ b/games-simulation/openrct2/openrct2-0.2.1.ebuild @@ -0,0 +1,121 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit cmake-utils gnome2-utils xdg-utils + +DESCRIPTION="An open source re-implementation of RollerCoaster Tycoon 2" +HOMEPAGE="https://openrct2.org/" +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://github.com/OpenRCT2/OpenRCT2.git" + EGIT_BRANCH="develop" + inherit git-r3 + SRC_URI="" +else + KEYWORDS="~amd64 ~x86" + SRC_URI="https://github.com/OpenRCT2/OpenRCT2/archive/v${PV}.tar.gz + -> ${P}.tar.gz" + S="${WORKDIR}/OpenRCT2-${PV}" +fi + +TSV="0.1.2" +OBJV="1.0.7" +SRC_URI+=" + https://github.com/OpenRCT2/title-sequences/releases/download/v${TSV}/title-sequence-v${TSV}.zip + -> ${PN}-title-sequence-v${TSV}.zip + https://github.com/OpenRCT2/objects/releases/download/v${OBJV}/objects.zip + -> ${PN}-objects-v${OBJV}.zip" + +LICENSE="GPL-3" +SLOT="0" +IUSE="libressl +multiplayer opengl test truetype +twitch" + +RDEPEND=" + >=dev-libs/jansson-2.5 + >=dev-libs/libzip-1.0 + media-libs/libpng:0= + media-libs/libsdl2 + media-libs/speexdsp + multiplayer? ( + libressl? ( dev-libs/libressl:0= ) + !libressl? ( dev-libs/openssl:0= ) + ) + opengl? ( virtual/opengl ) + truetype? ( + media-libs/sdl2-ttf + media-libs/fontconfig + ) + twitch? ( net-misc/curl[ssl] ) +" +DEPEND="${RDEPEND} + app-arch/unzip + test? ( dev-cpp/gtest ) +" + +PATCHES=( + "${FILESDIR}/${PN}-0.2.1-disable-tests-with-assets.patch" +) + +src_unpack() { + if [[ ${PV} == 9999 ]]; then + git-r3_src_unpack + else + unpack ${P}.tar.gz + fi + + mkdir -p "${S}/data/title" || die + pushd "${S}/data/title" || die + unpack ${PN}-title-sequence-v${TSV}.zip + popd || die + + mkdir -p "${S}/data/object" || die + pushd "${S}/data/object" || die + unpack ${PN}-objects-v${OBJV}.zip + popd || die +} + +src_prepare() { + sed -i CMakeLists.txt -e 's/-Werror//' || die + + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DDISABLE_HTTP_TWITCH="$(usex !twitch)" + -DDISABLE_NETWORK="$(usex !multiplayer)" + -DDISABLE_OPENGL="$(usex !opengl)" + -DDISABLE_TTF="$(usex !truetype)" + -DWITH_TESTS="$(usex test)" + -DDOWNLOAD_TITLE_SEQUENCES=OFF + -DDOWNLOAD_OBJECTS=OFF + -DBUILD_SHARED_LIBS=ON + ) + if use test ; then + mycmakeargs+=( + -DSYSTEM_GTEST=ON + -DDISABLE_RCT2_TESTS=ON + ) + fi + + cmake-utils_src_configure +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]]; then + ewarn "" + ewarn "You need the original RollerCoaster Tycoon 2 files to play this game." + ewarn "See: https://github.com/OpenRCT2/OpenRCT2/wiki/Required-RCT2-files#how-to-retrieve" + ewarn "" + fi + gnome2_icon_cache_update + xdg_desktop_database_update + xdg_mimeinfo_database_update +} + +pkg_postrm() { + gnome2_icon_cache_update + xdg_desktop_database_update + xdg_mimeinfo_database_update +} |