Logged In: YES
user_id=282107

I don't understand what you mean.
What is exactly the problem?
Why would the patch script need to set LDFLAGS, CPPFLAGS or
CFLAGS?

Anyway, this should not be a problem anymore, since the
latest versions don't use libusb explicitly but instead rely
on the built-in USB support from the sane framework.