diff --git a/libXrandr.spec b/libXrandr.spec index 27d21fd..abbb205 100644 --- a/libXrandr.spec +++ b/libXrandr.spec @@ -1,13 +1,14 @@ Summary: X.Org X11 libXrandr runtime library Name: libXrandr Version: 1.3.0 -Release: 3%{?dist} +Release: 4%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.x.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Source0: http://www.x.org/pub/individual/lib/%{name}-%{version}.tar.bz2 +Patch0: randr-git.patch BuildRequires: xorg-x11-proto-devel BuildRequires: pkgconfig(randrproto) >= 1.3.0 @@ -30,6 +31,7 @@ X.Org X11 libXrandr development package %prep %setup -q +%patch0 -p1 -b .git %build %configure --disable-static @@ -63,6 +65,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/*.3* %changelog +* Tue Nov 10 2009 Adam Jackson 1.3.0-4 +- randr-git.patch: Update to git + * Fri Jul 24 2009 Fedora Release Engineering - 1.3.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild diff --git a/randr-git.patch b/randr-git.patch new file mode 100644 index 0000000..44f8ca9 --- /dev/null +++ b/randr-git.patch @@ -0,0 +1,102 @@ +diff --git a/configure.ac b/configure.ac +index a018667..09c5d8d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -32,7 +32,7 @@ dnl protocol, so Xrandr version l.n.m corresponds to protocol version l.n + dnl + AC_INIT(libXrandr, 1.3.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXrandr) + AC_CONFIG_AUX_DIR(.) +-AM_INIT_AUTOMAKE([dist-bzip2]) ++AM_INIT_AUTOMAKE([foreign dist-bzip2]) + AM_MAINTAINER_MODE + + # Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG +diff --git a/include/X11/extensions/Xrandr.h b/include/X11/extensions/Xrandr.h +index a411321..6b756a7 100644 +--- a/include/X11/extensions/Xrandr.h ++++ b/include/X11/extensions/Xrandr.h +@@ -197,6 +197,7 @@ Time XRRTimes (Display *dpy, int screen, Time *config_timestamp); + + /* Version 1.2 additions */ + ++/* despite returning a Status, this returns 1 for success */ + Status + XRRGetScreenSizeRange (Display *dpy, Window window, + int *minWidth, int *minHeight, +diff --git a/src/XrrConfig.c b/src/XrrConfig.c +index db7a1ae..34ff3ef 100644 +--- a/src/XrrConfig.c ++++ b/src/XrrConfig.c +@@ -409,6 +409,7 @@ Status XRRSetScreenConfigAndRate (Display *dpy, + + (void) _XReply (dpy, (xReply *) &rep, 0, xTrue); + ++ /* actually .errorCode in struct xError */ + if (rep.status == RRSetConfigSuccess) { + /* if we succeed, set our view of reality to what we set it to */ + config->config_timestamp = rep.newConfigTimestamp; +diff --git a/src/XrrCrtc.c b/src/XrrCrtc.c +index db9d0b4..697987a 100644 +--- a/src/XrrCrtc.c ++++ b/src/XrrCrtc.c +@@ -167,7 +167,7 @@ XRRGetCrtcGammaSize (Display *dpy, RRCrtc crtc) + req->crtc = crtc; + + if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) +- rep.status = RRSetConfigFailed; ++ rep.size = 0; + UnlockDisplay (dpy); + SyncHandle (); + return rep.size; +@@ -179,7 +179,7 @@ XRRGetCrtcGamma (Display *dpy, RRCrtc crtc) + XExtDisplayInfo *info = XRRFindDisplay(dpy); + xRRGetCrtcGammaReply rep; + xRRGetCrtcGammaReq *req; +- XRRCrtcGamma *crtc_gamma; ++ XRRCrtcGamma *crtc_gamma = NULL; + long nbytes; + long nbytesRead; + +@@ -192,7 +192,7 @@ XRRGetCrtcGamma (Display *dpy, RRCrtc crtc) + req->crtc = crtc; + + if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) +- rep.status = RRSetConfigFailed; ++ goto out; + + nbytes = (long) rep.length << 2; + +@@ -204,9 +204,7 @@ XRRGetCrtcGamma (Display *dpy, RRCrtc crtc) + if (!crtc_gamma) + { + _XEatData (dpy, (unsigned long) nbytes); +- UnlockDisplay (dpy); +- SyncHandle (); +- return NULL; ++ goto out; + } + _XRead16 (dpy, crtc_gamma->red, rep.size * 2); + _XRead16 (dpy, crtc_gamma->green, rep.size * 2); +@@ -214,7 +212,8 @@ XRRGetCrtcGamma (Display *dpy, RRCrtc crtc) + + if (nbytes > nbytesRead) + _XEatData (dpy, (unsigned long) (nbytes - nbytesRead)); +- ++ ++out: + UnlockDisplay (dpy); + SyncHandle (); + return crtc_gamma; +diff --git a/src/XrrProperty.c b/src/XrrProperty.c +index 9554f9a..1a125b2 100644 +--- a/src/XrrProperty.c ++++ b/src/XrrProperty.c +@@ -272,7 +272,7 @@ XRRGetOutputProperty (Display *dpy, RROutput output, + { + UnlockDisplay (dpy); + SyncHandle (); +- return 1; ++ return ((xError *)&rep)->errorCode; + } + + *prop = (unsigned char *) NULL;