commit:     477015c0b557b557c8cd527b93fd5ba8d6b42000
Author:     Ronny (tastytea) Gutbrod <gentoo <AT> tastytea <DOT> de>
AuthorDate: Fri Jul 29 11:21:06 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jul 30 23:22:29 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=477015c0

x11-themes/gentoo-xcursors: fix blocked symlink installation

A directory was replaced by a symlink but that does not work due to
bug #834600.

Straight to stable since the broken ebuild landed in stable and the
package isn't compiling anything.

Closes: https://bugs.gentoo.org/861785
Co-developed-by: John Duncan
Signed-off-by: Ronny (tastytea) Gutbrod <gentoo <AT> tastytea.de>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../gentoo-xcursors-0.3.2-r3.ebuild                | 51 ++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/x11-themes/gentoo-xcursors/gentoo-xcursors-0.3.2-r3.ebuild 
b/x11-themes/gentoo-xcursors/gentoo-xcursors-0.3.2-r3.ebuild
new file mode 100644
index 000000000000..a891f268b288
--- /dev/null
+++ b/x11-themes/gentoo-xcursors/gentoo-xcursors-0.3.2-r3.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="A high quality set of animated mouse cursors"
+HOMEPAGE="https://schlomp.space/tastytea/gentoo-xcursors";
+SRC_URI="https://schlomp.space/tastytea/${PN}/archive/${PV}.tar.gz -> 
${P}.tar.gz"
+S="${WORKDIR}/${PN}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86"
+
+src_install() {
+       insinto /usr/share/icons
+       doins -r cursors/*
+
+       # Add symlinks in Gentoo-specific location for backwards compatibility, 
#848606
+       mkdir -p ${ED}/usr/share/cursors/xorg-x11 || die
+       cd ${ED}/usr/share/cursors/xorg-x11 || die
+       for cursorset in ../../icons/*; do
+               dosym ${cursorset} /usr/share/cursors/xorg-x11/${cursorset##*/}
+       done
+}
+
+pkg_preinst() {
+       # Needed until bug #834600 is solved
+       if [[ -n ${REPLACING_VERSIONS} ]] ; then
+               GENTOOCURSORS="${EROOT}/usr/share/cursors/xorg-x11"
+               if [[ -d "${GENTOOCURSORS}/gentoo" ]] ; then
+                       rm -r "${GENTOOCURSORS}/gentoo" || die
+               fi
+               if [[ -d "${GENTOOCURSORS}/gentoo-blue" ]] ; then
+                       rm -r "${GENTOOCURSORS}/gentoo-blue" || die
+               fi
+               if [[ -d "${GENTOOCURSORS}/gentoo-silver" ]] ; then
+                       rm -r "${GENTOOCURSORS}/gentoo-silver" || die
+               fi
+
+               if [[ -L "${GENTOOCURSORS}"/gentoo.backup.0000 ]]; then
+                       einfo "There are symlinks left from a previous failed 
upgrade."
+                       einfo "Remove ${GENTOOCURSORS}/gentoo*.backup.* 
manually to get rid of them."
+               fi
+       fi
+}
+
+pkg_postinst() {
+       einfo "To use this set of cursors, consult 
<https://wiki.gentoo.org/wiki/Cursor_themes>."
+       einfo "The three sets installed are gentoo, gentoo-silver and 
gentoo-blue."
+}

Reply via email to