# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 # Please report bugs/suggestions on: https://github.com/anyc/steam-overlay # or come to #gentoo-games in Libera Chat IRC inherit desktop linux-info prefix xdg DESCRIPTION="Installer, launcher and supplementary files for Valve's Steam client" HOMEPAGE="https://store.steampowered.com" # emerge -u dev-python/{requests,vdf} # python <>> Unpacking ${zip} to ${PWD}" # Valve's zip files have backslashes instead of forward slashes. bsdtar -cf - "@${DISTDIR}/${zip}" | gtar -xf - --xform='s:\\:/:g' || die done } src_prepare() { default sed "s#@@PVR@@#${PVR}#g" "${FILESDIR}"/steam-wrapper-r2.sh > steam-wrapper.sh || die hprefixify bin_steam.sh steam-wrapper.sh # Allow the desktop launcher to use wrappers from the PATH. sed -i "s:/usr/bin/::g" steam.desktop || die cd bootstrap || die # Reduce the size of the new bootstrap tarball. rm -r linux32/ ubuntu12_32/ ubuntu12_64/{fossilize_replay,steamwebhelper,streaming_client} || die # Some of Valve's zip files lack executable bits. scanelf -Rqi . | cut -d" " -f3 | xargs chmod a+x || die find -type f -exec awk '/^#!/ {print FILENAME} {nextfile}' {} + | xargs chmod a+x || die } src_compile() { cd bootstrap || die ebegin "Recreating bootstraplinux_ubuntu12_32.tar.xz for the 64-bit client" tar -Jcf "${S}"/bootstraplinux_ubuntu12_32.tar.xz * || die eend $? } src_install() { emake install-{appdata,bootstrap,icons} \ DESTDIR="${D}" PREFIX="${EPREFIX}/usr" newbin steam-wrapper.sh steam exeinto /usr/lib/steam doexe bin_steam.sh domenu steam.desktop insinto /usr/lib/steam doins "${FILESDIR}"/steam-non-gtar.patch dodoc README debian/changelog doman steam.6 } pkg_postinst() { xdg_pkg_postinst echo elog "Execute ${EPREFIX}/usr/bin/steam to download and install the actual" elog "client into your home folder. After installation, the script also" elog "starts the client from your home folder." echo ewarn "The Steam client and the games are _not_ controlled by Portage." ewarn "Updates are handled by the client itself." echo if ! use desktop-portal; then ewarn "You have disabled desktop-portal, which is not supported. An" ewarn "xdg-desktop-portal backend is needed for file pickers and other desktop" ewarn "components to work, e.g. adding a non-Steam game or new library folder." echo fi if ! has_version "gnome-extra/zenity"; then ewarn "Valve does not provide a xterm fallback for all calls of zenity." ewarn "Please install gnome-extra/zenity for full support." echo fi }