there are many ways:
-make a custom roar ability and modifi it to do nothing. if a unit is close enough to the building, use triggers to add the enter abilty, else remove the ability.
a unit starts the effect of an ability
ability being cast equal to roar
order 'your building' to natural devour casting unit
(no need to check range because nothing will happen when the casting unit is further than the casting range of devour)
-OR-
-give the building the abilty to buy a free unit (like travens on melee maps where you can buy heroes or hire units). Lets name the free unit 'enter' and go to triggers.
If a unit comes within 100 range of your building.
Entering unit equals to 'enter'
Remove entering unit from the game.
Pick every unit within 100 range of your building and do actions
order 'your building' to natural devour picked unit.
-OR-
Use a target ability. Lets take a modified Acid bomb and call it 'enter'; your acid bomb or enter has 100 cast range
A unit starts the effect of an ability
Ability being cast equal to 'enter'
order (target of ability being cast) to natural devour (casting unit)