apply packaging patches to debug build