undefined depreacted to fool CRAN check
added patchfile to add undefining of deprecated