# up_trigger stuff that still uses old giflib so it's not broken afterwards

if spell_ok  giflib; then
  message "Switching from giflib to giflib5 requires recompiling spells using giflib"
  message "Figuring out what spells need to be recast, this may take a while."
  for each in $(show_up_depends giflib); do
    if gaze install $each | xargs readelf -d 2> /dev/null |
       grep -q "NEEDED.*libgif"; then
         up_trigger $each cast_self
    fi
  done
fi
