ports/textproc/source-highlight/files/patch-tests_Makefile.in
Matthias Andree 160df1b4d1 textproc/source-highlight: fix "make test" or -DWITH_TESTING build
The normal build works for me, but "make test",
or poudriere-devel builds on FreeBSD 14.0-RELEASE amd64 under
WITH_TESTING=yes, fail for me in the test phase.

Fix two compiler bugs that LLVM/clang asserts:
* lib/tests/stdboosterror.h poses a most vexing parse,
  resolve by switching to C++11 uniform initialization
  (GCC 12 or 13 disambiguates by resolving to variable init.)
* lib/tests/test_wordtokenizer_main.cpp sees LLVM/clang complain
  about unresolved operator<< (needs to be defined earlier,
  so move the declaration up) (couldn't test with GCC)

Serialize tests/Makefile:
* tests/Makefile* causes "No such file or directory" errors when
  running with MAKE_JOBS, so patch a .NOTPARALLEL into the Makefile.

Approved by:	portmgr@ (blanket just-fix-it approval for failing build)
2024-04-23 19:35:33 +02:00

20 lines
1.2 KiB
Text

--- tests/Makefile.in.orig 2024-04-23 17:29:34 UTC
+++ tests/Makefile.in
@@ -14,6 +14,8 @@
@SET_MAKE@
+.NOTPARALLEL: # some of the java-related tests can't run in parallel
+
# Copyright (C) 1999-2008 Lorenzo Bettini <http://www.lorenzobettini.it>
#
# This file is free software; as a special exception the author gives
@@ -2240,7 +2242,7 @@ check_defaults:
@NO_CTAGS_FALSE@ sed -itesttmp -e 's/\_tmp\.h/\.h/g' test_refs_tmp.h.html test_refs_tmp.cpp.html
@NO_CTAGS_FALSE@ sed -itesttmp -e 's/\_tmp\.cpp/\.cpp/g' test_refs_tmp.h.html test_refs_tmp.cpp.html
@NO_CTAGS_FALSE@ $(CPP2LATEX_WREFS) -i $(srcdir)/test.h -o test_ref.out.tex $(CTAGS_COMMAND_TMP)
-@NO_CTAGS_FALSE@ sed -itesttmp -r 's/([.\/[:alnum:]]+)\/(test\.h\:[[:alnum:]\._]+)/\2/g' test_ref.out.tex # eliminate leading paths
+@NO_CTAGS_FALSE@ sed -itesttmp -E 's/([.\/[:alnum:]]+)\/(test\.h\:[[:alnum:]\._]+)/\2/g' test_ref.out.tex # eliminate leading paths
@NO_CTAGS_FALSE@ $(CPP2LATEX_WREFSPOST) -i $(srcdir)/test.h -o test_ref_post.out.tex $(CTAGS_COMMAND_TMP)
@NO_CTAGS_FALSE@ sed -itesttmp -f $(srcdir)/erasedir3.sed test_ref_post.out.tex # eliminate leading paths
@NO_CTAGS_FALSE@ $(CPP2TEXINFO_WREFS) -i $(srcdir)/test.h -o test_ref.out.texinfo $(CTAGS_COMMAND_TMP)