diff options
-rw-r--r-- | kde-base/kamera/ChangeLog | 8 | ||||
-rw-r--r-- | kde-base/kamera/files/digest-kamera-3.5.6-r1 | 3 | ||||
-rw-r--r-- | kde-base/kamera/files/kamera-3.5.6-download-fix.diff | 68 | ||||
-rw-r--r-- | kde-base/kamera/kamera-3.5.6-r1.ebuild | 17 |
4 files changed, 95 insertions, 1 deletions
diff --git a/kde-base/kamera/ChangeLog b/kde-base/kamera/ChangeLog index 10c57ea4dd2a..44774e2cb06d 100644 --- a/kde-base/kamera/ChangeLog +++ b/kde-base/kamera/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for kde-base/kamera # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/kde-base/kamera/ChangeLog,v 1.61 2007/02/04 01:42:48 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/kde-base/kamera/ChangeLog,v 1.62 2007/05/15 21:24:58 carlo Exp $ + +*kamera-3.5.6-r1 (15 May 2007) + + 15 May 2007; Carsten Lohrke <carlo@gentoo.org> + +files/kamera-3.5.6-download-fix.diff, +kamera-3.5.6-r1.ebuild: + Don't cut data at 16MB. 04 Feb 2007; Diego Pettenò <flameeyes@gentoo.org> -kamera-3.5.2.ebuild: Remove old versions. diff --git a/kde-base/kamera/files/digest-kamera-3.5.6-r1 b/kde-base/kamera/files/digest-kamera-3.5.6-r1 new file mode 100644 index 000000000000..de24125a93ab --- /dev/null +++ b/kde-base/kamera/files/digest-kamera-3.5.6-r1 @@ -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/kamera/files/kamera-3.5.6-download-fix.diff b/kde-base/kamera/files/kamera-3.5.6-download-fix.diff new file mode 100644 index 000000000000..c26dff3a86bf --- /dev/null +++ b/kde-base/kamera/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/kamera/kamera-3.5.6-r1.ebuild b/kde-base/kamera/kamera-3.5.6-r1.ebuild new file mode 100644 index 000000000000..faa9e412d52a --- /dev/null +++ b/kde-base/kamera/kamera-3.5.6-r1.ebuild @@ -0,0 +1,17 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/kde-base/kamera/kamera-3.5.6-r1.ebuild,v 1.1 2007/05/15 21:24:58 carlo Exp $ + +KMNAME=kdegraphics +MAXKDEVER=$PV +KM_DEPRANGE="$PV $MAXKDEVER" +inherit kde-meta eutils + +DESCRIPTION="KDE digital camera manager" +KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="" +DEPEND="media-libs/libgphoto2" + +RDEPEND="${DEPEND}" + +PATCHES="${FILESDIR}/kamera-3.5.6-download-fix.diff"
\ No newline at end of file |