+ (add-after 'unpack 'fix-build
+ ;; XXX: Build process complains about missing "config.h"
+ ;; and "primitives.h" files.
+ (lambda _
+ (substitute* (find-files "." "\\.in$")
+ (("#include <primitives.h>") "#include \"primitives.h\""))
+ (invoke "touch" "prc/config.h")))
+ (add-after 'unpack 'move-info-location
+ ;; Build process installs info file in the unusual
+ ;; "%out/share/info/asymptote/" location. Move it to
+ ;; "%out/share/info/" so it appears in the top-level directory.
+ (lambda _
+ (substitute* "doc/png/Makefile.in"
+ (("(\\$\\(infodir\\))/asymptote" _ infodir) infodir))
+ (substitute* "doc/asymptote.texi"
+ (("asymptote/asymptote") "asymptote"))
+ #t))