the patch in that upstream bug is bogus, it will fail on all arches except amd64. It should not be applied in debian in that way.
The canonical way to solve this problem (if you don't want to use pkg-config) is to try to compile and link to figure out if the library is usable. e.g. c = distutils.ccompiler.new_compiler() c.has_function("lzo_version_date", libraries=("lzo2",) (this is similar to AC_TRY_COMPILE in autotools) the debian can also just disable the check as the package should know exactly what is available during the build and runtime. You will want to to fail when something goes wrong with the dependencies and not hide the failure in some log message. the LDFLAGS setting is not necessary, the toolchain is aware of the multiarch paths already.
signature.asc
Description: OpenPGP digital signature