On Fri, Sep 17, 2021 at 1:15 AM Gerald Pfeifer gerald@pfeifer.com wrote:
For historic reasons FreeBSD call x86-64 by the name of amd64. And when building ports it uses a variable named ARCH to hold that value (or i386 for x86). Wine uses a variable by that name, too, which gets overriden by the one coming from the system, leading to Wine not finding some of its files (since "x86-64" is hardcoded elsewhere).
I was thinking to rename Wine's variable from ARCH to WINEARCH, alas that name is already taken for a different purpose.
So best have makedep accept amd64 as a synonym for x86-64 and convert the former to the latter.
Signed-off-by: Gerald Pfeifer gerald@pfeifer.com
tools/makedep.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/tools/makedep.c b/tools/makedep.c index 59857762edd..ed7a58ed1f9 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -4446,6 +4446,13 @@ int main( int argc, char *argv[] ) if (!man_ext) man_ext = "3w"; if (arch) {
/* For historic reasons FreeBSD calls x86-64 by the name of amd64
* and features a variable ARCH with that value in the environment
* when building ports. This breaks Wine in interesting ways, so
* revert to the industry standard name when we enouncter amd64.
Minor typo here, should be 'encounter'