diff options
author | Vadim A. Misbakh-Soloviov <git@mva.name> | 2017-06-21 13:21:31 +0700 |
---|---|---|
committer | Vadim A. Misbakh-Soloviov <git@mva.name> | 2017-06-21 13:21:31 +0700 |
commit | 37baa79165e6395d5712d5e4ab51c5a266120202 (patch) | |
tree | 63f3c769b012c9900d177016fabeafcb1078a085 /games-simulation | |
parent | kerbal: added missing deps (diff) | |
download | gamerlay-37baa79165e6395d5712d5e4ab51c5a266120202.tar.gz gamerlay-37baa79165e6395d5712d5e4ab51c5a266120202.tar.bz2 gamerlay-37baa79165e6395d5712d5e4ab51c5a266120202.zip |
kerbal: fix
Diffstat (limited to 'games-simulation')
-rw-r--r-- | games-simulation/kerbal-space-program/Manifest | 4 | ||||
-rw-r--r-- | games-simulation/kerbal-space-program/files/ksp-wrapper | 43 | ||||
-rw-r--r-- | games-simulation/kerbal-space-program/kerbal-space-program-1.3.0.1804.ebuild (renamed from games-simulation/kerbal-space-program/kerbal-space-program-2.13.0.16.ebuild) | 51 |
3 files changed, 78 insertions, 20 deletions
diff --git a/games-simulation/kerbal-space-program/Manifest b/games-simulation/kerbal-space-program/Manifest index 299bf4d..fdf9e5c 100644 --- a/games-simulation/kerbal-space-program/Manifest +++ b/games-simulation/kerbal-space-program/Manifest @@ -1 +1,5 @@ DIST gog_kerbal_space_program_2.13.0.16.sh 753707390 SHA256 02e6af35feaa103f3e3c38e6cb44a6e7e293bc4f599c6fee7f63cc8a17e05518 SHA512 0b49207ad0e0159aee350c8bbc0dffa3b511789f3a5c808b6e5dfb8a7ac228edcc9eced907513eceb245f3d6eb0632a2ead653d91ad1810eaedc2e7233047d51 WHIRLPOOL 3c5f1935488b279665265508f6591b69fad83b5deaebd32dc41d38ff9c953acba82f556ac48e8eb58ac0880c7367211f4a6463cc6cb53f7913cb898f2f7fd41a +DIST gog_kerbal_space_program_chinese_2.13.0.16.sh 963056884 SHA256 ad561085ee7dbbbd09094baabd850e642762a279a1451779102d3decfffdf867 SHA512 67ed4478122c724ba0324eebb3f799bd43a6621479121e4f71e80de383ab4a9413e0d167756f990f3361c0946a5532d6cc0606d15beeb5323ef85e3698da1523 WHIRLPOOL a3cea6656caa3b29e3bff826ff60a7b49e017d8e4c902cff2607b80683eedc5864cc3e165db484fe25fdf8b9fa829d86f68252356a9320365b172eed3215d9ad +DIST gog_kerbal_space_program_japanese_2.13.0.16.sh 922439807 SHA256 13b19433eaef0b732711bd6307282db610b025dafe5b3dafef6e55a7e42e19cf SHA512 0aa294b78aeffa8be3b94aeb7c302b76f9b995637c9995c7e784b6f2e8ceeb228cdfccbcdf0407bc48e6e0ceadc5f72963c228c38e696be5b364c549a202c8cc WHIRLPOOL 0762acb3fd304239f52f4919c33568ea44c59087ebc946f235448958d5ea84621bb305270fd3a972c7ed11c66cc3b204eca4f18bf71a3e79006689316c13aed3 +DIST gog_kerbal_space_program_russian_2.13.0.16.sh 808199038 SHA256 57279c95d8e69f12a7c89ae6a1932c23b005164b8f7226690fe259c114d7104d SHA512 454208b7da0de3befe886fc375cc18fd659e74bd112eb734fed2b691ed14e1d1fec2f5e445d5e5ccdeee0908c9bf4128d853e81c36e841bf7256dca6a8ac4eb0 WHIRLPOOL 299d2ffc552605c2f2109fd682af738a10c3899b89267192e6e6083343e9b1157ded1d363158689aff84875a387ab62a32aee74fee5776ebf2132107489d785d +DIST gog_kerbal_space_program_spanish_2.13.0.16.sh 816620477 SHA256 7374952f13101106278f9732424e7f6e19ebee419a67cc6e5689ab7220a77655 SHA512 ef3a597008cc77c9e43a568bbdab629b5a76a38c2cbc1c9ff485bd0415934e60b38e3060a526eae6491e73d3793bbabda0abe2cfc21af0880e68eed2da4d2819 WHIRLPOOL 6a4c6fb23253b5a0d92854399405b5fdcfafd72bff29eb784815e48c787787fd178bad8e7f527e7fbeca3452f24d4f3298c423c3d80aa44810a44cc7162d561b diff --git a/games-simulation/kerbal-space-program/files/ksp-wrapper b/games-simulation/kerbal-space-program/files/ksp-wrapper new file mode 100644 index 0000000..fcbf49a --- /dev/null +++ b/games-simulation/kerbal-space-program/files/ksp-wrapper @@ -0,0 +1,43 @@ +#!/bin/sh + +arch="$(uname -m)" +arch="${arch/i[2-6]/x}" +PV="__PV__" +s_dir="/usr/share/kerbal-space-program-${PV}" +t_dir="${HOME}/.local/share/kerbal-space-program" + + +mkdir -p "${t_dir}" +cd "${t_dir}"; + +IPV=$(cat .version 2>/dev/null) + +if [[ "${IPV}" != "${PV}" ]]; then + cat .content 2>/dev/null | rev | while read t; do + if [[ -d "${t}" ]]; then + rmdir "${f}" &>/dev/null + else + rm "${t}" &>/dev/null + fi + done + + echo -n '' > .content # truncate -s0 ? + cd "${s_dir}" + + find * | while read t; do + if [[ -d "${t}" ]]; then + mkdir -p "${t_dir}/${t}" + else + # Hardlinks with owner/rights change is not allowed, + # and symlinks doesn't work (game engine dereferences + # them and still complains on missing write access) + cp "${s_dir}/${t}" "${t_dir}/${t}" + fi + echo "${t}" >> "${t_dir}"/.content + done + echo "${PV}" > "${t_dir}"/.version +fi + +export LC_NUMERIC="C" +cd "${t_dir}"; +exec "./KSP.${arch}" "$@" diff --git a/games-simulation/kerbal-space-program/kerbal-space-program-2.13.0.16.ebuild b/games-simulation/kerbal-space-program/kerbal-space-program-1.3.0.1804.ebuild index 64582c5..7b542dd 100644 --- a/games-simulation/kerbal-space-program/kerbal-space-program-2.13.0.16.ebuild +++ b/games-simulation/kerbal-space-program/kerbal-space-program-1.3.0.1804.ebuild @@ -7,14 +7,27 @@ inherit eutils DESCRIPTION="A combination of platformer and role playing game" HOMEPAGE="http://www.unepicgame.com/" -SRC_URI="gog_${P//-/_}.sh" + +GOG_MAGIC="2.13.0.16" + +SRC_PH="gog_${PN//-/_}@PH@_${GOG_MAGIC}.sh" +SRC_URI=" + l10n_en? ( ${SRC_PH//@PH@} ) + l10n_es? ( ${SRC_PH//@PH@/_spanish} ) + l10n_ja? ( ${SRC_PH//@PH@/_japanese} ) + l10n_ru? ( ${SRC_PH//@PH@/_russian} ) + l10n_zh-CN? ( ${SRC_PH//@PH@/_chinese} ) +" RESTRICT="fetch strip" LICENSE="EULA" SLOT="0" KEYWORDS="amd64 x86" -IUSE="" + +L10NS="l10n_en l10n_es l10n_ja l10n_ru l10n_zh-CN" +IUSE="${L10NS}" +REQUIRED_USE="^^ ( ${L10NS} )" DEPEND="app-arch/unzip" RDEPEND=" @@ -39,18 +52,29 @@ pkg_nofetch() { } src_unpack() { + local tmp="${WORKDIR}/tmp" einfo "\nUnpacking files. This can take several minutes.\n" - mkdir "${WORKDIR}/tmp" || die "mkdir 'tmp' failed" - cd "${WORKDIR}/tmp" || die "cd 'tmp' failed" + mkdir "${tmp}" || die "mkdir 'tmp' failed" + cd "${tmp}" || die "cd 'tmp' failed" unzip -q "${DISTDIR}/${A}" - local gpath="data/noarch/game" mv "${gpath}" "${S}" - cd "${S}" && rm -r "${WORKDIR}/tmp" + cd "${S}" + + use l10n_es && unzip -oq KSP-LANG-ES-ES.zip && rm KSP-LANG-ES-ES.zip + use l10n_ja && unzip -oq KSP-LANG-JA.zip && rm KSP-LANG-JA.zip + use l10n_ru && unzip -oq KSP-LANG-RU.zip && rm KSP-LANG-RU.zip + use l10n_zh-CN && unzip -oq KSP-LANG-ZH-CN.zip && rm KSP-LANG-ZH-CN.zip + + rm -r "${WORKDIR}/tmp" + + find . -name .DS_Store -delete + + sed -e "s@__PV__@${PF}@" "${FILESDIR}/ksp-wrapper" > "${T}"/ksp-wrapper } src_install() { @@ -62,20 +86,7 @@ src_install() { doins -r . doexe {KSP,Launcher}.x86{,_64} || die "Failed to install executables" + newbin "${T}/ksp-wrapper" "${PN}" newicon "Launcher_Data/Resources/UnityPlayer.png" "${PN}.png" - make_wrapper "${PN}" "./KSP.${arch}" "${dir}" - make_wrapper "${PN}-launcher" "./Launcher.${arch}" "${dir}" make_desktop_entry "${PN}" "Kerbal Space Program" "${PN}" || die "make_desktop_entry failed" - make_desktop_entry "${PN}-launcher" "Kerbal Space Program: Launcher" "${PN}" || die "make_desktop_entry failed" -} - -pkg_postinst() { - einfo "Just in case: neither of these DRM-free versions sees Steam's savegames." - einfo "In case, if you played in Steam and moved to DRM-free version," - einfo "consider copying files from:" - einfo "~/.local/share/Steam/userdata/[your_user_id]/233980/remote/save" - einfo "to:" - einfo "~/.local/share/Unepic/unepic/save" - einfo "and vice versa if you want to import DRM-free saves to Steam." - einfo "Although, it can cause sudden game freezes..." } |