Slavek, hi, your patch was malformed — sorry, noticed it just now...
It breaks build of tdebase if tdelibs was built without libr/-DWITH_ELFICON=OFF.
Build log with error:
https://bpaste.net/show/5e4c40ea2dc5
You shouldn't use __internal_find_program here. Proposed patch in the
attach. Also a small fix to error syntax...