fixed patch rejection and added RPATH magic
Merge pull request #797 from qknight/smokegen-patch-fix

fixed patch rejection and added RPATH magic