Spanish, Portuguese and Catalan variant of the italian Allegri [q.v.], specifically from the noun for "cheerfulness".
Note: the spanish form is stressed: AlegrÃa.