Sort compulsory and optional build depends.