summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Lohrke <carlo@gentoo.org>2007-05-15 21:27:17 +0000
committerCarsten Lohrke <carlo@gentoo.org>2007-05-15 21:27:17 +0000
commit5468ace8992ddc2fea5ea43fd21fdf6ef86139a1 (patch)
tree96a8ffd4e553f616c856e13e43c58543de2c8cc4 /kde-base/kdegraphics
parent Don't cut data at 16MB. (diff)
downloadgentoo-2-5468ace8992ddc2fea5ea43fd21fdf6ef86139a1.tar.gz
gentoo-2-5468ace8992ddc2fea5ea43fd21fdf6ef86139a1.tar.bz2
gentoo-2-5468ace8992ddc2fea5ea43fd21fdf6ef86139a1.zip
Kamera: Don't cut data at 16MB.
(Portage version: 2.1.2.7)
Diffstat (limited to 'kde-base/kdegraphics')
-rw-r--r--kde-base/kdegraphics/ChangeLog8
-rw-r--r--kde-base/kdegraphics/files/digest-kdegraphics-3.5.6-r23
-rw-r--r--kde-base/kdegraphics/files/kamera-3.5.6-download-fix.diff68
-rw-r--r--kde-base/kdegraphics/kdegraphics-3.5.6-r2.ebuild65
4 files changed, 143 insertions, 1 deletions
diff --git a/kde-base/kdegraphics/ChangeLog b/kde-base/kdegraphics/ChangeLog
index 9024afeea04d..221915c3fa63 100644
--- a/kde-base/kdegraphics/ChangeLog
+++ b/kde-base/kdegraphics/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for kde-base/kdegraphics
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/kde-base/kdegraphics/ChangeLog,v 1.302 2007/02/14 19:04:21 dertobi123 Exp $
+# $Header: /var/cvsroot/gentoo-x86/kde-base/kdegraphics/ChangeLog,v 1.303 2007/05/15 21:27:17 carlo Exp $
+
+*kdegraphics-3.5.6-r2 (15 May 2007)
+
+ 15 May 2007; Carsten Lohrke <carlo@gentoo.org>
+ +files/kamera-3.5.6-download-fix.diff, +kdegraphics-3.5.6-r2.ebuild:
+ Kamera: Don't cut data at 16MB.
14 Feb 2007; Tobias Scherbaum <dertobi123@gentoo.org>
kdegraphics-3.5.5-r2.ebuild:
diff --git a/kde-base/kdegraphics/files/digest-kdegraphics-3.5.6-r2 b/kde-base/kdegraphics/files/digest-kdegraphics-3.5.6-r2
new file mode 100644
index 000000000000..de24125a93ab
--- /dev/null
+++ b/kde-base/kdegraphics/files/digest-kdegraphics-3.5.6-r2
@@ -0,0 +1,3 @@
+MD5 79a1ffb7ae89bede1410411a30be3210 kdegraphics-3.5.6.tar.bz2 7332938
+RMD160 4cb41696ffb1284252009edfe8bd0933ef541800 kdegraphics-3.5.6.tar.bz2 7332938
+SHA256 2c397f3c524b7c465e6d9289944aa8ed2acc43c8bafb983eb3f252aba7a19a1f kdegraphics-3.5.6.tar.bz2 7332938
diff --git a/kde-base/kdegraphics/files/kamera-3.5.6-download-fix.diff b/kde-base/kdegraphics/files/kamera-3.5.6-download-fix.diff
new file mode 100644
index 000000000000..c26dff3a86bf
--- /dev/null
+++ b/kde-base/kdegraphics/files/kamera-3.5.6-download-fix.diff
@@ -0,0 +1,68 @@
+--- kamera/kioslave/kamera.cpp 2006/06/22 06:45:40 553793
++++ kamera/kioslave/kamera.cpp 2007/05/03 20:59:50 660816
+@@ -270,19 +270,39 @@
+ long unsigned int fileSize;
+ // This merely returns us a pointer to gphoto's internal data
+ // buffer -- there's no expensive memcpy
+- gp_file_get_data_and_size(m_file, &fileData, &fileSize);
++ gpr = gp_file_get_data_and_size(m_file, &fileData, &fileSize);
++ if (gpr != GP_OK) {
++ kdDebug(7123) << "get():: get_data_and_size failed." << endl;
++ gp_file_free(m_file);
++ m_file = NULL;
++ error(KIO::ERR_UNKNOWN, gp_result_as_string(gpr));
++ closeCamera();
++ return;
++ }
+ // make sure we're not sending zero-sized chunks (=EOF)
+ // also make sure we send only if the progress did not send the data
+ // already.
+ if ((fileSize > 0) && (fileSize - m_fileSize)>0) {
+- // XXX using assign() here causes segfault, prolly because
+- // gp_file_free is called before chunkData goes out of scope
++ unsigned long written = 0;
+ QByteArray chunkDataBuffer;
+- chunkDataBuffer.setRawData(fileData + m_fileSize, fileSize - m_fileSize);
+- data(chunkDataBuffer);
+- processedSize(fileSize);
+- chunkDataBuffer.resetRawData(fileData + m_fileSize, fileSize - m_fileSize);
++
++ // We need to split it up here. Someone considered it funny
++ // to discard any data() larger than 16MB.
++ //
++ // So nearly any Movie will just fail....
++ while (written < fileSize-m_fileSize) {
++ unsigned long towrite = 1024*1024; // 1MB
++
++ if (towrite > fileSize-m_fileSize-written)
++ towrite = fileSize-m_fileSize-written;
++ chunkDataBuffer.setRawData(fileData + m_fileSize + written, towrite);
++ processedSize(m_fileSize + written + towrite);
++ data(chunkDataBuffer);
++ chunkDataBuffer.resetRawData(fileData + m_fileSize + written, towrite);
++ written += towrite;
++ }
+ m_fileSize = fileSize;
++ setFileSize(fileSize);
+ }
+
+ finished();
+@@ -907,8 +927,8 @@
+ // camera and pass it to KIO, to allow progressive display
+ // of the downloaded photo.
+
+- const char *fileData;
+- long unsigned int fileSize;
++ const char *fileData = NULL;
++ long unsigned int fileSize = 0;
+
+ // This merely returns us a pointer to gphoto's internal data
+ // buffer -- there's no expensive memcpy
+@@ -921,6 +941,7 @@
+ // gp_file_free is called before chunkData goes out of scope
+ QByteArray chunkDataBuffer;
+ chunkDataBuffer.setRawData(fileData + object->getFileSize(), fileSize - object->getFileSize());
++ // Note: this will fail with sizes > 16MB ...
+ object->data(chunkDataBuffer);
+ object->processedSize(fileSize);
+ chunkDataBuffer.resetRawData(fileData + object->getFileSize(), fileSize - object->getFileSize());
diff --git a/kde-base/kdegraphics/kdegraphics-3.5.6-r2.ebuild b/kde-base/kdegraphics/kdegraphics-3.5.6-r2.ebuild
new file mode 100644
index 000000000000..d54eb4c9f1df
--- /dev/null
+++ b/kde-base/kdegraphics/kdegraphics-3.5.6-r2.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/kde-base/kdegraphics/kdegraphics-3.5.6-r2.ebuild,v 1.1 2007/05/15 21:27:17 carlo Exp $
+
+inherit kde-dist eutils
+
+DESCRIPTION="KDE graphics-related apps"
+
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="gphoto2 imlib openexr opengl pdf povray scanner tetex"
+
+DEPEND="~kde-base/kdebase-${PV}
+ >=media-libs/freetype-2
+ media-libs/fontconfig
+ gphoto2? ( media-libs/libgphoto2 )
+ scanner? ( media-gfx/sane-backends )
+ media-libs/libart_lgpl
+ media-libs/lcms
+ dev-libs/fribidi
+ imlib? ( media-libs/imlib )
+ virtual/ghostscript
+ media-libs/tiff
+ openexr? ( >=media-libs/openexr-1.2 )
+ povray? ( media-gfx/povray
+ virtual/opengl )
+ pdf? ( >=app-text/poppler-0.5.1
+ >=app-text/poppler-bindings-0.5.1 )"
+
+RDEPEND="${DEPEND}
+ tetex? (
+ || ( >=app-text/tetex-2
+ app-text/ptex
+ app-text/cstetex
+ app-text/dvipdfm ) )"
+
+PATCHES="${FILESDIR}/kamera-3.5.6-download-fix.diff"
+
+pkg_setup() {
+ kde_pkg_setup
+ for ghostscript in app-text/ghostscript-{gnu,esp,afpl}; do
+ if has_version ${ghostscript} && ! built_with_use ${ghostscript} X; then
+ eerror "This package requires ${ghostscript} compiled with X11 support."
+ eerror "Please reemerge ${ghostscript} with USE=\"X\"."
+ die "Please reemerge ${ghostscript} with USE=\"X\"."
+ fi
+ done
+ if use pdf && ! built_with_use app-text/poppler-bindings qt3; then
+ eerror "This package requires app-text/poppler-bindings compiled with Qt 3.x support."
+ eerror "Please reemerge app-text/poppler-bindings with USE=\"qt3\"."
+ die "Please reemerge app-text/poppler-bindings with USE=\"qt3\"."
+ fi
+}
+
+src_compile() {
+ local myconf="$(use_with openexr) $(use_with pdf poppler)
+ $(use_with gphoto2 kamera)"
+
+ use imlib || export DO_NOT_COMPILE="${DO_NOT_COMPILE} kuickshow"
+ use scanner || export DO_NOT_COMPILE="${DO_NOT_COMPILE} kooka libkscan"
+ use povray || export DO_NOT_COMPILE="${DO_NOT_COMPILE} kpovmodeler"
+ use pdf || export DO_NOT_COMPILE="${DO_NOT_COMPILE} kpdf"
+
+ rm -f "${S}/configure" # ask rebuilding
+ kde_src_compile
+}