aboutsummaryrefslogtreecommitdiffstats
path: root/x11-servers/xorg-server
diff options
context:
space:
mode:
authoranholt <anholt@FreeBSD.org>2004-12-31 17:02:27 +0800
committeranholt <anholt@FreeBSD.org>2004-12-31 17:02:27 +0800
commit9e18f9fee0213797d5972c9e94fa7b8502d34582 (patch)
treed7c00e0aedcb3df4c09f9fd89da9b457448f7983 /x11-servers/xorg-server
parentac91c0eccf2b314a08ea5b028a36073aa3ee6be4 (diff)
downloadfreebsd-ports-gnome-9e18f9fee0213797d5972c9e94fa7b8502d34582.tar.gz
freebsd-ports-gnome-9e18f9fee0213797d5972c9e94fa7b8502d34582.tar.zst
freebsd-ports-gnome-9e18f9fee0213797d5972c9e94fa7b8502d34582.zip
Re-add libXThrStub for FreeBSD that requires thread stubs. Between 6.7 and 6.8
I had moved libXThrStub into libX11, because it seemed unnecessary. However, because libc_r symbols are also weak, the weak stubs in libX11 would interfere, however they don't if they are in a library linked by libX11. The most common manifestation of the problem was: GThread-ERROR **: file gthread-posix.c: line 137 (g_thread_impl_init): error 'Invalid argument' during 'pthread_getschedparam (pthread_self(), &policy, &sched)' in glib apps. PR: ports/75477 Submitted by: KIMURA Yasuhiro, yasu at utahime dot org Testing by: marcus
Diffstat (limited to 'x11-servers/xorg-server')
-rw-r--r--x11-servers/xorg-server/files/patch-FreeBSD.cf36
-rw-r--r--x11-servers/xorg-server/files/patch-X11.tmpl58
2 files changed, 78 insertions, 16 deletions
diff --git a/x11-servers/xorg-server/files/patch-FreeBSD.cf b/x11-servers/xorg-server/files/patch-FreeBSD.cf
index 391afe1b7cae..b2c195f77b75 100644
--- a/x11-servers/xorg-server/files/patch-FreeBSD.cf
+++ b/x11-servers/xorg-server/files/patch-FreeBSD.cf
@@ -1,5 +1,5 @@
--- config/cf/FreeBSD.cf.orig Sat Aug 14 17:03:36 2004
-+++ config/cf/FreeBSD.cf Sat Sep 11 15:18:01 2004
++++ config/cf/FreeBSD.cf Wed Dec 29 13:40:20 2004
@@ -78,6 +78,7 @@
#define HasIssetugid YES
#define HasPoll YES
@@ -8,37 +8,49 @@
#if OSMajorVersion >= 4
#define HasGetIfAddrs YES
-@@ -117,14 +118,8 @@
+@@ -116,15 +117,14 @@
+ # endif
# if (OSRelVersion < 500043)
# define NeedUIThrStubs YES
- # endif
+-# endif
-# if (OSRelVersion >= 502102)
-# define ThreadsLibraries -lpthread
-# elif (OSRelVersion >= 500016)
-# define ThreadsLibraries -lc_r
--# else
++# define BuildThreadStubLibrary YES
++# define SharedX11Reqs $(LDPRELIB) $(XTHRSTUBLIB)
++# define SharedXtReqs $(LDPRELIB) $(XONLYLIB) $(SMLIB) $(ICELIB) $(XTHRSTUBLIB)
+ # else
-# define ThreadsLibraries -pthread
--# endif
++# define BuildThreadStubLibrary NO
+ # endif
-# define SystemMTDefines -D_THREAD_SAFE
+# define ThreadsLibraries FreeBSDPTHREAD_LIBS
+# define SystemMTDefines FreeBSDPTHREAD_CFLAGS
#endif
/* This fixes linking C programs against libGLU on FreeBSD 3.x */
-@@ -173,10 +168,10 @@
+@@ -172,12 +172,14 @@
+ #endif
#endif
- #ifndef CcCmd
+-#ifndef CcCmd
-#define CcCmd cc
-+#define CcCmd FreeBSDCC
- #endif
- #ifndef CplusplusCmd
+-#endif
+-#ifndef CplusplusCmd
-#define CplusplusCmd c++
++#if BuildThreadStubLibrary && (!defined(UseInstalledX11) || !UseInstalledX11)
++#define CcCmd $(CLIENTENVSETUP) FreeBSDCC
++#define CplusplusCmd $(CLIENTENVSETUP) FreeBSDCXX
++#else
++#define CcCmd FreeBSDCC
+#define CplusplusCmd FreeBSDCXX
#endif
++
#define CppCmd /usr/bin/cpp
#define PreProcessCmd CppCmd
-@@ -338,7 +333,7 @@
+ #define StandardCppOptions -traditional
+@@ -338,7 +340,7 @@
#ifndef LibraryRpathLoadFlags
# if UseRpath
# if UseElfFormat
@@ -47,7 +59,7 @@
# else
# define LibraryRpathLoadFlags -R $(USRLIBDIRPATH)
# endif
-@@ -463,18 +458,8 @@
+@@ -463,18 +465,8 @@
#define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
#endif
diff --git a/x11-servers/xorg-server/files/patch-X11.tmpl b/x11-servers/xorg-server/files/patch-X11.tmpl
index bdd12fbbb3e2..c27d14d8e1ec 100644
--- a/x11-servers/xorg-server/files/patch-X11.tmpl
+++ b/x11-servers/xorg-server/files/patch-X11.tmpl
@@ -1,5 +1,5 @@
---- config/cf/X11.tmpl.orig Fri Sep 3 09:18:18 2004
-+++ config/cf/X11.tmpl Fri Sep 10 20:29:12 2004
+--- X11.tmpl.orig Fri Sep 3 09:18:18 2004
++++ config/cf/X11.tmpl Wed Dec 29 13:42:37 2004
@@ -616,7 +616,7 @@
#define BuildXft1Library BuildRenderLibrary
#endif
@@ -9,7 +9,17 @@
#endif
#ifndef BuildFontconfigLibrary
#define BuildFontconfigLibrary (UseFontconfig && !HasFontconfig)
-@@ -1606,7 +1606,7 @@
+@@ -773,6 +773,9 @@
+ #ifndef ThreadedProject
+ #define ThreadedProject ThreadedX
+ #endif
++#ifndef BuildThreadStubLibrary
++#define BuildThreadStubLibrary NO
++#endif
+ #ifndef NeedUIThrStubs
+ #define NeedUIThrStubs NO
+ #endif
+@@ -1606,7 +1609,7 @@
#endif
#ifndef PsWrap
@@ -18,7 +28,7 @@
# define PsWrap $(PSWRAPSRC)/pswrap
# else
# define PsWrap pswrap
-@@ -1683,7 +1683,7 @@
+@@ -1683,7 +1686,7 @@
INSTAPPFLAGS = $(INSTDATFLAGS) /* XXX - this should go away - XXX */
@@ -27,3 +37,43 @@
RGB = $(XBINDIR)/rgb
FONTC = $(XBINDIR)/bdftopcf
MKFONTSCALE = $(XBINDIR)/mkfontscale
+@@ -1843,6 +1846,39 @@
+ DEPXLIBONLY = $(DEPXONLYLIB)
+ XLIBONLY = $(XONLYLIB)
+ LINTXONLYLIB = $(LINTXONLY)
++
++#if BuildThreadStubLibrary
++#ifndef SharedLibXThrStub
++#define SharedLibXThrStub YES
++#endif
++#ifndef NormalLibXThrStub
++#define NormalLibXThrStub NO
++#endif
++#ifndef DebugLibXThrStub
++#define DebugLibXThrStub NO
++#endif
++#ifndef ProfileLibXThrStub
++#define ProfileLibXThrStub NO
++#endif
++ XTHRSTUBLIBSRC = $(LIBSRC)/XThrStub
++#if SharedLibXThrStub
++#ifndef SharedXThrStubRev
++#define SharedXThrStubRev 6.1
++#endif
++SharedLibReferences(XTHRSTUB,XThrStub,$(XTHRSTUBLIBSRC),SOXTHRSTUBREV,SharedXThrStubRev)
++#else
++ProjectUnsharedLibReferences(XTHRSTUB,XThrStub,$(XTHRSTUBSRC),XBuildLibDir)
++#endif
++#else
++#undef SharedLibXThrStub
++#define SharedLibXThrStub NO
++#undef NormalLibXThrStub
++#define NormalLibXThrStub NO
++#undef DebugLibXThrStub
++#define DebugLibXThrStub NO
++#undef ProfileLibXThrStub
++#define ProfileLibXThrStub NO
++#endif
+
+ #if BuildScreenSaverLibrary
+ #ifndef SharedLibXss