Clothing maker Warnaco Group Inc is to buy surfing apparel brand Ocean Pacific Apparel Corp for $40 million.