mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-29 11:38:52 +02:00
ixion: fix 32-bit build
This commit is contained in:
@@ -10,7 +10,7 @@ and a partial calculation of only the affected cells need to be calculated."
|
||||
HOMEPAGE="https://gitlab.com/ixion/ixion"
|
||||
COPYRIGHT="Kohei Yoshida et al."
|
||||
LICENSE="MPL v2.0"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
SOURCE_URI="http://kohei.us/files/ixion/src/libixion-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="5f646dd5089700093be157ff71698e276df9512afb4806954094a936f80ca9d1"
|
||||
SOURCE_DIR="libixion-$portVersion"
|
||||
@@ -73,6 +73,7 @@ defineDebugInfoPackage ixion$secondaryArchSuffix \
|
||||
|
||||
PATCH()
|
||||
{
|
||||
sed -i 's/-ldl//g' configure.ac
|
||||
sed -i 's/-pthread//g' configure.ac
|
||||
sed -i 's#$with_boost/include#$with_boost/headers#g' m4/boost.m4
|
||||
}
|
||||
|
||||
@@ -1,24 +1,54 @@
|
||||
From 52e55962498093559a0d35b282ac00894f0078be Mon Sep 17 00:00:00 2001
|
||||
From: Kacper Kasper <kacperkasper@gmail.com>
|
||||
Date: Sat, 1 Sep 2018 15:26:19 +0200
|
||||
Subject: Fix Haiku build
|
||||
From 0aed775d71d92ce291a8b9b8dcc0930f5223d86d Mon Sep 17 00:00:00 2001
|
||||
From: Kohei Yoshida <kohei.yoshida@gmail.com>
|
||||
Date: Tue, 28 Aug 2018 22:58:49 -0400
|
||||
Subject: Fix build issues on 32-bit platforms.
|
||||
|
||||
The string ID's are stored in mdds's unsigned long block, but we
|
||||
have changed the underlying type of string ID's from unsigned long
|
||||
to uint64_t. Because of this, on 32-bit systems it caused a type
|
||||
mismatch. On 64-bit systems this was fine since unsigned long was
|
||||
the underlying type for uint64_t...
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 388f85a..1296498 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -30,6 +30,10 @@ case $host_os in
|
||||
_os=Darwin
|
||||
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
||||
;;
|
||||
+ haiku*)
|
||||
+ _os=Haiku
|
||||
+ LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
|
||||
+ ;;
|
||||
*)
|
||||
_os=
|
||||
LDFLAGS="$LDFLAGS -Wl,--no-as-needed -pthread -ldl"
|
||||
diff --git a/src/libixion/model_context.cpp b/src/libixion/model_context.cpp
|
||||
index 0bcf940..b44713f 100644
|
||||
--- a/src/libixion/model_context.cpp
|
||||
+++ b/src/libixion/model_context.cpp
|
||||
@@ -541,7 +541,7 @@ void model_context_impl::set_string_cell(const abs_address_t& addr, const char*
|
||||
string_id_t str_id = add_string(p, n);
|
||||
column_store_t& col_store = sheet.at(addr.column);
|
||||
column_store_t::iterator& pos_hint = sheet.get_pos_hint(addr.column);
|
||||
- pos_hint = col_store.set(pos_hint, addr.row, str_id);
|
||||
+ pos_hint = col_store.set(pos_hint, addr.row, static_cast<unsigned long>(str_id));
|
||||
}
|
||||
|
||||
void model_context_impl::set_string_cell(const abs_address_t& addr, string_id_t identifier)
|
||||
@@ -549,7 +549,7 @@ void model_context_impl::set_string_cell(const abs_address_t& addr, string_id_t
|
||||
worksheet& sheet = m_sheets.at(addr.sheet);
|
||||
column_store_t& col_store = sheet.at(addr.column);
|
||||
column_store_t::iterator& pos_hint = sheet.get_pos_hint(addr.column);
|
||||
- pos_hint = col_store.set(pos_hint, addr.row, identifier);
|
||||
+ pos_hint = col_store.set(pos_hint, addr.row, static_cast<unsigned long>(identifier));
|
||||
}
|
||||
|
||||
void model_context_impl::set_formula_cell(const abs_address_t& addr, formula_tokens_t tokens)
|
||||
@@ -800,7 +800,7 @@ string_id_t model_context_impl::get_string_identifier(const abs_address_t& addr)
|
||||
switch (col_store.get_type(addr.row))
|
||||
{
|
||||
case ixion::element_type_string:
|
||||
- return col_store.get<string_id_t>(addr.row);
|
||||
+ return col_store.get<unsigned long>(addr.row);
|
||||
default:
|
||||
;
|
||||
}
|
||||
@@ -813,7 +813,7 @@ string_id_t model_context_impl::get_string_identifier_nowait(const abs_address_t
|
||||
switch (col_store.get_type(addr.row))
|
||||
{
|
||||
case ixion::element_type_string:
|
||||
- return col_store.get<string_id_t>(addr.row);
|
||||
+ return col_store.get<unsigned long>(addr.row);
|
||||
case ixion::element_type_formula:
|
||||
{
|
||||
const formula_cell* p = col_store.get<formula_cell*>(addr.row);
|
||||
--
|
||||
2.16.4
|
||||
|
||||
|
||||
Reference in New Issue
Block a user