summaryrefslogblamecommitdiffstats
path: root/xorg-extras/libpthread-stubs/UP_TRIGGERS
blob: 687a4b2a99cbd48e9be9286bfe45564b552dc2f1 (plain) (tree)
1
2
3
4
5
6
7
8
9


                                                              

                                                       
                                                 


                                                                                


                                                                               

                                                          


                                              



                                                              
                                                                            



                                         
  
 
. "$GRIMOIRE"/FUNCTIONS
# Not using the normal depender check as there is indirect use
# of the fake lib that enters libtool files.
if spell_ok $SPELL; then
  local OLD_SPELL_VERSION="$(installed_version $SPELL)"
  if is_version_less $OLD_SPELL_VERSION 0.4; then
    message "This is an ABI incompatible update of libpthread-stubs..."
    message "Determining which spells need to be recast, this may take a while."

    # There are spells wich do not link to the .so, but still have the .la
    # in dependencies in their .la file (giflib), inherited. So first check for
    # that and also for actual linkage.
    for other_spell in $(gaze installed | cut -d: -f1); do
      if gaze install $other_spell \
	 | grep '\.la$' \
	 | xargs grep -q 'libpthread-stubs' ||
	 gaze install $other_spell \
         | xargs file -e apptype -e ascii -e compress -e tar \
         | grep '\<ELF\>.*\<dynamically linked\>' \
         | cut -d: -f1 \
         | xargs readelf -d 2> /dev/null \
         | grep -q 'NEEDED)\s*Shared library: \[libpthread-stubs.so.0'; then
        up_trigger $other_spell cast_self
      fi
    done
  fi
fi