commit:     442db4d45a15b497cf43e75e3ad38ae90aaaabbc
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Oct  4 09:08:21 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Oct  4 09:08:59 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=442db4d4

app-text/ghostscript-gpl: fix version used for /usr/share/poppler/* symlink

Sometimes it deviates from the actual tarball & tag version, apparently.

Closes: https://bugs.gentoo.org/844115
Thanks-to: Guillaume Ayoub <guillaume <AT> yabz.fr>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...stscript-gpl-10.0.0.ebuild => ghostscript-gpl-10.0.0-r1.ebuild} | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/app-text/ghostscript-gpl/ghostscript-gpl-10.0.0.ebuild 
b/app-text/ghostscript-gpl/ghostscript-gpl-10.0.0-r1.ebuild
similarity index 94%
rename from app-text/ghostscript-gpl/ghostscript-gpl-10.0.0.ebuild
rename to app-text/ghostscript-gpl/ghostscript-gpl-10.0.0-r1.ebuild
index 131bd53e91c0..6a6286bd995e 100644
--- a/app-text/ghostscript-gpl/ghostscript-gpl-10.0.0.ebuild
+++ b/app-text/ghostscript-gpl/ghostscript-gpl-10.0.0-r1.ebuild
@@ -169,8 +169,13 @@ src_install() {
        cd "${S}/ijs" || die
        emake DESTDIR="${D}" install
 
+       # Sometimes the upstream versioning deviates from the tarball(!)
+       # bug #844115#c32
+       local my_gs_version=$(find "${ED}"/usr/share/ghostscript/ -maxdepth 1 
-mindepth 1 -type d || die)
+       my_gs_version=${my_gs_version##*/}
+
        # Install the CMaps from poppler-data properly, bug #409361
-       dosym -r /usr/share/poppler/cMaps 
/usr/share/ghostscript/${PV}/Resource/CMap
+       dosym -r /usr/share/poppler/cMaps 
/usr/share/ghostscript/${my_gs_version}/Resource/CMap
 
        if ! use static-libs; then
                find "${ED}" -name '*.la' -delete || die

Reply via email to