My first attempt would be to see which shared library all those symbols ended up in. Sometimes (it depends on the processing power of your computer) you can do a simple text-based search in your library directory for e.g. DrawSetFillPatternURL to figure out which library it is.
Once you know the library name, try appending it as a linker flag to the koffice/filters/chalk/gmagick/Makefile.am LDFLAGS string; e.g if you found libfoo.so.1.0.0 contains the symbol then you would append -lfoo
I want to verify I am patching the file correctly. The library with the symbols is /usr/lib/libMagickWand.so.3.0.0.
Do I append like this?:
-llib/MagickWand
Or this?:
-lMagickWand
Darrell