games-strategy/colobot: new package
authorsoredake <fdsfgs@krutt.org>
Fri, 5 Jan 2018 13:29:09 +0000 (15:29 +0200)
committerDavid Seifert <soap@gentoo.org>
Sat, 13 Jan 2018 22:35:35 +0000 (23:35 +0100)
Closes: https://github.com/gentoo/gentoo/pull/6756

games-strategy/colobot-data/Manifest [new file with mode: 0644]
games-strategy/colobot-data/colobot-data-0.1.11.ebuild [new file with mode: 0644]
games-strategy/colobot-data/colobot-data-9999.ebuild [new file with mode: 0644]
games-strategy/colobot-data/metadata.xml [new file with mode: 0644]
games-strategy/colobot/Manifest [new file with mode: 0644]
games-strategy/colobot/colobot-0.1.11.ebuild [new file with mode: 0644]
games-strategy/colobot/colobot-9999.ebuild [new file with mode: 0644]
games-strategy/colobot/metadata.xml [new file with mode: 0644]

diff --git a/games-strategy/colobot-data/Manifest b/games-strategy/colobot-data/Manifest
new file mode 100644 (file)
index 0000000..0ef5053
--- /dev/null
@@ -0,0 +1,5 @@
+DIST colobot-data-0.1.11-music-flac.tar.gz 298829480 BLAKE2B 2a041df82b295433257dd0358b6f83d585cae086a7c1f7e891964a4ffca2e1ca71bb68f7f01160c8dddaeb3b553fcc0082ab746177836d8b9494376a9a9b4451 SHA512 0ab613ea8ca59771b5d93b9c8d96ad88a0fe27f6171be0cb1d6d2eb60b820fdcad83f8fdc5d2f968e8091a6f3e727eb202c4dd09f86afb3eb2e325756eb40873
+DIST colobot-data-0.1.11-music-ogg.tar.gz 55596353 BLAKE2B 63be871fc2000c1cb041658b7395d5175cefc24c81661b366396965951efdadf1cf064211f3f543c4a4b1b7da5bd91db5e397844f1e8771318302c9d80788eb4 SHA512 486d084adc1b28a9fe36c530d261e48a89553c822989f493b0a92dabb9c3435953bda6fe98fcdabc72c6969b5e9be4ff9f3803066f6115fc7740c3de5d183764
+DIST colobot-data-0.1.11.zip 55796087 BLAKE2B 2a1a6fc57bb61423360f89c8bac597754cab872b3154f9b3464bef88555e4dcb9e0296a4b6f85271ef95e71c69d1c31737c8ae3b932a0b64dc8d7cfa8393481b SHA512 2024759af47b4c406325e1d72d119391712ec9d53b4059f3e942e0bd2b3881fdbc9613f79510b9b012cdbc76bebd8a008531da4f94be5d6107887bbcb330417f
+DIST colobot-data-9999-music-flac.tar.gz 298829480 BLAKE2B 2a041df82b295433257dd0358b6f83d585cae086a7c1f7e891964a4ffca2e1ca71bb68f7f01160c8dddaeb3b553fcc0082ab746177836d8b9494376a9a9b4451 SHA512 0ab613ea8ca59771b5d93b9c8d96ad88a0fe27f6171be0cb1d6d2eb60b820fdcad83f8fdc5d2f968e8091a6f3e727eb202c4dd09f86afb3eb2e325756eb40873
+DIST colobot-data-9999-music-ogg.tar.gz 3686106 BLAKE2B c1565dbcf1aab0e29014623c924ade2ac1b5da9ae9d9231afe3299dfedab0678c3d222e58665fe3ac60291972b7c2d763437246d7816ca7c16e69766a52e9490 SHA512 2ec22944857ccc5276b93d0da4684bfd9d2a80ac712e3396cb01ccbf21a582c22d525e8af9d12828e224ee948173bffb5e31f664cc9333b79b6f3062dd2466ac
diff --git a/games-strategy/colobot-data/colobot-data-0.1.11.ebuild b/games-strategy/colobot-data/colobot-data-0.1.11.ebuild
new file mode 100644 (file)
index 0000000..b60210f
--- /dev/null
@@ -0,0 +1,54 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils
+
+DESCRIPTION="Data package for colobot (Colonize with Bots)"
+HOMEPAGE="https://colobot.info/"
+SRC_URI="
+       https://github.com/colobot/colobot-data/archive/colobot-gold-${PV}-alpha.zip -> ${P}.zip
+       music_ogg? ( https://colobot.info/files/music/colobot-music_ogg_${PV}-alpha.tar.gz -> ${P}-music-ogg.tar.gz )
+       music_flac_convert? ( https://colobot.info/files/music/colobot-music_flac_${PV}-alpha.tar.gz -> ${P}-music-flac.tar.gz )"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+music music_flac_convert +music_ogg"
+REQUIRED_USE="
+       music? ( ^^ ( music_flac_convert music_ogg ) )
+       music_flac_convert? ( music )
+       music_ogg? ( music )"
+
+DEPEND="
+       app-arch/unzip
+       music_flac_convert? ( media-sound/vorbis-tools )"
+
+S="${WORKDIR}/${PN}-colobot-gold-${PV}-alpha"
+
+src_unpack() {
+       unpack "${P}.zip"
+
+       cd "${S}" || die
+       if use music; then
+               tar xf "${DISTDIR}/${P}"-music-*.tar.gz -C "${S}/music" || die "Failed to unpack music"
+       fi
+}
+
+src_prepare() {
+       cmake-utils_src_prepare
+
+       if use music; then
+               sed -i -e '/find_program(WGET wget)/d' -e '/if(NOT WGET)/,+2 d' music/CMakeLists.txt || die
+       fi
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DMUSIC=$(usex music)
+               -DMUSIC_FLAC=$(usex music_flac_convert)
+               -DMUSIC_QUALITY="${COLOBOT_DATA_MUSIC_QUALITY:-4}"
+       )
+       cmake-utils_src_configure
+}
diff --git a/games-strategy/colobot-data/colobot-data-9999.ebuild b/games-strategy/colobot-data/colobot-data-9999.ebuild
new file mode 100644 (file)
index 0000000..63f52ef
--- /dev/null
@@ -0,0 +1,51 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGIT_REPO_URI="https://github.com/colobot/colobot-data"
+
+inherit git-r3 cmake-utils
+
+DESCRIPTION="Data package for colobot (Colonize with Bots)"
+HOMEPAGE="https://colobot.info/"
+SRC_URI="
+       music_ogg? ( https://colobot.info/files/music/colobot-music_ogg_latest.tar.gz -> ${P}-music-ogg.tar.gz )
+       music_flac_convert? ( https://colobot.info/files/music/colobot-music_flac_latest.tar.gz -> ${P}-music-flac.tar.gz )"
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="+music music_flac_convert +music_ogg"
+REQUIRED_USE="
+       music? ( ^^ ( music_flac_convert music_ogg ) )
+       music_flac_convert? ( music )
+       music_ogg? ( music )"
+
+DEPEND="
+       app-arch/unzip
+       music_flac_convert? ( media-sound/vorbis-tools )"
+
+src_unpack() {
+       git-r3_src_unpack
+
+       if use music; then
+               tar xf "${DISTDIR}/${P}"-music-*.tar.gz -C "${S}/music" || die "Failed to unpack music"
+       fi
+}
+
+src_prepare() {
+       cmake-utils_src_prepare
+
+       if use music; then
+               sed -i -e '/find_program(WGET wget)/d' -e '/if(NOT WGET)/,+2 d' music/CMakeLists.txt || die
+       fi
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DMUSIC=$(usex music)
+               -DMUSIC_FLAC=$(usex music_flac_convert)
+               -DMUSIC_QUALITY="${COLOBOT_DATA_MUSIC_QUALITY:-4}"
+       )
+       cmake-utils_src_configure
+}
diff --git a/games-strategy/colobot-data/metadata.xml b/games-strategy/colobot-data/metadata.xml
new file mode 100644 (file)
index 0000000..f195410
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <maintainer type="person">
+               <email>fdsfgs@krutt.org</email>
+               <name>soredake</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">colobot/colobot-data</remote-id>
+       </upstream>
+       <use>
+               <flag name="music">Enable music support</flag>
+               <flag name="music_flac_convert">Fetch flac music and convert it to ogg</flag>
+               <flag name="music_ogg">Fetch ogg music</flag>
+       </use>
+</pkgmetadata>
diff --git a/games-strategy/colobot/Manifest b/games-strategy/colobot/Manifest
new file mode 100644 (file)
index 0000000..e61203e
--- /dev/null
@@ -0,0 +1 @@
+DIST colobot-0.1.11.tar.gz 1430595 BLAKE2B 6e4a23f17631031a6f502b045637949d99bfcf8aa723f11c406c8cdb9b201b9a2771de8b8c92829bc890848a19eb182bc30a45a51e6d281ce64370f6c7a0d8a5 SHA512 fe32bc56b6fae9435c74a73b694b7d2b93667e5d15b1c57a7558e492613f0a5d4cab72ff341ab4c921150137282cc71292a1e31eb1ed06c752de33c50120f20e
diff --git a/games-strategy/colobot/colobot-0.1.11.ebuild b/games-strategy/colobot/colobot-0.1.11.ebuild
new file mode 100644 (file)
index 0000000..02e4757
--- /dev/null
@@ -0,0 +1,58 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils desktop
+
+DESCRIPTION="Colobot is an educational real-time strategy video game featuring 3D graphics"
+HOMEPAGE="https://colobot.info/"
+
+if [[ ${PV} == "9999" ]] ; then
+       EGIT_REPO_URI="https://github.com/colobot/colobot"
+       EGIT_SUBMODULES=()
+       inherit git-r3
+else
+       SRC_URI="https://github.com/colobot/colobot/archive/${PN}-gold-${PV}-alpha.tar.gz -> ${P}.tar.gz"
+       KEYWORDS="~amd64"
+       S="${WORKDIR}/${PN}-${PN}-gold-${PV}-alpha"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="devbuild test tools doc +openal"
+
+DEPEND="
+       dev-games/physfs
+       dev-libs/boost:=
+       media-libs/glew:0
+       media-libs/libogg
+       media-libs/libpng:0=
+       media-libs/libsdl2:=
+       media-libs/libsndfile:=
+       media-libs/libvorbis:=
+       media-libs/sdl2-image
+       media-libs/sdl2-ttf
+       media-sound/vorbis-tools
+       sys-devel/gettext
+       openal? ( media-libs/openal )"
+RDEPEND="${DEPEND}
+       games-strategy/colobot-data"
+
+src_configure() {
+       local mycmakeargs=(
+               -DDEV_BUILD=$(usex devbuild)
+               -DTESTS=$(usex test)
+               -DTOOLS=$(usex tools)
+               -DINSTALL_DOCS=$(usex doc)
+               -DOPENAL_SOUND=$(usex openal)
+               -DCOLOBOT_INSTALL_BIN_DIR="${EPREFIX}"/usr/bin
+               -DCOLOBOT_INSTALL_LIB_DIR="${EPREFIX}"/usr/$(get_libdir)
+       )
+       cmake-utils_src_configure
+}
+
+src_install() {
+       cmake-utils_src_install
+       doicon -s 256 desktop/colobot.ico
+}
diff --git a/games-strategy/colobot/colobot-9999.ebuild b/games-strategy/colobot/colobot-9999.ebuild
new file mode 100644 (file)
index 0000000..02e4757
--- /dev/null
@@ -0,0 +1,58 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils desktop
+
+DESCRIPTION="Colobot is an educational real-time strategy video game featuring 3D graphics"
+HOMEPAGE="https://colobot.info/"
+
+if [[ ${PV} == "9999" ]] ; then
+       EGIT_REPO_URI="https://github.com/colobot/colobot"
+       EGIT_SUBMODULES=()
+       inherit git-r3
+else
+       SRC_URI="https://github.com/colobot/colobot/archive/${PN}-gold-${PV}-alpha.tar.gz -> ${P}.tar.gz"
+       KEYWORDS="~amd64"
+       S="${WORKDIR}/${PN}-${PN}-gold-${PV}-alpha"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="devbuild test tools doc +openal"
+
+DEPEND="
+       dev-games/physfs
+       dev-libs/boost:=
+       media-libs/glew:0
+       media-libs/libogg
+       media-libs/libpng:0=
+       media-libs/libsdl2:=
+       media-libs/libsndfile:=
+       media-libs/libvorbis:=
+       media-libs/sdl2-image
+       media-libs/sdl2-ttf
+       media-sound/vorbis-tools
+       sys-devel/gettext
+       openal? ( media-libs/openal )"
+RDEPEND="${DEPEND}
+       games-strategy/colobot-data"
+
+src_configure() {
+       local mycmakeargs=(
+               -DDEV_BUILD=$(usex devbuild)
+               -DTESTS=$(usex test)
+               -DTOOLS=$(usex tools)
+               -DINSTALL_DOCS=$(usex doc)
+               -DOPENAL_SOUND=$(usex openal)
+               -DCOLOBOT_INSTALL_BIN_DIR="${EPREFIX}"/usr/bin
+               -DCOLOBOT_INSTALL_LIB_DIR="${EPREFIX}"/usr/$(get_libdir)
+       )
+       cmake-utils_src_configure
+}
+
+src_install() {
+       cmake-utils_src_install
+       doicon -s 256 desktop/colobot.ico
+}
diff --git a/games-strategy/colobot/metadata.xml b/games-strategy/colobot/metadata.xml
new file mode 100644 (file)
index 0000000..16f1e43
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <maintainer type="person">
+               <email>fdsfgs@krutt.org</email>
+               <name>soredake</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">colobot/colobot</remote-id>
+       </upstream>
+       <use>
+               <flag name="devbuild">TODO</flag>
+               <flag name="tools">Build tools</flag>
+       </use>
+</pkgmetadata>