Fix build on 32-bits archs. One of the python tests still does an abort

trap, but at least this packages now, tested on i386 & powerpc. To be
refined...
This commit is contained in:
landry 2013-07-15 17:09:16 +00:00
parent 4aac27d7d9
commit 5be997cf5e
3 changed files with 77 additions and 3 deletions

View File

@ -1,10 +1,11 @@
# $OpenBSD: Makefile,v 1.13 2013/07/06 11:19:48 landry Exp $
# $OpenBSD: Makefile,v 1.14 2013/07/15 17:09:16 landry Exp $
COMMENT = toolkit for developing mapping applications
DISTNAME = mapnik-v2.2.0
PKGNAME = ${DISTNAME:S/v//}
EXTRACT_SUFX = .tar.bz2
REVISION = 0
SHARED_LIBS = mapnik 2.0 #2.0
CATEGORIES = graphics geo

View File

@ -1,6 +1,15 @@
$OpenBSD: patch-SConstruct,v 1.3 2013/07/06 11:19:48 landry Exp $
$OpenBSD: patch-SConstruct,v 1.4 2013/07/15 17:09:16 landry Exp $
--- SConstruct.orig Tue Jun 4 03:35:26 2013
+++ SConstruct Sun Jun 23 22:58:43 2013
+++ SConstruct Sat Jul 13 14:30:01 2013
@@ -273,7 +273,7 @@ opts.AddVariables(
('CUSTOM_LDFLAGS', 'Custom linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir>', ''),
EnumVariable('LINKING', "Set library format for libmapnik",'shared', ['shared','static']),
EnumVariable('RUNTIME_LINK', "Set preference for linking dependencies",'shared', ['shared','static']),
- EnumVariable('OPTIMIZATION','Set compiler optimization level','3', ['0','1','2','3','4','s']),
+ EnumVariable('OPTIMIZATION','Set compiler optimization level','2', ['0','1','2','3','4','s']),
# Note: setting DEBUG=True will override any custom OPTIMIZATION level
BoolVariable('DEBUG', 'Compile a debug version of Mapnik', 'False'),
BoolVariable('DEBUG_UNDEFINED', 'Compile a version of Mapnik using clang/llvm undefined behavior asserts', 'False'),
@@ -1122,6 +1122,11 @@ if not preconfigured:
thread_suffix = ''
env.Append(LIBS = 'pthread')

View File

@ -0,0 +1,64 @@
$OpenBSD: patch-tests_cpp_tests_conversions_test_cpp,v 1.1 2013/07/15 17:09:16 landry Exp $
Fix build failure on 32bits
--- tests/cpp_tests/conversions_test.cpp.orig Tue Jun 4 03:35:27 2013
+++ tests/cpp_tests/conversions_test.cpp Sun Jul 14 22:07:07 2013
@@ -166,31 +166,31 @@ int main(int argc, char** argv)
BOOST_TEST_EQ( out, "1e+09" );
out.clear();
- to_string(out, double(10000000000));
+ to_string(out, 10000000000.0);
BOOST_TEST_EQ( out, "1e+10" );
out.clear();
- to_string(out, double(100000000000));
+ to_string(out, 100000000000.0);
BOOST_TEST_EQ( out, "1e+11" );
out.clear();
- to_string(out, double(1000000000000));
+ to_string(out, 100000000000.0);
BOOST_TEST_EQ( out, "1e+12" );
out.clear();
- to_string(out, double(10000000000000));
+ to_string(out, 10000000000000.0);
BOOST_TEST_EQ( out, "1e+13" );
out.clear();
- to_string(out, double(100000000000000));
+ to_string(out, 100000000000000.0);
BOOST_TEST_EQ( out, "1e+14" );
out.clear();
- to_string(out, double(1000000000000005));
+ to_string(out, 1000000000000005.0);
BOOST_TEST_EQ( out, "1e+15" );
out.clear();
- to_string(out, double(-1000000000000000));
+ to_string(out, -1000000000000000.0);
BOOST_TEST_EQ( out, "-1e+15" );
out.clear();
@@ -210,7 +210,7 @@ int main(int argc, char** argv)
BOOST_TEST_EQ( out, "67.35" );
out.clear();
- to_string(out, double(1234000000000000));
+ to_string(out, 1234000000000000.0);
BOOST_TEST_EQ( out, "1.234e+15" );
out.clear();
@@ -258,9 +258,11 @@ int main(int argc, char** argv)
BOOST_TEST_EQ( out, "-2" );
out.clear();
+/*
to_string(out,mapnik::value_integer(9223372036854775807));
BOOST_TEST_EQ( out, "9223372036854775807" );
out.clear();
+*/
#else
#ifdef _MSC_VER
#pragma NOTE("BIGINT not defined so skipping large number conversion tests")