This is an automated email from the git hooks/post-receive script. sebastic-guest pushed a commit to branch master in repository osmium.
commit 81d1f627e73aeba1f72fcaa1866a02fb31c47274 Author: Bas Couwenberg <[email protected]> Date: Mon Jun 9 01:37:10 2014 +0200 Merge changes from 0.0_20111213-g7f3500a-3.1 NMU. --- debian/changelog | 10 ++ debian/patches/04-big-endian.patch | 192 +++++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 203 insertions(+) diff --git a/debian/changelog b/debian/changelog index 158f7f1..df294d3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,16 @@ osmium (0.0~20111213-g7f3500a-4) UNRELEASED; urgency=medium -- Andreas Tille <[email protected]> Tue, 17 Dec 2013 17:27:00 +0100 +osmium (0.0~20111213-g7f3500a-3.1) unstable; urgency=medium + + * Non-maintainer upload. + * Fix FTBFS on mips big-endian. + Add 04-big-endian.patch. + Patch by Jurica Stanojkovic <[email protected]>. + Closes: #749501. + + -- Anibal Monsalve Salazar <[email protected]> Wed, 28 May 2014 09:20:00 +0100 + osmium (0.0~20111213-g7f3500a-3) unstable; urgency=low * Disable building the documentation, since doxygen randomly fails diff --git a/debian/patches/04-big-endian.patch b/debian/patches/04-big-endian.patch new file mode 100644 index 0000000..02b3ee6 --- /dev/null +++ b/debian/patches/04-big-endian.patch @@ -0,0 +1,192 @@ +From: Jurica Stanojkovic <[email protected]> +Subject: package osmium FTBFS on mips big-endian +Date: Mon, 26 May 2014 10:20:07 -0700 + +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749501 + +Package osmium_0.0~20111213-g7f3500a-3 FTBFS on mips big-endian. + +Build log: +https://buildd.debian.org/status/fetch.php?pkg=osmium&arch=mips&ver=0.0~20111213-g7f3500a-3&stamp=1397047060 + +Test values are hard-coded in little-endian. + +This patch detects endianess used and adds big-endian test values. + +--- a/include/osmium/geometry.hpp ++++ b/include/osmium/geometry.hpp +@@ -23,6 +23,7 @@ You should have received a copy of the L + */ + + #include <sstream> ++#include <endian.h> + + #ifdef OSMIUM_WITH_GEOS + # include <geos/geom/GeometryFactory.h> +@@ -40,6 +41,14 @@ You should have received a copy of the L + #include <osmium/exceptions.hpp> + #include <osmium/osm/types.hpp> + ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++# define BYTE_ORDER_LITTLE_ENDIAN ++#elif __BYTE_ORDER == __BIG_ENDIAN ++# define BYTE_ORDER_BIG_ENDIAN ++#else ++# error unknown byte order ++#endif ++ + namespace Osmium { + + /** +@@ -161,7 +173,11 @@ namespace Osmium { + * - (optionally) the SRID + */ + inline void write_binary_wkb_header(std::ostream& out, bool with_srid, uint32_t type) { ++#ifdef BYTE_ORDER_LITTLE_ENDIAN // LITTLE_ENDIAN + write_binary<uint8_t>(out, wkbNDR); ++#else // BIG_ENDIAN ++ write_binary<uint8_t>(out, wkbXDR); ++#endif + if (with_srid) { + write_binary<uint32_t>(out, type | wkbSRID); + write_binary<uint32_t>(out, srid); +@@ -178,7 +194,11 @@ namespace Osmium { + * - (optionally) the SRID + */ + inline void write_hex_wkb_header(std::ostream& out, bool with_srid, uint32_t type) { ++#ifdef BYTE_ORDER_LITTLE_ENDIAN // LITTLE_ENDIAN + write_hex<uint8_t>(out, wkbNDR); ++#else // BIG_ENDIAN ++ write_hex<uint8_t>(out, wkbXDR); ++#endif + if (with_srid) { + write_hex<uint32_t>(out, type | wkbSRID); + write_hex<uint32_t>(out, srid); +--- a/test/testgroup_ogr/geometry/test_geometry.cpp ++++ b/test/testgroup_ogr/geometry/test_geometry.cpp +@@ -53,7 +53,11 @@ BOOST_AUTO_TEST_CASE(polygon_from_way) { + OGRPolygon* ogrpolygon = polygon.create_ogr_geometry(); + std::string ogrwkb; + ogrwkb.resize(ogrpolygon->WkbSize()); ++#ifdef BYTE_ORDER_LITTLE_ENDIAN + ogrpolygon->exportToWkb(wkbNDR, (unsigned char*)ogrwkb.c_str()); ++#else ++ ogrpolygon->exportToWkb(wkbXDR, (unsigned char*)ogrwkb.c_str()); ++#endif + output_test_stream osmiumwkb; + osmiumwkb << polygon.as_WKB(); + BOOST_CHECK_EQUAL(osmiumwkb.str().size(), ogrpolygon->WkbSize()); +--- a/test/testgroup_plain/geometry/test_linestring_geometry.cpp ++++ b/test/testgroup_plain/geometry/test_linestring_geometry.cpp +@@ -47,19 +47,35 @@ BOOST_AUTO_TEST_CASE(output) { + + std::ostringstream out_wkb; + out_wkb << line2.as_WKB(); ++#ifdef BYTE_ORDER_LITTLE_ENDIAN + BOOST_CHECK_EQUAL(Osmium::Test::to_hex(out_wkb.str()), "01020000000300000033333333333307403333333333330740666666666666FE3F3333333333330740666666666666FE3F666666666666FE3F"); ++#else ++ BOOST_CHECK_EQUAL(Osmium::Test::to_hex(out_wkb.str()), "000000000200000003400733333333333340073333333333333FFE66666666666640073333333333333FFE6666666666663FFE666666666666"); ++#endif + + std::ostringstream out_ewkb; + out_ewkb << line2.as_WKB(true); ++#ifdef BYTE_ORDER_LITTLE_ENDIAN + BOOST_CHECK_EQUAL(Osmium::Test::to_hex(out_ewkb.str()), "0102000020E61000000300000033333333333307403333333333330740666666666666FE3F3333333333330740666666666666FE3F666666666666FE3F"); ++#else ++ BOOST_CHECK_EQUAL(Osmium::Test::to_hex(out_ewkb.str()), "0020000002000010E600000003400733333333333340073333333333333FFE66666666666640073333333333333FFE6666666666663FFE666666666666"); ++#endif + + std::ostringstream out_hexwkb; + out_hexwkb << line1.as_HexWKB(); ++#ifdef BYTE_ORDER_LITTLE_ENDIAN + BOOST_CHECK_EQUAL(out_hexwkb.str(), "010200000003000000666666666666FE3F666666666666FE3F666666666666FE3F333333333333074033333333333307403333333333330740"); ++#else ++ BOOST_CHECK_EQUAL(out_hexwkb.str(), "0000000002000000033FFE6666666666663FFE6666666666663FFE666666666666400733333333333340073333333333334007333333333333"); ++#endif + + std::ostringstream out_hexewkb; + out_hexewkb << line1.as_HexWKB(true); ++#ifdef BYTE_ORDER_LITTLE_ENDIAN + BOOST_CHECK_EQUAL(out_hexewkb.str(), "0102000020E610000003000000666666666666FE3F666666666666FE3F666666666666FE3F333333333333074033333333333307403333333333330740"); ++#else ++ BOOST_CHECK_EQUAL(out_hexewkb.str(), "0020000002000010E6000000033FFE6666666666663FFE6666666666663FFE666666666666400733333333333340073333333333334007333333333333"); ++#endif + } + + BOOST_AUTO_TEST_SUITE_END() +--- a/test/testgroup_plain/geometry/test_point_geometry.cpp ++++ b/test/testgroup_plain/geometry/test_point_geometry.cpp +@@ -36,19 +36,35 @@ BOOST_AUTO_TEST_CASE(output) { + + std::ostringstream out_wkb; + out_wkb << point1.as_WKB(); ++#ifdef BYTE_ORDER_LITTLE_ENDIAN + BOOST_CHECK_EQUAL(Osmium::Test::to_hex(out_wkb.str()), "0101000000333333333333F33F3333333333330B40"); ++#else ++ BOOST_CHECK_EQUAL(Osmium::Test::to_hex(out_wkb.str()), "00000000013FF3333333333333400B333333333333"); ++#endif + + std::ostringstream out_ewkb; + out_ewkb << point1.as_WKB(true); ++#ifdef BYTE_ORDER_LITTLE_ENDIAN + BOOST_CHECK_EQUAL(Osmium::Test::to_hex(out_ewkb.str()), "0101000020E6100000333333333333F33F3333333333330B40"); ++#else ++ BOOST_CHECK_EQUAL(Osmium::Test::to_hex(out_ewkb.str()), "0020000001000010E63FF3333333333333400B333333333333"); ++#endif + + std::ostringstream out_hexwkb; + out_hexwkb << point1.as_HexWKB(); ++#ifdef BYTE_ORDER_LITTLE_ENDIAN + BOOST_CHECK_EQUAL(out_hexwkb.str(), "0101000000333333333333F33F3333333333330B40"); ++#else ++ BOOST_CHECK_EQUAL(out_hexwkb.str(), "00000000013FF3333333333333400B333333333333"); ++#endif + + std::ostringstream out_hexewkb; + out_hexewkb << point1.as_HexWKB(true); ++#ifdef BYTE_ORDER_LITTLE_ENDIAN + BOOST_CHECK_EQUAL(out_hexewkb.str(), "0101000020E6100000333333333333F33F3333333333330B40"); ++#else ++ BOOST_CHECK_EQUAL(out_hexewkb.str(), "0020000001000010E63FF3333333333333400B333333333333"); ++#endif + } + + BOOST_AUTO_TEST_SUITE_END() +--- a/test/testgroup_plain/geometry/test_polygon_geometry.cpp ++++ b/test/testgroup_plain/geometry/test_polygon_geometry.cpp +@@ -51,19 +51,35 @@ BOOST_AUTO_TEST_CASE(output) { + + std::ostringstream out_wkb; + out_wkb << polygon.as_WKB(); ++#ifdef BYTE_ORDER_LITTLE_ENDIAN + BOOST_CHECK_EQUAL(Osmium::Test::to_hex(out_wkb.str()), "01030000000100000004000000666666666666FE3F666666666666FE3F666666666666FE3F333333333333074033333333333307403333333333330740666666666666FE3F666666666666FE3F"); + ++#else ++ BOOST_CHECK_EQUAL(Osmium::Test::to_hex(out_wkb.str()), "000000000300000001000000043FFE6666666666663FFE6666666666663FFE6666666666664007333333333333400733333333333340073333333333333FFE6666666666663FFE666666666666"); ++#endif + std::ostringstream out_ewkb; + out_ewkb << polygon.as_WKB(true); ++#ifdef BYTE_ORDER_LITTLE_ENDIAN + BOOST_CHECK_EQUAL(Osmium::Test::to_hex(out_ewkb.str()), "0103000020E61000000100000004000000666666666666FE3F666666666666FE3F666666666666FE3F333333333333074033333333333307403333333333330740666666666666FE3F666666666666FE3F"); + ++#else ++ BOOST_CHECK_EQUAL(Osmium::Test::to_hex(out_ewkb.str()), "0020000003000010E600000001000000043FFE6666666666663FFE6666666666663FFE6666666666664007333333333333400733333333333340073333333333333FFE6666666666663FFE666666666666"); ++#endif + std::ostringstream out_hexwkb; + out_hexwkb << polygon.as_HexWKB(); ++#ifdef BYTE_ORDER_LITTLE_ENDIAN + BOOST_CHECK_EQUAL(out_hexwkb.str(), "01030000000100000004000000666666666666FE3F666666666666FE3F666666666666FE3F333333333333074033333333333307403333333333330740666666666666FE3F666666666666FE3F"); + ++#else ++ BOOST_CHECK_EQUAL(out_hexwkb.str(), "000000000300000001000000043FFE6666666666663FFE6666666666663FFE6666666666664007333333333333400733333333333340073333333333333FFE6666666666663FFE666666666666"); ++#endif + std::ostringstream out_hexewkb; + out_hexewkb << polygon.as_HexWKB(true); ++#ifdef BYTE_ORDER_LITTLE_ENDIAN + BOOST_CHECK_EQUAL(out_hexewkb.str(), "0103000020E61000000100000004000000666666666666FE3F666666666666FE3F666666666666FE3F333333333333074033333333333307403333333333330740666666666666FE3F666666666666FE3F"); ++#else ++ BOOST_CHECK_EQUAL(out_hexewkb.str(), "0020000003000010E600000001000000043FFE6666666666663FFE6666666666663FFE6666666666664007333333333333400733333333333340073333333333333FFE6666666666663FFE666666666666"); ++#endif + } + + BOOST_AUTO_TEST_SUITE_END() diff --git a/debian/patches/series b/debian/patches/series index 76e177e..9fd5ef0 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,4 +2,5 @@ 01-fix_ld--as-needed.patch 02-support_new_libgeos++.patch 03-disable_building_docs.patch +04-big-endian.patch 04-hardening.patch -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/osmium.git _______________________________________________ Pkg-grass-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

