signalbackup-tools: 20241220 -> 20250106 (#371523)
[NixPkgs.git] / pkgs / servers / x11 / xorg / imake.patch
blobe8ce66cdee002c5fd597f6932a49b1fb83c2c2a2
1 Disable imake autodetection for:
2 - LinuxDistribution to avoid injection of /usr paths
3 - gcc to avoid use uf /usr/bin/gcc
5 https://github.com/NixOS/nixpkgs/issues/135337
6 --- a/imake.c
7 +++ b/imake.c
8 @@ -1065,6 +1065,7 @@ get_distrib(FILE *inFile)
9 fprintf (inFile, "%s\n", "#define LinuxWare 11");
10 fprintf (inFile, "%s\n", "#define LinuxYggdrasil 12");
12 +#if 0 /* disable system autodetection. Fall through to LinuxUnknown. */
13 # ifdef CROSSCOMPILE
14 if (CrossCompiling) {
15 fprintf (inFile, "%s\n",
16 @@ -1090,6 +1091,7 @@ get_distrib(FILE *inFile)
17 * at the content of /etc/debian_version */
18 return;
20 +#endif
21 /* what's the definitive way to tell what any particular distribution is? */
23 fprintf (inFile, "%s\n", "#define DefaultLinuxDistribution LinuxUnknown");
24 @@ -1337,6 +1339,7 @@ get_gcc_version(FILE *inFile, char *name)
25 static boolean
26 get_gcc(char *cmd)
28 +#if 0 /* disable gcc autodetection. Fall through to explicitly set. */
29 struct stat sb;
30 static const char* gcc_path[] = {
31 #if defined(linux) || \
32 @@ -1385,6 +1388,9 @@ get_gcc(char *cmd)
35 return FALSE;
36 +#endif
37 + strcpy (cmd, IMAKE_COMPILETIME_CPP);
38 + return TRUE;
41 #ifdef CROSSCOMPILE