pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/imake



Module Name:    pkgsrc
Committed By:   dholland
Date:           Sun Sep  4 18:44:06 UTC 2016

Modified Files:
        pkgsrc/devel/imake: Makefile distinfo
        pkgsrc/devel/imake/patches: patch-imake.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 pkgsrc/devel/imake/Makefile
cvs rdiff -u -r1.12 -r1.13 pkgsrc/devel/imake/distinfo
cvs rdiff -u -r1.5 -r1.6 pkgsrc/devel/imake/patches/patch-imake.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/imake/Makefile
diff -u pkgsrc/devel/imake/Makefile:1.21 pkgsrc/devel/imake/Makefile:1.22
--- pkgsrc/devel/imake/Makefile:1.21    Wed May 21 21:10:54 2014
+++ pkgsrc/devel/imake/Makefile Sun Sep  4 18:44:06 2016
@@ -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

Index: pkgsrc/devel/imake/distinfo
diff -u pkgsrc/devel/imake/distinfo:1.12 pkgsrc/devel/imake/distinfo:1.13
--- pkgsrc/devel/imake/distinfo:1.12    Tue Nov  3 03:27:35 2015
+++ pkgsrc/devel/imake/distinfo Sun Sep  4 18:44:06 2016
@@ -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

Index: pkgsrc/devel/imake/patches/patch-imake.c
diff -u pkgsrc/devel/imake/patches/patch-imake.c:1.5 pkgsrc/devel/imake/patches/patch-imake.c:1.6
--- pkgsrc/devel/imake/patches/patch-imake.c:1.5        Fri Mar 14 21:14:28 2014
+++ pkgsrc/devel/imake/patches/patch-imake.c    Sun Sep  4 18:44:06 2016
@@ -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 
        (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 
  }
  
  #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,



Home | Main Index | Thread Index | Old Index