gnu: sajson: Fix build. Prevent the example from calling fclose multiple times. * gnu/packages/cpp.scm (sajson)[arguments]: Add 'fix-example phase. Change-Id: Icec4ef43fe5835810411a5a5681d552c5744aae6 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
1 files changed, 5 insertions(+), 0 deletions(-) M gnu/packages/cpp.scm
M gnu/packages/cpp.scm => gnu/packages/cpp.scm +5 -0
@@ 3562,6 3562,11 @@ different floating point sizes and complex transformations.") (string-append #$(this-package-native-input "unittest-cpp") "/lib") "', LIBS=['UnitTest++'])"))))) (add-after 'unpack 'fix-example (lambda _ (substitute* "example/main.cpp" (("fclose\\(file\\);") "if (file != nullptr) {fclose(file); file = nullptr;}")))) (replace 'build (lambda* (#:key tests? #:allow-other-keys #:rest args) (when tests?