summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-strategy')
-rw-r--r--games-strategy/openra/Manifest12
-rw-r--r--games-strategy/openra/files/openra-system-geoip.patch38
-rw-r--r--games-strategy/openra/metadata.xml2
-rw-r--r--games-strategy/openra/openra-20190314.ebuild164
4 files changed, 215 insertions, 1 deletions
diff --git a/games-strategy/openra/Manifest b/games-strategy/openra/Manifest
index b5a572c5c64c..0a5d9c29686f 100644
--- a/games-strategy/openra/Manifest
+++ b/games-strategy/openra/Manifest
@@ -1 +1,13 @@
+DIST Eluant-20160124.dll 71168 BLAKE2B b5bf63e634979732a9c524fa61a2876b9257ad2ce54c64faeba991d82e0da63d66fa7532f6f4baf1c55a2f50e3c41d9eb46e085381889e9582a47365f095e320 SHA512 2d2df1c9033aa7ac4a9314663c75424d40f7914fb046d3122eef993d0bbe55386c65167952acf8df4fae224a721318a378e3e97fc5ea654fc8781e196814060f
+DIST FuzzyLogicLibrary-1.2.0.zip 80141 BLAKE2B 568582c21b39462f4a3bf5610e2343d5f8ef7791dc66532109bc5c16f79494575790fb30b03fe014514b5681c78db3b441f65a199c4f6f4423e7b7a82a142d73 SHA512 9091649b362bc39d24ab7565f073d5658af58ba24639807b3f541f92296b8f858f4a7a22c88bd643304a0554dfbb095488c3948a6c63e0305b8798b8f1db6bdd
+DIST MaxMind.Db-2.0.0.zip 28890 BLAKE2B bd5e2d5027d6ca32b0fe52c14e56674004e48687d0328fd0afc8005f4928187c77bc83461bfa22a888cd8d6348ae50e244a326aedf8b72a6c867f1d74d889ecc SHA512 3f238d7829351a24cde22f6632e562e5eaf997d26f12ff01df512c72bb9274f5bd260afce3979e264a1de9e2130550156e330c4ff316a00d8936a7a009ebeb8e
+DIST Open.Nat-2.1.0.zip 347767 BLAKE2B 62940d0095aadd7696fe0df05944f0703cb3f5d563e0dd2f6de8afb0a1fe4c986c6c7dbc09a09d3ec9e7fbab064d703c1069ee49e7fc5cde16e1b3e862dc0756 SHA512 53e1e0d1fc8fd0ad22b064e89eac28140f7a718e4cff5b8524a58bd298da1a1d28100bf57b0b732c27d0c26417f39f024d516c3a90e009e79b9e14bbf118aaea
+DIST OpenAL-CS-20151227.dll 18944 BLAKE2B 981996b82dcda9a510cc4044f967c0450c41cbe0cb7df24009e6e78208eed92fcd3a82d427b30b8359d165f6d3da220f0a19d2c0957a85357bf9a2749eea8050 SHA512 6e1548bafb833e3e1a2d1a5f48c19a30bc80297afce0b909316a8d328392f3be86034fd11f66e9ac1172f66c7e2ebd5566ccf7a27c64af109748eb8b4134b8e4
+DIST OpenAL-CS-20151227.dll.config 301 BLAKE2B 8a39f572b5704a0e16b6771395f74f3ec76b528a79a999f44197c318f42960b61a1ab56c1c3ef862a3bae8aa777b6de5a56d5e8b037de2d78cf5f6f4e3276449 SHA512 7db75200798b5080f7d0a495f20e44354af0057b9cfb210a03a3dfe8d63990eb05ed3d1591c9f819900523560e1c3b9c977952f1adbfabf9a7d0fb7aed14b606
+DIST SDL2-CS-20161223.dll 80896 BLAKE2B 774ca64f7847d3cc02773788a6d5074e7d29d8c27b96489ba608ac4ea2376cde88494487b4d488583a1be9059a8fbafade67c70a3214e7c81443506e1142f3fa SHA512 06c5be637897f3a45c861450c26f45cbf9010a89aa0aa485dfaad0b8eabd440069e1ba8ff73dbbc375dca196bda3fa9928612a5d6da807de375fdae0aabeff98
+DIST SDL2-CS-20161223.dll.config 194 BLAKE2B 0b3743e0b41303191fcc7b233777e733529ae2eea9188923f28d8549dcf6d1594a5189ccbfd7ab97253a18d2b0a84f1a810a1f9891c27f6b833e2134d262c41f SHA512 0cf2c44c208cc1db7c6a44dab1882195b69ad65bbe39669f165a1f5caf431aa445a383c12aac9911f3f9ac7480ac1fdb5aae237b03b68cb198a74b107bfb6069
+DIST SharpFont-4.0.1.zip 151532 BLAKE2B 3745959e449b0745b5cd1c20a9653595ce2166f441356127bdb5a5bb99b3442db541f0709c006f90e95050477c6d29a9a895c94951a7299304f8c3196301682d SHA512 3f756d5c882d15bd64408c205cf955eb01e1984c727ff820b9be5c9604832ed83ebd905abd467cca3a3e893bdb86df3e05503f8d05ddccd773a2023742a2160c
+DIST SharpZipLib-0.86.0.zip 463599 BLAKE2B 5d6374c5daef33afc1faf814992df1ef7001b593594a022657406ac8ce67ac5e00f71cfe9365c4acab2925ef458f9add83ec62dd22e4db74e17efdd1e1091542 SHA512 70ac4a39b599a37ff45733477ba1afb4caee177262b72037998b7eb08a737177f8689bb690759b8090d25b9d408ba8c84e56bec3509997adde62724fcfcdc2b5
DIST openra-20141029.tar.gz 15340674 BLAKE2B bcb18118b1c04da6d2c7c9db2fc10e69a35623994c0c2915ce1c3b410889b72a8761ab6235a876c774470dc8ca03c823f09a6d195416dacd7f55ea6ea5353f06 SHA512 44594ec3c3a590ae29b0291fdf2292c72ba920dff7892cc269e729a161505c4bc0c5c682bf3c6d3cabb0cdebfa3cac5975eeeeec3f5a673e948ed28132c4a313
+DIST openra-20190314.tar.gz 24551126 BLAKE2B ed6289bbfab9f55aa88ac834dab3a2bab4cea3cb5a3b6934e24feb78bea1df71d839d4434242df666cda6180027a8e6d5b7766b6155ab2e85a4ee639a7950e12 SHA512 a16884cf626a31b3cf21662c307aef505bfcf6d34330f09b10510aa6c88d9d1026f17f2037565827fc95148776b0651fe0559c65db493295957df428793b2d71
+DIST rix0rrr.BeaconLib-1.0.1.zip 17989 BLAKE2B 2a65c9276b725ac6c433eb2cf6e4a13d6e5c07446dbff1e096b100a20eebb2a432c81cfbc13c11fdf672fbd37eb5985497b3fa425a317afe39049a6a967e3a7e SHA512 4fe4c6dfd7ad0f7eb5549c66fe53cd38f74026a8202d3553481bdfdab8ce0788f8b31f05092d93f9751a687badf75a1ec22da201235f2e505893192bb371367f
diff --git a/games-strategy/openra/files/openra-system-geoip.patch b/games-strategy/openra/files/openra-system-geoip.patch
new file mode 100644
index 000000000000..7a32ed47df3a
--- /dev/null
+++ b/games-strategy/openra/files/openra-system-geoip.patch
@@ -0,0 +1,38 @@
+Use a system-wide (uncompressed) GeoIP database instead of trying to
+download one at build time.
+
+diff -Naur a/Makefile b/Makefile
+--- a/Makefile 2019-03-14 19:32:26.000000000 +0000
++++ b/Makefile 2019-05-11 23:41:19.520479107 +0100
+@@ -300,7 +300,7 @@
+ @ $(CP_R) thirdparty/download/*.dll .
+ @ $(CP_R) thirdparty/download/*.dll.config .
+
+-linux-dependencies: cli-dependencies geoip-dependencies linux-native-dependencies
++linux-dependencies: cli-dependencies linux-native-dependencies
+
+ linux-native-dependencies:
+ @./thirdparty/configure-native-deps.sh
+@@ -341,7 +341,6 @@
+ @$(INSTALL_DIR) "$(DATA_INSTALL_DIR)"
+ @$(INSTALL_PROGRAM) $(foreach prog,$(CORE),$($(prog)_TARGET)) "$(DATA_INSTALL_DIR)"
+
+- @$(INSTALL_DATA) "GeoLite2-Country.mmdb.gz" "$(DATA_INSTALL_DIR)/GeoLite2-Country.mmdb.gz"
+ @$(INSTALL_DATA) VERSION "$(DATA_INSTALL_DIR)/VERSION"
+ @$(INSTALL_DATA) AUTHORS "$(DATA_INSTALL_DIR)/AUTHORS"
+ @$(INSTALL_DATA) COPYING "$(DATA_INSTALL_DIR)/COPYING"
+diff -Naur a/OpenRA.Game/Network/GeoIP.cs b/OpenRA.Game/Network/GeoIP.cs
+--- a/OpenRA.Game/Network/GeoIP.cs 2019-03-14 19:32:26.000000000 +0000
++++ b/OpenRA.Game/Network/GeoIP.cs 2019-05-11 23:40:33.919599297 +0100
+@@ -55,9 +55,8 @@
+ {
+ try
+ {
+- using (var fileStream = new FileStream("GeoLite2-Country.mmdb.gz", FileMode.Open, FileAccess.Read))
+- using (var gzipStream = new GZipInputStream(fileStream))
+- database = new Reader(gzipStream);
++ using (var fileStream = new FileStream(Path.Combine(Platform.GameDir, "..", "GeoIP", "GeoLite2-Country.mmdb"), FileMode.Open, FileAccess.Read))
++ database = new Reader(fileStream);
+ }
+ catch (Exception e)
+ {
diff --git a/games-strategy/openra/metadata.xml b/games-strategy/openra/metadata.xml
index a4988625f33d..b6617220811c 100644
--- a/games-strategy/openra/metadata.xml
+++ b/games-strategy/openra/metadata.xml
@@ -6,7 +6,7 @@
<name>Gentoo Games Project</name>
</maintainer>
<upstream>
- <changelog>http://openra.res0l.net/news/</changelog>
+ <changelog>https://www.openra.net/news/</changelog>
<doc lang="en">https://github.com/OpenRA/OpenRA/wiki</doc>
<bugs-to>https://github.com/OpenRA/OpenRA/issues</bugs-to>
<remote-id type="github">OpenRA/OpenRA</remote-id>
diff --git a/games-strategy/openra/openra-20190314.ebuild b/games-strategy/openra/openra-20190314.ebuild
new file mode 100644
index 000000000000..4926ae8f13bd
--- /dev/null
+++ b/games-strategy/openra/openra-20190314.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit 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"
+RESTRICT="mirror"
+
+BDEPEND=">=dev-lang/mono-4.2"
+
+DEPEND="${BDEPEND}
+ dev-dotnet/libgdiplus"
+
+RDEPEND="${DEPEND}
+ app-misc/ca-certificates
+ =dev-lang/lua-5.1*:0
+ 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
+)
+
+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
+}