Subject: Re: pkg/29889
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: MOCHIDA Shuji <mochid@netside.co.jp>
List: pkgsrc-bugs
Date: 04/05/2005 18:31:02
The following reply was made to PR pkg/29889; it has been noted by GNATS.
From: MOCHIDA Shuji <mochid@netside.co.jp>
To: minskim@netbsd.org
Cc: gnats-bugs@netbsd.org, mochid@netside.co.jp
Subject: Re: pkg/29889
Date: Wed, 06 Apr 2005 03:11:54 +0900 (JST)
> Synopsis: devel/nbitools imake miss cpp on MacOSX 10.3.7/Darwin 7.7.1
> Patch applied. Thank you!
I realized that that was not enough. generic.cf instead of Darwin.cf
will read into Makfile. Patch below is mainly taken from
xsrc/xfree/xc/config/cf (XFree 4.4.0).
May be we need use more recent imake source for base.
--- config/cf/Darwin.cf.ORIG Tue Jul 3 12:54:07 2001
+++ config/cf/Darwin.cf Tue Apr 5 21:56:43 2005
@@ -64,7 +64,7 @@
#define IncludeMakefile(file) @@# dependencies are in .depend
#define DependFileName .depend
#ifndef ExtraLibraries
-#define ExtraLibraries -lgnumalloc
+#define ExtraLibraries /* -lgnumalloc */
#endif
#else
#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DXNO_SYSCONF
--- config/cf/Imake.cf.ORIG Wed May 29 00:28:15 2002
+++ config/cf/Imake.cf Tue Apr 5 21:53:38 2005
@@ -19,6 +19,21 @@
* 4. Create a .cf file with the name given by MacroFile.
*/
+#if defined(__APPLE__)
+# undef __APPLE__
+# define MacroIncludeFile <Darwin.cf>
+# define MacroFile Darwin.cf
+# define DarwinArchitecture
+# ifdef __ppc__
+# define PpcDarwinArchitecture
+# undef __ppc__
+# endif
+# ifdef __i386__
+# define i386DarwinArchitecture
+# undef __i386__
+# endif
+#endif
+
#if defined(clipper) || defined(__clipper__)
# undef clipper
# define MacroIncludeFile <ingr.cf>
--- config/imake/imakemdep.h.ORIG Tue Apr 5 18:16:09 2005
+++ config/imake/imakemdep.h Tue Apr 5 18:21:15 2005
@@ -234,6 +234,11 @@
* If use cc -E but want a different compiler, define DEFAULT_CC.
* If the cpp you need is not in /lib/cpp, define DEFAULT_CPP.
*/
+
+#if defined(__APPLE__)
+#define DEFAULT_CPP "/usr/bin/cpp"
+#define DEFAULT_CC "cc"
+#endif
#ifdef hpux
#define USE_CC_E
#endif
@@ -253,7 +258,7 @@
#if defined(sun) && (defined(SVR4) || defined(__svr4__) || defined(__SVR4) || defined(__sol__))
#define DEFAULT_CPP "/usr/ccs/lib/cpp"
#endif
-#ifdef __bsdi__ || defined(__APPLE__)
+#ifdef __bsdi__
#define DEFAULT_CPP "/usr/bin/cpp"
#endif
#ifdef __uxp__
@@ -639,6 +644,12 @@
# define DEFAULT_OS_MINOR_REV "v %*d.%1s"
# define DEFAULT_OS_TEENY_REV "v %*d.%*c%[.0-9]"
# define DEFAULT_OS_NAME "srvm %[^\n]"
+# elif defined(__APPLE__)
+/* uname -v returns "x.yz" or "x.y.z", e.g. "2.02" or "2.1.2". */
+# define DEFAULT_OS_MAJOR_REV "r %[0-9]"
+# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]"
+# define DEFAULT_OS_TEENY_REV "r %*d.%*d.%[0-9]" /* this will just get 0 */
+# define DEFAULT_OS_NAME "s %[^\n]"
#elif defined(__osf__)
/* uname -r returns "Wx.y", e.g. "V3.2" or "T4.0" */
# define DEFAULT_OS_MAJOR_REV "r %*[^0-9]%[0-9]"
-mochid