dev-libs/mpfr: add preserve_old_lib, bug #642316
authorAnthony G. Basile <blueness@gentoo.org>
Tue, 26 Dec 2017 19:24:33 +0000 (14:24 -0500)
committerAnthony G. Basile <blueness@gentoo.org>
Tue, 26 Dec 2017 19:25:45 +0000 (14:25 -0500)
For people that have FEATURES=-preserve-libs, we don't want the toolchain
to break as the so name is bumped from libmpfr.so.4 to libmpfr.so.6.

Package-Manager: Portage-2.3.13, Repoman-2.3.3

dev-libs/mpfr/mpfr-4.0.0-r1.ebuild [moved from dev-libs/mpfr/mpfr-4.0.0.ebuild with 90% similarity]

similarity index 90%
rename from dev-libs/mpfr/mpfr-4.0.0.ebuild
rename to dev-libs/mpfr/mpfr-4.0.0-r1.ebuild
index d74928dff9025380aa429556d7024f3490dd75d2..fa5e936f49913a25f41020e400356fd808265b56 100644 (file)
@@ -50,3 +50,11 @@ multilib_src_install_all() {
        rm "${ED}"/usr/share/doc/"${P}"/COPYING*
        use static-libs || find "${ED}"/usr -name '*.la' -delete
 }
+
+pkg_preinst() {
+       preserve_old_lib /usr/$(get_libdir)/libmpfr$(get_libname 4)
+}
+
+pkg_postinst() {
+       preserve_old_lib_notify /usr/$(get_libdir)/libmpfr$(get_libname 4)
+}