Hi,

On Wed, Jul 03, 2002 at 02:15:13PM -0400, Garance A Drosihn wrote:
> Fwiw, I am also using the system toolchain (as cvsup'ed late last
> night), and not the port.

I can build x11/XFree86-4 with the following patches, which I harvested
from various email's since the gcc 3.1 import.  Which ones are really
needed, and why the X11 libraries are built four times during the build
of the meta port, are what I need to figure out next...

Stock -CURRENT just before KSE3, no relevant ports installed before the
build (only cvsup).

Regards,
  -Jeremy

-- 
FreeBSD - Because the best things in life are free...
                                           http://www.freebsd.org/

devel/imake-4:
  Maintainer:   [EMAIL PROTECTED]
  Changes: Makefile
  Adds   : files/patch-config::cf::FreeBSD.cf files/patch-config::cf::bsdLib.tmpl
  Removes: files/patch-d files/patch-xthreads

x11-servers/XFree86-4-Server:
  Maintainer:   [EMAIL PROTECTED]
  Changes:
  Adds   : files/patch-GL_mesa_src_Imakefile files/patch-OSmesa-Imakefile 
files/patch-gcc31
  Removes:

x11/XFree86-4-libraries:
  Maintainer:   [EMAIL PROTECTED]
  Changes: files/patch-UIThrStubs.c files/patch-z32 files/patch-z45
  Adds   : files/patch-bsdLib.rules
  Removes:

--- /usr/ports.ref/devel/imake-4/Makefile       Thu May 23 10:49:32 2002
+++ devel/imake-4/Makefile      Tue Jul  2 00:32:01 2002
@@ -21,6 +21,7 @@
 MAINTAINER=    [EMAIL PROTECTED]
 
 PREFIX?=       ${X11BASE}
+USE_PERL5=     yes
 
 .include <bsd.port.pre.mk>
 
@@ -127,6 +128,10 @@
 #             It's a traditional place ;-)
 # InstallXserverSetUID=NO : use Xwrapper.
 # End of XFree86 configrations
+
+pre-patch:
+       @${PERL} -pi -e 's|\#\!/usr/bin/perl|\#\!${PERL}|g ' \
+               ${WRKSRC}/util/mkhtmlindex.pl
 
 post-install:
        @${MKHTMLINDEX} ${PREFIX}/lib/X11/doc/html
--- /usr/ports.ref/devel/imake-4/files/patch-config::cf::FreeBSD.cf     Thu Jan  1 
02:00:00 1970
+++ devel/imake-4/files/patch-config::cf::FreeBSD.cf    Wed Jun 26 22:38:58 2002
@@ -0,0 +1,34 @@
+--- cf/FreeBSD.cf.orig Wed Jun 26 15:44:29 2002
++++ cf/FreeBSD.cf      Wed Jun 26 16:21:18 2002
+@@ -80,7 +80,6 @@
+ /*
+  * math.h uses _REENTRANT and stdio.h uses _THREAD_SAFE, so define both.
+  */
+-# define SystemMTDefines      -D_REENTRANT -D_THREAD_SAFE
+ /*
+  * FreeBSD has tread-safe api but no getpwnam_r yet.
+  */
+@@ -91,8 +90,13 @@
+ # else
+ #  define BuildThreadStubLibrary  YES 
+ #  define NeedUIThrStubs          YES 
+-#  define ThreadsCompileFlags -pthread
+-#  define ThreadsLibraries    -pthread
++#  if (OSRelVersion >= 500016)
++#   define SystemMTDefines    -D_REENTRANT -D_THREAD_SAFE
++#   define ThreadsLibraries   -lc_r
++#  else
++#   define SystemMTDefines    -D_REENTRANT -D_THREAD_SAFE
++#   define ThreadsLibraries   -pthread
++#  endif
+ #  define SharedX11Reqs               $(LDPRELIB) $(XTHRSTUBLIB)
+ #  define SharedXtReqs                $(LDPRELIB) $(XLIBONLY) $(SMLIB) $(ICELIB) 
+$(XTHRSTUBLIB)
+ # endif
+@@ -151,6 +154,7 @@
+ # define CcCmd                        cc
+ # define CplusplusCmd         c++
+ #endif
++#define       CplusplusLibC           -lstdc++
+ 
+ #define CppCmd                        /usr/bin/cpp
+ #define PreProcessCmd         CppCmd
--- /usr/ports.ref/devel/imake-4/files/patch-config::cf::bsdLib.tmpl    Thu Jan  1 
02:00:00 1970
+++ devel/imake-4/files/patch-config::cf::bsdLib.tmpl   Wed Jun 26 22:38:18 2002
@@ -0,0 +1,13 @@
+--- cf/bsdLib.tmpl.orig        Wed Jun 26 16:19:42 2002
++++ cf/bsdLib.tmpl     Wed Jun 26 16:20:34 2002
+@@ -39,7 +39,9 @@
+ #define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XLIB)
+ #endif
+ 
+-#define CplusplusLibC
++#ifndef CplusplusLibC
++#define CplusplusLibC $(CXX)
++#endif
+ #define FrescoSysLibs CplusplusLibC MathLibrary
+ 
+ /* Allow for libpthread, as overridden by OS definitions */
--- /usr/ports.ref/devel/imake-4/files/patch-d  Tue Jun 12 16:59:11 2001
+++ devel/imake-4/files/patch-d Wed Jun 26 22:01:35 2002
@@ -1,19 +0,0 @@
---- cf/FreeBSD.cf.orig Fri May  4 05:12:35 2001
-+++ cf/FreeBSD.cf      Mon Jun  4 19:31:27 2001
-@@ -444,14 +444,14 @@
- /* The GCC strength-reduce bug is fixed for FreeBSD 2.1.5 and later */
- #ifndef DefaultGcc2i386Opt
- #if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 1) || 
(OSMajorVersion == 2 && OSMinorVersion == 1 && OSTeenyVersion >= 5)
--#define DefaultGcc2i386Opt -O2
-+#define DefaultGcc2i386Opt
- #endif
- #endif
- 
- #ifdef i386Architecture
- # define OptimizedCDebugFlags DefaultGcc2i386Opt
- #else
--# define OptimizedCDebugFlags -O
-+# define OptimizedCDebugFlags
- #endif
- 
- #ifndef PreIncDir
--- /usr/ports.ref/devel/imake-4/files/patch-xthreads   Tue Jun 12 16:59:11 2001
+++ devel/imake-4/files/patch-xthreads  Wed Jun 26 22:02:08 2002
@@ -1,25 +0,0 @@
---- cf/FreeBSD.cf.orig Thu Jun  7 16:25:47 2001
-+++ cf/FreeBSD.cf      Thu Jun  7 16:28:30 2001
-@@ -80,7 +80,6 @@
- /*
-  * math.h uses _REENTRANT and stdio.h uses _THREAD_SAFE, so define both.
-  */
--# define SystemMTDefines      -D_REENTRANT -D_THREAD_SAFE
- /*
-  * FreeBSD has tread-safe api but no getpwnam_r yet.
-  */
-@@ -91,8 +90,12 @@
- # else
- #  define BuildThreadStubLibrary  YES 
- #  define NeedUIThrStubs          YES 
--#  define ThreadsCompileFlags -pthread
--#  define ThreadsLibraries    -pthread
-+#  if (OSRelVersion >= 500016)
-+#   define ThreadsLibraries   -lc_r
-+#  else
-+#   define SystemMTDefines    -D_REENTRANT -D_THREAD_SAFE
-+#   define ThreadsLibraries   -pthread
-+#  endif
- #  define SharedX11Reqs               $(LDPRELIB) $(XTHRSTUBLIB)
- #  define SharedXtReqs                $(LDPRELIB) $(XLIBONLY) $(SMLIB) $(ICELIB) 
$(XTHRSTUBLIB)
- # endif
--- /usr/ports.ref/x11-servers/XFree86-4-Server/files/patch-GL_mesa_src_Imakefile      
 Thu Jan  1 02:00:00 1970
+++ x11-servers/XFree86-4-Server/files/patch-GL_mesa_src_Imakefile      Wed Jun 26 
+22:33:32 2002
@@ -0,0 +1,16 @@
+--- lib/GL/mesa/src/Imakefile.orig     Wed May  2 17:06:02 2001
++++ lib/GL/mesa/src/Imakefile  Fri Jun 21 15:49:39 2002
+@@ -51,6 +51,13 @@
+ 
+ #include <Library.tmpl>
+ 
++#if defined(__GNUC__) && __GNUC__ >= 3
++#define ObjectCompile(options) RemoveFile($@)                           @@\
++      ClearmakeOSName \
++      $(CC) -c $(CFLAGS) options $*.c -o $@ || \
++      $(CC) -c $(CFLAGS) options -O0 $*.c -o $@
++#endif
++
+ LibraryObjectRule()
+ 
+ SubdirLibraryRule($(OBJS))
--- /usr/ports.ref/x11-servers/XFree86-4-Server/files/patch-OSmesa-Imakefile    Thu 
Jan  1 02:00:00 1970
+++ x11-servers/XFree86-4-Server/files/patch-OSmesa-Imakefile   Wed Jun 26 22:32:06 
+2002
@@ -0,0 +1,16 @@
+--- lib/GL/mesa/src/OSmesa/Imakefile.orig      Fri Jun 21 11:23:42 2002
++++ lib/GL/mesa/src/OSmesa/Imakefile   Fri Jun 21 13:55:44 2002
+@@ -8,6 +8,13 @@
+ #define DoDebugLib DebugLibGlx
+ #define DoProfileLib ProfileLibGlx
+ 
++#if defined(__GNUC__) && __GNUC__ >= 3
++#define ObjectCompile(options) RemoveFile($@)                           @@\
++      ClearmakeOSName \
++      $(CC) -c $(CFLAGS) options $*.c -o $@ || \
++      $(CC) -c $(CFLAGS) options -O0 $*.c -o $@
++#endif
++
+ #include "../Imakefile.inc"
+ #ifdef i386Architecture
+ #include "../X86/Imakefile.inc"
--- /usr/ports.ref/x11-servers/XFree86-4-Server/files/patch-gcc31       Thu Jan  1 
02:00:00 1970
+++ x11-servers/XFree86-4-Server/files/patch-gcc31      Wed Jun 26 22:06:47 2002
@@ -0,0 +1,32 @@
+--- lib/XThrStub/UIThrStubs.c.old      Mon Nov 19 06:13:26 2001
++++ lib/XThrStub/UIThrStubs.c  Tue Jun  4 11:39:19 2002
+@@ -99,6 +99,21 @@
+ #else
+ #include <pthread.h>
+ typedef pthread_t xthread_t;
++#if __GNUC__ >= 3
++xthread_t pthread_self()    __attribute__ ((weak, alias ("_Xthr_self_stub_")));
++int pthread_mutex_init()    __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
++int pthread_mutex_destroy() __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
++int pthread_mutex_lock()    __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
++int pthread_mutex_unlock()  __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
++int pthread_cond_init()     __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
++int pthread_cond_destroy()  __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
++int pthread_cond_wait()     __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
++int pthread_cond_signal()   __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
++int pthread_cond_broadcast() __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
++int pthread_key_create()    __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
++void *pthread_getspecific()  __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
++int pthread_setspecific()   __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
++#else /* __GNUC__ */
+ #pragma weak pthread_self = _Xthr_self_stub_
+ #pragma weak pthread_mutex_init = _Xthr_zero_stub_
+ #pragma weak pthread_mutex_destroy = _Xthr_zero_stub_
+@@ -113,6 +128,7 @@
+ #pragma weak pthread_key_create = _Xthr_zero_stub_
+ #pragma weak pthread_getspecific = _Xthr_zero_stub_
+ #pragma weak pthread_setspecific = _Xthr_zero_stub_
++#endif        /* __GNUC__ */
+ #if defined(_DECTHREADS_) || defined(linux)
+ #pragma weak pthread_equal = _Xthr_equal_stub_        /* See Xthreads.h! */
+ int
--- /usr/ports.ref/x11/XFree86-4-libraries/files/patch-UIThrStubs.c     Fri Jun  7 
05:26:24 2002
+++ x11/XFree86-4-libraries/files/patch-UIThrStubs.c    Wed Jun 26 22:19:12 2002
@@ -1,32 +1,36 @@
---- lib/XThrStub/UIThrStubs.c.old      Mon Nov 19 06:13:26 2001
-+++ lib/XThrStub/UIThrStubs.c  Tue Jun  4 11:39:19 2002
-@@ -99,6 +99,21 @@
+--- lib/XThrStub/UIThrStubs.c.orig     Sun Nov 18 22:13:26 2001
++++ lib/XThrStub/UIThrStubs.c  Wed May 29 17:14:24 2002
+@@ -99,6 +99,25 @@
  #else
  #include <pthread.h>
  typedef pthread_t xthread_t;
 +#if __GNUC__ >= 3
-+xthread_t pthread_self()    __attribute__ ((weak, alias ("_Xthr_self_stub_")));
-+int pthread_mutex_init()    __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
++static xthread_t _Xthr_self_stub_();
++static int _Xthr_zero_stub_();
++
++xthread_t pthread_self() __attribute__ ((weak, alias ("_Xthr_self_stub_")));
++int pthread_mutex_init() __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
 +int pthread_mutex_destroy() __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
-+int pthread_mutex_lock()    __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
-+int pthread_mutex_unlock()  __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
-+int pthread_cond_init()     __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
-+int pthread_cond_destroy()  __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
-+int pthread_cond_wait()     __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
-+int pthread_cond_signal()   __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
++int pthread_mutex_lock() __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
++int pthread_mutex_unlock() __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
++int pthread_cond_init() __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
++int pthread_cond_destroy() __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
++int pthread_cond_wait() __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
++int pthread_cond_signal() __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
 +int pthread_cond_broadcast() __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
-+int pthread_key_create()    __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
-+void *pthread_getspecific()  __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
-+int pthread_setspecific()   __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
-+#else /* __GNUC__ */
++/* These are added for libGL */
++int pthread_key_create() __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
++void * pthread_getspecific() __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
++int pthread_setspecific() __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
++#else
  #pragma weak pthread_self = _Xthr_self_stub_
  #pragma weak pthread_mutex_init = _Xthr_zero_stub_
  #pragma weak pthread_mutex_destroy = _Xthr_zero_stub_
-@@ -113,6 +128,7 @@
+@@ -113,6 +132,7 @@
  #pragma weak pthread_key_create = _Xthr_zero_stub_
  #pragma weak pthread_getspecific = _Xthr_zero_stub_
  #pragma weak pthread_setspecific = _Xthr_zero_stub_
-+#endif        /* __GNUC__ */
++#endif /* __GNUC__ */
  #if defined(_DECTHREADS_) || defined(linux)
  #pragma weak pthread_equal = _Xthr_equal_stub_        /* See Xthreads.h! */
  int
--- /usr/ports.ref/x11/XFree86-4-libraries/files/patch-bsdLib.rules     Thu Jan  1 
02:00:00 1970
+++ x11/XFree86-4-libraries/files/patch-bsdLib.rules    Sun Jun 30 00:35:05 2002
@@ -0,0 +1,37 @@
+--- config/cf/bsdLib.rules.orig        Sun Jun 30 00:30:05 2002
++++ config/cf/bsdLib.rules     Sun Jun 30 00:31:06 2002
+@@ -306,6 +306,34 @@
+ 
+ #endif /* SharedDepLibraryTarget */
+ 
++/*
++ * SharedDepCplusplusLibraryTarget - generate rules to create a shared library.
++ */
++#ifndef SharedDepCplusplusLibraryTarget
++#define SharedDepCplusplusLibraryTarget(libname,rev,deplist,solist,down,up)   @@\
++AllTarget(Concat(lib,libname.so.rev))                                 @@\
++                                                                      @@\
++Concat(lib,libname.so.rev):  deplist                                  @@\
++      $(RM) $@~                                                       @@\
++      @SONAME=`echo $@ | sed 's/\.[^\.]*$$//'`; set -x; \             @@\
++              (cd down; $(CXX) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist 
+$(REQUIREDLIBS) BaseShLibReqs); \ @@\
++              $(RM) $$SONAME; $(LN) $@ $$SONAME; \                    @@\
++              LinkBuildSonameLibrary($$SONAME)                        @@\
++      $(RM) $@                                                        @@\
++      $(MV) $@~ $@                                                    @@\
++      $(RM) Concat(lib,libname.so)                                    @@\
++      $(LN) $@ Concat(lib,libname.so)                                 @@\
++      LinkBuildLibrary($@)                                            @@\
++      LinkBuildLibrary(Concat(lib,libname.so))                        @@\
++                                                                      @@\
++clean::                                                                       @@\
++      @SONAME=`echo Concat(lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`; \ @@\
++      set -x; $(RM) $$SONAME                                          @@\
++      $(RM) Concat(lib,libname.so)                                    @@\
++      $(RM) Concat(lib,libname.so.rev)
++
++#endif /* SharedDepCplusplusLibraryTarget */
++
+ #ifndef SharedDepModuleTarget
+ #define SharedDepModuleTarget(name,deps,solist)                               @@\
+ AllTarget(name)                                                               @@\
--- /usr/ports.ref/x11/XFree86-4-libraries/files/patch-z32      Tue Jun 12 16:59:51 
2001
+++ x11/XFree86-4-libraries/files/patch-z32     Wed Jun 26 22:30:11 2002
@@ -1,5 +1,24 @@
 --- lib/GL/mesa/src/OSmesa/Imakefile.orig      Tue Apr  3 11:29:33 2001
-+++ lib/GL/mesa/src/OSmesa/Imakefile   Thu Jun  7 02:58:09 2001
++++ lib/GL/mesa/src/OSmesa/Imakefile   Fri Jun 21 13:55:44 2002
+@@ -8,6 +8,18 @@
+ #define DoDebugLib DebugLibGlx
+ #define DoProfileLib ProfileLibGlx
+ 
++#define LibObjCompile(dir,options) RemoveFiles($@ $(@:C!([^/]+)$!dir/\1!))    @@\
++      ClearmakeOSName \
++      $(CC) -c $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES) \
++      options $*.c -o $(@:C!([^/]+)$!dir/\1!)
++
++#if defined(__GNUC__) && __GNUC__ >= 3
++#define ObjectCompile(options) RemoveFile($@)                           @@\
++      ClearmakeOSName \
++      $(CC) -c $(CFLAGS) options $*.c -o $@ || \
++      $(CC) -c $(CFLAGS) options -O0 $*.c -o $@
++#endif
++
+ #include "../Imakefile.inc"
+ #ifdef i386Architecture
+ #include "../X86/Imakefile.inc"
 @@ -58,7 +58,7 @@
  LIBNAME = OSMesa
  SOREV = 3.3
--- /usr/ports.ref/x11/XFree86-4-libraries/files/patch-z45      Tue Jun 12 16:59:51 
2001
+++ x11/XFree86-4-libraries/files/patch-z45     Wed Jun 26 22:05:15 2002
@@ -1,5 +1,5 @@
---- lib/GLU/Imakefile.orig     Wed Feb 14 04:19:11 2001
-+++ lib/GLU/Imakefile  Thu Jun  7 03:00:26 2001
+--- lib/GLU/Imakefile.orig     Wed Jun  6 01:03:20 2001
++++ lib/GLU/Imakefile  Wed Jun 26 15:27:14 2002
 @@ -103,6 +103,7 @@
  #undef _LinkBuildLibrary
  #define _LinkBuildLibrary(lib) LinkBuildLibrary(lib)
@@ -8,7 +8,19 @@
  #if NormalLibGlu
  NormalDepLibraryTarget($(LIBNAME),$(SUBDIRS) $(DONES),$(STATIC_OBJS))
  InstallLibrary($(LIBNAME),$(USRLIBDIR))
-@@ -122,6 +123,7 @@
+@@ -110,9 +111,9 @@
+ 
+ #if SharedLibGlu
+ #ifdef SharedDepCplusplusLibraryTarget
+-SharedDepCplusplusLibraryTarget($(LIBNAME),$(SOREV),$(SUBDIRS) 
+$(DONES),$(SHARED_OBJS),.,.)
++SharedDepCplusplusLibraryTarget($(LIBNAME),$(SOREV),$(SUBDIRS) 
+$(DONES),$(SHARED_OBJS) $(CXXLIB),.,.)
+ #else
+-SharedDepLibraryTarget($(LIBNAME),$(SOREV),$(SUBDIRS) $(DONES),$(SHARED_OBJS),.,.)
++SharedDepLibraryTarget($(LIBNAME),$(SOREV),$(SUBDIRS) $(DONES),$(SHARED_OBJS) 
+$(CXXLIB),.,.)
+ #endif
+ InstallSharedLibrary($(LIBNAME),$(SOREV),$(SHLIBDIR))
+ #endif
+@@ -126,6 +127,7 @@
  ProfiledDepLibraryTarget($(LIBNAME),$(SUBDIRS) $(DONES),$(PROFILE_OBJS))
  InstallLibrary($(LIBNAME)_p,$(USRLIBDIR))
  #endif /* ProfileLibFont */

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to