app-emacs/pariemacs: accept pari.cfg or pari.cfg.bz2
authorAndrey Grozin <grozin@gentoo.org>
Sun, 14 Jan 2018 00:22:10 +0000 (07:22 +0700)
committerAndrey Grozin <grozin@gentoo.org>
Sun, 14 Jan 2018 00:22:10 +0000 (07:22 +0700)
pari-2.3.5 installs pari.cfg, other versions - pari.cfg.bz2
Closes: https://bugs.gentoo.org/644472
Package-Manager: Portage-2.3.19, Repoman-2.3.6

app-emacs/pariemacs/pariemacs-3.14.ebuild

index 308e790bebef97ab2b1d48579c5700f74ae1d0f7..aa608c9b7eaa5556e3c209173b1a8a9d80c407f5 100644 (file)
@@ -23,8 +23,13 @@ DOCS="README CHANGES"
 src_prepare() {
        eapply "${FILESDIR}"/${P}-makefile.patch
        eapply_user
-       cp /usr/share/doc/pari-*/pari.cfg.bz2 . || die "pari.cfg.bz2 not found"
-       bunzip2 pari.cfg.bz2
+       if [ -f /usr/share/doc/pari-*/pari.cfg ]; then
+               cp /usr/share/doc/pari-*/pari.cfg .
+       elif [ -f /usr/share/doc/pari-*/pari.cfg.bz2 ]; then
+               cp /usr/share/doc/pari-*/pari.cfg.bz2 .
+               bunzip2 pari.cfg.bz2
+       else die "pari.cfg not found"
+       fi
 }
 
 src_compile() {