diff options
author | 2009-05-23 12:36:41 +0000 | |
---|---|---|
committer | 2009-05-23 12:36:41 +0000 | |
commit | 09b04d20eef688d4c402984f098e86f8c5e0df97 (patch) | |
tree | cda8328e98e82bdde6b1f047f8bc8b473f835d3d /x11-libs/qt-gui | |
parent | amd64/x86 stable, bug #267212 (diff) | |
download | gentoo-2-09b04d20eef688d4c402984f098e86f8c5e0df97.tar.gz gentoo-2-09b04d20eef688d4c402984f098e86f8c5e0df97.tar.bz2 gentoo-2-09b04d20eef688d4c402984f098e86f8c5e0df97.zip |
Revbump qt-gui with a patch for qpixmap memory leak
(Portage version: 2.2_rc33/cvs/Linux x86_64)
Diffstat (limited to 'x11-libs/qt-gui')
-rw-r--r-- | x11-libs/qt-gui/ChangeLog | 9 | ||||
-rw-r--r-- | x11-libs/qt-gui/files/qt-gui-4.5.1-0282-fix-qpixmapcache-leak.diff | 25 | ||||
-rw-r--r-- | x11-libs/qt-gui/qt-gui-4.5.1-r2.ebuild | 168 |
3 files changed, 201 insertions, 1 deletions
diff --git a/x11-libs/qt-gui/ChangeLog b/x11-libs/qt-gui/ChangeLog index 48265d0e55ae..d10c035c38c6 100644 --- a/x11-libs/qt-gui/ChangeLog +++ b/x11-libs/qt-gui/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for x11-libs/qt-gui # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt-gui/ChangeLog,v 1.55 2009/05/22 15:45:25 ranger Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt-gui/ChangeLog,v 1.56 2009/05/23 12:36:41 hwoarang Exp $ + +*qt-gui-4.5.1-r2 (23 May 2009) + + 23 May 2009; Markos Chandras <hwoarang@gentoo.org> + +qt-gui-4.5.1-r2.ebuild, + +files/qt-gui-4.5.1-0282-fix-qpixmapcache-leak.diff: + Revbump qt-gui with a patch for qpixmap memory leak. 22 May 2009; Brent Baude <ranger@gentoo.org> qt-gui-4.5.1-r1.ebuild: Marking qt-gui-4.5.1-r1 ppc for bug 266201 diff --git a/x11-libs/qt-gui/files/qt-gui-4.5.1-0282-fix-qpixmapcache-leak.diff b/x11-libs/qt-gui/files/qt-gui-4.5.1-0282-fix-qpixmapcache-leak.diff new file mode 100644 index 000000000000..7de6c9d7a1a0 --- /dev/null +++ b/x11-libs/qt-gui/files/qt-gui-4.5.1-0282-fix-qpixmapcache-leak.diff @@ -0,0 +1,25 @@ +qt-bugs@ issue : none +Qt Software task ID : none +bugs.kde.org number : 183191 +applied: yes +author: Alexis Menard <alexis.menard@nokia.com> + +Make sure that QPixmapCache release the old pixmap if +you reinsert a QPixmap with the same key. + +This patch is already in 4.5 branch. + +--- src/gui/image/qpixmapcache.cpp ++++ src/gui/image/qpixmapcache.cpp +@@ -187,6 +187,11 @@ bool QPMCache::insert(const QString& key, const QPixmap &pixmap, int cost) + cacheKeys.insert(key, cacheKey); + return true; + } ++ qint64 oldCacheKey = cacheKeys.value(key, -1); ++ //If for the same key we add already a pixmap we should delete it ++ if (oldCacheKey != -1) ++ QCache<qint64, QDetachedPixmap>::remove(oldCacheKey); ++ + bool success = QCache<qint64, QDetachedPixmap>::insert(cacheKey, new QDetachedPixmap(pixmap), cost); + if (success) { + cacheKeys.insert(key, cacheKey); diff --git a/x11-libs/qt-gui/qt-gui-4.5.1-r2.ebuild b/x11-libs/qt-gui/qt-gui-4.5.1-r2.ebuild new file mode 100644 index 000000000000..f50af76b3fa0 --- /dev/null +++ b/x11-libs/qt-gui/qt-gui-4.5.1-r2.ebuild @@ -0,0 +1,168 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt-gui/qt-gui-4.5.1-r2.ebuild,v 1.1 2009/05/23 12:36:41 hwoarang Exp $ + +EAPI="2" +inherit eutils qt4-build + +DESCRIPTION="The GUI module for the Qt toolkit" +SLOT="4" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="+accessibility cups +dbus +glib +gtkstyle mng nas nis raster tiff +qt3support xinerama" + +RDEPEND="media-libs/fontconfig + >=media-libs/freetype-2 + media-libs/jpeg + media-libs/libpng + sys-libs/zlib + x11-libs/libXrandr + x11-libs/libXcursor + x11-libs/libXfont + x11-libs/libSM + x11-libs/libXi + ~x11-libs/qt-core-${PV}[debug=,glib=,qt3support=] + ~x11-libs/qt-script-${PV}[debug=] + cups? ( net-print/cups ) + dbus? ( ~x11-libs/qt-dbus-${PV}[debug=] ) + gtkstyle? ( x11-libs/gtk+:2 ) + mng? ( >=media-libs/libmng-1.0.9 ) + nas? ( >=media-libs/nas-1.5 ) + tiff? ( media-libs/tiff ) + xinerama? ( x11-libs/libXinerama )" +DEPEND="${RDEPEND} + xinerama? ( x11-proto/xineramaproto ) + x11-proto/xextproto + x11-proto/inputproto" +PDEPEND="qt3support? ( ~x11-libs/qt-qt3support-${PV}[debug=] )" + +QT4_TARGET_DIRECTORIES=" +src/gui +src/scripttools/ +tools/designer +tools/linguist +src/plugins/imageformats/gif +src/plugins/imageformats/ico +src/plugins/imageformats/jpeg +src/plugins/inputmethods" + +QT4_EXTRACT_DIRECTORIES=" +include/ +src/ +tools/shared/" + +pkg_setup() { + if use raster; then + ewarn "WARNING: You have enabled raster backend rendering engine." + ewarn "This is a new feature and may lead to composite problems" + ewarn "screen corruption and broken qt4 or kde4 applications. " + ewarn "If you encounter such problems please" + ewarn "remove 'raster' use flag and re-compile qt-gui before" + ewarn "filling a bug on gentoo bugzilla." + ebeep 5 + fi + qt4-build_pkg_setup +} + +src_unpack() { + use dbus && QT4_TARGET_DIRECTORIES="${QT4_TARGET_DIRECTORIES} tools/qdbus/qdbusviewer" + use mng && QT4_TARGET_DIRECTORIES="${QT4_TARGET_DIRECTORIES} src/plugins/imageformats/mng" + use tiff && QT4_TARGET_DIRECTORIES="${QT4_TARGET_DIRECTORIES} src/plugins/imageformats/tiff" + use accessibility && QT4_TARGET_DIRECTORIES="${QT4_TARGET_DIRECTORIES} src/plugins/accessible/widgets" + QT4_EXTRACT_DIRECTORIES="${QT4_TARGET_DIRECTORIES} ${QT4_EXTRACT_DIRECTORIES}" + + qt4-build_src_unpack +} + +src_prepare() { + qt4-build_src_prepare + + # Don't build plugins this go around, because they depend on qt3support lib + sed -i -e "s:CONFIG(shared:# &:g" "${S}"/tools/designer/src/src.pro + + # fixing hardcoded fonts, bug #252312 + EPATCH_OPTS="--ignore-whitespace" + epatch "${FILESDIR}"/hardcoded_fonts.patch + + # ppc fix backported from qt 4.5.2 + # http://www.qtsoftware.com/developer/task-tracker/index_html?method=entry&id=196152 + # http://qt.gitorious.org/qt/qt/commit/e018b82432055d9a5f13be7c17e31502830b9fa7 + epatch "${FILESDIR}"/${P}-ppc-pixmap-fix-backport-196152.patch + + # Qpixmap memory leak fix + # http://qt.gitorious.org/qt/qt/commit/ae949b9d21470a9b9bf200774c246a0b86a69ff6.patch + epatch "${FILESDIR}"/"${P}"-0282-fix-qpixmapcache-leak.diff +} + +src_configure() { + export PATH="${S}/bin:${PATH}" + export LD_LIBRARY_PATH="${S}/lib:${LD_LIBRARY_PATH}" + + myconf="$(qt_use accessibility) + $(qt_use cups) + $(qt_use glib) + $(qt_use mng libmng system) + $(qt_use nis) + $(qt_use tiff libtiff system) + $(qt_use dbus qdbus) + $(qt_use qt3support) + $(qt_use gtkstyle) + $(qt_use xinerama)" + + use nas && myconf="${myconf} -system-nas-sound" + use raster && myconf="${myconf} -graphicssystem raster" + + myconf="${myconf} -qt-gif -system-libpng -system-libjpeg + -no-sql-mysql -no-sql-psql -no-sql-ibase -no-sql-sqlite -no-sql-sqlite2 -no-sql-odbc + -xrender -xrandr -xkb -xshape -sm -no-svg" + + # Explictly don't compile these packages. + # Emerge "qt-webkit", "qt-phonon", etc for their functionality. + myconf="${myconf} -no-webkit -no-phonon -no-dbus -no-opengl" + + qt4-build_src_configure +} + +src_install() { + QCONFIG_ADD="x11sm xshape xcursor xfixes xrandr xrender xkb fontconfig + $(usev accessibility) $(usev xinerama) $(usev cups) $(usev nas) + gif png system-png system-jpeg + $(use mng && echo system-mng) $(use tiff && echo system-tiff)" + QCONFIG_REMOVE="no-gif no-png" + QCONFIG_DEFINE="$(use accessibility && echo QT_ACCESSIBILITY) + $(use cups && echo QT_CUPS) QT_FONTCONFIG QT_IMAGEFORMAT_JPEG + $(use mng && echo QT_IMAGEFORMAT_MNG) $(use nas && echo QT_NAS) + $(use nis && echo QT_NIS) QT_IMAGEFORMAT_PNG QT_SESSIONMANAGER QT_SHAPE + $(use tiff && echo QT_IMAGEFORMAT_TIFF) QT_XCURSOR + $(use xinerama && echo QT_XINERAMA) QT_XFIXES QT_XKB QT_XRANDR QT_XRENDER" + + qt4-build_src_install + + # remove some unnecessary headers + rm -f "${D}${QTHEADERDIR}"/{Qt,QtGui}/{qmacstyle_mac.h,qwindowdefs_win.h} \ + "${D}${QTHEADERDIR}"/QtGui/QMacStyle + + # qt-creator + # some qt-creator headers are located + # under /usr/include/qt4/QtDesigner/private. + # those headers are just includes of the headers + # which are located under tools/designer/src/lib/* + # So instead of installing both, we create the private folder + # and drop tools/designer/src/lib/* headers in it. + dodir /usr/include/qt4/QtDesigner/private/ + insinto /usr/include/qt4/QtDesigner/private/ + doins "${S}"/tools/designer/src/lib/shared/* + doins "${S}"/tools/designer/src/lib/sdk/* + + # install correct designer and linguist icons, bug 241208 + dodir /usr/share/pixmaps/ || die "dodir failed" + insinto /usr/share/pixmaps/ || die "insinto failed" + doins tools/linguist/linguist/images/icons/linguist-128-32.png \ + tools/designer/src/designer/images/designer.png || die "doins failed" + # Note: absolute image path required here! + make_desktop_entry /usr/bin/linguist Linguist \ + /usr/share/pixmaps/linguist-128-32.png 'Qt;Development;GUIDesigner' \ + || die "make_desktop_entry failed" + make_desktop_entry /usr/bin/designer Designer \ + /usr/share/pixmaps/designer.png 'Qt;Development;GUIDesigner' \ + || die "make_desktop_entry failed" +} |