summaryrefslogtreecommitdiff
path: root/devel/imake
diff options
context:
space:
mode:
authordholland <dholland>2016-09-04 18:44:06 +0000
committerdholland <dholland>2016-09-04 18:44:06 +0000
commit96981fa68548d5282483be6b292d77545f98c7df (patch)
treed7b2b156dee60f5baaceb58cf3c71930d92e01fa /devel/imake
parent539c851da1736051389f879ac6b009c3208f3ab4 (diff)
downloadpkgsrc-96981fa68548d5282483be6b292d77545f98c7df.tar.gz
Beat some sense in, to make it easier to debug build failures.
- Generate all files into the current (build) directory, not /tmp. - Do not delete any of the temporary files, to allow analysis after build failure. - Log the command lines executed. - Warn if scrubbing the Imakefile to alert the user to check if that broke it. This currently does not capture the munging imake does on the output from cpp, as that is disgustingly done in place and changing that would require more extensive hacking. However, it's now readily possible to rerun the cpp command directly for diagnostic purposes; the previously-secret file that imake uses to start the cpp invocation is now left in .imake.start.c. PKGREVISION -> 1.
Diffstat (limited to 'devel/imake')
-rw-r--r--devel/imake/Makefile3
-rw-r--r--devel/imake/distinfo4
-rw-r--r--devel/imake/patches/patch-imake.c106
3 files changed, 106 insertions, 7 deletions
diff --git a/devel/imake/Makefile b/devel/imake/Makefile
index 9fb0be9b662..5d5e360532b 100644
--- a/devel/imake/Makefile
+++ b/devel/imake/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.21 2014/05/21 21:10:54 wiz Exp $
+# $NetBSD: Makefile,v 1.22 2016/09/04 18:44:06 dholland Exp $
DISTNAME= imake-1.0.7
+PKGREVISION= 1
CATEGORIES= x11 devel
MASTER_SITES= ${MASTER_SITE_XORG:=util/}
EXTRACT_SUFX= .tar.bz2
diff --git a/devel/imake/distinfo b/devel/imake/distinfo
index 5e68184fc1e..a7ac08db41d 100644
--- a/devel/imake/distinfo
+++ b/devel/imake/distinfo
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.12 2015/11/03 03:27:35 agc Exp $
+$NetBSD: distinfo,v 1.13 2016/09/04 18:44:06 dholland Exp $
SHA1 (imake-1.0.7.tar.bz2) = 52e236776133f217d438622034b8603d201a6ec5
RMD160 (imake-1.0.7.tar.bz2) = 7a8d7b830463c1c429a8ad8349324e607ea255fb
SHA512 (imake-1.0.7.tar.bz2) = b3527c8fead25c6e093e1fe4a39e60ff210212dcd323e206505b9e872a3f36d9db85f85cab5a6f0fa914fa5c558ef54b499b2b13ccd66739223e4e72ef805d08
Size (imake-1.0.7.tar.bz2) = 156543 bytes
-SHA1 (patch-imake.c) = ae55d0ed6321c1723c3e8cbbca88611a42bf15bf
+SHA1 (patch-imake.c) = 7f8511f147d90cede0b5dfcb8dda3d7542891ae0
SHA1 (patch-imakemdep.h) = a8aa1adff501da7eb22d695ff93f0517ce146269
diff --git a/devel/imake/patches/patch-imake.c b/devel/imake/patches/patch-imake.c
index de7e4fc95f9..3bdb4f88222 100644
--- a/devel/imake/patches/patch-imake.c
+++ b/devel/imake/patches/patch-imake.c
@@ -1,8 +1,89 @@
-$NetBSD: patch-imake.c,v 1.5 2014/03/14 21:14:28 asau Exp $
+$NetBSD: patch-imake.c,v 1.6 2016/09/04 18:44:06 dholland Exp $
---- imake.c.orig 2013-07-23 04:53:04.000000000 +0000
+Beat some sense in.
+
+ - Generate all files into the current (build) directory, not /tmp.
+ (hunks 1-2)
+
+ - Do not delete any of the temporary files, to allow analysis after
+ build failure. (hunks 3-4, first part of 8)
+
+ - Log the command lines executed. (hunk 5)
+
+ - Warn if scrubbing the Imakefile to alert the user to check if that
+ broke it (second part of hunk 8)
+
+Also,
+
+ - Force use of just "gcc" for pkgsrc, so as to not bypass the
+ wrappers (hunk 7)
+
+ - Force ELF for freebsd versions >= 6 (hunk 6)
+
+
+--- imake.c.orig 2013-08-17 10:11:50.000000000 +0000
+++ imake.c
-@@ -1158,7 +1158,9 @@ get_binary_format(FILE *inFile)
+@@ -303,9 +303,9 @@ void KludgeOutputLine(char **), KludgeRe
+ const char *cpp = NULL;
+
+ const char *tmpMakefile;
+-const char *tmpMakefileTemplate = "/tmp/Imf.XXXXXX";
++const char *tmpMakefileTemplate = ".imake.Makefile.XXXXXX";
+ const char *tmpImakefile;
+-const char *tmpImakefileTemplate = "/tmp/IIf.XXXXXX";
++const char *tmpImakefileTemplate = ".imake.Imakefile.XXXXXX";
+ const char *make_argv[ ARGUMENTS ] = {
+ #ifdef WIN32
+ "nmake"
+@@ -319,7 +319,7 @@ int cpp_argindex;
+ const char *Imakefile = NULL;
+ const char *Makefile = "Makefile";
+ const char *Template = "Imake.tmpl";
+-const char *ImakefileC = "Imakefile.c";
++const char *ImakefileC = ".imake.start.c";
+ boolean haveImakefileC = FALSE;
+ const char *cleanedImakefile = NULL;
+ const char *program;
+@@ -412,7 +412,8 @@ main(int argc, char *argv[])
+ fd = mkstemp(tmpMakefileName);
+ if (fd == -1 || (tmpfd = fdopen(fd, "w+")) == NULL) {
+ if (fd != -1) {
+- unlink(tmpMakefileName); close(fd);
++ /*unlink(tmpMakefileName);*/
++ close(fd);
+ }
+ LogFatal("Cannot create temporary file %s.", tmpMakefileName);
+ }
+@@ -454,12 +455,14 @@ showit(FILE *fd)
+ void
+ wrapup(void)
+ {
++#if 0
+ if (tmpMakefile != Makefile)
+ unlink(tmpMakefile);
+ if (cleanedImakefile && cleanedImakefile != Imakefile)
+ unlink(cleanedImakefile);
+ if (haveImakefileC)
+ unlink(ImakefileC);
++#endif
+ }
+
+ #ifdef SIGNALRETURNSINT
+@@ -773,6 +776,13 @@ doit(FILE *outfd, const char *cmd, const
+ {
+ int pid;
+ waitType status;
++ unsigned i;
++
++ fprintf(stderr, "imake: executing:");
++ for (i=0; argv[i]; i++) {
++ fprintf(stderr, " %s", argv[i]);
++ }
++ fprintf(stderr, "\n");
+
+ /*
+ * Fork and exec the command.
+@@ -1158,7 +1168,9 @@ get_binary_format(FILE *inFile)
} else
strcpy (cmd, "objformat");
@@ -13,7 +94,7 @@ $NetBSD: patch-imake.c,v 1.5 2014/03/14 21:14:28 asau Exp $
(objprog = popen(cmd, "r")) != NULL &&
fgets(buf, sizeof(buf), objprog) != NULL &&
strncmp(buf, "elf", 3) == 0)
-@@ -1337,54 +1339,8 @@ get_gcc_version(FILE *inFile, char *name
+@@ -1337,54 +1349,8 @@ get_gcc_version(FILE *inFile, char *name
static boolean
get_gcc(char *cmd)
{
@@ -70,3 +151,20 @@ $NetBSD: patch-imake.c,v 1.5 2014/03/14 21:14:28 asau Exp $
}
#ifdef CROSSCOMPILE
+@@ -1795,12 +1761,15 @@ CleanCppInput(const char *imakefile)
+ outFile = fdopen(fd, "w");
+ if (outFile == NULL) {
+ if (fd != -1) {
+- unlink(tmpImakefileName); close(fd);
++ /*unlink(tmpImakefileName);*/
++ close(fd);
+ }
+ LogFatal("Cannot open %s for write.",
+ tmpImakefileName);
+ }
+ #endif
++ fprintf(stderr, "%s: Warning: cleaning Imakefile\n",
++ program);
+ tmpImakefile = tmpImakefileName;
+ }
+ writetmpfile(outFile, punwritten, pbuf-punwritten,