mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
DocumentViewer: more fixes by me.
* Update SRC_URI and homepage * Patch has been applied to the repo
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
SUMMARY="A viewer supporting PDF and DJVU Files"
|
||||
DESCRIPTION="DocumentViewer is a viewer that supports PDF and DJVU Files."
|
||||
LICENSE="MIT"
|
||||
COPYRIGHT="2010-2012 Haiku, Inc"
|
||||
HOMEPAGE="http://haiku.bplaced.net/"
|
||||
SRC_URI="http://haiku.bplaced.net/DocumentViewer/sources/documentviewer-0.3.2.zip"
|
||||
CHECKSUM_SHA256="92449ddaa6013443bb97920a373e07b7cc43786ce25780d94b02cb9d5f3dd7d3"
|
||||
REVISION="2"
|
||||
PATCHES="documentviewer-0.3.2.patchset"
|
||||
SOURCE_DIR="documentviewer-0.3.2"
|
||||
COPYRIGHT="2010-2014 Haiku, Inc"
|
||||
HOMEPAGE="http://github.com/HaikuArchives/DocumentViewer/"
|
||||
SRC_URI="https://github.com/HaikuArchives/DocumentViewer/archive/a291aabb.tar.gz"
|
||||
REVISION="1"
|
||||
SOURCE_DIR="DocumentViewer-a291aabb14c2e57ceaed3686c766d3fff9b30cf1"
|
||||
ARCHITECTURES="x86 x86_64"
|
||||
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
|
||||
# x86_gcc2 is fine as primary target architecture as long as we're building
|
||||
@@ -52,8 +50,6 @@ BUILD_PREREQUIRES="
|
||||
|
||||
BUILD()
|
||||
{
|
||||
# Yes, the source package actually contains binaries...
|
||||
find . \( -name '*.o' -or -name '*.a' \) -delete
|
||||
jam -q
|
||||
}
|
||||
|
||||
@@ -1,139 +0,0 @@
|
||||
From 37a6e0dc8fa52531136c65ae8e0797bb1557fc89 Mon Sep 17 00:00:00 2001
|
||||
From: Jonathan Schleifer <js@webkeks.org>
|
||||
Date: Mon, 24 Mar 2014 22:12:11 +0100
|
||||
Subject: [PATCH] Fix compilation on x86_64
|
||||
|
||||
---
|
||||
application/Debug.h | 4 ++--
|
||||
application/ImageButton.cpp | 10 ++++++----
|
||||
application/MainWindow.cpp | 8 ++++----
|
||||
application/Tools.h | 10 ++++++----
|
||||
libs/columnlistview/ColumnListView.cpp | 4 ++--
|
||||
5 files changed, 20 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/application/Debug.h b/application/Debug.h
|
||||
index 0cdf14a..ee14cef 100644
|
||||
--- a/application/Debug.h
|
||||
+++ b/application/Debug.h
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
return( *this );
|
||||
}
|
||||
|
||||
- Debug& operator<<(int32 number)
|
||||
+ Debug& operator<<(long number)
|
||||
{
|
||||
fStr << number;
|
||||
return *this;
|
||||
@@ -143,7 +143,7 @@ public:
|
||||
Debug& operator<<(int) { return *this; }
|
||||
Debug& operator<<(uint) { return *this; }
|
||||
Debug& operator<<(char) { return *this; }
|
||||
- Debug& operator<<(int32) { return *this; }
|
||||
+ Debug& operator<<(long) { return *this; }
|
||||
bool const& state(void) { return fState; }
|
||||
void Clear(void) { }
|
||||
|
||||
diff --git a/application/ImageButton.cpp b/application/ImageButton.cpp
|
||||
index fc1ed66..2609613 100644
|
||||
--- a/application/ImageButton.cpp
|
||||
+++ b/application/ImageButton.cpp
|
||||
@@ -8,6 +8,8 @@
|
||||
*/
|
||||
#include "ImageButton.h"
|
||||
|
||||
+#include <stdint.h>
|
||||
+
|
||||
#include <algorithm>
|
||||
|
||||
#include <Application.h>
|
||||
@@ -248,12 +250,12 @@ ImageButton::_RescaleBitmap(const BBitmap* src, int32 width, int32 height)
|
||||
void* srcData = src->Bits();
|
||||
|
||||
for (int32 y = 0; y <= height; y++) {
|
||||
- void* dstRow = (void*)((uint32)dstData + (uint32)(y * dstYOff));
|
||||
- void* srcRow = (void*)((uint32)srcData + ((uint32)(y * dy) * srcYOff));
|
||||
+ void* dstRow = (void*)((uintptr_t)dstData + (uintptr_t)(y * dstYOff));
|
||||
+ void* srcRow = (void*)((uintptr_t)srcData + ((uintptr_t)(y * dy) * srcYOff));
|
||||
|
||||
for (int32 x = 0; x <= width; x++)
|
||||
- memcpy((void*)((uint32)dstRow + (x * bpp)), (void*)((uint32)srcRow
|
||||
- + ((uint32)(x * dx) * bpp)), bpp);
|
||||
+ memcpy((void*)((uintptr_t)dstRow + (x * bpp)), (void*)((uintptr_t)srcRow
|
||||
+ + ((uintptr_t)(x * dx) * bpp)), bpp);
|
||||
}
|
||||
|
||||
return res;
|
||||
diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp
|
||||
index e8002bd..af73601 100644
|
||||
--- a/application/MainWindow.cpp
|
||||
+++ b/application/MainWindow.cpp
|
||||
@@ -316,10 +316,10 @@ MainWindow::_SaveSettings(void)
|
||||
|
||||
if (fDocumentLayout != nullptr) {
|
||||
settings
|
||||
- << "Split10" << fSplitView1->ItemWeight(0L)
|
||||
- << "Split11" << fSplitView1->ItemWeight(1L)
|
||||
- << "Split20" << fSplitView2->ItemWeight(0L)
|
||||
- << "Split21" << fSplitView2->ItemWeight(1L)
|
||||
+ << "Split10" << fSplitView1->ItemWeight(0)
|
||||
+ << "Split11" << fSplitView1->ItemWeight(1)
|
||||
+ << "Split20" << fSplitView2->ItemWeight(0)
|
||||
+ << "Split21" << fSplitView2->ItemWeight(1)
|
||||
<< "RibbonTab" << fRibbon->ActiveTab()
|
||||
<< "SidebarTab" << fTabView1->Selection()
|
||||
<< "Fullscreen" << (int32)fFullscreenIsOn
|
||||
diff --git a/application/Tools.h b/application/Tools.h
|
||||
index 4941ac0..f994a6b 100644
|
||||
--- a/application/Tools.h
|
||||
+++ b/application/Tools.h
|
||||
@@ -9,6 +9,8 @@
|
||||
#ifndef TOOLS_H
|
||||
#define TOOLS_H
|
||||
|
||||
+#include <stdint.h>
|
||||
+
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
@@ -266,12 +268,12 @@ public:
|
||||
void* srcData = src->Bits();
|
||||
|
||||
for (int32 y = 0; y <= height; y++) {
|
||||
- void* dstRow = (void*)((uint32)dstData + (uint32)(y * dstYOff));
|
||||
- void* srcRow = (void*)((uint32)srcData + ((uint32)(y * dy) * srcYOff));
|
||||
+ void* dstRow = (void*)((uintptr_t)dstData + (uintptr_t)(y * dstYOff));
|
||||
+ void* srcRow = (void*)((uintptr_t)srcData + ((uintptr_t)(y * dy) * srcYOff));
|
||||
|
||||
for (int32 x = 0; x <= width; x++)
|
||||
- memcpy((void*)((uint32)dstRow + (x * bpp)), (void*)((uint32)srcRow
|
||||
- + ((uint32)(x * dx) * bpp)), bpp);
|
||||
+ memcpy((void*)((uintptr_t)dstRow + (x * bpp)), (void*)((uintptr_t)srcRow
|
||||
+ + ((uintptr_t)(x * dx) * bpp)), bpp);
|
||||
}
|
||||
|
||||
std::unique_ptr<BBitmap> bitmap(res);
|
||||
diff --git a/libs/columnlistview/ColumnListView.cpp b/libs/columnlistview/ColumnListView.cpp
|
||||
index baa05a2..fe3bbcb 100644
|
||||
--- a/libs/columnlistview/ColumnListView.cpp
|
||||
+++ b/libs/columnlistview/ColumnListView.cpp
|
||||
@@ -454,7 +454,7 @@ BRow::BRow(float height)
|
||||
BRow::~BRow()
|
||||
{
|
||||
while (true) {
|
||||
- BField* field = (BField*) fFields.RemoveItem(0L);
|
||||
+ BField* field = (BField*) fFields.RemoveItem(0);
|
||||
if (field == 0)
|
||||
break;
|
||||
|
||||
@@ -750,7 +750,7 @@ BColumnListView::BColumnListView(const char* name, uint32 flags,
|
||||
|
||||
BColumnListView::~BColumnListView()
|
||||
{
|
||||
- while (BColumn* column = (BColumn*)fColumns.RemoveItem(0L))
|
||||
+ while (BColumn* column = (BColumn*)fColumns.RemoveItem(0))
|
||||
delete column;
|
||||
}
|
||||
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
Reference in New Issue
Block a user