Does anybody know how diffutils works on freebsd?

I don’t have access to a freebsd machine so I can’t figure out how to do it. Specifically, i’d like to know how to update the conf-diffutils package so it will install GNU diff on freeBSD. Anybody have any idea?

Have you tried adding this to the depexts list?

  ["diffutils"] {os-distribution = "freebsd"}

It looks to me like that’s the way to get depexts to run pkg install diffutils.

If that’s happening, but you’re not finding the tools in your path, then it might be this:

Note that this port will install these utilities with a 'g' prefix,
for example gdiff, gdiff3, gcmp, but the texinfo documentation
will refer to these utilities without the 'g' prefix.

…which is the convention for things like this on FreeBSD (and other xBSD distributions that have their own versions of these POSIX tools).

1 Like

Boom! I tried the first part, but not the second. This still isn’t great, b/c depending on the OS version, I’ll have to use a different diff command. I wonder if there’s a way to get opam to spit out the os and os-distribution variables. Sure, I guess one can infer it, but much better to get whatever opam knows.

Thank you for this pointer!

ETA: o.i.c. opam var os will get me what I need. OK, I think I know what to do. Thank you again!

1 Like

Also note that GNU make is gmake on BSD to distinguish it from the vastly superior make used on BSD.

1 Like