1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
7 SDESC[standard]= X.Org imake program and related utilities
8 HOMEPAGE= https://www.x.org/
12 SITES[main]= https://www.x.org/releases/individual/util/
13 DISTFILE[1]= imake-1.0.7.tar.bz2:main
15 SPKGS[standard]= single
17 OPTIONS_AVAILABLE= none
18 OPTIONS_STANDARD= none
20 BUILDRUN_DEPENDS= tradcpp:single:standard
21 RUN_DEPENDS= xorg-cf-files:single:standard
22 gccmakedep:single:standard
23 makedepend:single:standard
25 USES= perl:run pkgconfig shebangfix
26 XORG_COMPONENTS= xproto
28 FPC_EQUIVALENT= devel/imake
29 SHEBANG_FILES= mkhtmlindex.pl
32 CONFIGURE_ENV= APP_MAN_SUFFIX=1
36 ${REINPLACE_CMD} -e 's|RAWCPP|"${PREFIX}/bin/tradcpp"|' \
40 # This required with some C preprocessors and not others,
41 # but is harmless when not required.
42 ${REINPLACE_CMD} -e "s/^configdirspec= */configdirspec=/" \
45 [FILE:224:descriptions/desc.single]
46 The imake package contains Xorg's imake utility for generating Makefiles,
47 plus the following support programs:
60 690c2c4ac1fad2470a5ea73156cf930b8040dc821a0da4e322014a42c045f37e 156543 imake-1.0.7.tar.bz2
63 [FILE:240:manifests/plist.single]
86 [FILE:5486:patches/patch-imake.c]
89 - Generate all files into the current (build) directory, not /tmp.
90 - Do not delete any of the temporary files, to allow analysis after
92 - Log the command lines executed.
93 - Warn if scrubbing the Imakefile to alert the user to check if that
97 - Use tradcpp's -debuglog feature to trace what happens in the
98 templates (requires imake always be run with tradcpp)
99 - Force ELF for all freebsd versions
100 - Force use of just "gcc"
101 - Recognize IMAKECPPFLAGS in the environment
103 --- imake.c.orig 2013-08-17 10:11:50 UTC
105 @@ -303,9 +303,9 @@ void KludgeOutputLine(char **), KludgeRe
106 const char *cpp = NULL;
108 const char *tmpMakefile;
109 -const char *tmpMakefileTemplate = "/tmp/Imf.XXXXXX";
110 +const char *tmpMakefileTemplate = ".imake.Makefile.XXXXXX";
111 const char *tmpImakefile;
112 -const char *tmpImakefileTemplate = "/tmp/IIf.XXXXXX";
113 +const char *tmpImakefileTemplate = ".imake.Imakefile.XXXXXX";
114 const char *make_argv[ ARGUMENTS ] = {
117 @@ -319,7 +319,7 @@ int cpp_argindex;
118 const char *Imakefile = NULL;
119 const char *Makefile = "Makefile";
120 const char *Template = "Imake.tmpl";
121 -const char *ImakefileC = "Imakefile.c";
122 +const char *ImakefileC = ".imake.start.c";
123 boolean haveImakefileC = FALSE;
124 const char *cleanedImakefile = NULL;
126 @@ -412,7 +412,8 @@ main(int argc, char *argv[])
127 fd = mkstemp(tmpMakefileName);
128 if (fd == -1 || (tmpfd = fdopen(fd, "w+")) == NULL) {
130 - unlink(tmpMakefileName); close(fd);
131 + /*unlink(tmpMakefileName);*/
134 LogFatal("Cannot create temporary file %s.", tmpMakefileName);
136 @@ -454,12 +455,14 @@ showit(FILE *fd)
141 if (tmpMakefile != Makefile)
143 if (cleanedImakefile && cleanedImakefile != Imakefile)
144 unlink(cleanedImakefile);
150 #ifdef SIGNALRETURNSINT
151 @@ -488,6 +491,10 @@ init(void)
152 while (cpp_argv[ cpp_argindex ] != NULL)
155 + /* pkgsrc: generate a debug trace of reading the templates */
156 + AddCppArg("-debuglog");
157 + AddCppArg(".imake.cpplog");
159 #if defined CROSSCOMPILE
161 if (CrossCompiling) {
162 @@ -531,6 +538,14 @@ init(void)
166 + if ((p = getenv("IMAKECPPFLAGS"))) {
174 if ((p = getenv("IMAKECPP")))
176 if ((p = getenv("IMAKEMAKE")))
177 @@ -773,6 +788,13 @@ doit(FILE *outfd, const char *cmd, const
183 + fprintf(stderr, "imake: executing:");
184 + for (i=0; argv[i]; i++) {
185 + fprintf(stderr, " %s", argv[i]);
187 + fprintf(stderr, "\n");
190 * Fork and exec the command.
191 @@ -1139,32 +1161,7 @@ get_ld_version(FILE *inFile)
193 get_binary_format(FILE *inFile)
198 - FILE *objprog = NULL;
201 - char cmd[PATH_MAX];
204 - mib[1] = KERN_OSRELDATE;
205 - len = sizeof(osrel);
206 - sysctl(mib, 2, &osrel, &len, NULL, 0);
207 - if (CrossCompiling) {
208 - strcpy (cmd, CrossCompileDir);
210 - strcat (cmd,"objformat");
212 - strcpy (cmd, "objformat");
214 - if (osrel >= 300004 &&
215 - (objprog = popen(cmd, "r")) != NULL &&
216 - fgets(buf, sizeof(buf), objprog) != NULL &&
217 - strncmp(buf, "elf", 3) == 0)
223 fprintf(inFile, "#define DefaultToElfFormat %s\n", iself ? "YES" : "NO");
225 @@ -1337,54 +1334,8 @@ get_gcc_version(FILE *inFile, char *name
230 - static const char* gcc_path[] = {
231 -#if defined(linux) || \
232 - defined(__NetBSD__) || \
233 - defined(__OpenBSD__) || \
234 - defined(__FreeBSD__) || \
235 - defined(__DragonFly__) || \
236 - defined(__APPLE__) || \
237 - defined(__CYGWIN__) || \
238 - defined(__MINGW32__) || \
239 - defined(__GNU__) || \
241 - "/usr/bin/cc", /* for Linux PostIncDir */
243 - "/usr/local/bin/gcc",
244 - "/opt/gnu/bin/gcc",
249 - static const char* cross_cc_name[] = {
254 - if (CrossCompiling) {
256 - for (i = 0; i < sizeof (cross_cc_name) / sizeof cross_cc_name[0]; i++){
257 - strcpy (cmd, CrossCompileDir);
259 - strcat (cmd, cross_cc_name[i]);
260 - if (lstat (cmd, &sb) == 0) {
269 - for (i = 0; i < sizeof (gcc_path) / sizeof gcc_path[0]; i++) {
270 - if (lstat (gcc_path[i], &sb) == 0) {
271 - strcpy (cmd, gcc_path[i]);
277 + strcpy(cmd, "gcc");
282 @@ -1795,12 +1746,15 @@ CleanCppInput(const char *imakefile)
283 outFile = fdopen(fd, "w");
284 if (outFile == NULL) {
286 - unlink(tmpImakefileName); close(fd);
287 + /*unlink(tmpImakefileName);*/
290 LogFatal("Cannot open %s for write.",
294 + fprintf(stderr, "%s: Warning: cleaning Imakefile\n",
296 tmpImakefile = tmpImakefileName;
298 writetmpfile(outFile, punwritten, pbuf-punwritten,
301 [FILE:4178:patches/patch-imakemdep.h]
302 $NetBSD: patch-imakemdep.h,v 1.6 2016/09/17 17:49:36 richard Exp $
304 - Configure for pkgsrc: never set FIXUP_CPP_WHITESPACE as pkgsrc now
305 always uses a whitespace-preserving cpp and fixing it twice causes
308 - Remove all the "logic" for guessing how to invoke cpp, and get it
309 via RAWCPP defined on the command line.
311 - Make argv[0] for invoking cpp "cpp" by default.
313 - Do not pass -m32 to cpp; it is not portable, valid, or even a
314 reasonable thing to do.
316 - Add support for __aarch64__
318 --- imakemdep.h.orig 2013-08-17 10:11:06.000000000 +0000
320 @@ -229,7 +229,7 @@ in this Software without prior written a
321 * all colons). One way to tell if you need this is to see whether or not
322 * your Makefiles have no tabs in them and lots of @@ strings.
324 -# if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(WIN32) || defined(__SCO__) || (defined(AMOEBA) && defined(CROSS_COMPILE)) || defined(__QNX__) || defined(__sgi) || defined(__UNIXWARE__)
326 # define FIXUP_CPP_WHITESPACE
329 @@ -257,79 +257,7 @@ in this Software without prior written a
330 * If the cpp you need is not in /lib/cpp, define DEFAULT_CPP.
332 # if !defined (CROSSCOMPILE) || defined (CROSSCOMPILE_CPP)
334 -# if defined(__APPLE__)
335 -# define DEFAULT_CPP "/usr/bin/cpp"
336 -# define DEFAULT_CC "cc"
338 -# if defined(Lynx) || defined(__Lynx__)
339 -# define DEFAULT_CC "gcc"
348 -# define DEFAULT_CC "gcc"
350 -# define DEFAULT_CC "cl"
354 -# define DEFAULT_CPP "/usr/lib/cpp"
356 -# if defined(clipper) || defined(__clipper__)
357 -# define DEFAULT_CPP "/usr/lib/cpp"
359 -# if defined(_IBMR2) && !defined(DEFAULT_CPP)
360 -# define DEFAULT_CPP "/usr/ccs/lib/cpp"
363 -# define DEFAULT_CPP "/usr/bin/cpp"
366 -# define DEFAULT_CPP "/usr/ccs/lib/cpp"
369 -# define DEFAULT_CPP "/usr/lib/cpp"
372 -# define DEFAULT_CPP "/lib/pcpp"
374 -# if defined(__386BSD__)
375 -# define DEFAULT_CPP "/usr/libexec/cpp"
377 -# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
380 -# if defined(__sgi) && defined(__ANSI_CPP__)
383 -# if defined(MACH) && !defined(__GNU__)
387 -# define DEFAULT_CPP "/usr/lib/cpp"
390 -# define DEFAULT_CC "gcc"
391 -# define DEFAULT_CPP "/usr/bin/cpp"
393 -# if defined (__QNX__)
395 -# define DEFAULT_CPP "/usr/bin/cpp"
397 -# define DEFAULT_CPP "/usr/X11R6/bin/cpp"
400 -# if defined(__GNUC__) && !defined(USE_CC_E)
403 -# define DEFAULT_CC "gcc"
406 +# define DEFAULT_CPP RAWCPP
408 # endif /* !defined (CROSSCOMPILE) || defined (CROSSCOMPILE_CPP) */
410 @@ -352,7 +280,7 @@ in this Software without prior written a
411 # define ARGUMENTS 50 /* number of arguments in various arrays */
412 # if !defined (CROSSCOMPILE) || defined (CROSSCOMPILE_CPP)
413 const char *cpp_argv[ARGUMENTS] = {
414 - "cc", /* replaced by the actual program to exec */
415 + "cpp", /* replaced by the actual program to exec */
416 "-I.", /* add current directory to include path */
417 # if !defined(__NetBSD_Version__) || __NetBSD_Version__ < 103080000
419 @@ -365,9 +293,6 @@ const char *cpp_argv[ARGUMENTS] = {
420 defined(__GNUC__) || defined(__GLIBC__)
423 -# if defined(__GNUC__) && (__GNUC__ >= 3)
429 @@ -399,6 +324,9 @@ const char *cpp_argv[ARGUMENTS] = {
441 [FILE:329:patches/patch-mdepend.cpp]
442 --- mdepend.cpp.orig 2013-08-17 10:11:06 UTC
444 @@ -125,9 +125,6 @@ do
448 - # Flag to tell compiler to output dependencies directly
449 - # For example, with Sun compilers, -xM or -xM1 or
452 compilerlistsdepends="y"
453 compilerlistdependsflag="$2"