From 9cf4ab40d2872f143f717c1be7031df494beaa0b Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Fri, 7 Feb 2020 15:12:03 +0100 Subject: games-strategy/freeorion: Switch to PYTHON_MULTI_USEDEP API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- .../freeorion/freeorion-0.4.7.1-r4.ebuild | 6 +- .../freeorion/freeorion-0.4.8_p20190501-r1.ebuild | 82 ++++++++++++++++++++++ .../freeorion/freeorion-0.4.8_p20190501.ebuild | 80 --------------------- games-strategy/freeorion/freeorion-9999.ebuild | 6 +- 4 files changed, 90 insertions(+), 84 deletions(-) create mode 100644 games-strategy/freeorion/freeorion-0.4.8_p20190501-r1.ebuild delete mode 100644 games-strategy/freeorion/freeorion-0.4.8_p20190501.ebuild diff --git a/games-strategy/freeorion/freeorion-0.4.7.1-r4.ebuild b/games-strategy/freeorion/freeorion-0.4.7.1-r4.ebuild index e827e00ef9ec..3811c4a25749 100644 --- a/games-strategy/freeorion/freeorion-0.4.7.1-r4.ebuild +++ b/games-strategy/freeorion/freeorion-0.4.7.1-r4.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -26,7 +26,9 @@ IUSE="" REQUIRED_USE="${PYTHON_REQUIRED_USE}" RDEPEND=" - >=dev-libs/boost-1.56:=[python,threads,${PYTHON_USEDEP}] + $(python_gen_cond_dep ' + >=dev-libs/boost-1.56:=[python,threads,${PYTHON_MULTI_USEDEP}] + ') media-libs/freealut media-libs/freetype media-libs/glew:= diff --git a/games-strategy/freeorion/freeorion-0.4.8_p20190501-r1.ebuild b/games-strategy/freeorion/freeorion-0.4.8_p20190501-r1.ebuild new file mode 100644 index 000000000000..5bf1f6f4f99a --- /dev/null +++ b/games-strategy/freeorion/freeorion-0.4.8_p20190501-r1.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python2_7 ) +inherit cmake-utils python-single-r1 xdg + +DESCRIPTION="A free turn-based space empire and galactic conquest game" +HOMEPAGE="https://www.freeorion.org" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/freeorion/freeorion.git" +else + KEYWORDS="~amd64" + if [[ ${PV} = *_p* ]]; then + COMMIT="2a49c05796f1c92b96ce9b2aeaf0124fc8be7a77" + SRC_URI="https://github.com/${PN}/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${PN}-${COMMIT}" + else + SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV/_/-}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${PN}-${PV/_/-}" + fi +fi + +LICENSE="GPL-2 LGPL-2.1 CC-BY-SA-3.0" +SLOT="0" +IUSE="dedicated" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +BDEPEND=" + virtual/pkgconfig +" +RDEPEND=" + $(python_gen_cond_dep ' + >=dev-libs/boost-1.58:=[python,threads,${PYTHON_MULTI_USEDEP}] + ') + !dedicated? ( + media-libs/freealut + >=media-libs/freetype-2.5.5 + media-libs/glew:= + >=media-libs/libogg-1.1.3 + media-libs/libpng:0= + media-libs/libsdl2[X,opengl,video] + >=media-libs/libvorbis-1.1.2 + media-libs/openal + sci-physics/bullet + virtual/opengl + ) + sys-libs/zlib + ${PYTHON_DEPS} +" +DEPEND="${RDEPEND}" + +pkg_setup() { + # build system is using FindPythonLibs.cmake which needs python:2 + python-single-r1_pkg_setup +} + +src_prepare() { + sed -e "s/-O3//" -i CMakeLists.txt || die + + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DCMAKE_BUILD_TYPE=Release + -DCMAKE_SKIP_RPATH=ON + -DBUILD_HEADLESS="$(usex dedicated)" + ) + + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + newenvd "${FILESDIR}/${PN}.envd" 99${PN} +} diff --git a/games-strategy/freeorion/freeorion-0.4.8_p20190501.ebuild b/games-strategy/freeorion/freeorion-0.4.8_p20190501.ebuild deleted file mode 100644 index 3aea6bd3b5d9..000000000000 --- a/games-strategy/freeorion/freeorion-0.4.8_p20190501.ebuild +++ /dev/null @@ -1,80 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python2_7 ) -inherit cmake-utils python-single-r1 xdg - -DESCRIPTION="A free turn-based space empire and galactic conquest game" -HOMEPAGE="https://www.freeorion.org" - -if [[ ${PV} == 9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/freeorion/freeorion.git" -else - KEYWORDS="~amd64" - if [[ ${PV} = *_p* ]]; then - COMMIT="2a49c05796f1c92b96ce9b2aeaf0124fc8be7a77" - SRC_URI="https://github.com/${PN}/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" - S="${WORKDIR}/${PN}-${COMMIT}" - else - SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV/_/-}.tar.gz -> ${P}.tar.gz" - S="${WORKDIR}/${PN}-${PV/_/-}" - fi -fi - -LICENSE="GPL-2 LGPL-2.1 CC-BY-SA-3.0" -SLOT="0" -IUSE="dedicated" - -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -BDEPEND=" - virtual/pkgconfig -" -RDEPEND=" - >=dev-libs/boost-1.58:=[python,threads,${PYTHON_USEDEP}] - !dedicated? ( - media-libs/freealut - >=media-libs/freetype-2.5.5 - media-libs/glew:= - >=media-libs/libogg-1.1.3 - media-libs/libpng:0= - media-libs/libsdl2[X,opengl,video] - >=media-libs/libvorbis-1.1.2 - media-libs/openal - sci-physics/bullet - virtual/opengl - ) - sys-libs/zlib - ${PYTHON_DEPS} -" -DEPEND="${RDEPEND}" - -pkg_setup() { - # build system is using FindPythonLibs.cmake which needs python:2 - python-single-r1_pkg_setup -} - -src_prepare() { - sed -e "s/-O3//" -i CMakeLists.txt || die - - cmake-utils_src_prepare -} - -src_configure() { - local mycmakeargs=( - -DCMAKE_BUILD_TYPE=Release - -DCMAKE_SKIP_RPATH=ON - -DBUILD_HEADLESS="$(usex dedicated)" - ) - - cmake-utils_src_configure -} - -src_install() { - cmake-utils_src_install - - newenvd "${FILESDIR}/${PN}.envd" 99${PN} -} diff --git a/games-strategy/freeorion/freeorion-9999.ebuild b/games-strategy/freeorion/freeorion-9999.ebuild index 3aea6bd3b5d9..5bf1f6f4f99a 100644 --- a/games-strategy/freeorion/freeorion-9999.ebuild +++ b/games-strategy/freeorion/freeorion-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -34,7 +34,9 @@ BDEPEND=" virtual/pkgconfig " RDEPEND=" - >=dev-libs/boost-1.58:=[python,threads,${PYTHON_USEDEP}] + $(python_gen_cond_dep ' + >=dev-libs/boost-1.58:=[python,threads,${PYTHON_MULTI_USEDEP}] + ') !dedicated? ( media-libs/freealut >=media-libs/freetype-2.5.5 -- cgit v1.2.3-65-gdbad