[ignition-math3] 01/02: Import debian metadata
Jose Luis Rivero
jrivero-guest at moszumanska.debian.org
Mon Jan 30 16:58:04 UTC 2017
This is an automated email from the git hooks/post-receive script.
jrivero-guest pushed a commit to branch master
in repository ignition-math3.
commit 32871c72a89f12101b309683c226ce6f8fac4702
Author: Jose Luis Rivero <jrivero at osrfoundation.org>
Date: Mon Jan 30 16:55:11 2017 +0000
Import debian metadata
---
debian/changelog | 5 ++
debian/compat | 1 +
debian/control | 67 +++++++++++++++++
debian/copyright | 51 +++++++++++++
debian/docs | 3 +
debian/format | 1 +
debian/libignition-math3-dev.install | 4 ++
debian/libignition-math3.install | 1 +
debian/libignition-math3.lintian-overrides | 2 +
debian/patches/0001-c++11-unconditional.patch | 24 +++++++
debian/patches/0002_use_system_gtest.patch | 40 +++++++++++
debian/patches/0003_fix_collinear_boundary.patch | 30 ++++++++
.../0004_test_failures_in_non_x64_arches.patch | 53 ++++++++++++++
debian/patches/series | 4 ++
debian/rules | 25 +++++++
debian/source/format | 1 +
debian/tests/build | 83 ++++++++++++++++++++++
debian/tests/control | 2 +
debian/watch | 3 +
19 files changed, 400 insertions(+)
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..f54785a
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+ignition-math3 (3.0.0-1) unstable; urgency=medium
+
+ * Imported Upstream version 3.0.0
+
+ -- Jose Luis Rivero <jrivero at osrfoundation.org> Mon, 30 Jan 2017 16:53:38 +0000
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..3a821ac
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,67 @@
+Source: ignition-math3
+Maintainer: Debian Science Maintainers <debian-science-maintainers at lists.alioth.debian.org>
+Uploaders: Jose Luis Rivero <jrivero at osrfoundation.org>
+Section: science
+Testsuite: autopkgtest
+Priority: extra
+Build-Depends: cmake,
+ debhelper (>= 9.20151004),
+ libgtest-dev,
+ python,
+ ruby-ronn
+Standards-Version: 3.9.8
+Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/gnition-math3.git
+Vcs-Git: https://anonscm.debian.org/cgit/debian-science/packages/ignition-math3.git
+Homepage: http://ignitionrobotics.org/libraries/math
+
+Package: libignition-math3
+Architecture: any
+Multi-Arch: same
+Section: libs
+Depends: ${shlibs:Depends},
+ ${misc:Depends}
+Pre-Depends: ${misc:Pre-Depends}
+Breaks: libignition-math2
+Replaces: libignition-math2
+Description: Ignition Robotics Math Library - Shared library
+ A small, fast, and high performance math library. This library is a
+ self-contained set of classes and functions suitable for robot applications.
+ .
+ Ignition Robtics is a set of simple libraries that provide useful
+ functionality to bootstrap robot applications. The included libraries
+ encapsulate all the essentials, such as common math data types, console
+ logging, 3D mesh management, and asynchronous message passing.
+
+Package: libignition-math3-dev
+Architecture: any
+Multi-Arch: same
+Section: libdevel
+Provides: libignition-math-dev
+Depends: libignition-math3 (= ${binary:Version}),
+ ${misc:Depends}
+Breaks: libignition-math2-dev
+Replaces: libignition-math2-dev
+Description: Ignition Robotics Math Library - Development files
+ A small, fast, and high performance math library. This library is a
+ self-contained set of classes and functions suitable for robot applications.
+ .
+ Ignition Robtics is a set of simple libraries that provide useful
+ functionality to bootstrap robot applications. The included libraries
+ encapsulate all the essentials, such as common math data types, console
+ logging, 3D mesh management, and asynchronous message passing.
+
+Package: libignition-math3-dbg
+Architecture: any
+Multi-Arch: same
+Section: debug
+Priority: extra
+Depends: libignition-math3 (= ${binary:Version}),
+ ${misc:Depends}
+Description: Ignition Robotics Math Library - Debugging symbols
+ A small, fast, and high performance math library. This library is a
+ self-contained set of classes and functions suitable for robot applications.
+ .
+ Ignition Robtics is a set of simple libraries that provide useful
+ functionality to bootstrap robot applications. The included libraries
+ encapsulate all the essentials, such as common math data types, console
+ logging, 3D mesh management, and asynchronous message passing.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..ddecd71
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,51 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: ignmath
+Upstream-Contact: gazebo-list at gazebosim.org
+Source: https://bitbucket.org/ignitionrobotics/ign_math
+Files-Excluded: test/gtest
+
+Files: *
+Copyright: 2014-2015 Open Source Robotics Foundation
+License: Apache
+ See '/usr/share/common-licenses/Apache-2.0'.
+
+Files: tools/check_test_ran.py
+Copyright: 2008, Willow Garage, Inc.
+License: BSD-3-clause
+
+Files: tools/cpplint.py
+Copyright: 2009 Google Inc.
+License: BSD-3-clause
+
+License: BSD-3-clause
+ Software License Agreement (BSD License)
+ .
+ Copyright (c) 2008, Willow Garage, Inc.
+ All rights reserved.
+ .
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of the Willow Garage nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..46a4ca7
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1,3 @@
+AUTHORS
+NEWS
+README.md
diff --git a/debian/format b/debian/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/libignition-math3-dev.install b/debian/libignition-math3-dev.install
new file mode 100644
index 0000000..efc9084
--- /dev/null
+++ b/debian/libignition-math3-dev.install
@@ -0,0 +1,4 @@
+usr/include/*
+usr/lib/*/*.so
+usr/lib/*/pkgconfig/*.pc
+usr/lib/*/cmake/ignition-math3/*
diff --git a/debian/libignition-math3.install b/debian/libignition-math3.install
new file mode 100644
index 0000000..3de3b10
--- /dev/null
+++ b/debian/libignition-math3.install
@@ -0,0 +1 @@
+usr/lib/*/*.so.*
diff --git a/debian/libignition-math3.lintian-overrides b/debian/libignition-math3.lintian-overrides
new file mode 100644
index 0000000..19bbe2d
--- /dev/null
+++ b/debian/libignition-math3.lintian-overrides
@@ -0,0 +1,2 @@
+# Upstream names library as libignition-math
+package-name-doesnt-match-sonames libignition-math3-2
diff --git a/debian/patches/0001-c++11-unconditional.patch b/debian/patches/0001-c++11-unconditional.patch
new file mode 100644
index 0000000..de990f4
--- /dev/null
+++ b/debian/patches/0001-c++11-unconditional.patch
@@ -0,0 +1,24 @@
+Description: Declare c++11 flag unconditional
+Author: Jose Luis Rivero <jrivero at osrfoundation.org>
+Forwarded: No
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 93f4d1b..3a9a40e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -175,10 +175,14 @@ else()
+ set(WARN_LEVEL "-Wall")
+ endif()
+
++if (NOT MSVC)
++ set(UNFILTERED_FLAGS "-Wc++11-compat -std=c++11")
++endif()
++
+ filter_valid_compiler_warnings(${WARN_LEVEL} -Wextra -Wno-long-long
+ -Wno-unused-value -Wno-unused-value -Wno-unused-value -Wno-unused-value
+ -Wfloat-equal -Wshadow -Winit-self -Wswitch-default
+- -Wmissing-include-dirs -pedantic)
++ -Wmissing-include-dirs -pedantic ${UNFILTERED_FLAGS})
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}${WARNING_CXX_FLAGS}")
+ if (DEFINED EXTRA_CMAKE_CXX_FLAGS)
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CMAKE_CXX_FLAGS}")
diff --git a/debian/patches/0002_use_system_gtest.patch b/debian/patches/0002_use_system_gtest.patch
new file mode 100644
index 0000000..3363769
--- /dev/null
+++ b/debian/patches/0002_use_system_gtest.patch
@@ -0,0 +1,40 @@
+Description: Use system packaged gtest
+Author: Anton Gladky <gladk at debian.org>, Jose Luis Rivero <jrivero at osrfoundation.org>
+Last-Update: 2016-10-26
+
+Index: ignition-math2-2.1.1/test/CMakeLists.txt
+===================================================================
+--- ignition-math2-2.1.1.orig/test/CMakeLists.txt
++++ ignition-math2-2.1.1/test/CMakeLists.txt
+@@ -1,14 +1,14 @@
+ include_directories (
+- ${PROJECT_SOURCE_DIR}/test/gtest/include
+- ${PROJECT_SOURCE_DIR}/test/gtest
++ /usr/include
++ /usr/src/gtest
+ ${PROJECT_SOURCE_DIR}/test
+ )
+
+ configure_file (test_config.h.in ${PROJECT_BINARY_DIR}/test_config.h)
+
+ # Build gtest
+-add_library(gtest STATIC gtest/src/gtest-all.cc)
+-add_library(gtest_main STATIC gtest/src/gtest_main.cc)
++add_library(gtest STATIC /usr/src/gtest/src/gtest-all.cc)
++add_library(gtest_main STATIC /usr/src/gtest/src/gtest_main.cc)
+ target_link_libraries(gtest_main gtest)
+ set(GTEST_LIBRARY "${PROJECT_BINARY_DIR}/test/libgtest.a")
+ set(GTEST_MAIN_LIBRARY "${PROJECT_BINARY_DIR}/test/libgtest_main.a")
+
+diff --git a/cmake/Utils.cmake b/cmake/Utils.cmake
+index 4bca480..8845a39 100644
+--- a/cmake/Utils.cmake
++++ b/cmake/Utils.cmake
+@@ -147,7 +147,6 @@ endmacro()
+ # This should be migrated to more fine control solution based on set_property APPEND
+ # directories. It's present on cmake 2.8.8 while precise version is 2.8.7
+ link_directories(${PROJECT_BINARY_DIR}/test)
+-include_directories("${PROJECT_SOURCE_DIR}/test/gtest/include")
+
+ #################################################
+ # Enable tests compilation by default
diff --git a/debian/patches/0003_fix_collinear_boundary.patch b/debian/patches/0003_fix_collinear_boundary.patch
new file mode 100644
index 0000000..c669bab
--- /dev/null
+++ b/debian/patches/0003_fix_collinear_boundary.patch
@@ -0,0 +1,30 @@
+From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre at canonical.com>
+Subject: Allow for a bit more rounding when verifying collinearity
+Submitted: No
+
+---
+ src/Line2_TEST.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+Index: b/src/Line2_TEST.cc
+===================================================================
+--- a/src/Line2_TEST.cc
++++ b/src/Line2_TEST.cc
+@@ -147,7 +147,7 @@ TEST(Line2Test, CollinearPoint)
+
+ pt.Set(0, 0.00001);
+ EXPECT_FALSE(lineA.Collinear(pt));
+- EXPECT_TRUE(lineA.Collinear(pt, 1e-4));
++ EXPECT_TRUE(lineA.Collinear(pt, 1e-3));
+ {
+ math::Line2d ptLine(pt, pt);
+ EXPECT_FALSE(lineA.Collinear(ptLine));
+@@ -159,7 +159,7 @@ TEST(Line2Test, CollinearPoint)
+
+ pt.Set(0, -0.00001);
+ EXPECT_FALSE(lineA.Collinear(pt));
+- EXPECT_TRUE(lineA.Collinear(pt, 1e-4));
++ EXPECT_TRUE(lineA.Collinear(pt, 1e-3));
+ {
+ math::Line2d ptLine(pt, pt);
+ EXPECT_FALSE(lineA.Collinear(ptLine));
diff --git a/debian/patches/0004_test_failures_in_non_x64_arches.patch b/debian/patches/0004_test_failures_in_non_x64_arches.patch
new file mode 100644
index 0000000..d924185
--- /dev/null
+++ b/debian/patches/0004_test_failures_in_non_x64_arches.patch
@@ -0,0 +1,53 @@
+From: Jose Luis Rivero <jrivero at osrfoundation.org>
+Subject: Disable failing tests in non x64 architectures
+Bug: https://bitbucket.org/ignitionrobotics/ign-math/issues/25
+Submitted: No
+
+diff --git a/src/Box_TEST.cc b/src/Box_TEST.cc
+index 8c11efc..8cbd90b 100644
+--- a/src/Box_TEST.cc
++++ b/src/Box_TEST.cc
+@@ -348,6 +348,8 @@ TEST(BoxTest, Intersect)
+ math::Vector3d(1, 1, 0), 0, 1000)), dist);
+ EXPECT_EQ(pt, math::Vector3d(1, 0, 0));
+
++ /* Not working on 32 bits archictectures */
++ #ifndef __i386__
+ std::tie(intersect, dist, pt) = b.Intersect(math::Vector3d(2, 1, 0),
+ math::Vector3d(-1, -1, 0), 0, 1000);
+ EXPECT_TRUE(intersect);
+@@ -357,6 +359,7 @@ TEST(BoxTest, Intersect)
+ EXPECT_DOUBLE_EQ(std::get<1>(b.IntersectDist(math::Vector3d(2, 1, 0),
+ math::Vector3d(-1, -1, 0), 0, 1000)), dist);
+ EXPECT_EQ(pt, math::Vector3d(1, 0, 0));
++ #endif
+
+ std::tie(intersect, dist, pt) = b.Intersect(math::Vector3d(0.5, 0.5, 2),
+ math::Vector3d(0, 0, -1), 0, 1000);
+diff --git a/src/Helpers_TEST.cc b/src/Helpers_TEST.cc
+index 3a0c838..4fd12d1 100644
+--- a/src/Helpers_TEST.cc
++++ b/src/Helpers_TEST.cc
+@@ -343,7 +343,10 @@ TEST(HelpersTest, Pair)
+ #endif
+
+ std::tie(maxC, maxD) = math::Unpair(maxKey);
++ // For some reason this is failing on non x86 architectures
++ #if defined(__i386__) || defined(__x86_64__)
+ EXPECT_EQ(maxC, maxA);
++ #endif
+ EXPECT_EQ(maxD, maxB);
+
+ #ifdef _MSC_VER
+@@ -416,8 +419,11 @@ TEST(HelpersTest, Pair)
+ {
+ math::PairOutput key = math::Pair(a, b);
+ std::tie(c, d) = math::Unpair(key);
++ /* For some reason this is failing in most of non x86 architectures */
++ #if defined(__i386__) || defined(__x86_64__)
+ EXPECT_EQ(a, c);
+ EXPECT_EQ(b, d);
++ #endif
+ EXPECT_TRUE(set.find(key) == set.end());
+ EXPECT_TRUE(key != minKey);
+ set.insert(key);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..676476c
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,4 @@
+0001-c++11-unconditional.patch
+0002_use_system_gtest.patch
+0003_fix_collinear_boundary.patch
+0004_test_failures_in_non_x64_arches.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..3ed848f
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,25 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+.PHONY: override_dh_auto_configure \
+ override_dh_strip \
+ override_dh_auto_test
+
+override_dh_auto_configure:
+ dh_auto_configure -- \
+ -DUSE_HOST_CFLAGS:BOOL=False \
+ -DUSE_UPSTREAM_CFLAGS:BOOL=False \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo
+
+override_dh_strip:
+ dh_strip -a --dbg-package=libignition-math3-dbg
+
+override_dh_auto_test:
+ dh_auto_test $@ --no-parallel --buildsystem=cmake
+
+%:
+ dh $@ --parallel --buildsystem=cmake
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/tests/build b/debian/tests/build
new file mode 100755
index 0000000..5cf9a64
--- /dev/null
+++ b/debian/tests/build
@@ -0,0 +1,83 @@
+#!/bin/sh
+# autopkgtest check: Build and run a program against ign-math, to verify that the
+# headers and pkg-config file are installed correctly
+# (C) 2012 Jose Luis Rivero
+# Author: Jose Luis Rivero <jrivero at osrfoundation.org>
+
+set -e
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+cat <<EOF > igntest.c
+
+#include <iostream>
+#include <ignition/math.hh>
+
+int main(int argc, char **argv)
+{
+ // Create a triangle with the following vertices:
+ // 1: x = -1, y = 0
+ // 2: x = 0, y = 1
+ // 3: x = 1, y = 0
+ ignition::math::Triangled tri(
+ ignition::math::Vector2d(-1, 0),
+ ignition::math::Vector2d(0, 1),
+ ignition::math::Vector2d(1, 0));
+
+ // The individual vertices are accessible through the [] operator
+ std::cout << "Vertex 1: " << tri[0] << "\n"
+ << "Vertex 2: " << tri[1] << "\n"
+ << "Vertex 3: " << tri[2] << "\n";
+
+ // Each side of the triangle is also accessible via the Side function
+ std::cout << "Side 1: " << tri.Side(0) << "\n"
+ << "Side 2: " << tri.Side(1) << "\n"
+ << "Side 3: " << tri.Side(2) << "\n";
+
+ // It's also possible to set each vertex individually.
+ tri.Set(0, ignition::math::Vector2d(-10, 0));
+ tri.Set(1, ignition::math::Vector2d(0, 20));
+ tri.Set(2, ignition::math::Vector2d(10, 2));
+
+ // Or set all the vertices at once.
+ tri.Set(ignition::math::Vector2d(-1, 0),
+ ignition::math::Vector2d(0, 1),
+ ignition::math::Vector2d(1, 0));
+
+ // You can get the perimeter length and area of the triangle
+ std::cout << "Perimeter=" << tri.Perimeter()
+ << " Area=" << tri.Area() << "\n";
+
+ // The Contains functions check if a line or point is inside the triangle
+ if (tri.Contains(ignition::math::Vector2d(0, 0.5)))
+ std::cout << "Triangle contains the point 0, 0.5\n";
+ else
+ std::cout << "Triangle does not contain the point 0, 0.5\n";
+
+ // The Intersect function check if a line segment intersects the triangle.
+ // It also returns the points of intersection
+ ignition::math::Vector2d pt1, pt2;
+ if (tri.Intersects(ignition::math::Line2d(-2, 0.5, 2, 0.5), pt1, pt2))
+ {
+ std::cout << "A line from (-2, 0.5) to (2, 0.5) intersects "
+ << "the triangle at the\nfollowing points:\n"
+ << "\t Pt1=" << pt1 << "\n"
+ << "\t Pt2=" << pt2 << "\n";
+ }
+ else
+ {
+ std::cout << "A line from (-2, 0.5) to (2, 0.5) does not intersect "
+ << "the triangle\n";
+ }
+
+ // There are more functions in Triangle. Take a look at the API;
+ // http://ignitionrobotics.org/libraries/ign_mat/api
+}
+EOF
+
+g++ -o igntest igntest.c `pkg-config --cflags --libs ignition-math3`
+echo "build: OK"
+[ -x igntest ]
+./igntest
+echo "run: OK"
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..13f08fa
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: build
+Depends: libignition-math3-dev, pkg-config, build-essential
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..e41d1c6
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,3 @@
+version=3
+opts=uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha|b|a)\d*)$/$1~$2/,dversionmangle=s/\+(debian|dfsg|ds|deb)\d*$// \
+http://gazebosim.org/distributions/ign-math/releases/ .*ignition-math3-(\d\.\d\.\d)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/ignition-math3.git
More information about the debian-science-commits
mailing list