Verified Commit 087e625c authored by flussence's avatar flussence

Fix errors reported by shellcheck

parent e56265cf
......@@ -21,11 +21,11 @@ S="${WORKDIR}"
src_unpack() {
# Unihan.zip needs to be installed as a zip for reverse deps
# https://bugzilla.gnome.org/show_bug.cgi?id=768210
unpack ${P}-UCD.zip
unpack "${P}"-UCD.zip
}
src_install() {
insinto /usr/share/${PN}
insinto /usr/share/"${PN}"
doins -r "${S}"/*
newins "${DISTDIR}"/${P}-Unihan.zip Unihan.zip
newins "${DISTDIR}/${P}"-Unihan.zip Unihan.zip
}
......@@ -28,7 +28,7 @@ S="${WORKDIR}"
src_install() {
dobin "${FILESDIR}"/minecraft
doicon -s 192 "${DISTDIR}"/minecraft.png
insinto /usr/share/games/${PN}/
insinto /usr/share/games/"${PN}"
newins "${MY_JAR}" launcher.jar
make_desktop_entry minecraft Minecraft minecraft
......
......@@ -24,7 +24,7 @@ src_prepare() {
# Provided by ut2004-bonuspack-mega
rm Textures/Ty_RocketTextures.utx
cd Help
cd Help || die
# Useless orphan file
rm Note.txt
mv GERROIDREADME.txt DOM-CBP2-Gerroid.txt
......
......@@ -5,7 +5,7 @@ EAPI=7
inherit eutils multilib desktop
MY_P="ut2004-lnxpatch${PV%.*}-2.tar.bz2"
MY_P=(ut2004-lnxpatch${PV%.*}-2.tar.bz2 ut2004-v${PV/./-}-linux-dedicated.7z)
MY_P=( ut2004-lnxpatch"${PV%.*}"-2.tar.bz2 ut2004-v"${PV/./-}"-linux-dedicated.7z )
DESCRIPTION="Editor's Choice Edition plus Mega Pack for the well-known first-person shooter"
HOMEPAGE="http://www.unrealtournament2004.com/"
SRC_URI="
......@@ -42,7 +42,7 @@ QA_PREBUILT="${dir:1}/System/ut2004-bin
src_prepare() {
default
cd "${S}"/System
cd "${S}"/System || die
# These files are owned by ut2004-bonuspack-mega
rm -f Manifest.in{i,t} Packages.md5 ucc-bin* || die
......@@ -53,7 +53,7 @@ src_prepare() {
rm -f ut2004-bin-linux-amd64 || die
fi
cd "${WORKDIR}"/ut2004-ucc-bin-09192008
cd "${WORKDIR}"/ut2004-ucc-bin-09192008 || die
if use amd64 ; then
mv -f ucc-bin-linux-amd64 "${S}"/System/ucc-bin || die
else
......@@ -63,12 +63,12 @@ src_prepare() {
src_install() {
insinto "${dir}"
doins -r *
doins -r ./*
fperms +x "${dir}"/System/ucc-bin
fperms +x "${dir}"/System/ut2004-bin
dosym "${ED}"/usr/$(get_libdir)/libopenal.so "${dir}"/System/openal.so
dosym "${ED}"/usr/$(get_libdir)/libSDL-1.2.so.0 "${dir}"/System/libSDL-1.2.so.0
dosym "${ED}/usr/$(get_libdir)"/libopenal.so "${dir}"/System/openal.so
dosym "${ED}/usr/$(get_libdir)"/libSDL-1.2.so.0 "${dir}"/System/libSDL-1.2.so.0
make_wrapper ut2004 ./ut2004 "${dir}"
......@@ -107,14 +107,14 @@ pkg_config() {
einfo "CD key format is: XXXXX-XXXXX-XXXXX-XXXXX"
while true ; do
einfo "Please enter your CD key:"
read CDKEY1
read -r CDKEY1
einfo "Please re-enter your CD key:"
read CDKEY2
read -r CDKEY2
if [[ -z ${CDKEY1} ]] || [[ -z ${CDKEY2} ]] ; then
echo "You entered a blank CD key. Try again."
else
if [[ ${CDKEY1} == ${CDKEY2} ]] ; then
echo "${CDKEY1}" | tr [:lower:] [:upper:] > "${dir}"/System/cdkey
if [[ ${CDKEY1} -eq ${CDKEY2} ]] ; then
echo "${CDKEY1}" | tr "[:lower:]" "[:upper:]" > "${dir}"/System/cdkey
einfo "Thank you!"
break
else
......
......@@ -41,8 +41,8 @@ DOCS=( AUTHORS CHANGELOG README.md )
src_configure() {
local myqmakeargs=(
PREFIX="${EPREFIX%/}/usr"
SYSTEMQTSA=1
"PREFIX=${EPREFIX%/}/usr"
"SYSTEMQTSA=1"
)
eqmake5 "${myqmakeargs[@]}"
}
......
......@@ -91,7 +91,7 @@ PDEPEND="
"
MULTILIB_CHOST_TOOLS=(
/usr/bin/gtk-query-immodules-3.0$(get_exeext)
/usr/bin/gtk-query-immodules-3.0"$(get_exeext)"
)
strip_builddir() {
......@@ -99,8 +99,8 @@ strip_builddir() {
shift
local directory=$1
shift
sed -e "s/^\(${rule} =.*\)${directory}\(.*\)$/\1\2/" -i $@ \
|| die "Could not strip director ${directory} from build."
sed -e 's/^\('"${rule}"' =.*\)'"${directory}"'\(.*\)$/\1\2/' -i "$@" \
|| die "Could not strip directory ${directory} from build."
}
src_prepare() {
......@@ -120,13 +120,13 @@ src_prepare() {
fi
# gtk-update-icon-cache is installed by dev-util/gtk-update-icon-cache
eapply "${FILESDIR}"/${PN}-3.22.2-update-icon-cache.patch
eapply "${FILESDIR}/${PN}"-3.22.2-update-icon-cache.patch
# Fix broken autotools logic
eapply "${FILESDIR}"/${PN}-3.22.20-libcloudproviders-automagic.patch
eapply "${FILESDIR}/${PN}"-3.22.20-libcloudproviders-automagic.patch
# get rid of gtk3-atk-bridge crap
eapply "${FILESDIR}"/${PN}-3.22.19.atk-bridge.patch
eapply "${FILESDIR}/${PN}"-3.22.19.atk-bridge.patch
eautoreconf
gnome2_src_prepare
......@@ -138,27 +138,27 @@ multilib_src_configure() {
# cloudprovider is not packaged in Gentoo
ECONF_SOURCE=${S} \
gnome2_src_configure \
$(use_enable aqua quartz-backend) \
$(use_enable broadway broadway-backend) \
$(use_enable cloudprint) \
$(use_enable colord) \
$(use_enable cups cups auto) \
$(multilib_native_use_enable introspection) \
$(use_enable wayland wayland-backend) \
$(use_enable X x11-backend) \
$(use_enable X xcomposite) \
$(use_enable X xdamage) \
$(use_enable X xfixes) \
$(use_enable X xkb) \
$(use_enable X xrandr) \
$(use_enable xinerama) \
$(use_with atk-bridge) \
"$(use_enable aqua quartz-backend)" \
"$(use_enable broadway broadway-backend)" \
"$(use_enable cloudprint)" \
"$(use_enable colord)" \
"$(use_enable cups cups auto)" \
"$(multilib_native_use_enable introspection)" \
"$(use_enable wayland wayland-backend)" \
"$(use_enable X x11-backend)" \
"$(use_enable X xcomposite)" \
"$(use_enable X xdamage)" \
"$(use_enable X xfixes)" \
"$(use_enable X xkb)" \
"$(use_enable X xrandr)" \
"$(use_enable xinerama)" \
"$(use_with atk-bridge)" \
--disable-cloudproviders \
--disable-mir-backend \
--disable-papi \
--enable-man \
--with-xml-catalog="${EPREFIX}"/etc/xml/catalog \
--libdir="${EPREFIX}"/usr/$(get_libdir) \
--libdir="${EPREFIX}/usr/$(get_libdir)" \
CUPS_CONFIG="${EPREFIX}/usr/bin/${CHOST}-cups-config"
# work-around gtk-doc out-of-source brokedness
......@@ -192,12 +192,13 @@ pkg_preinst() {
multilib_pkg_preinst() {
# Make immodules.cache belongs to gtk+ alone
local cache="usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache"
local cache
cache="usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache"
if [[ -e ${EROOT}${cache} ]]; then
cp "${EROOT}"${cache} "${ED}"/${cache} || die
if [[ -e "${EROOT}${cache}" ]]; then
cp "${EROOT}${cache}" "${ED}/${cache}" || die
else
touch "${ED}"/${cache} || die
touch "${ED}/${cache}" || die
fi
}
multilib_parallel_foreach_abi multilib_pkg_preinst
......@@ -224,7 +225,7 @@ pkg_postrm() {
if [[ -z ${REPLACED_BY_VERSION} ]]; then
multilib_pkg_postrm() {
rm -f "${EROOT}"usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache
rm -f "${EROOT}usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache"
}
multilib_foreach_abi multilib_pkg_postrm
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment