Meat giant Smithfield Foods Inc. has won a bidding war to buy a bankrupt Midwestern pork producer .