diff --git a/x11/XFree86-4-libraries/Makefile b/x11/XFree86-4-libraries/Makefile index c160d8298569..6fe3bd222da9 100644 --- a/x11/XFree86-4-libraries/Makefile +++ b/x11/XFree86-4-libraries/Makefile @@ -29,6 +29,7 @@ LIB_DEPENDS= freetype.9:${PORTSDIR}/print/freetype2 \ fontconfig.1:${PORTSDIR}/x11-fonts/fontconfig USE_X_PREFIX= no +USE_REINPLACE= yes PREFIX?= ${X11BASE} MTREE_FILE= /etc/mtree/BSD.x11-4.dist INSTALLS_SHLIB= yes @@ -78,6 +79,9 @@ PLIST_SUB+= AMD64:="@comment " post-extract: ${GUNZIP_CMD} -c ${DISTDIR}/${DIST_SUBDIR}/Wraphelp2.gz > \ ${WRKSRC}/lib/Xdmcp/Wraphelp.c + @${REINPLACE_CMD} -e 's|%%PTHREAD_CFLAGS%%|${PTHREAD_CFLAGS}|g ; \ + s|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|g' \ + ${WRKSRC}/config/cf/FreeBSD.cf post-patch: ${CP} ${MASTERDIR}/files/nls::Compose::microsoft-cp1251 ${WRKSRC}/nls/Compose/microsoft-cp1251 diff --git a/x11/XFree86-4-libraries/files/patch-FreeBSD.cf b/x11/XFree86-4-libraries/files/patch-FreeBSD.cf index 0a50e5269e91..6938da5efc6d 100644 --- a/x11/XFree86-4-libraries/files/patch-FreeBSD.cf +++ b/x11/XFree86-4-libraries/files/patch-FreeBSD.cf @@ -1,5 +1,34 @@ ---- config/cf/FreeBSD.cf Tue Jan 14 21:52:12 2003 -+++ config/cf/FreeBSD.cf Sun Nov 2 13:21:24 2003 +--- config/cf/FreeBSD.cf.orig Tue Jan 14 21:52:12 2003 ++++ config/cf/FreeBSD.cf Thu Feb 5 12:33:53 2004 +@@ -89,14 +89,14 @@ + # endif + # define HasPosixThreads YES + # define ThreadedX YES +-# define SystemMTDefines -D_REENTRANT -D_THREAD_SAFE ++# define SystemMTDefines %%PTHREAD_CFLAGS%% + /* + * FreeBSD has tread-safe api but no getpwnam_r yet. + */ + # define HasThreadSafeAPI YES + # define MTSafeAPIDefines -DXUSE_MTSAFE_API -DXNO_MTSAFE_PWDAPI + # if HasLibPthread +-# define ThreadsLibraries -lpthread ++# define ThreadsLibraries %%PTHREAD_LIBS%% + # else + # if OSRelVersion >= 500043 + # define BuildThreadStubLibrary NO +@@ -106,9 +106,9 @@ + # define NeedUIThrStubs YES + # endif + # if (OSRelVersion >= 500016) +-# define ThreadsLibraries -lc_r ++# define ThreadsLibraries %%PTHREAD_LIBS%% + # else +-# define ThreadsLibraries -pthread ++# define ThreadsLibraries %%PTHREAD_LIBS%% + # endif + # define SharedX11Reqs $(LDPRELIB) $(XTHRSTUBLIB) + # define SharedXtReqs $(LDPRELIB) $(XLIBONLY) $(SMLIB) $(ICELIB) $(XTHRSTUBLIB) @@ -162,11 +162,11 @@ * ld: warning: libXThrStub.so.6, needed by libX11.so, not found */