Sync KDcraw workaround patches with Digikam, allowing to use the former

on non-i386.
This commit is contained in:
zhuk 2014-07-10 09:10:13 +00:00
parent 0eca4da31c
commit 5d58c2b5e2
3 changed files with 28 additions and 14 deletions

View File

@ -1,7 +1,8 @@
# $OpenBSD: Makefile,v 1.9 2014/07/09 20:03:24 zhuk Exp $
# $OpenBSD: Makefile,v 1.10 2014/07/10 09:10:13 zhuk Exp $
COMMENT = KDE image viewer
DISTNAME = gwenview-${MODKDE4_VERSION}
REVISION = 0
SHARED_LIBS = gwenviewlib 51.0 # 4.7
@ -35,4 +36,12 @@ LIB_DEPENDS = databases/soprano>=${MIN_SOPRANO_VERSION} \
${MODKDE4_DEP_DIR}/libkipi>=${MODKDE4_DEP_VERSION} \
${MODKDE4_DEP_DIR}/baloo>=${MODKDE4_DEP_VERSION}
.include <bsd.port.arch.mk>
.if ${ARCH} == "i386"
CONFIGURE_ENV = CXXFLAGS="${CXXFLAGS} -DOPENBSD_LIBKDCRAW_NO_CRASH=0"
.else
CONFIGURE_ENV = CXXFLAGS="${CXXFLAGS} -DOPENBSD_LIBKDCRAW_NO_CRASH=1"
.endif
.include <bsd.port.mk>

View File

@ -1,13 +1,16 @@
$OpenBSD: patch-lib_document_loadingdocumentimpl_cpp,v 1.1 2014/07/09 20:03:24 zhuk Exp $
Disable libkdcraw usage until crashes are resolved.
--- lib/document/loadingdocumentimpl.cpp.orig Sun Jun 29 23:23:24 2014
+++ lib/document/loadingdocumentimpl.cpp Sun Jun 29 23:23:40 2014
@@ -190,7 +190,8 @@ struct LoadingDocumentImplPrivate
$OpenBSD: patch-lib_document_loadingdocumentimpl_cpp,v 1.2 2014/07/10 09:10:13 zhuk Exp $
XXX Disable libkdcraw usage until crashes are resolved.
--- lib/document/loadingdocumentimpl.cpp.orig Mon May 5 09:21:49 2014
+++ lib/document/loadingdocumentimpl.cpp Thu Jul 10 10:55:39 2014
@@ -190,7 +190,12 @@ struct LoadingDocumentImplPrivate
buffer.setBuffer(&mData);
buffer.open(QIODevice::ReadOnly);
- if (KDcrawIface::KDcraw::rawFilesList().contains(QString(mFormatHint))) {
+#if OPENBSD_LIBKDCRAW_NO_CRASH
if (KDcrawIface::KDcraw::rawFilesList().contains(QString(mFormatHint))) {
+#else
+ if (false) {
+#endif
+ // if (KDcrawIface::KDcraw::rawFilesList().contains(QString(mFormatHint))) {
QByteArray previewData;

View File

@ -1,14 +1,16 @@
$OpenBSD: patch-lib_thumbnailprovider_thumbnailgenerator_cpp,v 1.1 2014/07/09 20:03:24 zhuk Exp $
Disable libkdcraw usage until crashes are resolved.
--- lib/thumbnailprovider/thumbnailgenerator.cpp.orig Sun Jun 29 23:24:06 2014
+++ lib/thumbnailprovider/thumbnailgenerator.cpp Sun Jun 29 23:24:30 2014
@@ -73,7 +73,8 @@ bool ThumbnailContext::load(const QString &pixPath, in
$OpenBSD: patch-lib_thumbnailprovider_thumbnailgenerator_cpp,v 1.2 2014/07/10 09:10:13 zhuk Exp $
XXX Disable libkdcraw usage until crashes are resolved.
--- lib/thumbnailprovider/thumbnailgenerator.cpp.orig Mon May 5 09:21:49 2014
+++ lib/thumbnailprovider/thumbnailgenerator.cpp Thu Jul 10 10:57:33 2014
@@ -73,7 +73,11 @@ bool ThumbnailContext::load(const QString &pixPath, in
int previewRatio = 1;
// raw images deserve special treatment
- if (KDcrawIface::KDcraw::rawFilesList().contains(QString(formatHint))) {
+#if OPENBSD_LIBKDCRAW_NO_CRASH
if (KDcrawIface::KDcraw::rawFilesList().contains(QString(formatHint))) {
+#else
+ if (false) {
+ // if (KDcrawIface::KDcraw::rawFilesList().contains(QString(formatHint))) {
+#endif
// use KDCraw to extract the preview
bool ret = KDcrawIface::KDcraw::loadEmbeddedPreview(data, pixPath);