[ v2: It's x86_64, with an underscore, not x86-64, with a dash. ] [ v3: Fix a typo in a comment, pointed out by two friendly souls. ]
For historic reasons FreeBSD calls x86_64 by the name of amd64. And when building ports it uses a variable named ARCH to hold that value (or i386 for 32-bit). 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).
We could 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..bb4a6cfd10e 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 encounter amd64. + */ + if ( !strcmp(arch,"amd64") ) + arch = "x86_64"; so_dir = strmake( "$(dlldir)/%s-unix", arch ); pe_dir = strmake( "$(dlldir)/%s-windows", arch ); }