games-rpg/silence: New package

Signed-off-by: James Le Cuirot <chewi@gentoo.org>
This commit is contained in:
James Le Cuirot
2021-10-22 16:11:01 +01:00
parent 97ac21c6d0
commit 3997898997
3 changed files with 103 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST Silence_1.2.20280_Linux_Full_EN_DE_IT_ES_FR_ZH_JA_PT_KO_RU_PL_EL_Daedalic_noDRM.zip 4618513055 BLAKE2B 6a7b420d32e0fb8c9203ce73d201c765f046fe0f2d0514fc3abc6f666216ef920091eb0ec2f896477c084d40bd5c311514211bafe778c4309897ea0ebd5f824e SHA512 9b10b5ba75b7d493ace35d4f3f5fd419614e11b80b6c4e2723b254b94651fc73db9b4d4153a97df19d667fc9838950dda53c6997039368ec4278e619297eb513

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>games@gentoo.org</email>
<name>Gentoo Games Project</name>
</maintainer>
</pkgmetadata>

View File

@@ -0,0 +1,94 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit desktop wrapper xdg
DESCRIPTION="3D point and click adventure, sequel to The Whispered World"
HOMEPAGE="https://www.daedalic.com/silence"
SRC_URI="Silence_${PV}_Linux_Full_EN_DE_IT_ES_FR_ZH_JA_PT_KO_RU_PL_EL_Daedalic_noDRM.zip"
LICENSE="all-rights-reserved"
SLOT="0"
KEYWORDS="-* ~amd64 ~x86"
IUSE="l10n_de +l10n_en l10n_pl l10n_zh"
REQUIRED_USE="|| ( ${IUSE//+} )"
RESTRICT="bindist fetch splitdebug strip"
BDEPEND="app-arch/unzip"
RDEPEND="
media-libs/libsdl2[opengl,video]
virtual/opengl
x11-libs/libX11
x11-libs/libXcursor
x11-libs/libXrandr
"
S="${WORKDIR}"
DIR="/opt/${PN}"
QA_PREBUILT="${DIR#/}/*"
pkg_nofetch() {
einfo "Please buy and download ${SRC_URI} from:"
einfo " https://www.humblebundle.com/store/${PN}"
einfo "and move it to your distfiles directory."
}
src_prepare() {
default
MY_ARCH=$(usex amd64 x86_64 x86)
OTHER_ARCH=$(usex amd64 x86 x86_64)
# Delete files for the other architecture.
# Delete Steam library because we're not running under Steam.
# Delete Screen Selector library, because it requires GTK2 but is unused.
rm -rv \
Silence_Data/{Mono,Plugins}/${OTHER_ARCH}/ \
Silence_Data/Plugins/${MY_ARCH}/{libDaedalic.Ecosystems.Steam.External,ScreenSelector}.so \
|| die
# Remove unneeded language files.
local locale localedir
for locale in ${IUSE//+}; do
if [[ ${locale} = l10n_* ]] && ! use ${locale}; then
case ${locale#l10n_} in
de) localedir=german ;;
en) localedir=english ;;
pl) localedir=polish ;;
zh) localedir=chinese ;;
*) die "unrecognised locale ${locale}" ;;
esac
rm -rv Silence_Data/GameData/Sounds/{LipSync,Voice}/${localedir}/ || die
fi
done
}
src_install() {
exeinto "${DIR}"
newexe Silence.${MY_ARCH} Silence
make_wrapper ${PN} ./Silence "${DIR}"
insinto "${DIR}"
doins -r Silence_Data version.txt
local libdir
for libdir in Mono Plugins; do
exeinto "${DIR}"/Silence_Data/${libdir}/${MY_ARCH}
doexe Silence_Data/${libdir}/${MY_ARCH}/*.so
done
newicon -s 128 Silence_Data/Resources/UnityPlayer.png silence.png
make_desktop_entry ${PN} Silence
}
pkg_postinst() {
xdg_pkg_postinst
if ! use l10n_en; then
ewarn "You have disabled the English voice audio and lip sync data. The game"
ewarn "still defaults to English though, so you will need to manually change"
ewarn "the voice language in the options menu."
fi
}