From b68d0711b501f064b8d2d449ab08725cdbcdcf7c Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Sat, 28 Dec 2024 16:53:35 -0500 Subject: [PATCH] open-mpi: avoid conflict with `putty` --- Formula/o/open-mpi.rb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Formula/o/open-mpi.rb b/Formula/o/open-mpi.rb index fe62abc60eab01..90314176f7297e 100644 --- a/Formula/o/open-mpi.rb +++ b/Formula/o/open-mpi.rb @@ -82,10 +82,19 @@ def install # Avoid references to cellar paths. inreplace (lib/"pkgconfig").glob("*.pc"), prefix, opt_prefix, audit_result: false + + # Avoid conflict with PuTTY similar to Arch Linux[^1]. May be able to remove with PRRTE v4[^2] + # + # [^1]: https://gitlab.archlinux.org/archlinux/packaging/packages/prrte/-/blob/main/PKGBUILD?ref_type=heads#L98 + # [^2]: https://github.com/openpmix/prrte/issues/1836 + (libexec/"bin").install bin/"pterm" + (libexec/"man/man1").install man1/"pterm.1" + bin.install_symlink libexec/"bin/pterm" => "prrte-pterm" + man1.install_symlink libexec/"man/man1/pterm.1" => "prrte-pterm.1" end test do - (testpath/"hello.c").write <<~C + (testpath/"hello.c").write <<~'C' #include #include @@ -97,7 +106,7 @@ def install MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Get_processor_name(name, &nameLen); - printf("[%d/%d] Hello, world! My name is %s.\\n", rank, size, name); + printf("[%d/%d] Hello, world! My name is %s.\n", rank, size, name); MPI_Finalize(); return 0; }