diff options
author | avilla <avilla@FreeBSD.org> | 2012-03-13 18:03:32 +0800 |
---|---|---|
committer | avilla <avilla@FreeBSD.org> | 2012-03-13 18:03:32 +0800 |
commit | 56c536ab953e3b4d7b6c75faa624b0e78ca11169 (patch) | |
tree | 4a9b9c4f1c09ec7d908cef017812e72314e2bd27 /x11-toolkits | |
parent | baee0653c91d46010e52d509874e835e96cc031b (diff) | |
download | freebsd-ports-graphics-56c536ab953e3b4d7b6c75faa624b0e78ca11169.tar.gz freebsd-ports-graphics-56c536ab953e3b4d7b6c75faa624b0e78ca11169.tar.zst freebsd-ports-graphics-56c536ab953e3b4d7b6c75faa624b0e78ca11169.zip |
- Fix MIT-SHM problem.
- Bump PORTREVISION.
Qt raster graphics system engine tries to attach to shared memory
segments marked for removal, which is forbidden by POSIX (shmctl(2)).
Backport a fix to invert order of operations.
The issue was triggered by Marble and KDE-Games, which resulted in
blank windows.
PR: 164742
Approved by: portmgr via miwi
Obtained from: Qt Project
Feature safe: yes
Diffstat (limited to 'x11-toolkits')
-rw-r--r-- | x11-toolkits/qt4-gui/Makefile | 1 | ||||
-rw-r--r-- | x11-toolkits/qt4-gui/files/patch-src__gui__image__qnativeimage.cpp | 23 |
2 files changed, 24 insertions, 0 deletions
diff --git a/x11-toolkits/qt4-gui/Makefile b/x11-toolkits/qt4-gui/Makefile index 166a46ff888..7a076d249ef 100644 --- a/x11-toolkits/qt4-gui/Makefile +++ b/x11-toolkits/qt4-gui/Makefile @@ -8,6 +8,7 @@ PORTNAME= gui DISTVERSION= ${QT4_VERSION} +PORTREVISION= 1 CATEGORIES?= x11-toolkits PKGNAMEPREFIX= qt4- diff --git a/x11-toolkits/qt4-gui/files/patch-src__gui__image__qnativeimage.cpp b/x11-toolkits/qt4-gui/files/patch-src__gui__image__qnativeimage.cpp new file mode 100644 index 00000000000..e869f1b4054 --- /dev/null +++ b/x11-toolkits/qt4-gui/files/patch-src__gui__image__qnativeimage.cpp @@ -0,0 +1,23 @@ +--- ./src/gui/image/qnativeimage.cpp.orig 2012-03-12 13:30:21.000000000 +0100 ++++ ./src/gui/image/qnativeimage.cpp 2012-03-12 13:32:39.000000000 +0100 +@@ -178,15 +178,17 @@ + if (ok) { + xshmimg->data = (char*)shmat(xshminfo.shmid, 0, 0); + xshminfo.shmaddr = xshmimg->data; +- if (shmctl(xshminfo.shmid, IPC_RMID, 0) == -1) +- qWarning() << "Error while marking the shared memory segment to be destroyed"; + ok = (xshminfo.shmaddr != (char*)-1); + if (ok) + image = QImage((uchar *)xshmimg->data, width, height, format); + } + xshminfo.readOnly = false; +- if (ok) ++ if (ok) { + ok = XShmAttach(X11->display, &xshminfo); ++ XSync(X11->display, False); ++ if (shmctl(xshminfo.shmid, IPC_RMID, 0) == -1) ++ qWarning() << "Error while marking the shared memory segment to be destroyed"; ++ } + if (!ok) { + qWarning() << "QNativeImage: Unable to attach to shared memory segment."; + if (xshmimg->data) { |