summaryrefslogtreecommitdiff
path: root/games-strategy/openra
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-12-14 13:26:14 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-12-14 13:26:14 +0000
commit6abbf81ef2f298e3221ff5e67a1f3c5f23958212 (patch)
tree25413d1cb3a0cbfe36029db32398c0f333609215 /games-strategy/openra
parent9c417bacd51da6d8b57fa9f37425161d30d4b95b (diff)
gentoo resync : 14.12.2020
Diffstat (limited to 'games-strategy/openra')
-rw-r--r--games-strategy/openra/Manifest1
-rw-r--r--games-strategy/openra/openra-20190314-r100.ebuild174
2 files changed, 175 insertions, 0 deletions
diff --git a/games-strategy/openra/Manifest b/games-strategy/openra/Manifest
index 75e8a6ad586b..4c4710253eaa 100644
--- a/games-strategy/openra/Manifest
+++ b/games-strategy/openra/Manifest
@@ -11,5 +11,6 @@ DIST SharpFont-4.0.1.zip 151532 BLAKE2B 3745959e449b0745b5cd1c20a9653595ce2166f4
DIST SharpZipLib-0.86.0.zip 463599 BLAKE2B 5d6374c5daef33afc1faf814992df1ef7001b593594a022657406ac8ce67ac5e00f71cfe9365c4acab2925ef458f9add83ec62dd22e4db74e17efdd1e1091542 SHA512 70ac4a39b599a37ff45733477ba1afb4caee177262b72037998b7eb08a737177f8689bb690759b8090d25b9d408ba8c84e56bec3509997adde62724fcfcdc2b5
DIST openra-20190314.tar.gz 24551126 BLAKE2B ed6289bbfab9f55aa88ac834dab3a2bab4cea3cb5a3b6934e24feb78bea1df71d839d4434242df666cda6180027a8e6d5b7766b6155ab2e85a4ee639a7950e12 SHA512 a16884cf626a31b3cf21662c307aef505bfcf6d34330f09b10510aa6c88d9d1026f17f2037565827fc95148776b0651fe0559c65db493295957df428793b2d71
DIST rix0rrr.BeaconLib-1.0.1.zip 17989 BLAKE2B 2a65c9276b725ac6c433eb2cf6e4a13d6e5c07446dbff1e096b100a20eebb2a432c81cfbc13c11fdf672fbd37eb5985497b3fa425a317afe39049a6a967e3a7e SHA512 4fe4c6dfd7ad0f7eb5549c66fe53cd38f74026a8202d3553481bdfdab8ce0788f8b31f05092d93f9751a687badf75a1ec22da201235f2e505893192bb371367f
+EBUILD openra-20190314-r100.ebuild 5011 BLAKE2B aaec300aa007cdc04961f89f32f4cb4120cc9bde374d2728f692bf0c78115ee2347c0ae3885ecb19aa9f4d1fed86a036f425c64702e2474e431a2c4bf6b4ef74 SHA512 40f12f8f9b87dd3dbbf74f4fd8c4f9a0aba9c57f42ade666ca95ad805fa4d535f017ee40a2f21caf075c5bc4a33669119ad23a3482b90cb4d6f6fe8f6e7edc93
EBUILD openra-20190314.ebuild 4890 BLAKE2B 5805d4bc6f43bc93f2748849ab462c7f8612c3cfeab5439e8b183537111ddc5296cfe42bfdc09cd5855d347582beae866cd3c21b23e121b8d8c0fbb02d5cdf2a SHA512 289a8c32e587585b6876fe65d42411402ab4806cba7f5be09b3626a1a27f17861338455dba527a91ee627660b60e1a31f64815a7b63f0bbb97c8801b4b3d484b
MISC metadata.xml 507 BLAKE2B 41509ed4d51adffd4aaf548f986ff19ccdf2b382e6265eeca268ccf693fcbf47468fad4ba1fcafb73f2a7fd5893942944f4118ca3b388a2b9299fd9130621d5e SHA512 ffeb53c6a7368c79336656bee82ea41fcdec13ef68f22e70a2ef70b5ba644ae1ad3832406cf54c7afd888ebe3357d2530528f39b07d515b813cf090248fa5186
diff --git a/games-strategy/openra/openra-20190314-r100.ebuild b/games-strategy/openra/openra-20190314-r100.ebuild
new file mode 100644
index 000000000000..c9121cd7fddf
--- /dev/null
+++ b/games-strategy/openra/openra-20190314-r100.ebuild
@@ -0,0 +1,174 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( lua5-1 )
+
+inherit lua-single mono-env xdg-utils
+
+MY_PV=release-${PV}
+#MY_PV=playtest-${PV}
+
+DESCRIPTION="A free RTS engine supporting games like Command & Conquer, Red Alert and Dune2k"
+HOMEPAGE="https://www.openra.net/"
+
+# This sed one-liner was used to generate the SRC_URI list
+# below. Ideally we would package these DLLs separately instead but
+# Gentoo Dotnet doesn't seem to be in great shape right now.
+#
+# sed -n -r -e 's@.*curl.*(https:[^ ]+/([^/]+)/([^.]+)([^ ]+)).*@\1 -> \3-\2\4@p' \
+# -e 's@.*noget\.sh ([^ ]+) ([^ ]+).*@https://www.nuget.org/api/v2/package/\1/\2 -> \1-\2.zip@p' \
+# "${S}"/thirdparty/fetch-thirdparty-deps.sh | grep -v 'NUnit\|StyleCop' | sort
+
+SRC_URI="https://github.com/OpenRA/OpenRA/archive/${MY_PV}.tar.gz -> ${P}.tar.gz
+ https://github.com/OpenRA/Eluant/releases/download/20160124/Eluant.dll -> Eluant-20160124.dll
+ https://github.com/OpenRA/OpenAL-CS/releases/download/20151227/OpenAL-CS.dll.config -> OpenAL-CS-20151227.dll.config
+ https://github.com/OpenRA/OpenAL-CS/releases/download/20151227/OpenAL-CS.dll -> OpenAL-CS-20151227.dll
+ https://github.com/OpenRA/SDL2-CS/releases/download/20161223/SDL2-CS.dll.config -> SDL2-CS-20161223.dll.config
+ https://github.com/OpenRA/SDL2-CS/releases/download/20161223/SDL2-CS.dll -> SDL2-CS-20161223.dll
+ https://www.nuget.org/api/v2/package/FuzzyLogicLibrary/1.2.0 -> FuzzyLogicLibrary-1.2.0.zip
+ https://www.nuget.org/api/v2/package/MaxMind.Db/2.0.0 -> MaxMind.Db-2.0.0.zip
+ https://www.nuget.org/api/v2/package/Open.Nat/2.1.0 -> Open.Nat-2.1.0.zip
+ https://www.nuget.org/api/v2/package/rix0rrr.BeaconLib/1.0.1 -> rix0rrr.BeaconLib-1.0.1.zip
+ https://www.nuget.org/api/v2/package/SharpFont/4.0.1 -> SharpFont-4.0.1.zip
+ https://www.nuget.org/api/v2/package/SharpZipLib/0.86.0 -> SharpZipLib-0.86.0.zip"
+
+# Engine is GPL-3, dependent DLLs are mixed.
+LICENSE="GPL-3 Apache-2.0 BSD GPL-2 MIT"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+debug geoip"
+
+REQUIRED_USE="${LUA_REQUIRED_USE}"
+
+RESTRICT="mirror test"
+
+BDEPEND=">=dev-lang/mono-4.2"
+
+DEPEND="${BDEPEND}
+ dev-dotnet/libgdiplus"
+
+RDEPEND="${DEPEND}
+ app-misc/ca-certificates
+ ${LUA_DEPS}
+ media-libs/freetype:2
+ media-libs/libsdl2[opengl,video]
+ media-libs/openal
+ geoip? ( net-misc/geoipupdate )"
+
+S="${WORKDIR}/OpenRA-${MY_PV}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-system-geoip.patch
+)
+
+DOCS=(
+ AUTHORS
+ CODE_OF_CONDUCT.md
+ CONTRIBUTING.md
+ README.md
+)
+
+pkg_setup() {
+ lua-single_pkg_setup
+ mono-env_pkg_setup
+}
+
+src_unpack() {
+ local DOWNLOADS="${S}"/thirdparty/download
+ mkdir -p "${DOWNLOADS}" || die
+
+ # Stub out unnecessary development dependencies.
+ touch "${DOWNLOADS}"/{{nunit.framework,StyleCop{,Plus}}.dll,nunit3-console.exe} || die
+
+ for a in ${A}; do
+ case ${a} in
+ # Unpack engine sources.
+ ${P}.tar.gz) unpack ${a} ;;
+
+ # Symlink other downloads, Makefile will extract and copy.
+ *) ln -snf "${DISTDIR}/${a}" "${DOWNLOADS}/${a%-[0-9]*}${a##*[0-9]}" || die ;;
+ esac
+ done
+}
+
+src_prepare() {
+ # Stub out attempts to download anything.
+ sed -i -r 's/^\s*(curl|wget)\b/: #\1/' thirdparty/{fetch-thirdparty-deps,noget}.sh || die
+
+ # Extract what is needed from the downloads.
+ emake cli-dependencies
+
+ default
+}
+
+src_compile() {
+ emake $(usex debug "" DEBUG=false)
+ emake VERSION=${MY_PV} version man-page
+}
+
+src_install() {
+ emake $(usex debug "" DEBUG=false) \
+ prefix="${EPREFIX}"/usr \
+ gameinstalldir='$(prefix)'/share/${PN} \
+ DESTDIR="${D}" \
+ VERSION=${MY_PV} \
+ install \
+ install-linux-mime \
+ install-linux-shortcuts \
+ install-man-page
+
+ einstalldocs
+}
+
+pkg_postinst() {
+ xdg_icon_cache_update
+ xdg_desktop_database_update
+ xdg_mimeinfo_database_update
+
+ if [[ ! -s ${EROOT}/usr/share/GeoIP/GeoLite2-Country.mmdb ]]; then
+ echo
+ ewarn "Multiplayer server locations will show as unknown until you install"
+
+ if use geoip; then
+ ewarn "a GeoIP database. Run emerge --config ${CATEGORY}/${PN}"
+ ewarn "occasionally to fetch one and keep it current."
+ else
+ ewarn "a GeoIP database. Start by enabling the geoip USE flag."
+ fi
+ fi
+
+ if [[ ! -d ${EROOT}/usr/share/.mono/certs ]]; then
+ echo
+ ewarn "The multiplayer server listing will not work at all until you install"
+ ewarn "CA certificates using Mono's cert-sync. Run emerge --config"
+ ewarn "${CATEGORY}/${PN} occasionally to set them up and keep them"
+ ewarn "current."
+ fi
+}
+
+pkg_postrm() {
+ xdg_icon_cache_update
+ xdg_desktop_database_update
+ xdg_mimeinfo_database_update
+}
+
+pkg_config() {
+ if use geoip; then
+ ebegin "Updating GeoIP database"
+ geoipupdate -d "${EROOT}"/usr/share/GeoIP
+ eend $?
+ fi
+
+ ebegin "Updating Mono CA certificates"
+ cert-sync --quiet "${EROOT}"/etc/ssl/certs/ca-certificates.crt
+ eend $?
+
+ if [[ -n ${ROOT} ]]; then
+ echo
+ ewarn "Mono's cert-sync cannot write to your ROOT system so you must manually"
+ ewarn "copy the certificates from ${BROOT}/usr/share/.mono to ${EROOT}/usr/share/.mono."
+ fi
+}