summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Baergen <joshuabaergen@gentoo.org>2006-01-22 23:17:12 +0000
committerJoshua Baergen <joshuabaergen@gentoo.org>2006-01-22 23:17:12 +0000
commit8e14f7887ea17afc9f0035b08c07bccee81ee1d7 (patch)
tree79ad6ff855083dfb64c3d04b2caa14a3a8beadb6 /x11-misc/imake/files
parentAdd ~ia64 keyword, bug 119722. (diff)
downloadhistorical-8e14f7887ea17afc9f0035b08c07bccee81ee1d7.tar.gz
historical-8e14f7887ea17afc9f0035b08c07bccee81ee1d7.tar.bz2
historical-8e14f7887ea17afc9f0035b08c07bccee81ee1d7.zip
Allow an alternate to /tmp to be specified so that imake works if /tmp is
noexec. Thanks to Torsten Veller in #119984. Package-Manager: portage-2.1_pre3-r1
Diffstat (limited to 'x11-misc/imake/files')
-rw-r--r--x11-misc/imake/files/0128_all_4.2.0-imake-tmpdir-v2.patch37
-rw-r--r--x11-misc/imake/files/digest-imake-1.0.1-r11
2 files changed, 38 insertions, 0 deletions
diff --git a/x11-misc/imake/files/0128_all_4.2.0-imake-tmpdir-v2.patch b/x11-misc/imake/files/0128_all_4.2.0-imake-tmpdir-v2.patch
new file mode 100644
index 000000000000..209cb15bf543
--- /dev/null
+++ b/x11-misc/imake/files/0128_all_4.2.0-imake-tmpdir-v2.patch
@@ -0,0 +1,37 @@
+--- xc/config/imake/imake.c.orig 2001-12-14 20:53:18.000000000 +0100
++++ xc/config/imake/imake.c 2003-09-12 15:00:10.000000000 +0200
+@@ -985,13 +985,23 @@
+ static void
+ get_libc_version(FILE *inFile)
+ {
+- char aout[] = "/tmp/imakeXXXXXX";
++ char aout[4096], *tmpdir;
+ FILE *fp;
+ const char *format = "%s -o %s -x c -";
+ char *cc;
+ int len;
+ char *command;
+
++ /* If $TMPDIR is defined and has an acceptable length,
++ * use that as tmp dir, else use /tmp. That fixes
++ * problems with /tmp mounted "noexec".
++ */
++ if((tmpdir = getenv("TMPDIR")) != NULL && strlen(tmpdir) < (4096-13))
++ strcpy(aout, tmpdir);
++ else
++ strcpy(aout, "/tmp");
++ strcat(aout, "/imakeXXXXXX");
++
+ /* Pre-create temp file safely */
+ {
+ /* Linux + ELF has mkstemp() */
+@@ -1007,7 +1017,8 @@
+ cc = "gcc";
+ len = strlen (aout) + strlen (format) + strlen (cc);
+ if (len < 128) len = 128;
+- command = alloca (len);
++ if((command = alloca (len)) == NULL)
++ abort();
+
+ if (snprintf (command , len, format, cc, aout) == len)
+ abort ();
diff --git a/x11-misc/imake/files/digest-imake-1.0.1-r1 b/x11-misc/imake/files/digest-imake-1.0.1-r1
new file mode 100644
index 000000000000..5dc088a8258f
--- /dev/null
+++ b/x11-misc/imake/files/digest-imake-1.0.1-r1
@@ -0,0 +1 @@
+MD5 8c859fdddd57e91132ceab1344bfe728 imake-1.0.1.tar.bz2 108642