Firstly, there's no need to call gnome2_pkg_preinst() explicitly
as it'll be called due to ebuild inheriting gnome2 eclass.
Secondly, setting GNOME2_ECLASS_ICONS variable is so EAPI5 (read
obsolete), so drop it as gnome2_pkg_preinst() handles that.
Thirdly, removing files in pkg_preinst() is undesirable.
Therefore, drop the code that handles 'if use gui', and move the
code that handles the other case into src_install().
Signed-off-by: Michal Privoznik <michal.privoznik@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/39532
Signed-off-by: Sam James <sam@gentoo.org>