Ravenports generated: 10 Jan 2018 09:56
[ravenports.git] / bucket_98 / imake
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               imake
4 VERSION=                1.0.7
5 KEYWORDS=               devel
6 VARIANTS=               standard
7 SDESC[standard]=        X.Org imake program and related utilities
8 HOMEPAGE=               https://www.x.org/
9 CONTACT=                nobody
10
11 DOWNLOAD_GROUPS=        main
12 SITES[main]=            https://www.x.org/releases/individual/util/
13 DISTFILE[1]=            imake-1.0.7.tar.bz2:main
14 DF_INDEX=               1
15 SPKGS[standard]=        single
16
17 OPTIONS_AVAILABLE=      none
18 OPTIONS_STANDARD=       none
19
20 BUILDRUN_DEPENDS=       tradcpp:single:standard
21 RUN_DEPENDS=            xorg-cf-files:single:standard
22                         gccmakedep:single:standard
23                         makedepend:single:standard
24
25 USES=                   perl:run pkgconfig shebangfix
26 XORG_COMPONENTS=        xproto
27
28 FPC_EQUIVALENT=         devel/imake
29 SHEBANG_FILES=          mkhtmlindex.pl
30
31 MUST_CONFIGURE=         gnu
32 CONFIGURE_ENV=          APP_MAN_SUFFIX=1
33                         HAS_PERL=no
34
35 post-patch:
36         ${REINPLACE_CMD} -e 's|RAWCPP|"${PREFIX}/bin/tradcpp"|' \
37                 ${WRKSRC}/imakemdep.h
38
39 post-build:
40         # This required with some C preprocessors and not others,
41         # but is harmless when not required.
42         ${REINPLACE_CMD} -e "s/^configdirspec= */configdirspec=/" \
43                 ${WRKSRC}/xmkmf
44
45 [FILE:224:descriptions/desc.single]
46 The imake package contains Xorg's imake utility for generating Makefiles,
47 plus the following support programs:
48
49    - ccmakedep
50    - cleanlinks
51    - makeg
52    - mergelib
53    - mkdirhier
54    - mkhtmlindex
55    - revpath
56    - xmkmf
57
58
59 [FILE:98:distinfo]
60 690c2c4ac1fad2470a5ea73156cf930b8040dc821a0da4e322014a42c045f37e       156543 imake-1.0.7.tar.bz2
61
62
63 [FILE:240:manifests/plist.single]
64 bin/
65  ccmakedep
66  cleanlinks
67  imake
68  makeg
69  mergelib
70  mkdirhier
71  mkhtmlindex
72  revpath
73  xmkmf
74 share/man/man1/
75  ccmakedep.1.gz
76  cleanlinks.1.gz
77  imake.1.gz
78  makeg.1.gz
79  mergelib.1.gz
80  mkdirhier.1.gz
81  mkhtmlindex.1.gz
82  revpath.1.gz
83  xmkmf.1.gz
84
85
86 [FILE:5486:patches/patch-imake.c]
87 Beat some sense in.
88
89    - Generate all files into the current (build) directory, not /tmp.
90    - Do not delete any of the temporary files, to allow analysis after
91      build failure.
92    - Log the command lines executed.
93    - Warn if scrubbing the Imakefile to alert the user to check if that
94      broke it
95
96 Also,
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
102
103 --- imake.c.orig        2013-08-17 10:11:50 UTC
104 +++ imake.c
105 @@ -303,9 +303,9 @@ void KludgeOutputLine(char **), KludgeRe
106  const char *cpp = NULL;
107  
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 ] = {
115  #ifdef WIN32
116      "nmake"
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;
125  const char     *program;
126 @@ -412,7 +412,8 @@ main(int argc, char *argv[])
127                 fd = mkstemp(tmpMakefileName);
128                 if (fd == -1 || (tmpfd = fdopen(fd, "w+")) == NULL) {
129                    if (fd != -1) {
130 -                     unlink(tmpMakefileName); close(fd);
131 +                     /*unlink(tmpMakefileName);*/
132 +                     close(fd);
133                    }
134                    LogFatal("Cannot create temporary file %s.", tmpMakefileName);
135                 }
136 @@ -454,12 +455,14 @@ showit(FILE *fd)
137  void
138  wrapup(void)
139  {
140 +#if 0
141         if (tmpMakefile != Makefile)
142                 unlink(tmpMakefile);
143         if (cleanedImakefile && cleanedImakefile != Imakefile)
144                 unlink(cleanedImakefile);
145         if (haveImakefileC)
146                 unlink(ImakefileC);
147 +#endif
148  }
149  
150  #ifdef SIGNALRETURNSINT
151 @@ -488,6 +491,10 @@ init(void)
152         while (cpp_argv[ cpp_argindex ] != NULL)
153                 cpp_argindex++;
154  
155 +       /* pkgsrc: generate a debug trace of reading the templates */
156 +       AddCppArg("-debuglog");
157 +       AddCppArg(".imake.cpplog");
158 +
159  #if defined CROSSCOMPILE
160         if (sys == netBSD)
161           if (CrossCompiling) {
162 @@ -531,6 +538,14 @@ init(void)
163                                 AddCppArg(p);
164                         }
165         }
166 +       if ((p = getenv("IMAKECPPFLAGS"))) {
167 +               AddCppArg(p);
168 +               for (; *p; p++)
169 +                       if (*p == ' ') {
170 +                               *p++ = '\0';
171 +                               AddCppArg(p);
172 +                       }
173 +       }
174         if ((p = getenv("IMAKECPP")))
175                 cpp = p;
176         if ((p = getenv("IMAKEMAKE")))
177 @@ -773,6 +788,13 @@ doit(FILE *outfd, const char *cmd, const
178  {
179         int             pid;
180         waitType        status;
181 +       unsigned i;
182 +
183 +       fprintf(stderr, "imake: executing:");
184 +       for (i=0; argv[i]; i++) {
185 +          fprintf(stderr, " %s", argv[i]);
186 +       }
187 +       fprintf(stderr, "\n");
188  
189         /*
190          * Fork and exec the command.
191 @@ -1139,32 +1161,7 @@ get_ld_version(FILE *inFile)
192  static void
193  get_binary_format(FILE *inFile)
194  {
195 -  int mib[2];
196 -  size_t len;
197 -  int osrel = 0;
198 -  FILE *objprog = NULL;
199 -  int iself = 0;
200 -  char buf[10];
201 -  char cmd[PATH_MAX];
202 -
203 -  mib[0] = CTL_KERN;
204 -  mib[1] = KERN_OSRELDATE;
205 -  len = sizeof(osrel);
206 -  sysctl(mib, 2, &osrel, &len, NULL, 0);
207 -  if (CrossCompiling) {
208 -      strcpy (cmd, CrossCompileDir);
209 -      strcat (cmd, "/");
210 -      strcat (cmd,"objformat");
211 -  } else
212 -      strcpy (cmd, "objformat");
213 -
214 -  if (osrel >= 300004 &&
215 -      (objprog = popen(cmd, "r")) != NULL &&
216 -      fgets(buf, sizeof(buf), objprog) != NULL &&
217 -      strncmp(buf, "elf", 3) == 0)
218 -    iself = 1;
219 -  if (objprog)
220 -    pclose(objprog);
221 +  int iself = 1;
222  
223    fprintf(inFile, "#define DefaultToElfFormat %s\n", iself ? "YES" : "NO");
224  }
225 @@ -1337,54 +1334,8 @@ get_gcc_version(FILE *inFile, char *name
226  static boolean
227  get_gcc(char *cmd)
228  {
229 -  struct stat sb;
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__) || \
240 -     defined(__GLIBC__)
241 -       "/usr/bin/cc",  /* for Linux PostIncDir */
242 -#endif
243 -       "/usr/local/bin/gcc",
244 -       "/opt/gnu/bin/gcc",
245 -       "/usr/pkg/bin/gcc"
246 -    };
247 -
248 -#ifdef CROSSCOMPILE
249 -    static const char* cross_cc_name[] = {
250 -       "cc",
251 -       "gcc"
252 -    };
253 -
254 -    if (CrossCompiling) {
255 -       int i;
256 -       for (i = 0; i < sizeof (cross_cc_name) / sizeof cross_cc_name[0]; i++){
257 -           strcpy (cmd, CrossCompileDir);
258 -           strcat (cmd, "/");
259 -           strcat (cmd, cross_cc_name[i]);
260 -           if (lstat (cmd, &sb) == 0) {
261 -               return TRUE;
262 -               break;
263 -           }
264 -       }
265 -    } else
266 -#endif
267 -      {
268 -       int i;
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]);
272 -               return TRUE;
273 -           }
274 -       }
275 -      }
276 -    return FALSE;
277 +       strcpy(cmd, "gcc");
278 +       return TRUE;
279  }
280  
281  #ifdef CROSSCOMPILE
282 @@ -1795,12 +1746,15 @@ CleanCppInput(const char *imakefile)
283                             outFile = fdopen(fd, "w");
284                         if (outFile == NULL) {
285                             if (fd != -1) {
286 -                              unlink(tmpImakefileName); close(fd);
287 +                              /*unlink(tmpImakefileName);*/
288 +                              close(fd);
289                             }
290                             LogFatal("Cannot open %s for write.",
291                                 tmpImakefileName);
292                         }
293  #endif
294 +                       fprintf(stderr, "%s: Warning: cleaning Imakefile\n",
295 +                               program);
296                         tmpImakefile = tmpImakefileName;
297                     }
298                     writetmpfile(outFile, punwritten, pbuf-punwritten,
299
300
301 [FILE:4178:patches/patch-imakemdep.h]
302 $NetBSD: patch-imakemdep.h,v 1.6 2016/09/17 17:49:36 richard Exp $
303
304  - Configure for pkgsrc: never set FIXUP_CPP_WHITESPACE as pkgsrc now
305 always uses a whitespace-preserving cpp and fixing it twice causes
306 bizarre lossage.
307
308  - Remove all the "logic" for guessing how to invoke cpp, and get it
309 via RAWCPP defined on the command line.
310
311  - Make argv[0] for invoking cpp "cpp" by default.
312
313  - Do not pass -m32 to cpp; it is not portable, valid, or even a
314 reasonable thing to do.
315
316  - Add support for __aarch64__
317
318 --- imakemdep.h.orig    2013-08-17 10:11:06.000000000 +0000
319 +++ imakemdep.h
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.
323   */
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__)
325 +#  if 0
326  #   define FIXUP_CPP_WHITESPACE
327  #  endif
328  #  ifdef WIN32
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.
331   */
332  #  if !defined (CROSSCOMPILE) || defined (CROSSCOMPILE_CPP)
333 -
334 -#   if defined(__APPLE__)
335 -#    define DEFAULT_CPP "/usr/bin/cpp"
336 -#    define DEFAULT_CC "cc"
337 -#   endif
338 -#   if defined(Lynx) || defined(__Lynx__)
339 -#    define DEFAULT_CC "gcc"
340 -#    define USE_CC_E
341 -#   endif
342 -#   ifdef hpux
343 -#    define USE_CC_E
344 -#   endif
345 -#   ifdef WIN32
346 -#    define USE_CC_E
347 -#    ifdef __GNUC__
348 -#     define DEFAULT_CC "gcc"
349 -#    else
350 -#     define DEFAULT_CC "cl"
351 -#    endif
352 -#   endif
353 -#   ifdef apollo
354 -#    define DEFAULT_CPP "/usr/lib/cpp"
355 -#   endif
356 -#   if defined(clipper) || defined(__clipper__)
357 -#    define DEFAULT_CPP "/usr/lib/cpp"
358 -#   endif
359 -#   if defined(_IBMR2) && !defined(DEFAULT_CPP)
360 -#    define DEFAULT_CPP "/usr/ccs/lib/cpp"
361 -#   endif
362 -#   ifdef __bsdi__
363 -#    define DEFAULT_CPP "/usr/bin/cpp"
364 -#   endif
365 -#   ifdef __uxp__
366 -#    define DEFAULT_CPP "/usr/ccs/lib/cpp"
367 -#   endif
368 -#   ifdef __sxg__
369 -#    define DEFAULT_CPP "/usr/lib/cpp"
370 -#   endif
371 -#   ifdef _CRAY
372 -#    define DEFAULT_CPP "/lib/pcpp"
373 -#   endif
374 -#   if defined(__386BSD__)
375 -#    define DEFAULT_CPP "/usr/libexec/cpp"
376 -#   endif
377 -#   if defined(__FreeBSD__)  || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
378 -#    define USE_CC_E
379 -#   endif
380 -#   if defined(__sgi) && defined(__ANSI_CPP__)
381 -#    define USE_CC_E
382 -#   endif
383 -#   if defined(MACH) && !defined(__GNU__)
384 -#    define USE_CC_E
385 -#   endif
386 -#   ifdef __minix_vmd
387 -#    define DEFAULT_CPP "/usr/lib/cpp"
388 -#   endif
389 -#   ifdef __CYGWIN__
390 -#    define DEFAULT_CC "gcc"
391 -#    define DEFAULT_CPP "/usr/bin/cpp"
392 -#   endif
393 -#   if defined (__QNX__)
394 -#    ifdef __QNXNTO__
395 -#     define DEFAULT_CPP "/usr/bin/cpp"
396 -#    else
397 -#     define DEFAULT_CPP "/usr/X11R6/bin/cpp"
398 -#    endif
399 -#   endif
400 -#   if defined(__GNUC__) && !defined(USE_CC_E)
401 -#    define USE_CC_E
402 -#    ifndef DEFAULT_CC
403 -#     define DEFAULT_CC "gcc"
404 -#    endif
405 -#   endif
406 +#    define DEFAULT_CPP RAWCPP
407  
408  #  endif /* !defined (CROSSCOMPILE) || defined (CROSSCOMPILE_CPP) */
409  /*
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
418  #    ifdef unix
419 @@ -365,9 +293,6 @@ const char *cpp_argv[ARGUMENTS] = {
420      defined(__GNUC__) || defined(__GLIBC__)
421  #    ifdef __i386__
422         "-D__i386__",
423 -#     if defined(__GNUC__) && (__GNUC__ >= 3)
424 -       "-m32",
425 -#     endif
426  #    endif
427  #    ifdef __i486__
428         "-D__i486__",
429 @@ -399,6 +324,9 @@ const char *cpp_argv[ARGUMENTS] = {
430  #    ifdef __arm__
431         "-D__arm__",
432  #    endif
433 +#    ifdef __aarch64__
434 +       "-D__aarch64__",
435 +#    endif
436  #    ifdef __s390x__
437         "-D__s390x__",
438  #    endif
439
440
441 [FILE:329:patches/patch-mdepend.cpp]
442 --- mdepend.cpp.orig    2013-08-17 10:11:06 UTC
443 +++ mdepend.cpp
444 @@ -125,9 +125,6 @@ do
445                             shift
446                             ;;
447  
448 -                       # Flag to tell compiler to output dependencies directly
449 -                       # For example, with Sun compilers, -xM or -xM1 or
450 -                       # with gcc, -M
451                         -d)
452                             compilerlistsdepends="y"
453                             compilerlistdependsflag="$2"
454