mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
hare: fix x86_64 build.
* use a safe source.
This commit is contained in:
@@ -6,8 +6,12 @@ COPYRIGHT="2000 FlipSide Software
|
||||
2001-2003 BeUnited.org
|
||||
2009-2013 Hare Maintainers"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="git://github.com/HaikuArchives/Hare.git#af69ba7b06"
|
||||
REVISION="2"
|
||||
srcGitRev="af69ba7b065974ab5fe3f84e629186727d84b604"
|
||||
SOURCE_URI="$HOMEPAGE/archive/$srcGitRev.tar.gz"
|
||||
CHECKSUM_SHA256="328d9fff8f0c96e37b68637288864487d2bd2a77605b2d6907f1e26253c9aab4"
|
||||
SOURCE_DIR="Hare-$srcGitRev"
|
||||
PATCHES="hare-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="x86_gcc2 x86 x86_64"
|
||||
|
||||
|
||||
250
haiku-apps/hare/patches/hare-1.1.1.patchset
Normal file
250
haiku-apps/hare/patches/hare-1.1.1.patchset
Normal file
@@ -0,0 +1,250 @@
|
||||
From d1a6b1d395a6277ff662d8e9779b935f501d1852 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Tue, 31 Jan 2017 21:00:15 +0100
|
||||
Subject: x86_64 build fix.
|
||||
|
||||
|
||||
diff --git a/src/Hare/BeEncoder/BeEncoder.cpp b/src/Hare/BeEncoder/BeEncoder.cpp
|
||||
index de6e98d..3eddc53 100644
|
||||
--- a/src/Hare/BeEncoder/BeEncoder.cpp
|
||||
+++ b/src/Hare/BeEncoder/BeEncoder.cpp
|
||||
@@ -296,7 +296,7 @@ BeEncoder::AddEncoderEntries(BMenu* encoderMenu) {
|
||||
}
|
||||
|
||||
int32
|
||||
-BeEncoder::WriteDetails(BMessage* msg, const char* mime, bool tags = false) {
|
||||
+BeEncoder::WriteDetails(BMessage* msg, const char* mime, bool tags) {
|
||||
PRINT(("BeEncoder::WriteDetails(BMessage*,bool)\n"));
|
||||
|
||||
BFile file;
|
||||
diff --git a/src/Hare/BeEncoder/MediaMenuItem.cpp b/src/Hare/BeEncoder/MediaMenuItem.cpp
|
||||
index a8e1fb9..695c557 100644
|
||||
--- a/src/Hare/BeEncoder/MediaMenuItem.cpp
|
||||
+++ b/src/Hare/BeEncoder/MediaMenuItem.cpp
|
||||
@@ -44,7 +44,7 @@ MediaMenuItem::Instantiate(BMessage* archive) {
|
||||
}
|
||||
|
||||
status_t
|
||||
-MediaMenuItem::Archive(BMessage* archive, bool deep = true) const {
|
||||
+MediaMenuItem::Archive(BMessage* archive, bool deep) const {
|
||||
PRINT(("MediaMenuItem::Archive(BMessage*,bool)\n"));
|
||||
|
||||
status_t status = BMenuItem::Archive(archive, deep);
|
||||
diff --git a/src/Hare/Hare/Application.cpp b/src/Hare/Hare/Application.cpp
|
||||
index 2260bd5..cc58313 100644
|
||||
--- a/src/Hare/Hare/Application.cpp
|
||||
+++ b/src/Hare/Hare/Application.cpp
|
||||
@@ -45,11 +45,12 @@ Application::RefsReceived(BMessage* message) {
|
||||
window->PostMessage(message);
|
||||
}
|
||||
|
||||
-void
|
||||
+int
|
||||
main() {
|
||||
PRINT(("main()\n"));
|
||||
|
||||
new Application();
|
||||
be_app->Run();
|
||||
delete be_app;
|
||||
+ return 0;
|
||||
}
|
||||
diff --git a/src/Hare/Hare/EditorView.cpp b/src/Hare/Hare/EditorView.cpp
|
||||
index c68131c..e98fa41 100644
|
||||
--- a/src/Hare/Hare/EditorView.cpp
|
||||
+++ b/src/Hare/Hare/EditorView.cpp
|
||||
@@ -1,4 +1,5 @@
|
||||
#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
#include <be/app/Message.h>
|
||||
#include <be/app/Messenger.h>
|
||||
#include <be/interface/Button.h>
|
||||
@@ -452,7 +453,7 @@ EditorView::SetControlValues(CLVRefListItem* item) {
|
||||
}
|
||||
|
||||
void
|
||||
-EditorView::MakeFocus(bool focused = true) {
|
||||
+EditorView::MakeFocus(bool focused) {
|
||||
PRINT(("EditorView::MakeFocus(bool)\n"));
|
||||
|
||||
artistCheckBox->MakeFocus(focused);
|
||||
diff --git a/src/Hare/Hare/EncoderListView.cpp b/src/Hare/Hare/EncoderListView.cpp
|
||||
index 370d39f..a32ccc3 100644
|
||||
--- a/src/Hare/Hare/EncoderListView.cpp
|
||||
+++ b/src/Hare/Hare/EncoderListView.cpp
|
||||
@@ -1,3 +1,4 @@
|
||||
+#include <string.h>
|
||||
#include <be/app/Message.h>
|
||||
#include <be/interface/ListView.h>
|
||||
#include <be/interface/Rect.h>
|
||||
diff --git a/src/Hare/Hare/FileNamePatternView.cpp b/src/Hare/Hare/FileNamePatternView.cpp
|
||||
index 82cebf1..7f7f7e2 100644
|
||||
--- a/src/Hare/Hare/FileNamePatternView.cpp
|
||||
+++ b/src/Hare/Hare/FileNamePatternView.cpp
|
||||
@@ -136,7 +136,7 @@ FileNamePatternView::InitView() {
|
||||
}
|
||||
|
||||
void
|
||||
-FileNamePatternView::MakeFocus(bool focused = true) {
|
||||
+FileNamePatternView::MakeFocus(bool focused) {
|
||||
PRINT(("FileNamePatternView::MakeFocused(bool)\n"));
|
||||
|
||||
fileNamePatternTextControl->MakeFocus(focused);
|
||||
diff --git a/src/Hare/Hare/Settings.cpp b/src/Hare/Hare/Settings.cpp
|
||||
index 04a5f52..3493a53 100644
|
||||
--- a/src/Hare/Hare/Settings.cpp
|
||||
+++ b/src/Hare/Hare/Settings.cpp
|
||||
@@ -181,7 +181,7 @@ Settings::Instantiate(BMessage* archive) {
|
||||
}
|
||||
|
||||
status_t
|
||||
-Settings::Archive(BMessage* archive, bool deep = true) const {
|
||||
+Settings::Archive(BMessage* archive, bool deep) const {
|
||||
PRINT(("Settings::Archive(BMessage*,bool)\n"));
|
||||
|
||||
status_t status = B_OK;
|
||||
diff --git a/src/Santa/CLVColumn.cpp b/src/Santa/CLVColumn.cpp
|
||||
index cc61ec8..b3d1402 100644
|
||||
--- a/src/Santa/CLVColumn.cpp
|
||||
+++ b/src/Santa/CLVColumn.cpp
|
||||
@@ -143,7 +143,7 @@ BArchivable* CLVColumn::Instantiate(BMessage* archive)
|
||||
return result;
|
||||
}
|
||||
|
||||
-status_t CLVColumn::Archive(BMessage* archive, bool deep = true) const
|
||||
+status_t CLVColumn::Archive(BMessage* archive, bool deep) const
|
||||
{
|
||||
status_t status = B_OK;
|
||||
|
||||
diff --git a/src/Santa/CLVEasyItem.cpp b/src/Santa/CLVEasyItem.cpp
|
||||
index 09c4845..482e85d 100644
|
||||
--- a/src/Santa/CLVEasyItem.cpp
|
||||
+++ b/src/Santa/CLVEasyItem.cpp
|
||||
@@ -69,7 +69,7 @@ CLVEasyItem::~CLVEasyItem()
|
||||
int num_columns = m_column_types.CountItems();
|
||||
for(int column = 0; column < num_columns; column++)
|
||||
{
|
||||
- int32 type = (int32)m_column_types.ItemAt(column);
|
||||
+ int32 type = (int32)(addr_t)m_column_types.ItemAt(column);
|
||||
bool bitmap_is_copy = false;
|
||||
if(type & CLVColFlagBitmapIsCopy)
|
||||
bitmap_is_copy = true;
|
||||
@@ -100,7 +100,7 @@ void CLVEasyItem::PrepListsForSet(int column_index)
|
||||
if(delete_old)
|
||||
{
|
||||
//Column content exists already so delete the old entries
|
||||
- int32 old_type = (int32)m_column_types.ItemAt(column_index);
|
||||
+ int32 old_type = (int32)(addr_t)m_column_types.ItemAt(column_index);
|
||||
bool bitmap_is_copy = false;
|
||||
if(old_type & CLVColFlagBitmapIsCopy)
|
||||
bitmap_is_copy = true;
|
||||
@@ -204,7 +204,7 @@ void CLVEasyItem::SetColumnUserTextContent(int column_index, bool truncate, bool
|
||||
|
||||
const char* CLVEasyItem::GetColumnContentText(int column_index) const
|
||||
{
|
||||
- int32 type = ((int32)m_column_types.ItemAt(column_index)) & CLVColTypesMask;
|
||||
+ int32 type = ((int32)(addr_t)m_column_types.ItemAt(column_index)) & CLVColTypesMask;
|
||||
if(type == CLVColStaticText || type == CLVColTruncateText)
|
||||
return (char*)m_column_content.ItemAt(column_index);
|
||||
if(type == CLVColTruncateUserText || type == CLVColUserText)
|
||||
@@ -215,7 +215,7 @@ const char* CLVEasyItem::GetColumnContentText(int column_index) const
|
||||
|
||||
const BBitmap* CLVEasyItem::GetColumnContentBitmap(int column_index) const
|
||||
{
|
||||
- int32 type = ((int32)m_column_types.ItemAt(column_index)) & CLVColTypesMask;
|
||||
+ int32 type = ((int32)(addr_t)m_column_types.ItemAt(column_index)) & CLVColTypesMask;
|
||||
if(type != CLVColBitmap)
|
||||
return NULL;
|
||||
return (BBitmap*)m_column_content.ItemAt(column_index);
|
||||
@@ -240,7 +240,7 @@ void CLVEasyItem::DrawItemColumn(BView *owner, BRect item_column_rect, int32 col
|
||||
if(column_index == -1)
|
||||
return;
|
||||
|
||||
- int32 type = (int32)m_column_types.ItemAt(column_index);
|
||||
+ int32 type = (int32)(addr_t)m_column_types.ItemAt(column_index);
|
||||
if(type == 0)
|
||||
return;
|
||||
bool needs_truncation = false;
|
||||
@@ -302,7 +302,7 @@ void CLVEasyItem::DrawItemColumn(BView *owner, BRect item_column_rect, int32 col
|
||||
{
|
||||
const BBitmap* bitmap = (BBitmap*)m_column_content.ItemAt(column_index);
|
||||
BRect bounds = bitmap->Bounds();
|
||||
- float horizontal_offset = (float)((int32)m_aux_content.ItemAt(column_index));
|
||||
+ float horizontal_offset = (float)((int32)(addr_t)m_aux_content.ItemAt(column_index));
|
||||
if(!right_justify)
|
||||
{
|
||||
item_column_rect.left += horizontal_offset;
|
||||
@@ -343,8 +343,8 @@ int CLVEasyItem::CompareItems(const CLVListItem *a_Item1, const CLVListItem *a_I
|
||||
Item2->m_column_types.CountItems() <= KeyColumn)
|
||||
return 0;
|
||||
|
||||
- int32 type1 = ((int32)Item1->m_column_types.ItemAt(KeyColumn)) & CLVColTypesMask;
|
||||
- int32 type2 = ((int32)Item2->m_column_types.ItemAt(KeyColumn)) & CLVColTypesMask;
|
||||
+ int32 type1 = ((int32)(addr_t)Item1->m_column_types.ItemAt(KeyColumn)) & CLVColTypesMask;
|
||||
+ int32 type2 = ((int32)(addr_t)Item2->m_column_types.ItemAt(KeyColumn)) & CLVColTypesMask;
|
||||
|
||||
if(!((type1 == CLVColStaticText || type1 == CLVColTruncateText || type1 == CLVColTruncateUserText ||
|
||||
type1 == CLVColUserText) && (type2 == CLVColStaticText || type2 == CLVColTruncateText ||
|
||||
@@ -424,7 +424,7 @@ void CLVEasyItem::ColumnWidthChanged(int32 column_index, float column_width, Col
|
||||
other_rect->OffsetBy(width_delta,0);
|
||||
}
|
||||
|
||||
- int32 type = (int32)m_column_types.ItemAt(column_index);
|
||||
+ int32 type = (int32)(addr_t)m_column_types.ItemAt(column_index);
|
||||
bool right_justify = (type&CLVColFlagRightJustify);
|
||||
type &= CLVColTypesMask;
|
||||
BRect invalid;
|
||||
@@ -486,7 +486,7 @@ void CLVEasyItem::FrameChanged(int32 column_index, BRect new_frame, ColumnListVi
|
||||
BRect* cached_rect = (BRect*)m_cached_rects.ItemAt(column_index);
|
||||
if(cached_rect == NULL)
|
||||
return;
|
||||
- int32 type = ((int32)m_column_types.ItemAt(column_index)) & CLVColTypesMask;
|
||||
+ int32 type = ((int32)(addr_t)m_column_types.ItemAt(column_index)) & CLVColTypesMask;
|
||||
if(type == CLVColTruncateText)
|
||||
if(*cached_rect != new_frame)
|
||||
{
|
||||
@@ -517,13 +517,13 @@ const char* CLVEasyItem::GetUserText(int32 column_index, float column_width) con
|
||||
|
||||
bool CLVEasyItem::Editable(int32 column_index) const
|
||||
{
|
||||
- return ((((int32)m_column_types.ItemAt(column_index))&CLVColFlagEditable) == CLVColFlagEditable);
|
||||
+ return ((((int32)(addr_t)m_column_types.ItemAt(column_index))&CLVColFlagEditable) == CLVColFlagEditable);
|
||||
}
|
||||
|
||||
|
||||
const char* CLVEasyItem::EditInitialText(int32 column_index) const
|
||||
{
|
||||
- int32 type = (((int32)m_column_types.ItemAt(column_index))&CLVColTypesMask);
|
||||
+ int32 type = (((int32)(addr_t)m_column_types.ItemAt(column_index))&CLVColTypesMask);
|
||||
const char* text = NULL;
|
||||
if(type == CLVColStaticText || type == CLVColTruncateText)
|
||||
text = (const char*)m_column_content.ItemAt(column_index);
|
||||
diff --git a/src/Santa/CLVRefListItem.cpp b/src/Santa/CLVRefListItem.cpp
|
||||
index 610991d..087dd1b 100644
|
||||
--- a/src/Santa/CLVRefListItem.cpp
|
||||
+++ b/src/Santa/CLVRefListItem.cpp
|
||||
@@ -2,8 +2,8 @@
|
||||
#include "CLVRefListItem.h"
|
||||
|
||||
CLVRefListItem::CLVRefListItem(entry_ref* entryRef, node_ref* nodeRef,
|
||||
- uint32 level = 0, bool superitem = false, bool expanded = false,
|
||||
- float minheight = 0.0) : CLVEasyItem(level,superitem,expanded,minheight)
|
||||
+ uint32 level, bool superitem, bool expanded,
|
||||
+ float minheight) : CLVEasyItem(level,superitem,expanded,minheight)
|
||||
{
|
||||
PRINT(("CLVRefListItem::CLVRefListItem(entry_ref*,node_ref*)\n"));
|
||||
|
||||
diff --git a/src/Santa/ColumnListView.cpp b/src/Santa/ColumnListView.cpp
|
||||
index c2eedf3..234605f 100644
|
||||
--- a/src/Santa/ColumnListView.cpp
|
||||
+++ b/src/Santa/ColumnListView.cpp
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <Window.h>
|
||||
#include <ClassInfo.h>
|
||||
#include <assert.h>
|
||||
+#include <string.h>
|
||||
|
||||
|
||||
//******************************************************************************************************
|
||||
--
|
||||
2.10.2
|
||||
|
||||
Reference in New Issue
Block a user