commit:     550be1b9278fdbd713c29e6dff6833dc2ab4fb18
Author:     Hans de Graaff <hans <AT> degraaff <DOT> org>
AuthorDate: Mon May 30 16:57:53 2016 +0000
Commit:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Sun Jul 23 07:35:16 2017 +0000
URL:        https://gitweb.gentoo.org/proj/ruby-scripts.git/commit/?id=550be1b9

Remove legacy libruby.so link

Our ebuilds for Ruby 1.8 and older versions installed an unversioned
link called libruby.so. This method was flawed because the shared
library is not ABI compatible and thus cannot be managed by switching a
shared link. Later versions of Ruby ebuilds no longer install this link,
but on old systems a dangling link may still be present. This can lead
to problems with the cmake recipes for Ruby, bug 582672.

This patch removes the link when removing symlinks as part of an eselect
change.

 eselect-ruby/ruby.eselect | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/eselect-ruby/ruby.eselect b/eselect-ruby/ruby.eselect
index efead1e..1a7f059 100644
--- a/eselect-ruby/ruby.eselect
+++ b/eselect-ruby/ruby.eselect
@@ -8,6 +8,7 @@ SVN_DATE="20161226"
 VERSION="20161226"
 
 bindir=/usr/bin
+libdir=/usr/lib
 man1dir=/usr/share/man/man1
 
 find_targets() {
@@ -43,6 +44,13 @@ check_target() {
 remove_symlinks() {
        rm -f ${EROOT}${bindir}/{ruby,gem,irb,erb,ri,rdoc,testrb} && \
        rm -f ${EROOT}${man1dir}/{ruby,irb,erb,ri}.1*
+
+       # Remove unversioned legacy link set by ruby 1.8 and earlier
+       # see bug 582672
+       local link="${EROOT}${libdir}/libruby.so"
+       if [[ -e ${link} ]]; then
+               rm -f ${link}
+       fi
 }
 
 create_man_links() {

Reply via email to