Skip to content

Commit

Permalink
Detect TOPCOM package on Arch Linux
Browse files Browse the repository at this point in the history
It prepends "topcom-" to just some of the binaries.  This means we
need to check two binaries (one with the prefix and one without) to
distinguish the Arch package from the Debian one (which prepends
"topcom-" to everything).
  • Loading branch information
d-torrance committed Oct 26, 2024
1 parent 4cf299d commit 1064658
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions M2/Macaulay2/packages/Topcom.m2
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@ topcomPoints Matrix := opts -> (A) -> (
callTopcom = method()
callTopcom(String, List) := (command, inputs) -> (
if topcomProgram === null then
topcomProgram = findProgram("topcom","cube 3", Prefix => {
topcomProgram = findProgram("topcom", {"cube 3", "B_A 3"}, Prefix => {
(".*", "topcom-"), -- debian
("^(cross|cube|cyclic|hypersimplex|lattice)$", "TOPCOM-"), --fedora
("^cube$", "topcom_")}); --gentoo
("^cube$", "topcom_"), --gentoo
("^(binomial|cross|cube|cyclic|lattice)$", "topcom-") --arch
});
filename := temporaryFileName();
infile := filename|".in";
-- now create the output file
Expand Down

0 comments on commit 1064658

Please sign in to comment.