diff options
author | bjs <bjs@pkgsrc.org> | 2008-07-24 01:07:31 +0000 |
---|---|---|
committer | bjs <bjs@pkgsrc.org> | 2008-07-24 01:07:31 +0000 |
commit | 7e7069fbf2daa539e276833c2e2b69fa6427ab1d (patch) | |
tree | 056e24512827a567d15a9f4ea9ac3c9e967682be /x11/libX11 | |
parent | 8ac4236495cf491a513bff79ddf9b9701ce49cfa (diff) | |
download | pkgsrc-7e7069fbf2daa539e276833c2e2b69fa6427ab1d.tar.gz |
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 (limited to 'x11/libX11')
-rw-r--r-- | x11/libX11/Makefile | 4 | ||||
-rw-r--r-- | x11/libX11/distinfo | 16 | ||||
-rw-r--r-- | x11/libX11/patches/patch-aa | 58 | ||||
-rw-r--r-- | x11/libX11/patches/patch-ab | 21 | ||||
-rw-r--r-- | x11/libX11/patches/patch-ac | 18 | ||||
-rw-r--r-- | x11/libX11/patches/patch-ah | 74 | ||||
-rw-r--r-- | x11/libX11/patches/patch-ai | 17 | ||||
-rw-r--r-- | x11/libX11/patches/patch-aj | 18 | ||||
-rw-r--r-- | x11/libX11/patches/patch-ak | 44 | ||||
-rw-r--r-- | x11/libX11/patches/patch-al | 27 | ||||
-rw-r--r-- | x11/libX11/patches/patch-am | 15 | ||||
-rw-r--r-- | x11/libX11/patches/patch-an | 27 | ||||
-rw-r--r-- | x11/libX11/patches/patch-ao | 15 |
13 files changed, 327 insertions, 27 deletions
diff --git a/x11/libX11/Makefile b/x11/libX11/Makefile index 05b8fad8396..27dd32abece 100644 --- a/x11/libX11/Makefile +++ b/x11/libX11/Makefile @@ -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 --git a/x11/libX11/distinfo b/x11/libX11/distinfo index 82b7dbe94aa..1a8f199db25 100644 --- a/x11/libX11/distinfo +++ b/x11/libX11/distinfo @@ -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 --git a/x11/libX11/patches/patch-aa b/x11/libX11/patches/patch-aa index b82d8c6a8fb..b84256f08db 100644 --- a/x11/libX11/patches/patch-aa +++ b/x11/libX11/patches/patch-aa @@ -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 @@ Define conditional for cross-compiling support. 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 --git a/x11/libX11/patches/patch-ab b/x11/libX11/patches/patch-ab new file mode 100644 index 00000000000..c056c1a61f0 --- /dev/null +++ b/x11/libX11/patches/patch-ab @@ -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 --git a/x11/libX11/patches/patch-ac b/x11/libX11/patches/patch-ac index b07f4a2b594..9380df1396d 100644 --- a/x11/libX11/patches/patch-ac +++ b/x11/libX11/patches/patch-ac @@ -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 @@ $NetBSD: patch-ac,v 1.4 2008/04/24 07:45:49 joerg Exp $ 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 --git a/x11/libX11/patches/patch-ah b/x11/libX11/patches/patch-ah index 4f339156304..fbf72e43ae1 100644 --- a/x11/libX11/patches/patch-ah +++ b/x11/libX11/patches/patch-ah @@ -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 --git a/x11/libX11/patches/patch-ai b/x11/libX11/patches/patch-ai new file mode 100644 index 00000000000..5602e86b326 --- /dev/null +++ b/x11/libX11/patches/patch-ai @@ -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 --git a/x11/libX11/patches/patch-aj b/x11/libX11/patches/patch-aj new file mode 100644 index 00000000000..e5133e2142d --- /dev/null +++ b/x11/libX11/patches/patch-aj @@ -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 diff --git a/x11/libX11/patches/patch-ak b/x11/libX11/patches/patch-ak new file mode 100644 index 00000000000..eabac8ee7aa --- /dev/null +++ b/x11/libX11/patches/patch-ak @@ -0,0 +1,44 @@ +$NetBSD: patch-ak,v 1.1 2008/07/24 01:07:31 bjs Exp $ + +ConnDis: properly cast 'addr' before accessing it as a byte array. + +Bug #15884: Remove useless sleep()'s from the connection code. + +--- src/ConnDis.c.orig 2008-03-06 15:45:06.000000000 -0500 ++++ src/ConnDis.c +@@ -42,6 +42,7 @@ in this Software without prior written a + #include <X11/Xdmcp.h> + #include <stdio.h> + #include <ctype.h> ++#include <unistd.h> + + #if !defined(WIN32) + #ifndef Lynx +@@ -389,10 +390,7 @@ _X11TransConnectDisplay ( + trans_conn = NULL; + + if (connect_stat == TRANS_TRY_CONNECT_AGAIN) +- { +- sleep(1); + continue; +- } + else + break; + } +@@ -409,7 +407,6 @@ _X11TransConnectDisplay ( + { + _X11TransClose(trans_conn); + trans_conn = NULL; +- sleep(1); + if (saddr) + { + free ((char *) saddr); +@@ -1143,7 +1140,7 @@ GetAuthorization( + + /* In the case of v4 mapped addresses send the v4 + part of the address - addr is already in network byte order */ +- if (memcmp(addr+8, ipv4mappedprefix, 12) == 0) { ++ if (memcmp((char*)addr+8, ipv4mappedprefix, 12) == 0) { + for (i = 20 ; i < 24; i++) + xdmcp_data[j++] = ((char *)addr)[i]; + diff --git a/x11/libX11/patches/patch-al b/x11/libX11/patches/patch-al new file mode 100644 index 00000000000..70570a9a70c --- /dev/null +++ b/x11/libX11/patches/patch-al @@ -0,0 +1,27 @@ +$NetBSD: patch-al,v 1.1 2008/07/24 01:07:31 bjs Exp $ + +Warning fixes. + +--- src/GetDflt.c.orig 2008-03-06 15:45:06.000000000 -0500 ++++ src/GetDflt.c +@@ -98,16 +98,16 @@ GetHomeDir( + int len) + { + #ifdef WIN32 +- register char *ptr1; +- register char *ptr2; ++ register char *ptr1 = NULL; ++ register char *ptr2 = NULL; + int len1 = 0, len2 = 0; + +- if (ptr1 = getenv("HOME")) { /* old, deprecated */ ++ if ((ptr1 = getenv("HOME"))) { /* old, deprecated */ + len1 = strlen (ptr1); + } else if ((ptr1 = getenv("HOMEDRIVE")) && (ptr2 = getenv("HOMEDIR"))) { + len1 = strlen (ptr1); + len2 = strlen (ptr2); +- } else if (ptr2 = getenv("USERNAME")) { ++ } else if ((ptr2 = getenv("USERNAME"))) { + len1 = strlen (ptr1 = "/users/"); + len2 = strlen (ptr2); + } diff --git a/x11/libX11/patches/patch-am b/x11/libX11/patches/patch-am new file mode 100644 index 00000000000..7b74e8c7bd0 --- /dev/null +++ b/x11/libX11/patches/patch-am @@ -0,0 +1,15 @@ +$NetBSD: patch-am,v 1.1 2008/07/24 01:07:31 bjs Exp $ + +Warning fix. + +--- src/locking.c.orig 2008-03-06 15:45:06.000000000 -0500 ++++ src/locking.c +@@ -60,7 +60,7 @@ extern LockInfoPtr _Xi18n_lock; + #ifdef WIN32 + static DWORD _X_TlsIndex = (DWORD)-1; + +-_Xthread_init() ++void _Xthread_init() + { + if (_X_TlsIndex == (DWORD)-1) + _X_TlsIndex = TlsAlloc(); diff --git a/x11/libX11/patches/patch-an b/x11/libX11/patches/patch-an new file mode 100644 index 00000000000..b49ab5e896a --- /dev/null +++ b/x11/libX11/patches/patch-an @@ -0,0 +1,27 @@ +$NetBSD: patch-an,v 1.1 2008/07/24 01:07:31 bjs Exp $ + +Fix missing error condition (from GIT) + +added error check in Xcms color file parser; closes bug #15305 + +--- src/xcms/cmsColNm.c.orig 2008-03-06 15:45:06.000000000 -0500 ++++ src/xcms/cmsColNm.c +@@ -735,10 +735,17 @@ LoadColornameDB(void) + } + + if ((stream = _XFopenFile (pathname, "r")) == NULL) { ++ /* can't open file */ ++ XcmsColorDbState = XcmsDbInitFailure; + return(XcmsFailure); + } + +- stringSectionSize(stream, &nEntries, &size); ++ if (stringSectionSize(stream, &nEntries, &size) != XcmsSuccess || ++ nEntries == 0) { ++ (void) fclose(stream); ++ XcmsColorDbState = XcmsDbInitFailure; ++ return(XcmsFailure); ++ } + rewind(stream); + + strings = (char *) Xmalloc(size); diff --git a/x11/libX11/patches/patch-ao b/x11/libX11/patches/patch-ao new file mode 100644 index 00000000000..f6a934cca99 --- /dev/null +++ b/x11/libX11/patches/patch-ao @@ -0,0 +1,15 @@ +$NetBSD: patch-ao,v 1.1 2008/07/24 01:07:31 bjs Exp $ + +Warning fix. + +--- src/xlibi18n/lcWrap.c.orig 2008-03-06 15:45:06.000000000 -0500 ++++ src/xlibi18n/lcWrap.c +@@ -154,7 +154,7 @@ _XlcDefaultMapModifiers( + #ifdef WIN32 + { + char *s; +- for (s = mods; s = strchr(s, '@'); s++) { ++ for (s = mods; (s = strchr(s, '@')); s++) { + for (s++; *s && *s != '='; s++) { + if (*s == '#') { + *s = '='; |