Give him a more interesting place to hang out in the yard.
Or retrain him to potty in a particular spot, as far from the house as possible.
Or use a repellent (which doesn't always work, but worth a try).
Or put a barrier up (like a fence or something).