# Copyright 2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 DESCRIPTION="Manage active Wine slots and variants" HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Wine" SRC_URI="https://gitweb.gentoo.org/proj/eselect-wine.git/snapshot/${P}.tar.bz2" LICENSE="GPL-2+" SLOT="0" KEYWORDS="amd64 x86" RDEPEND="app-admin/eselect" pkg_pretend() { # /usr/bin/wine and /usr/include/wine are removed by pkg_preinst's unset, # but portage currently checks collisions and errors out /before/ preinst if has_version '/dev/null # some rare man dirs were created by old eselect, cleanup if now empty rmdir "${EROOT}"/usr/share/man/{de,fr,pl}.UTF-8{/man1,} 2>/dev/null fi # lacking QA_BROKEN_SYMLINK, and rather avoid live /usr changes wrt # bug #632576, nor create "owned" placeholders that will be clobbered [[ -e ${EROOT}/etc/eselect/wine/bin/wine ]] || eqawarn "QA Note: broken symlinks QA is normal on first merge, targets created after" } pkg_postinst() { eselect wine update --if-unset || die rm -f "${EROOT}"/etc/eselect/wine/eselect-wine-migration || die # see preinst if [[ ! ${REPLACING_VERSIONS##* } ]] || ver_test ${REPLACING_VERSIONS##* } -lt 2; then elog if [[ ${REPLACING_VERSIONS} ]]; then elog "${PN} changed a bit, suggest reviewing 'eselect wine help' (and list)." elog "Note: if seen bin/wine or include/wine merge collisions, they are harmless." fi elog "Please run '. ${EROOT}/etc/profile' to update PATH in current shells." fi } pkg_prerm() { [[ ${REPLACED_BY_VERSION} ]] || eselect wine update --reset # no die }