mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
libsanta: fix x86_64 build (well still a hack).
This commit is contained in:
@@ -6,10 +6,11 @@ This package only exists for applications that have not yet been migrated."
|
||||
HOMEPAGE="https://github.com/HaikuArchives/SantasGiftBag"
|
||||
COPYRIGHT="1997-2000 Brian Tietz"
|
||||
LICENSE="libsanta"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://github.com/HaikuArchives/SantasGiftBag/archive/41e3b43058acb99959582187d31495cfbb8435f3.tar.gz"
|
||||
CHECKSUM_SHA256="1c5ff2b0b3e2e81bbd99b226313ebf74f29fc969046bf1cf1f929bbfcb9ca763"
|
||||
SOURCE_DIR="SantasGiftBag-41e3b43058acb99959582187d31495cfbb8435f3"
|
||||
PATCHES="libsanta-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
|
||||
|
||||
96
haiku-libs/libsanta/patches/libsanta-3.0.1.patchset
Normal file
96
haiku-libs/libsanta/patches/libsanta-3.0.1.patchset
Normal file
@@ -0,0 +1,96 @@
|
||||
From c461b0f16302bc3a1a32c0af546e8a866beba55d Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Mon, 5 Dec 2016 19:09:51 +0000
|
||||
Subject: x86_64 hack.
|
||||
|
||||
|
||||
diff --git a/src/CLVEasyItem.cpp b/src/CLVEasyItem.cpp
|
||||
index a83e74b..4025747 100644
|
||||
--- a/src/CLVEasyItem.cpp
|
||||
+++ b/src/CLVEasyItem.cpp
|
||||
@@ -68,7 +68,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)(intptr_t)m_column_types.ItemAt(column);
|
||||
bool bitmap_is_copy = false;
|
||||
if(type & CLVColFlagBitmapIsCopy)
|
||||
bitmap_is_copy = true;
|
||||
@@ -99,7 +99,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)(intptr_t)m_column_types.ItemAt(column_index);
|
||||
bool bitmap_is_copy = false;
|
||||
if(old_type & CLVColFlagBitmapIsCopy)
|
||||
bitmap_is_copy = true;
|
||||
@@ -205,7 +205,7 @@ void CLVEasyItem::SetColumnUserTextContent(int column_index, bool truncate, bool
|
||||
|
||||
const char* CLVEasyItem::GetColumnContentText(int column_index)
|
||||
{
|
||||
- int32 type = ((int32)m_column_types.ItemAt(column_index)) & CLVColTypesMask;
|
||||
+ int32 type = ((int32)(intptr_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)
|
||||
@@ -216,7 +216,7 @@ const char* CLVEasyItem::GetColumnContentText(int column_index)
|
||||
|
||||
const BBitmap* CLVEasyItem::GetColumnContentBitmap(int column_index)
|
||||
{
|
||||
- int32 type = ((int32)m_column_types.ItemAt(column_index)) & CLVColTypesMask;
|
||||
+ int32 type = ((int32)(intptr_t)m_column_types.ItemAt(column_index)) & CLVColTypesMask;
|
||||
if(type != CLVColBitmap)
|
||||
return NULL;
|
||||
return (BBitmap*)m_column_content.ItemAt(column_index);
|
||||
@@ -241,7 +241,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)(intptr_t)m_column_types.ItemAt(column_index);
|
||||
if(type == 0)
|
||||
return;
|
||||
bool needs_truncation = false;
|
||||
@@ -303,7 +303,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)(intptr_t)m_aux_content.ItemAt(column_index));
|
||||
if(!right_justify)
|
||||
{
|
||||
item_column_rect.left += horizontal_offset;
|
||||
@@ -344,8 +344,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)(intptr_t)Item1->m_column_types.ItemAt(KeyColumn)) & CLVColTypesMask;
|
||||
+ int32 type2 = ((int32)(intptr_t)Item2->m_column_types.ItemAt(KeyColumn)) & CLVColTypesMask;
|
||||
|
||||
if(!((type1 == CLVColStaticText || type1 == CLVColTruncateText || type1 == CLVColTruncateUserText ||
|
||||
type1 == CLVColUserText) && (type2 == CLVColStaticText || type2 == CLVColTruncateText ||
|
||||
@@ -425,7 +425,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)(intptr_t)m_column_types.ItemAt(column_index);
|
||||
bool right_justify = (type&CLVColFlagRightJustify);
|
||||
type &= CLVColTypesMask;
|
||||
BRect invalid;
|
||||
@@ -487,7 +487,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)(intptr_t)m_column_types.ItemAt(column_index)) & CLVColTypesMask;
|
||||
if(type == CLVColTruncateText)
|
||||
if(*cached_rect != new_frame)
|
||||
{
|
||||
--
|
||||
2.10.2
|
||||
|
||||
Reference in New Issue
Block a user