mirror of
https://git.freebsd.org/ports.git
synced 2025-06-06 13:20:32 -04:00
Add license information to devel/imake. [1] As per discussions with portmgr, there is no need to add the different varieties of MIT license, since they are so similar. Just note that this is MIT licensed. PR: 223255 [1] (based on) Submitted by: Yasuhiro KIMURA [1] Sponsored by: B3 Init (zeising)
50 lines
1.1 KiB
C
50 lines
1.1 KiB
C
--- imake.c.orig 2013-08-17 10:11:50 UTC
|
|
+++ imake.c
|
|
@@ -531,6 +531,14 @@ init(void)
|
|
AddCppArg(p);
|
|
}
|
|
}
|
|
+ if ((p = getenv("IMAKECPPFLAGS"))) {
|
|
+ AddCppArg(p);
|
|
+ for (; *p; p++)
|
|
+ if (*p == ' ') {
|
|
+ *p++ = '\0';
|
|
+ AddCppArg(p);
|
|
+ }
|
|
+ }
|
|
if ((p = getenv("IMAKECPP")))
|
|
cpp = p;
|
|
if ((p = getenv("IMAKEMAKE")))
|
|
@@ -1142,29 +1150,17 @@ get_binary_format(FILE *inFile)
|
|
int mib[2];
|
|
size_t len;
|
|
int osrel = 0;
|
|
- FILE *objprog = NULL;
|
|
int iself = 0;
|
|
- char buf[10];
|
|
- char cmd[PATH_MAX];
|
|
|
|
mib[0] = CTL_KERN;
|
|
mib[1] = KERN_OSRELDATE;
|
|
len = sizeof(osrel);
|
|
sysctl(mib, 2, &osrel, &len, NULL, 0);
|
|
- if (CrossCompiling) {
|
|
- strcpy (cmd, CrossCompileDir);
|
|
- strcat (cmd, "/");
|
|
- strcat (cmd,"objformat");
|
|
- } else
|
|
- strcpy (cmd, "objformat");
|
|
|
|
- if (osrel >= 300004 &&
|
|
- (objprog = popen(cmd, "r")) != NULL &&
|
|
- fgets(buf, sizeof(buf), objprog) != NULL &&
|
|
- strncmp(buf, "elf", 3) == 0)
|
|
+ if (osrel < 300004)
|
|
+ iself = 0;
|
|
+ else
|
|
iself = 1;
|
|
- if (objprog)
|
|
- pclose(objprog);
|
|
|
|
fprintf(inFile, "#define DefaultToElfFormat %s\n", iself ? "YES" : "NO");
|
|
}
|