pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/libX11 Properly define XTHREAD_CFLAGS/XTHREADLIB o...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5ec239203f09
branches:  trunk
changeset: 544997:5ec239203f09
user:      bjs <bjs%pkgsrc.org@localhost>
date:      Thu Jul 24 01:07:31 2008 +0000

description:
Properly define XTHREAD_CFLAGS/XTHREADLIB on NetBSD:  We do not
want -pthread in XTHREAD_CFLAGS, as this will end up linking everything
against libpthread.  Thus, in keeping with our gcc specfile, define
_REENTRANT in XTHREAD_CFLAGS instead.  XTHREADLIB is now
-pthread, not -lpthread.

While here, update to head of libX11-1.1 branch in GIT (with the
exception of some unicode changes which caused mkpatches to choke).

changes:

 - IM: Respect XMODIFIERS for Thai locale (bug #15719)
 - Bug #15884: Remove useless sleep()'s from the connection code.
 - NLS: Make UTF-8 the default for Russian
 - ConnDis: properly cast 'addr' before accessing it as a byte array.
 - added error check in Xcms color file parser; closes bug #15305
 - Fix missing error condition in cmsColNm.c, also.

Bump PKGREVISION.

diffstat:

 x11/libX11/Makefile         |   4 +-
 x11/libX11/distinfo         |  16 +++++++--
 x11/libX11/patches/patch-aa |  58 +++++++++++++++++++++++++++++++++-
 x11/libX11/patches/patch-ab |  21 ++++++++++++
 x11/libX11/patches/patch-ac |  18 +++++++++-
 x11/libX11/patches/patch-ah |  74 +++++++++++++++++++++++++++++++++++---------
 x11/libX11/patches/patch-ai |  17 ++++++++++
 x11/libX11/patches/patch-aj |  18 ++++++++++
 x11/libX11/patches/patch-ak |  44 ++++++++++++++++++++++++++
 x11/libX11/patches/patch-al |  27 ++++++++++++++++
 x11/libX11/patches/patch-am |  15 +++++++++
 x11/libX11/patches/patch-an |  27 ++++++++++++++++
 x11/libX11/patches/patch-ao |  15 +++++++++
 13 files changed, 327 insertions(+), 27 deletions(-)

diffs (truncated from 448 to 300 lines):

diff -r 58af38ddacdc -r 5ec239203f09 x11/libX11/Makefile
--- a/x11/libX11/Makefile       Thu Jul 24 00:11:56 2008 +0000
+++ b/x11/libX11/Makefile       Thu Jul 24 01:07:31 2008 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.14 2008/05/24 21:45:15 tnn Exp $
+# $NetBSD: Makefile,v 1.15 2008/07/24 01:07:31 bjs Exp $
 #
 
 DISTNAME=              libX11-1.1.4
-PKGREVISION=           1
+PKGREVISION=           2
 CATEGORIES=            x11 devel
 MASTER_SITES=          ${MASTER_SITE_XORG:=lib/}
 EXTRACT_SUFX=          .tar.bz2
diff -r 58af38ddacdc -r 5ec239203f09 x11/libX11/distinfo
--- a/x11/libX11/distinfo       Thu Jul 24 00:11:56 2008 +0000
+++ b/x11/libX11/distinfo       Thu Jul 24 01:07:31 2008 +0000
@@ -1,12 +1,20 @@
-$NetBSD: distinfo,v 1.10 2008/04/24 07:45:49 joerg Exp $
+$NetBSD: distinfo,v 1.11 2008/07/24 01:07:31 bjs Exp $
 
 SHA1 (libX11-1.1.4.tar.bz2) = e91092e22c3b48371c3549afba1b6a457acb2d7e
 RMD160 (libX11-1.1.4.tar.bz2) = 42776389986e0b158f703a9b88fdf95bb5095d1f
 Size (libX11-1.1.4.tar.bz2) = 1576030 bytes
-SHA1 (patch-aa) = b6424a728e1eec6aed7b74885c61a83f05fd20f4
-SHA1 (patch-ac) = c5096ba7511b60f836944aa1604aabc069771382
+SHA1 (patch-aa) = 00b07dfbf3e9b7b8ea636bb9ce4b5a037db56f61
+SHA1 (patch-ab) = 7cb4fe18ec4e4f3305a1508ddd77ef41a5f98cb8
+SHA1 (patch-ac) = a5473e31ce8b60c9ee9f19a453face3dffb9ab24
 SHA1 (patch-ad) = 58645e734f48334ce5cbf62f5870d087d95194ee
 SHA1 (patch-ae) = f9957bdb7a03c87dd24c2d4bfe4f0f46fd955fcc
 SHA1 (patch-af) = a97f3b31eecc783caecfeb315ac2cf6603ec32a5
 SHA1 (patch-ag) = 626875c0c772264ea53fbf4f6e9c2228f7628ecf
-SHA1 (patch-ah) = 3565c046484ba7b7d18cd5ddc3265870f143ffda
+SHA1 (patch-ah) = 20c4e36f8b8d0b805abe55e4246c02bdd32108da
+SHA1 (patch-ai) = 164a5dd68278552a0d6e389815568d8c38982927
+SHA1 (patch-aj) = 1da0dec1119b66940b7627bb51d3834d813026ab
+SHA1 (patch-ak) = 0320b2ef0a6e93fe0b23a5b0b903505b58182deb
+SHA1 (patch-al) = fc39dd845dc49dce15b80f2c8ff7e1766e85656c
+SHA1 (patch-am) = b1946f578716c261b5fd0a99d7eba2876e197a61
+SHA1 (patch-an) = 00b554db6b9e957b714190a3dc7e9d3c9c10b1a0
+SHA1 (patch-ao) = 2ee7efa67cfa8f6be2ebcab5fdcc2be71c1cf961
diff -r 58af38ddacdc -r 5ec239203f09 x11/libX11/patches/patch-aa
--- a/x11/libX11/patches/patch-aa       Thu Jul 24 00:11:56 2008 +0000
+++ b/x11/libX11/patches/patch-aa       Thu Jul 24 01:07:31 2008 +0000
@@ -1,10 +1,13 @@
-$NetBSD: patch-aa,v 1.4 2008/04/24 07:45:49 joerg Exp $
+$NetBSD: patch-aa,v 1.5 2008/07/24 01:07:31 bjs Exp $
 
 Include pthread.h as thread stubs might be macros like on NetBSD.
 
 Define conditional for cross-compiling support.
 
---- configure.ac.orig  2008-03-06 21:48:26.000000000 +0100
+Also, don't look for keysmydef.h, as this could break cross
+builds (from GIT).
+
+--- configure.ac.orig  2008-03-06 15:48:26.000000000 -0500
 +++ configure.ac
 @@ -180,7 +180,7 @@ esac
  AC_SUBST(XTHREADS)
@@ -15,7 +18,56 @@
  AM_CONDITIONAL(THRSTUBS, test x$thrstubs = xyes)
  
  dnl XXX incomplete, please fill this in
-@@ -322,6 +322,8 @@ else
+@@ -189,8 +189,8 @@ if test x$xthreads = xyes ; then
+     linux*|openbsd*|gnu*|k*bsd*-gnu)
+         XTHREADLIB=-lpthread ;;
+     netbsd*)
+-      XTHREAD_CFLAGS="-D_POSIX_THREAD_SAFE_FUNCTIONS"
+-      XTHREADLIB="-lpthread" ;;
++      XTHREAD_CFLAGS="-D_REENTRANT"
++      XTHREADLIB="-pthread" ;;
+     freebsd*)
+         XTHREAD_CFLAGS="-D_THREAD_SAFE"
+         XTHREADLIB="-pthread" ;;
+@@ -220,31 +220,14 @@ AC_CHECK_FUNC(poll, [AC_DEFINE(USE_POLL,
+ #
+ # Find keysymdef.h
+ #
+-KEYSYMDEF=""
+ AC_MSG_CHECKING([keysymdef.h])
+-for flag in $XPROTO_CFLAGS -I/usr/include; do
+-      case "$KEYSYMDEF" in
+-      "")
+-              case "$flag" in
+-              *-I*)
+-                      dir=`echo "$flag" | sed 's/ *-I//'`
+-                      file="$dir/X11/keysymdef.h"
+-                      if test -f "$file"; then
+-                              KEYSYMDEF="$file"
+-                      fi
+-                      ;;
+-              esac
+-              ;;
+-      esac
+-done
+-case "$KEYSYMDEF" in
+-"")
+-      AC_MSG_ERROR([Cannot find keysymdef.h])
+-      ;;
+-*)
++dir=`pkg-config --variable=includedir xproto`
++KEYSYMDEF="$dir/X11/keysymdef.h"
++if test -f "$KEYSYMDEF"; then
+       AC_MSG_RESULT([$KEYSYMDEF])
+-        ;;
+-esac
++else
++      AC_MSG_ERROR([Cannot find keysymdef.h])
++fi
+ AC_SUBST(KEYSYMDEF)
+ 
+ AM_CONDITIONAL(UDC, test xfalse = xtrue)
+@@ -322,6 +305,8 @@ else
  fi
  AC_SUBST(XKBPROTO_REQUIRES)
  
diff -r 58af38ddacdc -r 5ec239203f09 x11/libX11/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/libX11/patches/patch-ab       Thu Jul 24 01:07:31 2008 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-ab,v 1.3 2008/07/24 01:07:31 bjs Exp $
+
+IM: Respect XMODIFIERS for Thai locale (bug #15719)
+
+--- modules/im/ximcp/imThaiIm.c.orig   2008-03-06 15:45:06.000000000 -0500
++++ modules/im/ximcp/imThaiIm.c
+@@ -67,7 +67,13 @@ _XimCheckIfThaiProcessing(im)
+     char *language;
+ 
+     _XGetLCValues(im->core.lcd, XlcNLanguage, &language, NULL);
+-    if(strcmp(language, THAI_LANGUAGE_NAME) == 0) {
++    if(strcmp(language, THAI_LANGUAGE_NAME) == 0 &&
++       (strcmp(im->core.im_name, "") == 0 ||
++        strcmp(im->core.im_name, "BasicCheck") == 0 ||
++        strcmp(im->core.im_name, "Strict") == 0 ||
++        strcmp(im->core.im_name, "Thaicat") == 0 ||
++        strcmp(im->core.im_name, "Passthrough") == 0))
++    {
+       return(True);
+     }
+     return(False);
diff -r 58af38ddacdc -r 5ec239203f09 x11/libX11/patches/patch-ac
--- a/x11/libX11/patches/patch-ac       Thu Jul 24 00:11:56 2008 +0000
+++ b/x11/libX11/patches/patch-ac       Thu Jul 24 01:07:31 2008 +0000
@@ -1,6 +1,9 @@
-$NetBSD: patch-ac,v 1.4 2008/04/24 07:45:49 joerg Exp $
+$NetBSD: patch-ac,v 1.5 2008/07/24 01:07:31 bjs Exp $
 
---- configure.orig     2008-03-06 21:48:42.000000000 +0100
+_POSIX_THREAD_SAFE_FUNCTIONS is not used on NetBSD.  Instead,
+let's use _REENTRANT.
+
+--- configure.orig     2008-03-06 15:48:42.000000000 -0500
 +++ configure
 @@ -927,6 +927,8 @@ XKB_FALSE
  XKBPROTO_CFLAGS
@@ -115,6 +118,17 @@
   if test x$thrstubs = xyes; then
    THRSTUBS_TRUE=
    THRSTUBS_FALSE='#'
+@@ -22966,8 +22970,8 @@ if test x$xthreads = xyes ; then
+     linux*|openbsd*|gnu*|k*bsd*-gnu)
+         XTHREADLIB=-lpthread ;;
+     netbsd*)
+-      XTHREAD_CFLAGS="-D_POSIX_THREAD_SAFE_FUNCTIONS"
+-      XTHREADLIB="-lpthread" ;;
++      XTHREAD_CFLAGS="-D_REENTRANT"
++      XTHREADLIB="-pthread" ;;
+     freebsd*)
+         XTHREAD_CFLAGS="-D_THREAD_SAFE"
+         XTHREADLIB="-pthread" ;;
 @@ -23507,6 +23511,15 @@ else
  fi
  
diff -r 58af38ddacdc -r 5ec239203f09 x11/libX11/patches/patch-ah
--- a/x11/libX11/patches/patch-ah       Thu Jul 24 00:11:56 2008 +0000
+++ b/x11/libX11/patches/patch-ah       Thu Jul 24 01:07:31 2008 +0000
@@ -1,18 +1,60 @@
-$NetBSD: patch-ah,v 1.2 2008/01/14 07:12:53 tnn Exp $
+$NetBSD: patch-ah,v 1.3 2008/07/24 01:07:31 bjs Exp $
 
---- src/XlibInt.c.orig 2007-07-21 10:45:39.000000000 +0200
+--- src/XlibInt.c.orig 2008-07-23 01:53:49.000000000 -0400
 +++ src/XlibInt.c
-@@ -138,8 +138,13 @@ xthread_t (*_Xthread_self_fn)(void) = NU
- #ifdef ISC
- #define ECHECK(err) ((errno == err) || ETEST())
- #else
-+#ifdef __hpux
-+#define ECHECK(err) ((errno == err) || ETEST())
-+#define SUNSYSV 1
-+#else
- #define ECHECK(err) (errno == err)
- #endif
-+#endif
- #define ESET(val) errno = val
- #endif
- #endif
+@@ -206,8 +206,6 @@ static char *_XAsyncReply(
+     Bool discard);
+ #endif /* !USE_XCB */
+ 
+-#define SEQLIMIT (65535 - (BUFSIZE / SIZEOF(xReq)) - 10)
+-
+ /*
+  * The following routines are internal routines used by Xlib for protocol
+  * packet transmission and reception.
+@@ -570,24 +568,34 @@ _XWaitForReadable(
+ }
+ #endif /* !USE_XCB */
+ 
++static int sync_hazard(Display *dpy)
++{
++    unsigned long span = dpy->request - dpy->last_request_read;
++    unsigned long hazard = min((dpy->bufmax - dpy->buffer) / SIZEOF(xReq), 65535 - 10);
++    return span >= 65535 - hazard - 10;
++}
++
+ static
+ int _XSeqSyncFunction(
+     register Display *dpy)
+ {
+     xGetInputFocusReply rep;
+     register xReq *req;
++    int sent_sync = 0;
+ 
+     LockDisplay(dpy);
+-    if ((dpy->request - dpy->last_request_read) >= (BUFSIZE / SIZEOF(xReq))) {
++    if ((dpy->request - dpy->last_request_read) >= (65535 - BUFSIZE/SIZEOF(xReq))) {
+       GetEmptyReq(GetInputFocus, req);
+       (void) _XReply (dpy, (xReply *)&rep, 0, xTrue);
++      sent_sync = 1;
+     }
+     /* could get XID handler while waiting for reply in MT env */
+-    if (dpy->synchandler == _XSeqSyncFunction) {
++    if (dpy->synchandler == _XSeqSyncFunction && !sync_hazard(dpy)) {
+       dpy->synchandler = dpy->savedsynchandler;
+       dpy->flags &= ~XlibDisplayPrivSync;
+     }
+     UnlockDisplay(dpy);
++    if (sent_sync)
+     SyncHandle();
+     return 0;
+ }
+@@ -595,8 +603,7 @@ int _XSeqSyncFunction(
+ void _XSetSeqSyncFunction(
+     register Display *dpy)
+ {
+-    if ((dpy->request - dpy->last_request_read) >= SEQLIMIT &&
+-      !(dpy->flags & XlibDisplayPrivSync)) {
++    if (!(dpy->flags & XlibDisplayPrivSync) && sync_hazard(dpy)) {
+       dpy->savedsynchandler = dpy->synchandler;
+       dpy->synchandler = _XSeqSyncFunction;
+       dpy->flags |= XlibDisplayPrivSync;
diff -r 58af38ddacdc -r 5ec239203f09 x11/libX11/patches/patch-ai
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/libX11/patches/patch-ai       Thu Jul 24 01:07:31 2008 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-ai,v 1.1 2008/07/24 01:07:31 bjs Exp $
+
+Bug #15884: Remove useless sleep()'s from the connection code.
+
+--- modules/im/ximcp/imTrans.c.orig    2008-03-06 15:45:06.000000000 -0500
++++ modules/im/ximcp/imTrans.c
+@@ -77,10 +77,7 @@ _XimTransConnect(
+           spec->trans_conn = NULL;
+ 
+           if (connect_stat == TRANS_TRY_CONNECT_AGAIN)
+-          {
+-              sleep(1);
+               continue;
+-          }
+           else
+               break;
+       }
diff -r 58af38ddacdc -r 5ec239203f09 x11/libX11/patches/patch-aj
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/libX11/patches/patch-aj       Thu Jul 24 01:07:31 2008 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-aj,v 1.1 2008/07/24 01:07:31 bjs Exp $
+
+NLS: Make UTF-8 the default for Russian
+
+--- nls/locale.alias.pre.orig  2008-03-06 15:45:06.000000000 -0500
++++ nls/locale.alias.pre
+@@ -916,8 +916,9 @@ ro_RO:                                             ro_RO.ISO8859-2
+ ro_RO.iso88592:                                       ro_RO.ISO8859-2
+ ro_RO.ISO-8859-2:                             ro_RO.ISO8859-2
+ ro_RO.utf8:                                   ro_RO.UTF-8
+-ru:                                           ru_RU.ISO8859-5
+-ru_RU:                                                ru_RU.ISO8859-5
++ru:                                           ru_RU.UTF-8
++ru_RU:                                                ru_RU.UTF-8
++ru_RU.utf8:                                   ru_RU.UTF-8
+ ru_RU.iso88595:                                       ru_RU.ISO8859-5
+ ru_RU.ISO-8859-5:                             ru_RU.ISO8859-5
+ ru_RU.koi8r:                                  ru_RU.KOI8-R



Home | Main Index | Thread Index | Old Index