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= xorgproto
29 LICENSE_FILE= MIT:{{WRKSRC}}/LICENSE
32 FPC_EQUIVALENT= devel/imake
33 SHEBANG_FILES= mkhtmlindex.pl
36 CONFIGURE_ENV= APP_MAN_SUFFIX=1
40 ${REINPLACE_CMD} -e 's|RAWCPP|"${PREFIX}/bin/tradcpp"|' \
44 # This required with some C preprocessors and not others,
45 # but is harmless when not required.
46 ${REINPLACE_CMD} -e "s/^configdirspec= */configdirspec=/" \
49 [FILE:224:descriptions/desc.single]
50 The imake package contains Xorg's imake utility for generating Makefiles,
51 plus the following support programs:
64 690c2c4ac1fad2470a5ea73156cf930b8040dc821a0da4e322014a42c045f37e 156543 imake-1.0.7.tar.bz2
67 [FILE:240:manifests/plist.single]
90 [FILE:5486:patches/patch-imake.c]
93 - Generate all files into the current (build) directory, not /tmp.
94 - Do not delete any of the temporary files, to allow analysis after
96 - Log the command lines executed.
97 - Warn if scrubbing the Imakefile to alert the user to check if that
101 - Use tradcpp's -debuglog feature to trace what happens in the
102 templates (requires imake always be run with tradcpp)
103 - Force ELF for all freebsd versions
104 - Force use of just "gcc"
105 - Recognize IMAKECPPFLAGS in the environment
107 --- imake.c.orig 2013-08-17 10:11:50 UTC
109 @@ -303,9 +303,9 @@ void KludgeOutputLine(char **), KludgeRe
110 const char *cpp = NULL;
112 const char *tmpMakefile;
113 -const char *tmpMakefileTemplate = "/tmp/Imf.XXXXXX";
114 +const char *tmpMakefileTemplate = ".imake.Makefile.XXXXXX";
115 const char *tmpImakefile;
116 -const char *tmpImakefileTemplate = "/tmp/IIf.XXXXXX";
117 +const char *tmpImakefileTemplate = ".imake.Imakefile.XXXXXX";
118 const char *make_argv[ ARGUMENTS ] = {
121 @@ -319,7 +319,7 @@ int cpp_argindex;
122 const char *Imakefile = NULL;
123 const char *Makefile = "Makefile";
124 const char *Template = "Imake.tmpl";
125 -const char *ImakefileC = "Imakefile.c";
126 +const char *ImakefileC = ".imake.start.c";
127 boolean haveImakefileC = FALSE;
128 const char *cleanedImakefile = NULL;
130 @@ -412,7 +412,8 @@ main(int argc, char *argv[])
131 fd = mkstemp(tmpMakefileName);
132 if (fd == -1 || (tmpfd = fdopen(fd, "w+")) == NULL) {
134 - unlink(tmpMakefileName); close(fd);
135 + /*unlink(tmpMakefileName);*/
138 LogFatal("Cannot create temporary file %s.", tmpMakefileName);
140 @@ -454,12 +455,14 @@ showit(FILE *fd)
145 if (tmpMakefile != Makefile)
147 if (cleanedImakefile && cleanedImakefile != Imakefile)
148 unlink(cleanedImakefile);
154 #ifdef SIGNALRETURNSINT
155 @@ -488,6 +491,10 @@ init(void)
156 while (cpp_argv[ cpp_argindex ] != NULL)
159 + /* pkgsrc: generate a debug trace of reading the templates */
160 + AddCppArg("-debuglog");
161 + AddCppArg(".imake.cpplog");
163 #if defined CROSSCOMPILE
165 if (CrossCompiling) {
166 @@ -531,6 +538,14 @@ init(void)
170 + if ((p = getenv("IMAKECPPFLAGS"))) {
178 if ((p = getenv("IMAKECPP")))
180 if ((p = getenv("IMAKEMAKE")))
181 @@ -773,6 +788,13 @@ doit(FILE *outfd, const char *cmd, const
187 + fprintf(stderr, "imake: executing:");
188 + for (i=0; argv[i]; i++) {
189 + fprintf(stderr, " %s", argv[i]);
191 + fprintf(stderr, "\n");
194 * Fork and exec the command.
195 @@ -1139,32 +1161,7 @@ get_ld_version(FILE *inFile)
197 get_binary_format(FILE *inFile)
202 - FILE *objprog = NULL;
205 - char cmd[PATH_MAX];
208 - mib[1] = KERN_OSRELDATE;
209 - len = sizeof(osrel);
210 - sysctl(mib, 2, &osrel, &len, NULL, 0);
211 - if (CrossCompiling) {
212 - strcpy (cmd, CrossCompileDir);
214 - strcat (cmd,"objformat");
216 - strcpy (cmd, "objformat");
218 - if (osrel >= 300004 &&
219 - (objprog = popen(cmd, "r")) != NULL &&
220 - fgets(buf, sizeof(buf), objprog) != NULL &&
221 - strncmp(buf, "elf", 3) == 0)
227 fprintf(inFile, "#define DefaultToElfFormat %s\n", iself ? "YES" : "NO");
229 @@ -1337,54 +1334,8 @@ get_gcc_version(FILE *inFile, char *name
234 - static const char* gcc_path[] = {
235 -#if defined(linux) || \
236 - defined(__NetBSD__) || \
237 - defined(__OpenBSD__) || \
238 - defined(__FreeBSD__) || \
239 - defined(__DragonFly__) || \
240 - defined(__APPLE__) || \
241 - defined(__CYGWIN__) || \
242 - defined(__MINGW32__) || \
243 - defined(__GNU__) || \
245 - "/usr/bin/cc", /* for Linux PostIncDir */
247 - "/usr/local/bin/gcc",
248 - "/opt/gnu/bin/gcc",
253 - static const char* cross_cc_name[] = {
258 - if (CrossCompiling) {
260 - for (i = 0; i < sizeof (cross_cc_name) / sizeof cross_cc_name[0]; i++){
261 - strcpy (cmd, CrossCompileDir);
263 - strcat (cmd, cross_cc_name[i]);
264 - if (lstat (cmd, &sb) == 0) {
273 - for (i = 0; i < sizeof (gcc_path) / sizeof gcc_path[0]; i++) {
274 - if (lstat (gcc_path[i], &sb) == 0) {
275 - strcpy (cmd, gcc_path[i]);
281 + strcpy(cmd, "gcc");
286 @@ -1795,12 +1746,15 @@ CleanCppInput(const char *imakefile)
287 outFile = fdopen(fd, "w");
288 if (outFile == NULL) {
290 - unlink(tmpImakefileName); close(fd);
291 + /*unlink(tmpImakefileName);*/
294 LogFatal("Cannot open %s for write.",
298 + fprintf(stderr, "%s: Warning: cleaning Imakefile\n",
300 tmpImakefile = tmpImakefileName;
302 writetmpfile(outFile, punwritten, pbuf-punwritten,
305 [FILE:4178:patches/patch-imakemdep.h]
306 $NetBSD: patch-imakemdep.h,v 1.6 2016/09/17 17:49:36 richard Exp $
308 - Configure for pkgsrc: never set FIXUP_CPP_WHITESPACE as pkgsrc now
309 always uses a whitespace-preserving cpp and fixing it twice causes
312 - Remove all the "logic" for guessing how to invoke cpp, and get it
313 via RAWCPP defined on the command line.
315 - Make argv[0] for invoking cpp "cpp" by default.
317 - Do not pass -m32 to cpp; it is not portable, valid, or even a
318 reasonable thing to do.
320 - Add support for __aarch64__
322 --- imakemdep.h.orig 2013-08-17 10:11:06.000000000 +0000
324 @@ -229,7 +229,7 @@ in this Software without prior written a
325 * all colons). One way to tell if you need this is to see whether or not
326 * your Makefiles have no tabs in them and lots of @@ strings.
328 -# if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(WIN32) || defined(__SCO__) || (defined(AMOEBA) && defined(CROSS_COMPILE)) || defined(__QNX__) || defined(__sgi) || defined(__UNIXWARE__)
330 # define FIXUP_CPP_WHITESPACE
333 @@ -257,79 +257,7 @@ in this Software without prior written a
334 * If the cpp you need is not in /lib/cpp, define DEFAULT_CPP.
336 # if !defined (CROSSCOMPILE) || defined (CROSSCOMPILE_CPP)
338 -# if defined(__APPLE__)
339 -# define DEFAULT_CPP "/usr/bin/cpp"
340 -# define DEFAULT_CC "cc"
342 -# if defined(Lynx) || defined(__Lynx__)
343 -# define DEFAULT_CC "gcc"
352 -# define DEFAULT_CC "gcc"
354 -# define DEFAULT_CC "cl"
358 -# define DEFAULT_CPP "/usr/lib/cpp"
360 -# if defined(clipper) || defined(__clipper__)
361 -# define DEFAULT_CPP "/usr/lib/cpp"
363 -# if defined(_IBMR2) && !defined(DEFAULT_CPP)
364 -# define DEFAULT_CPP "/usr/ccs/lib/cpp"
367 -# define DEFAULT_CPP "/usr/bin/cpp"
370 -# define DEFAULT_CPP "/usr/ccs/lib/cpp"
373 -# define DEFAULT_CPP "/usr/lib/cpp"
376 -# define DEFAULT_CPP "/lib/pcpp"
378 -# if defined(__386BSD__)
379 -# define DEFAULT_CPP "/usr/libexec/cpp"
381 -# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
384 -# if defined(__sgi) && defined(__ANSI_CPP__)
387 -# if defined(MACH) && !defined(__GNU__)
391 -# define DEFAULT_CPP "/usr/lib/cpp"
394 -# define DEFAULT_CC "gcc"
395 -# define DEFAULT_CPP "/usr/bin/cpp"
397 -# if defined (__QNX__)
399 -# define DEFAULT_CPP "/usr/bin/cpp"
401 -# define DEFAULT_CPP "/usr/X11R6/bin/cpp"
404 -# if defined(__GNUC__) && !defined(USE_CC_E)
407 -# define DEFAULT_CC "gcc"
410 +# define DEFAULT_CPP RAWCPP
412 # endif /* !defined (CROSSCOMPILE) || defined (CROSSCOMPILE_CPP) */
414 @@ -352,7 +280,7 @@ in this Software without prior written a
415 # define ARGUMENTS 50 /* number of arguments in various arrays */
416 # if !defined (CROSSCOMPILE) || defined (CROSSCOMPILE_CPP)
417 const char *cpp_argv[ARGUMENTS] = {
418 - "cc", /* replaced by the actual program to exec */
419 + "cpp", /* replaced by the actual program to exec */
420 "-I.", /* add current directory to include path */
421 # if !defined(__NetBSD_Version__) || __NetBSD_Version__ < 103080000
423 @@ -365,9 +293,6 @@ const char *cpp_argv[ARGUMENTS] = {
424 defined(__GNUC__) || defined(__GLIBC__)
427 -# if defined(__GNUC__) && (__GNUC__ >= 3)
433 @@ -399,6 +324,9 @@ const char *cpp_argv[ARGUMENTS] = {
445 [FILE:329:patches/patch-mdepend.cpp]
446 --- mdepend.cpp.orig 2013-08-17 10:11:06 UTC
448 @@ -125,9 +125,6 @@ do
452 - # Flag to tell compiler to output dependencies directly
453 - # For example, with Sun compilers, -xM or -xM1 or
456 compilerlistsdepends="y"
457 compilerlistdependsflag="$2"