diff --git a/packages/games-strategy/openra/openra-20150919.exheres-0 b/packages/games-strategy/openra/openra-20150919.exheres-0 new file mode 100644 index 00000000..db0dc600 --- /dev/null +++ b/packages/games-strategy/openra/openra-20150919.exheres-0 @@ -0,0 +1,163 @@ +# Copyright 2015-2016 Julian Ospald +# Distributed under the terms of the GNU General Public License v2 + +require gtk-icon-cache freedesktop-desktop freedesktop-mime + +SUMMARY="A free RTS engine supporting games like Command & Conquer and Red Alert" +HOMEPAGE="http://www.openra.net/" +DOWNLOADS="https://github.com/OpenRA/OpenRA/archive/release-${PV}.tar.gz -> ${PNV}.tar.gz" + +NG_SRC="https://nuget.org/api/v2/package" +# 3rd party deps +StyleCopPlus_MSBuild="${NG_SRC}/StyleCopPlus.MSBuild/4.7.49.5 -> StyleCopPlus_MSBuild-4.7.49.5.zip" +StyleCop_MSBuild="${NG_SRC}/StyleCop.MSBuild/4.7.49.0 -> StyleCop_MSBuild-4.7.49.0.zip" +SharpZipLib="${NG_SRC}/SharpZipLib/0.86.0 -> SharpZipLib-0.86.0.zip" +MaxMind_Db="${NG_SRC}/MaxMind.Db/1.0.0.0 -> MaxMind_Db-1.0.0.0.zip" +Newtonsoft_Json="${NG_SRC}/Newtonsoft.Json/6.0.5 -> Newtonsoft_Json-6.0.5.zip" +RestSharp="${NG_SRC}/RestSharp/105.0.1 -> RestSharp-105.0.1.zip" +MaxMind_GeoIP2="${NG_SRC}/MaxMind.GeoIP2/2.1.0 -> MaxMind_GeoIP2-2.1.0.zip" +SharpFont="${NG_SRC}/SharpFont/3.0.1 -> SharpFont-3.0.1.zip" +NUnit="${NG_SRC}/NUnit/2.6.4 -> NUnit-2.6.4.zip" +Mono_Nat="${NG_SRC}/Mono.Nat/1.2.21 -> Mono_Nat-1.2.21.zip" +FuzzyLogicLibrary="${NG_SRC}/FuzzyLogicLibrary/1.2.0 -> FuzzyLogicLibrary-1.2.0.zip" +SDL2CS="https://github.com/OpenRA/SDL2-CS/releases/download/20150709/SDL2-CS.dll -> SDL2-CS.dll.20150709" +Eluant="https://github.com/OpenRA/Eluant/releases/download/20140425/Eluant.dll -> Eluant.dll.20140425" +# unfortunately, this may randomly change +GEO_IP_DB="http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz -> GeoLite2-Country-2015-10-18.mmdb.gz" + +DOWNLOADS="${DOWNLOADS} +${StyleCopPlus_MSBuild} +${StyleCop_MSBuild} +${SharpZipLib} +${MaxMind_Db} +${Newtonsoft_Json} +${RestSharp} +${MaxMind_GeoIP2} +${SharpFont} +${NUnit} +${Mono_Nat} +${FuzzyLogicLibrary} +${SDL2CS} +${Eluant} +${GEO_IP_DB} +" + +LICENCES="GPL-3" +SLOT="0" +PLATFORMS="~amd64 ~x86" + +MYOPTIONS=" + ( providers: ijg-jpeg jpeg-turbo ) [[ number-selected = exactly-one ]] +" + +LUA_SLOT="5.1" +DEPENDENCIES=" + build+run: + dev-dotnet/libgdiplus + dev-lang/lua:${LUA_SLOT} + dev-lang/mono[>=3.2] + media-libs/freetype:2 + media-libs/SDL:2[X] + media-libs/openal + x11-dri/mesa + providers:ijg-jpeg? ( media-libs/jpeg ) + providers:jpeg-turbo? ( media-libs/libjpeg-turbo ) + build: + virtual/unzip +" + +WORK=${WORKBASE}/OpenRA-release-${PV} + +src_unpack() { + unpack ${PNV}.tar.gz + + # this is pure crapshit, but it will successfully die + # if upstream has added/changed files + edo cd "${WORK}"/thirdparty + edo sed -i \ + -e 's/get()/furz()/' \ + -e 's|curl |: |' \ + fetch-thirdparty-deps.sh + + edo mkdir "${WORK}"/thirdparty/download + get() { + # don't add dies here + local archive="${1/./_}" + local version="${2}" + mkdir -p "${WORK}"/thirdparty/download/${1} + unzip -o -qq "${FETCHEDDIR}"/${archive}-${version}.zip \ + -d "${WORK}"/thirdparty/download/${1} + } + export -f get + edo ./fetch-thirdparty-deps.sh + unset get + edo cd "${WORK}"/thirdparty/download + edo cp "${FETCHEDDIR}"/${SDL2CS##* } ./SDL2-CS.dll + edo cp "${FETCHEDDIR}"/${Eluant##* } ./Eluant.dll + edo cp "${FETCHEDDIR}"/${GEO_IP_DB##* } ./GeoLite2-Country.mmdb.gz +} + +src_configure() { :; } + +src_prepare() { + # register game-version + emake VERSION="${PV}" version + + edo sed \ + -e "s/@LIBLUA51@/liblua${LUA_SLOT}.so/" \ + "${WORK}"/thirdparty/Eluant.dll.config.in > Eluant.dll.config + + edo cd "${WORK}"/thirdparty/download + edo cp *.dll *.dll.config GeoLite2-Country.mmdb.gz "${WORK}"/ +} + +src_compile() { + emake VERSION="${PV}" core tools +} + +install_desktop_entry() { + local cmd=$1 + local name=$2 + insinto /usr/share/applications + hereins ${PN}.desktop <