Have had pigs a few times, as Woody Girl says, electric is the way forward. I have a pig pen of stock fence approx 12m by 12m. Nice mature trees in there for shade, and a live wire about 200mm off the floor inside the stock fence.
Have seen in the states they run them with just a live wire...