[ignition-math4] 03/04: Initial debian metadata

Jose Luis Rivero jrivero-guest at moszumanska.debian.org
Mon Nov 20 19:51:22 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-math4.

commit 189e22c5d4e4d5148b1ab481d19cf7c9cc5a54a4
Author: Jose Luis Rivero <jrivero at osrfoundation.org>
Date:   Mon Nov 20 16:09:24 2017 +0000

    Initial debian metadata
---
 debian/changelog                                   |  7 ++
 debian/compat                                      |  1 +
 debian/control                                     | 49 +++++++++++++
 debian/copyright                                   | 60 ++++++++++++++++
 debian/docs                                        |  3 +
 debian/format                                      |  1 +
 debian/libignition-math4-dev.install               |  4 ++
 debian/libignition-math4.install                   |  1 +
 debian/libignition-math4.lintian-overrides         |  2 +
 debian/patches/0001-c++11-unconditional.patch      | 24 +++++++
 debian/patches/0002_use_system_gtest.patch         | 40 +++++++++++
 .../0004_test_failures_in_non_x64_arches.patch     | 53 ++++++++++++++
 debian/patches/series                              |  3 +
 debian/rules                                       | 21 ++++++
 debian/source/format                               |  1 +
 debian/tests/build                                 | 83 ++++++++++++++++++++++
 debian/tests/control                               |  2 +
 debian/watch                                       |  3 +
 18 files changed, 358 insertions(+)

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..d24e82d
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,7 @@
+ignition-math4 (4.0.0~pre2+dfsg1-1) unstable; urgency=medium
+
+  * Imported Upstream version 4.0.0~pre2
+  * Initial release (Closes: #882233)
+
+ -- Jose Luis Rivero <jrivero at osrfoundation.org>  Mon, 20 Nov 2017 16:06:01 +0000
+
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..f599e28
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+10
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..b8b1deb
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,49 @@
+Source: ignition-math4
+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 (>= 10),
+               libgtest-dev,
+               python,
+               ruby-ronn
+Standards-Version: 4.0.0
+Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/gnition-math4.git
+Vcs-Git: https://anonscm.debian.org/cgit/debian-science/packages/ignition-math4.git
+Homepage: http://ignitionrobotics.org/libraries/math
+
+Package: libignition-math4
+Architecture: any
+Multi-Arch: same
+Section: libs
+Depends: ${shlibs:Depends},
+         ${misc:Depends}
+Pre-Depends: ${misc:Pre-Depends}
+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-math4-dev
+Architecture: any
+Multi-Arch: same
+Section: libdevel
+Provides: libignition-math-dev
+Depends: libignition-math4 (= ${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.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..b26fcca
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,60 @@
+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
+
+Files: cmake/Ronn2Man.cmake
+Copyright: 2009, 2012 Emmanuel Roullit.
+License: GPL-2
+ See '/usr/share/common-licenses/GPL-2'.
+
+Files: cmake/TargetArch.cmake
+Copyright: 2012 Petroules Corporation. All rights reserved.
+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-math4-dev.install b/debian/libignition-math4-dev.install
new file mode 100644
index 0000000..d660227
--- /dev/null
+++ b/debian/libignition-math4-dev.install
@@ -0,0 +1,4 @@
+usr/include/*
+usr/lib/*/*.so
+usr/lib/*/pkgconfig/*.pc
+usr/lib/*/cmake/ignition-math4/*
diff --git a/debian/libignition-math4.install b/debian/libignition-math4.install
new file mode 100644
index 0000000..3de3b10
--- /dev/null
+++ b/debian/libignition-math4.install
@@ -0,0 +1 @@
+usr/lib/*/*.so.*
diff --git a/debian/libignition-math4.lintian-overrides b/debian/libignition-math4.lintian-overrides
new file mode 100644
index 0000000..50d63a7
--- /dev/null
+++ b/debian/libignition-math4.lintian-overrides
@@ -0,0 +1,2 @@
+# Upstream names library as libignition-math
+package-name-doesnt-match-sonames libignition-math4-4
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/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..abc432b
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+0001-c++11-unconditional.patch
+0002_use_system_gtest.patch
+0004_test_failures_in_non_x64_arches.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..a6938e6
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,21 @@
+#!/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_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_auto_test:
+	dh_auto_test $@ --no-parallel --buildsystem=cmake
+
+%:
+	dh $@ --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..cd9a954
--- /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-math4`
+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..f1b4207
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: build
+Depends: libignition-math4-dev, pkg-config, build-essential
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..c77f789
--- /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-math4-(\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-math4.git



More information about the debian-science-commits mailing list