debian/0000755000000000000000000000000012231527410007163 5ustar debian/watch0000644000000000000000000000025212224611073010214 0ustar version=3 opts=dversionmangle=s/\+repack$// \ http://robots.mobilerobots.com/wiki/ARIA \ http://robots.mobilerobots.com/ARIA/download/current/ARIA-([0-9\.]+)\+gcc.+\.tgz debian/libaria2.install0000644000000000000000000000006312224611073012240 0ustar etc/Aria usr/lib/*/lib*.so.* usr/share/Aria/params debian/README.source0000644000000000000000000000135412224611073011346 0ustar Source tarball was repackaged from ARIA-2.8.0+gcc4.6.tgz since the upstream tarball was not source only. Repackaging was done as follows: $ wget http://robots.mobilerobots.com/ARIA/download/current/ARIA-2.8.0+gcc4.6.tgz $ tar xzf ARIA-2.8.0+gcc4.6.tgz $ mv Aria-2.8.0 libaria-2.8.0.orig $ cd libaria-2.8.0.orig && patch -p1 < /path/to/libaria_source/debian/patches/fix-upstream-makefile.patch $ make -C libaria-2.8.0.orig fullCleanAll cleanDoc cleanParams cleanSwigJava $ cd libaria-2.8.0.orig && patch -p1 -R < /path/to/libaria_source/debian/patches/fix-upstream-makefile.patch $ tar cjf libaria_2.8.0+repack.orig.tar.bz2 libaria-2.8.0.orig/ The get-orig-source target is provided in debian/rules, but assumes it's invoked in debian directory. debian/python-ariapy.docs0000644000000000000000000000005512224611073012642 0ustar python/AriaPy.html pythonExamples/README.txt debian/libaria-dev.install0000644000000000000000000000004012224611073012725 0ustar usr/include/* usr/lib/*/lib*.so debian/shlibs.local0000644000000000000000000000004212224611073011460 0ustar libaria 2 libaria2 (>= 2.7.5.2-1) debian/rules0000755000000000000000000000163012224611073010244 0ustar #!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 export INSTALL_DIR=/usr DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) %: dh $@ --with python2 --parallel override_dh_auto_build-indep: $(MAKE) -C . docs override_dh_installchangelogs: dh_installchangelogs Changes.txt upstream override_dh_installdocs: dh_installdocs -Xfigures/ -Xoptions/ -X.dox get-orig-source: wget http://robots.mobilerobots.com/ARIA/download/current/ARIA-2.8.0+gcc4.6.tgz tar xzf ARIA-2.8.0+gcc4.6.tgz mv Aria-2.8.0 libaria-2.8.0.orig cd libaria-2.8.0.orig && patch -p1 < ../patches/fix-upstream-makefile.patch make -C libaria-2.8.0.orig fullCleanAll cleanDoc cleanParams cleanSwigJava cd libaria-2.8.0.orig && patch -p1 -R < ../patches/fix-upstream-makefile.patch tar cjf libaria_2.8.0+repack.orig.tar.bz2 libaria-2.8.0.orig/ rm -rf libaria-2.8.0.orig/ ARIA-2.8.0+gcc4.6.tgz debian/python-ariapy.pyinstall0000644000000000000000000000004312224611073013726 0ustar debian/AriaPy.py debian/_AriaPy.so debian/libaria-demo.manpages0000644000000000000000000000002312224611073013221 0ustar debian/aria-demo.1 debian/python-ariapy.examples0000644000000000000000000000002412224611073013524 0ustar pythonExamples/*.py debian/aria-demo.10000644000000000000000000000547212224611073011114 0ustar .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH ARIA-DEMO 1 "MAY 2013" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME aria-demo \- demonstration program for the Aria library .SH SYNOPSIS .B aria-demo [-remoteHost|-rh remoteHostNameOrIP .B ] [-robotPort|-rp robotSerialPort .B ] ... .SH DESCRIPTION This manual page documents briefly the .B aria-demo program. .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. \fBaria-demo\fP uses "Modes" defined in ARIA to provide keyboard control of many different robot features. Use this utility to experiment and test the robot's hardware. .SH OPTIONS \fBaria-demo\fP accepts all command line options recognized by ARIA library. A summary of options is included below. .SS ArRobotConnector options .TP .B \-rh, \-remoteHost Specify the hostname or the IP address of the robot to connect to. .TP .B \-rp. \-robotPort Specify the serial port on which the robots microcontroller is connected. .TP .B \-rb, \-robotBaud Set the baud rate for the serial connection. .TP .B \-rrtp, \-remoteRobotTcpPort Set the TCP port of the remote robot. .TP .B \-ris, \-remoteIsSim Indicate that the remote robot is simulated. .TP .B \-rins, \-remoteIsNotSim .TP .B \-rlpr, \-robotLogPacketsReceived .TP .B \-rlps, \-robotLogPacketsSent .TP .B \-rlmr, \-robotLogMovementReceived .TP .B \-rlms, \-robotLogMovementSent .TP .B \-rlvr, \-robotLogVelocitiesReceived .TP .B \-rla, \-robotLogActions .SS ArLaserConnector options The following options work accross different laser sensors that may be installed on the robot. Read the documentation (provided in the libaria-dev-doc package) for details. .TP .B \-lp, \-laserPort .TP .B \-lpt, \-laserPortType .TP .B \-rltp, \-remoteLaserTcpPort .TP .B \-lf, \-laserFlipped .TP .B \-lmr, -laserMaxRange .TP .B \-lair, \-laserAdditionalIgnoreReadings .SH AUTHOR Aria library and this demo program was written by MobileRobots/Adept. .PP This manual page was written by Srećko Jurić-Kavelj , for the Debian project (and may be used by others). debian/copyright0000644000000000000000000000511412224611073011120 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: MobileRobots' Advanced Robot Interface for Applications (ARIA) Upstream-Contact: Reed Hedges Source: http://robots.mobilerobots.com/wiki/ARIA Files: * Copyright: 2002, 2003, 2004, 2005 ActivMedia Robotics, LLC. All rights reserved. 2006, 2007, 2008, 2009 MobileRobots Inc. All rights reserved. 2010, 2011, 2012, 2013 Adept Technology. All rights reserved. License: GPL-2 Files: ArNetworking/tests/md5test.cpp ArNetworking/src/md5.cpp src/md5.cpp include/md5.h ArNetworking/include/md5.h Copyright: 1999, 2002 Aladdin Enterprises. All rights reserved. Comment: Original author L. Peter Deutsch , some files relicensed as GPL-2 after inclusion in ARIA by ...? License: Zlib This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. . Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: . 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Files: debian/* Copyright: 2013 Srećko Jurić-Kavelj License: GPL-2 License: GPL-2 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. debian/docs0000644000000000000000000000005612224611073010040 0ustar CommandLineOptions.txt README.txt version.txt debian/libaria-demo.install0000644000000000000000000000002212224611073013073 0ustar usr/bin/aria-demo debian/libaria-dev-doc.doc-base0000644000000000000000000000031512224611073013504 0ustar Document: libaria-dev-doc Title: ARIA Developer's Reference Manual Section: Programming/C++ Format: HTML Index: /usr/share/doc/libaria-dev-doc/docs/index.html Files: /usr/share/doc/libaria-dev-doc/docs/* debian/python-ariapy.doc-base0000644000000000000000000000031712224611073013370 0ustar Document: python-ariapy Title: Python wrapper for ARIA Documentation Section: Programming/Python Format: HTML Index: /usr/share/doc/python-ariapy/AriaPy.html Files: /usr/share/doc/python-ariapy/AriaPy.html debian/source/0000755000000000000000000000000012224611073010464 5ustar debian/source/format0000644000000000000000000000001412224611073011672 0ustar 3.0 (quilt) debian/patches/0000755000000000000000000000000012231527371010620 5ustar debian/patches/hardening.patch0000644000000000000000000000462012224611073013575 0ustar Subject: Patching detected hardening problems in libaria. Author: Srećko Jurić-Kavelj --- a/src/ArMap.cpp +++ b/src/ArMap.cpp @@ -1605,7 +1605,7 @@ { myConfigMapName[0] = '\0'; if (fileName != NULL) { - snprintf(myConfigMapName, MAX_MAP_NAME_LENGTH, fileName); + snprintf(myConfigMapName, MAX_MAP_NAME_LENGTH, "%s", fileName); } } // end method changeConfigMapName --- a/src/ArMapInterface.cpp +++ b/src/ArMapInterface.cpp @@ -101,7 +101,7 @@ char *nameBuf = new char[totalLen]; nameBuf[0] = '\0'; - snprintf(nameBuf, totalLen, baseDirectory); + snprintf(nameBuf, totalLen, "%s", baseDirectory); ArUtil::appendSlash(nameBuf, totalLen); realFileName = nameBuf; --- a/src/ArSocket.cpp +++ b/src/ArSocket.cpp @@ -527,7 +527,7 @@ } if (separator.getArgc() == 1) { - snprintf(useHost, useHostSize, separator.getArg(0)); + snprintf(useHost, useHostSize, "%s", separator.getArg(0)); *port = rawPort; return; } @@ -535,7 +535,7 @@ { if (separator.isArgInt(1)) { - snprintf(useHost, useHostSize, separator.getArg(0)); + snprintf(useHost, useHostSize, "%s", separator.getArg(0)); *port = separator.getArgInt(1); return; } --- a/src/ArSocket_LIN.cpp +++ b/src/ArSocket_LIN.cpp @@ -678,7 +678,7 @@ { myErrorStr="Trying to get socket name on an unopened socket"; myError = NetFail; - printf(myErrorStr.c_str()); + printf("%s", myErrorStr.c_str()); return(false); } --- a/Makefile +++ b/Makefile @@ -24,10 +24,10 @@ # this is set up with the extra layer since the python wrapper needs exceptions # but I didn't want to have two sets of defines BARECXXFLAGS:=-g -Wall -D_REENTRANT #-pg -fprofile-arcs -CXXFLAGS+=$(BARECXXFLAGS) -fno-exceptions +CXXFLAGS+=$(CPPFLAGS) $(BARECXXFLAGS) -fno-exceptions CXXINC:=-Iinclude -CXXLINK=-Llib -lAria -CXXSTATICLINK:=-Llib -Xlinker -Bstatic -lAria -Xlinker -Bdynamic +CXXLINK=$(LDFLAGS) -Llib -lAria +CXXSTATICLINK:=$(LDFLAGS) -Llib -Xlinker -Bstatic -lAria -Xlinker -Bdynamic host:=$(shell uname | cut -d _ -f 1) ifeq ($(host),MINGW32) @@ -589,7 +589,7 @@ #### lib/libAria.so: $(OFILES) Makefile.dep - $(CXX) -shared -Wl,-soname,libAria.so.2 -o $(@).2.8.0 $(OFILES) + $(CXX) -shared -Wl,-soname,libAria.so.2 $(LDFLAGS) -o $(@).2.8.0 $(OFILES) ln -s libAria.so.2.8.0 lib/libAria.so.2 ln -s libAria.so.2 lib/libAria.so debian/patches/python.patch0000644000000000000000000000556012224611073013163 0ustar Description: Building Python package from SWIG generated wrapper. Author: Srećko Jurić-Kavelj --- a/Makefile +++ b/Makefile @@ -272,7 +272,7 @@ #### # Default Rule -all: dirs $(TARGETS) params +all: dirs $(TARGETS) params python python-doc # Build all targets, docs, params, etc. etc. everything: dirs $(ALL_TARGETS) @@ -506,22 +506,19 @@ python-doc: python/AriaPy.html -python/AriaPy.html: python/AriaPy.py - cd python; pydoc -w AriaPy +python/AriaPy.html: python/_AriaPy.so python/AriaPy.py + cd python; LD_LIBRARY_PATH=../lib pydoc -w AriaPy python/AriaPy_wrap.cpp python/AriaPy.py: include/wrapper.i include/*.h -rm -f `find python -maxdepth 1 -xtype f -name "*Aria*" | grep -v .ds | grep -v .sln | grep -v .vcproj` cd python; $(SWIG) -Wall -c++ -python -modern -module AriaPy -Dlinux -DAREXPORT -o AriaPy_wrap.cpp -I../include ../include/wrapper.i python/_AriaPy.so: obj/AriaPy_wrap.o lib/libAria.so Makefile.dep - if ! test -f $(PYTHON_INCLUDE)/Python.h; then echo Error: $(PYTHON_INCLUDE)/Python.h not found. Is the Python development package installed on this system? Is PYTHON_INCLUDE set correctly?; exit 1; fi - $(CXX) -shared -o $(@) obj/AriaPy_wrap.o $(CXXLINK) + $(CXX) -shared -o $(@) obj/AriaPy_wrap.o $(LDFLAGS) $(CXXLINK) obj/AriaPy_wrap.o: python/AriaPy_wrap.cpp mkdir -p obj - @ if test -z "$(PYTHON_INCLUDE)"; then echo "*** Error: PYTHON_INCLUDE is not set, cannot build ARIA python wrapper"; fi - if ! test -f $(PYTHON_INCLUDE)/Python.h; then echo Error: $(PYTHON_INCLUDE)/Python.h not found. Is the Python development package installed on this system? Is PYTHON_INCLUDE set correctly?; exit 1; fi - $(CXX) -c $(BARECXXFLAGS) $(CXXINC) $(PYTHON_INCLUDE_FLAGS) $< -o $@ + $(CXX) -c $(CPPFLAGS) -O2 $(BARECXXFLAGS) $(CXXINC) $(shell python-config --includes) $< -o $@ ### Java Wrapper: ### @@ -737,6 +734,8 @@ if test \! -d $(DESTDIR)$(SYSTEM_ETC_DIR); then install -d $(DESTDIR)$(SYSTEM_ETC_DIR); fi ;\ echo $(STORED_INSTALL_DIR) > $(DESTDIR)$(SYSTEM_ETC_DIR)/Aria ;\ fi + $(INSTALL) -D -m 644 python/_AriaPy.so debian/ + $(INSTALL) -D -m 644 python/AriaPy.py debian/ # echo ;\ # echo The files are owned by the group \"users\", and all members of that group ;\ --- a/include/ArConfigArg.h +++ b/include/ArConfigArg.h @@ -307,10 +307,12 @@ char *errorBuffer = NULL, size_t errorBufferLen = 0, bool doNotSet = false); +#ifndef SWIG /// Sets the argument value for string arguments. The value of @a str is copied to the target string. AREXPORT bool setString(const std::string &str, char *errorBuffer = NULL, size_t errorBufferLen = 0, bool doNotSet = false); +#endif AREXPORT bool setCppString(const std::string &str, char *errorBuffer = NULL, size_t errorBufferLen = 0, debian/patches/fix-upstream-makefile.patch0000644000000000000000000000734612224611073016045 0ustar Description: Fix upstream build system. Since the upstream tarball already contains build results, Makefile and utils were modified to enable full clean and rebuild. Forwarded: Reed Hedges Author: Srećko Jurić-Kavelj --- a/Makefile +++ b/Makefile @@ -308,10 +308,7 @@ docs: doc doc: docs/index.html docs/index.html: $(SRC_FILES) $(HEADER_FILES) $(EXAMPLES_CPP) docs/overview.dox docs/options/all_options.dox docs/params.dox - @echo Removing old documentation... - $(MAKE) cleanDoc - @echo Running dist/make-doc.sh to generate HTML API documentation... - dist/make-doc.sh dev ARIA_DIST_NO_NTP=1 + doxygen doxygen.conf arnetworking_swig: $(MAKE) -C ArNetworking java python @@ -395,7 +392,11 @@ -rm -f $(MOD_EXAMPLES) cleanDoc: - -rm docs/*.html docs/*.png docs/doxygen.css + find docs/ -path docs/figures -prune -o -type d \! -name docs -exec rm -rf \{\} + + find docs/ -path docs/figures -prune -o \! \( -name "*.dox" -o -name docs \) -execdir rm \{\} + + +cleanParams: + -rm -rf params cleandoc: cleanDoc @@ -440,8 +441,6 @@ cleanAll: clean rm -f lib/lib*.so* for dir in `find . -maxdepth 1 -name "Ar*" -xtype d`; do cd $$dir; make clean; cd ..; done - $(MAKE) -C ArVideo cleanAll - $(MAKE) -C ArNetworking cleanAll fullCleanAll: cleanAll cleanJava cleanPython rm -f lib/lib*.so* @@ -450,13 +449,14 @@ + params: utils/makeParams$(binsuffix) -mkdir params - utils/makeParams$(binsuffix) + LD_LIBRARY_PATH=lib utils/makeParams$(binsuffix) CommandLineOptions.txt.in docs/options/all_options.dox: utils/genCommandLineOptionDocs$(binsuffix) src/ArSimpleConnector.cpp src/ArGPSConnector.cpp src/ArTCM2.cpp -mkdir docs/options - utils/genCommandLineOptionDocs$(binsuffix) + LD_LIBRARY_PATH=lib utils/genCommandLineOptionDocs$(binsuffix) alllibs: allLibs --- a/utils/makeParams.cpp +++ b/utils/makeParams.cpp @@ -38,6 +38,7 @@ { Aria::init(); //ArLog::init(ArLog::StdOut, ArLog::Verbose); + Aria::setDirectory("."); makePref(new ArRobotAmigo); makePref(new ArRobotAmigoSh); --- a/ArNetworking/Makefile +++ b/ArNetworking/Makefile @@ -70,7 +70,7 @@ TARGETS:=../lib/libArNetworking.so examples EXAMPLES_CPP:=$(shell find examples -name "*.$(CFILEEXT)" | grep -v Mod.cpp) -EXAMPLES:=$(patsubst %.$(CFILEEXT),%,$(EXAMPLES_CPP)) +EXAMPLES:=$(patsubst %.$(CFILEEXT),%,$(EXAMPLES_CPP)) $(patsubst %.$(CFILEEXT),%Static,$(EXAMPLES_CPP)) TESTS_CPP:=$(shell find tests -name "*.$(CFILEEXT)" | grep -v Mod.cpp) TESTS:=$(patsubst %.$(CFILEEXT),%,$(TESTS_CPP)) @@ -104,20 +104,22 @@ clean: cleanExamples rm -f ../lib/libArNetworking.so ../lib/libArNetworking.a \ `find . -name core` $(OFILES) `find . -name '*~'` + rm -f genCommandLineOptionDocs cleanPython: -rm ../python/_ArNetworkingPy.so -rm ../python/ArNetworkingPy.py -rm ../python/ArNetworkingPy.pyc -rm ../python/ArNetworkingPy_wrap.cpp + -rm ../python/ArNetworkingPy_wrap.h -rm ../obj/ArNetworkingPy_wrap.o cleanExamples: rm -f $(EXAMPLES) cleanDoc: - -rm -f docs/*.html docs/*.png docs/*.png - -rm -rf docs/tmp + find docs/ -path docs/figures -prune -o -type d \! -name docs -exec rm -rf \{\} + + find docs/ -path docs/figures -prune -o \! -name docs -execdir rm \{\} + fullClean: clean cleanExamples cleanJava cleanPython cleanDoc @@ -184,7 +186,7 @@ CommandLineOptions.txt.in docs/options/all_options.dox: genCommandLineOptionDocs -mkdir docs/options - ./genCommandLineOptionDocs + LD_LIBRARY_PATH=../lib ./genCommandLineOptionDocs genCommandLineOptionDocs: ../utils/genCommandLineOptionDocs.cpp ../lib/libAria.so ../lib/libArNetworking.so src/ArServerSimpleOpener.cpp src/ArClientSimpleConnector.cpp src/ArClientSwitchManager.cpp $(CXX) $(CXXFLAGS) -DFOR_ARNETWORKING $(CXXINC) $< -o $@ $(CXXLINK) debian/patches/examples.patch0000644000000000000000000000623012224611073013453 0ustar Description: Including Aria examples in packages. Author: Srećko Jurić-Kavelj --- a/examples/Makefile +++ b/examples/Makefile @@ -1,30 +1,61 @@ -# A simple $(MAKE)file to cause make to go look in the top directory. A simple -# convenience. +#Hacked up Makefile for Aria examples -all: lib - $(MAKE) -C .. examples - -lib: - $(MAKE) -C .. lib/libAria.so - -%.so: ../lib/libAria.so %.cpp - $(MAKE) -C .. examples/$@ - -%: ../lib/libAria.so %.cpp - $(MAKE) -C .. examples/$@ - -%Static: ../lib/libAria.a %.cpp - $(MAKE) -C .. examples/$@ - -clean: - $(MAKE) -C .. cleanExamples - -../lib/libAria.so: FORCE - $(MAKE) -C .. dirs lib/libAria.so - -../lib/libAria.a: FORCE - $(MAKE) -C .. dirs lib/libAria.a - -FORCE: - -.PHONY: all FORCE clean lib +ifndef CXX +CXX:=g++ +endif + +ifndef OUT_DIR +OUT_DIR:=/tmp +endif + +#### +#### General variables +#### + +CFILEEXT:=cpp +# this is set up with the extra layer since the python wrapper needs exceptions +# but I didn't want to have two sets of defines +BARECXXFLAGS:= -fPIC -g -Wall -D_REENTRANT +CXXFLAGS+=$(CPPFLAGS) $(BARECXXFLAGS) -fno-exceptions + +CXXINC:=-I/usr/include/Aria +CXXLINK:=$(LDFLAGS) -Llib -lAria -lpthread -ldl -lrt + +EXAMPLES_CPP:=$(shell find . -maxdepth 1 -name "*.$(CFILEEXT)" | grep -v Mod.cpp | grep -v proprietary) +EXAMPLES_CPP_GZ:=$(shell find . -maxdepth 1 -name "*.$(CFILEEXT).gz" | grep -v Mod.cpp | grep -v proprietary) +EXAMPLES:=$(patsubst %.$(CFILEEXT),%,$(EXAMPLES_CPP)) +EXAMPLES+=$(patsubst %.$(CFILEEXT).gz,%,$(EXAMPLES_CPP_GZ)) +ADVANCED_CPP:=$(shell find advanced -name "*.$(CFILEEXT)" | grep -v Mod.cpp | grep -v proprietary) +ADVANCED_CPP_GZ:=$(shell find advanced -name "*.$(CFILEEXT).gz" | grep -v Mod.cpp | grep -v proprietary) +ADVANCED:=$(patsubst %.$(CFILEEXT),%,$(ADVANCED_CPP)) +ADVANCED+=$(patsubst %.$(CFILEEXT).gz,%,$(ADVANCED_CPP_GZ)) + +info: + @echo "Convenience makefile for building Aria examples." + @echo "Provided targets are examples and advanced." + @echo "There is also target all, depending on the previously mentioned targets." + @echo + @echo "Build results end up in the OUT_DIR (defaults to /tmp)". + @echo + @echo "One can also build individual example, by providing an example name" + @echo "(without suffixes) as a make target." + +all: examples advanced + +examples: $(EXAMPLES) + +advanced: $(ADVANCED) + +%: %.$(CFILEEXT) + $(CXX) $(CXXFLAGS) $(CXXINC) $< -o $(OUT_DIR)/$@ $(CXXLINK) + +%: %.$(CFILEEXT).gz + zcat $< | $(CXX) $(CXXFLAGS) $(CXXINC) -x c++ - -o $(OUT_DIR)/$@ $(CXXLINK) + +advanced/%: advanced/%.$(CFILEEXT) + -mkdir -p $(OUT_DIR)/advanced + $(CXX) $(CXXFLAGS) $(CXXINC) $< -o $(OUT_DIR)/$@ $(CXXLINK) + +advanced/%: advanced/%.$(CFILEEXT).gz + -mkdir -p $(OUT_DIR)/advanced + zcat $< | $(CXX) $(CXXFLAGS) $(CXXINC) -x c++ - -o $(OUT_DIR)/$@ $(CXXLINK) --- a/Makefile +++ b/Makefile @@ -734,6 +734,7 @@ if test \! -d $(DESTDIR)$(SYSTEM_ETC_DIR); then install -d $(DESTDIR)$(SYSTEM_ETC_DIR); fi ;\ echo $(STORED_INSTALL_DIR) > $(DESTDIR)$(SYSTEM_ETC_DIR)/Aria ;\ fi + $(INSTALL) -D -m 755 examples/demo $(DESTDIR)$(INSTALL_DIR)/bin/aria-demo $(INSTALL) -D -m 644 python/_AriaPy.so debian/ $(INSTALL) -D -m 644 python/AriaPy.py debian/ debian/patches/install.patch0000644000000000000000000001005412224611073013302 0ustar Description: Changes to the install target. The install target handles only a subset of the generated files. . libAria.so gets a SONAME. Author: Srećko Jurić-Kavelj --- a/Makefile +++ b/Makefile @@ -272,7 +272,7 @@ #### # Default Rule -all: dirs $(TARGETS) +all: dirs $(TARGETS) params # Build all targets, docs, params, etc. etc. everything: dirs $(ALL_TARGETS) @@ -589,7 +589,9 @@ #### lib/libAria.so: $(OFILES) Makefile.dep - $(CXX) -shared -o $(@) $(OFILES) + $(CXX) -shared -Wl,-soname,libAria.so.2 -o $(@).2.8.0 $(OFILES) + ln -s libAria.so.2.8.0 lib/libAria.so.2 + ln -s libAria.so.2 lib/libAria.so lib/libAria.a: $(OFILES) Makefile.dep ar -cr $(@) $(OFILES) @@ -703,7 +705,7 @@ # What to put in /etc/Aria: ifndef STORED_INSTALL_DIR -STORED_INSTALL_DIR=$(INSTALL_DIR) +STORED_INSTALL_DIR=$(INSTALL_DIR)/share/Aria endif # How to run 'install' for the install rule: @@ -722,35 +724,18 @@ # Override installation locations with INSTALL_DIR environment variable. # Things are installed group-writable so as to be hacked upon. install: - @echo -------------------------------------- - @echo Installing ARIA in $(DESTDIR)$(INSTALL_DIR)... - @echo -------------------------------------- - $(INSTALL) -m 775 -d $(DESTDIR)$(INSTALL_DIR) - find include src tests utils params docs examples advanced maps \ - ArNetworking java javaExamples python pythonExamples obj \ - \( -name \*.o -or -name core -or -name CVS -or -name .\* -or -name \*~ -or -name tmp -or -name proprietary* -or -name \*.bak -or -name \*.class \) -prune \ - -or -type d -exec $(INSTALL) -d -m 777 $(DESTDIR)$(INSTALL_DIR)/\{\} \; \ - -or -type l -exec cp --no-dereference \{\} $(DESTDIR)$(INSTALL_DIR)/\{\} \; \ - -or -name \*.a -exec $(INSTALL) -D -m 666 \{\} $(DESTDIR)$(INSTALL_DIR)/\{\} \; \ - -or -perm +1 -exec $(INSTALL) -D --strip -m 777 \{\} $(DESTDIR)$(INSTALL_DIR)/\{\} \; \ - -or -exec $(INSTALL) -D -m 666 \{\} $(DESTDIR)$(INSTALL_DIR)/\{\} \; - $(INSTALL) -D -m 664 LICENSE.txt INSTALL.txt README.txt Makefile Aria-Reference.html version.txt Changes.txt CommandLineOptions.txt icon.png $(DESTDIR)$(INSTALL_DIR)/ - $(INSTALL) -D -m 666 Makefile.dep doxygen.conf $(DESTDIR)$(INSTALL_DIR)/ - $(INSTALL) -D -m 664 bin/SIMULATOR_README.txt $(DESTDIR)$(INSTALL_DIR)/bin/SIMULATOR_README.txt - $(INSTALL) -d -m 777 $(DESTDIR)$(INSTALL_DIR)/lib/ - $(INSTALL) -D --strip -m 666 lib/libAria.so lib/libArNetworking.so lib/libAriaJava.so lib/libArNetworkingJava.so $(DESTDIR)$(INSTALL_DIR)/lib/ + $(INSTALL) -m 755 -d $(DESTDIR)$(INSTALL_DIR) + $(INSTALL) -d -m 755 $(DESTDIR)$(INSTALL_DIR)/include/Aria + $(INSTALL) -D -m 644 include/*.h $(DESTDIR)$(INSTALL_DIR)/include/Aria + $(INSTALL) -d -m 755 $(DESTDIR)$(INSTALL_DIR)/share/Aria/params + $(INSTALL) -D -m 644 params/* $(DESTDIR)$(INSTALL_DIR)/share/Aria/params + $(INSTALL) -d -m 755 $(DESTDIR)$(INSTALL_DIR)/lib/ + $(INSTALL) -D -m 644 lib/libAria.so.2.8.0 $(DESTDIR)$(INSTALL_DIR)/lib/ + cp --no-dereference lib/libAria.so.2 $(DESTDIR)$(INSTALL_DIR)/lib/ + cp --no-dereference lib/libAria.so $(DESTDIR)$(INSTALL_DIR)/lib/ @if test -z "$(DIST_INSTALL)"; then \ - echo "if test \! -d $(DESTDIR)$(SYSTEM_ETC_DIR); then install -d $(DESTDIR)$(SYSTEM_ETC_DIR); fi" ;\ if test \! -d $(DESTDIR)$(SYSTEM_ETC_DIR); then install -d $(DESTDIR)$(SYSTEM_ETC_DIR); fi ;\ - echo "echo $(STORED_INSTALL_DIR) > $(DESTDIR)$(SYSTEM_ETC_DIR)/Aria" ;\ echo $(STORED_INSTALL_DIR) > $(DESTDIR)$(SYSTEM_ETC_DIR)/Aria ;\ - echo ------------------------------------------------------------------------------------ ;\ - echo ARIA has been installed in $(DESTDIR)$(INSTALL_DIR). ;\ - echo ;\ - echo To be able to use the ARIA libraries, you must now add $(DESTDIR)$(INSTALL_DIR)/lib ;\ - echo to your LD_LIBRARY_PATH environment variable, or to the /etc/ld.so.conf system file, ;\ - echo then run \'ldconfig\';\ - echo ------------------------------------------------------------------------------------ ;\ fi # echo ;\ debian/patches/test.patch0000644000000000000000000001205512224611073012616 0ustar Description: Run some tests with dh_autotest Programs in tests directory do not comprise a standard testsuite. Most tests presume a human as an evaluator, and most need actual robot hardware to run. . Following tests could be patched to be useful for automated testing: tests/actionAverageTest.cpp tests/actionManagementTest.cpp tests/configSectionTest.cpp tests/configTest.cpp tests/fileParserTest.cpp tests/functorTest.cpp tests/gpsCoordsTest.cpp tests/gpsInternals.cpp tests/interpolationTest.cpp tests/mapTest.cpp tests/mutexLockWarning.cpp tests/poseTest.cpp tests/stripQuoteTest.cpp tests/timeTest.cpp tests/transformTest.cpp Author: Srećko Jurić-Kavelj --- a/Makefile +++ b/Makefile @@ -263,6 +263,15 @@ UTILS:=$(patsubst %.$(CFILEEXT),%$(binsuffix),$(UTILS_CPP)) SRC_FILES:=$(patsubst %,src/%,$(CFILES)) HEADER_FILES:=$(shell find include -type f -name \*.h) +# Tests to run for the testsuite +TESTS_TO_RUN:=\ + tests/actionArgumentTest \ + tests/angleBetweenTest \ + tests/angleFixTest \ + tests/angleTest \ + tests/lineTest \ + tests/mathTests \ + tests/robotListTest @@ -293,6 +302,11 @@ tests: $(TESTS) $(MOD_TESTS) +test: $(TESTS_TO_RUN) + for test in $(TESTS_TO_RUN); do \ + LD_LIBRARY_PATH=lib $$test; \ + done + advanced: $(ADVANCED) utils: $(UTILS) --- a/tests/angleTest.cpp +++ b/tests/angleTest.cpp @@ -73,7 +73,7 @@ { printf("Failed that one from (%.0f, %.0f) (%.0f, %.0f) %3.0f %4.0f\n", x1, y1, x2, y2, initial, distance); - exit(0); + exit(1); } } --- a/tests/robotListTest.cpp +++ b/tests/robotListTest.cpp @@ -31,42 +31,42 @@ ArRobot robot; printf("%s\n", robot.getName()); - if (strcmp(robot.getName(), "robot") == 0) - printf("SUCCESS: 'robot's name successfully set\n"); + if (strcmp(robot.getName(), "robot0") == 0) + printf("SUCCESS: 'robot0's name successfully set\n"); else { - printf("FAILURE: 'robot's name not successfully set\n"); + printf("FAILURE: 'robot0's name not successfully set\n"); exit(1); } ArRobot robot2; printf("%s\n", robot2.getName()); - if (strcmp(robot2.getName(), "robot2") == 0) - printf("SUCCESS: 'robot2's name successfully set\n"); + if (strcmp(robot2.getName(), "robot1") == 0) + printf("SUCCESS: 'robot1's name successfully set\n"); else { - printf("FAILURE: 'robot2's name not successfully set\n"); + printf("FAILURE: 'robot1's name not successfully set\n"); exit(1); } ArRobot robot3; printf("%s\n", robot3.getName()); - if (strcmp(robot3.getName(), "robot3") == 0) - printf("SUCCESS: 'robot3's name successfully set\n"); + if (strcmp(robot3.getName(), "robot2") == 0) + printf("SUCCESS: 'robot2's name successfully set\n"); else { - printf("FAILURE: 'robot3's name not successfully set\n"); + printf("FAILURE: 'robot2's name not successfully set\n"); exit(1); } - r = Aria::findRobot("robot"); - if (r != NULL && strcmp(r->getName(), "robot") == 0) - printf("SUCCESS: Found a the robot named 'robot' successfully.\n"); + r = Aria::findRobot("robot0"); + if (r != NULL && strcmp(r->getName(), "robot0") == 0) + printf("SUCCESS: Found a the robot named 'robot0' successfully.\n"); else { - printf("FAILURE: could not find the robot named 'robot'\n"); + printf("FAILURE: could not find the robot named 'robot0'\n"); exit(1); } - r = Aria::findRobot("Bleargh"); + r = Aria::findRobot("bleargh"); if (r == NULL) printf("SUCCESS: didn't find any robot named bleargh\n"); else @@ -76,35 +76,35 @@ } robot.setName(NULL); - printf("Resetting the name of 'robot'\n"); + printf("Resetting the name of 'robot0'\n"); printf("%s\n", robot.getName()); if (strcmp(robot.getName(), "robot") == 0) - printf("SUCCESS: 'robot's name successfully reset\n"); + printf("SUCCESS: 'robot0's name successfully reset\n"); else { - printf("FAILURE: 'robot's name not successfully reset\n"); + printf("FAILURE: 'robot0's name not successfully reset\n"); exit(1); } robot2.setName(NULL); - printf("Resetting the name of 'robot2'\n"); + printf("Resetting the name of 'robot1'\n"); printf("%s\n", robot2.getName()); if (strcmp(robot2.getName(), "robot2") == 0) - printf("SUCCESS: 'robot2's name successfully reset\n"); + printf("SUCCESS: 'robot1's name successfully reset\n"); else { - printf("FAILURE: 'robot2's name not successfully reset\n"); + printf("FAILURE: 'robot1's name not successfully reset\n"); exit(1); } robot.setName("BobBot"); - printf("Resetting the name of 'robot' to 'BobBot'\n"); + printf("Resetting the name of 'robot0' to 'BobBot'\n"); printf("%s\n", robot.getName()); if (strcmp(robot.getName(), "BobBot") == 0) - printf("SUCCESS: 'robot's name successfully changed to 'BobBot'\n"); + printf("SUCCESS: 'robot0's name successfully changed to 'BobBot'\n"); else { - printf("FAILURE: 'robot's name not successfully changed to 'BobBot'"); + printf("FAILURE: 'robot0's name not successfully changed to 'BobBot'"); exit(1); } } debian/patches/linkage.patch0000644000000000000000000000226012231527365013256 0ustar Description: Link libAria.so directly with the libraries it uses Author: Colin Watson Bug-Debian: http://bugs.debian.org/726429 Forwarded: no Last-Update: 2013-10-22 Index: b/Makefile =================================================================== --- a/Makefile +++ b/Makefile @@ -34,12 +34,12 @@ $(info Building on MinGW) #CXXFLAGS+=-mwindows -mms-bitfields -D__MINGW__ -DMINGW CXXFLAGS+=-mms-bitfields -D__MINGW__ -DMINGW - CXXLINK+=-lpthreadGC2 -lwinmm -lws2_32 -lstdc++ + LIBARIA_LDADD=-lpthreadGC2 -lwinmm -lws2_32 -lstdc++ CXXSTATICLINK+=-Wl,-Bstatic -lpthread -Wl,-Bdynamic -lwinmm -lws2_32 -lstdc++ binsuffix:=.exe else BARECXXFLAGS+=-fPIC - CXXLINK+=-lpthread -ldl -lrt + LIBARIA_LDADD=-lpthread -ldl -lrt CXXSTATICLINK+=-Xlinker -Bdynamic -lpthread -ldl -lrt -Xlinker -Bstatic -lstdc++ -Xlinker -Bdynamic binsuffix:= endif @@ -600,7 +600,7 @@ #### lib/libAria.so: $(OFILES) Makefile.dep - $(CXX) -shared -Wl,-soname,libAria.so.2 $(LDFLAGS) -o $(@).2.8.0 $(OFILES) + $(CXX) -shared -Wl,-soname,libAria.so.2 $(LDFLAGS) -o $(@).2.8.0 $(OFILES) $(LIBARIA_LDADD) ln -s libAria.so.2.8.0 lib/libAria.so.2 ln -s libAria.so.2 lib/libAria.so debian/patches/series0000644000000000000000000000017712231526746012047 0ustar fix-upstream-makefile.patch install.patch hardening.patch multiarch.patch python.patch examples.patch test.patch linkage.patch debian/patches/multiarch.patch0000644000000000000000000000225112224611073013624 0ustar Description: Multi-Arch support for shared libraries Author: Srećko Jurić-Kavelj --- a/Makefile +++ b/Makefile @@ -729,10 +729,10 @@ $(INSTALL) -D -m 644 include/*.h $(DESTDIR)$(INSTALL_DIR)/include/Aria $(INSTALL) -d -m 755 $(DESTDIR)$(INSTALL_DIR)/share/Aria/params $(INSTALL) -D -m 644 params/* $(DESTDIR)$(INSTALL_DIR)/share/Aria/params - $(INSTALL) -d -m 755 $(DESTDIR)$(INSTALL_DIR)/lib/ - $(INSTALL) -D -m 644 lib/libAria.so.2.8.0 $(DESTDIR)$(INSTALL_DIR)/lib/ - cp --no-dereference lib/libAria.so.2 $(DESTDIR)$(INSTALL_DIR)/lib/ - cp --no-dereference lib/libAria.so $(DESTDIR)$(INSTALL_DIR)/lib/ + $(INSTALL) -d -m 755 $(DESTDIR)$(INSTALL_DIR)/lib/$(DEB_HOST_MULTIARCH) + $(INSTALL) -D -m 644 lib/libAria.so.2.8.0 $(DESTDIR)$(INSTALL_DIR)/lib/$(DEB_HOST_MULTIARCH) + cp --no-dereference lib/libAria.so.2 $(DESTDIR)$(INSTALL_DIR)/lib/$(DEB_HOST_MULTIARCH) + cp --no-dereference lib/libAria.so $(DESTDIR)$(INSTALL_DIR)/lib/$(DEB_HOST_MULTIARCH) @if test -z "$(DIST_INSTALL)"; then \ if test \! -d $(DESTDIR)$(SYSTEM_ETC_DIR); then install -d $(DESTDIR)$(SYSTEM_ETC_DIR); fi ;\ echo $(STORED_INSTALL_DIR) > $(DESTDIR)$(SYSTEM_ETC_DIR)/Aria ;\ debian/compat0000644000000000000000000000000212224611073010362 0ustar 9 debian/control0000644000000000000000000000625112231526746010605 0ustar Source: libaria Priority: extra Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Srećko Jurić-Kavelj Build-Depends: debhelper (>= 9), swig, python-dev Build-Depends-Indep: doxygen Standards-Version: 3.9.4 Section: libs Homepage: http://robots.mobilerobots.com/wiki/ARIA Vcs-Git: git://github.com/jksrecko/libaria.git Vcs-browser: https://github.com/jksrecko/libaria Package: libaria-dev Section: libdevel Architecture: any Multi-Arch: same Depends: libaria2 (= ${binary:Version}), ${misc:Depends} Description: C++ library for MobileRobots/ActivMedia robots (devel) ARIA is an object oriented toolkit for controlling MobileRobots/ActivMedia mobile robots and their accessories, and for creating robot control applications. It also provides many cross-platform and high-level tools for multimedia, networking, and other useful tasks. . This package contains static libraries and header files. Package: libaria-demo Section: libdevel Architecture: any Depends: libaria2 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Description: C++ library for MobileRobots/ActivMedia robots (demo example) ARIA is an object oriented toolkit for controlling MobileRobots/ActivMedia mobile robots and their accessories, and for creating robot control applications. It also provides many cross-platform and high-level tools for multimedia, networking, and other useful tasks. . This package contains the demo example of the library functions. The example is renamed to aria-demo and can be used to experiment and test the robot's hardware. Package: libaria2 Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends} Description: C++ library for MobileRobots/ActivMedia robots ARIA is an object oriented toolkit for controlling MobileRobots/ActivMedia mobile robots and their accessories, and for creating robot control applications. It also provides many cross-platform and high-level tools for multimedia, networking, and other useful tasks. . This package contains shared libraries. Package: libaria-dev-doc Section: doc Architecture: all Multi-Arch: foreign Depends: ${misc:Depends} Suggests: libaria-dev (= ${binary:Version}) Description: C++ library for MobileRobots/ActivMedia robots (devel docs) ARIA is an object oriented toolkit for controlling MobileRobots/ActivMedia mobile robots and their accessories, and for creating robot control applications. It also provides many cross-platform and high-level tools for multimedia, networking, and other useful tasks. . This package contains doxygen generated documentation. Package: python-ariapy Section: python Architecture: any Depends: libaria2 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}, ${python:Depends} Description: C++ library for MobileRobots/ActivMedia robots (Python bindings) ARIA is an object oriented toolkit for controlling MobileRobots/ActivMedia mobile robots and their accessories, and for creating robot control applications. It also provides many cross-platform and high-level tools for multimedia, networking, and other useful tasks. . This package contains SWIG generated Python bindings. debian/libaria-dev-doc.docs0000644000000000000000000000000512224611073012753 0ustar docs debian/libaria-dev-doc.lintian-overrides0000644000000000000000000000045112224611073015466 0ustar # The doxygen introduces jQuery library. # The issue has been discused at debian-metors mailing list: # http://lists.debian.org/debian-mentors/2012/11/msg00310.html libaria-dev-doc binary: embedded-javascript-library # Doxygen builds some identical images. libaria-dev-doc binary: duplicate-files debian/changelog0000644000000000000000000000317212231527401011040 0ustar libaria (2.8.0+repack-1ubuntu1) trusty; urgency=low * Resynchronise with Debian (LP: #1243245). Remaining changes: - Link libAria.so with -lpthread -ldl -lrt, rather than passing those options only when linking the objects that are linked with libAria. -- Colin Watson Tue, 22 Oct 2013 17:59:44 +0100 libaria (2.8.0+repack-1) unstable; urgency=low * New upstream version (2.8.0). -- Srećko Jurić-Kavelj Fri, 20 Sep 2013 19:44:53 +0200 libaria (2.7.5.2+repack-3ubuntu1) saucy; urgency=low * Link libAria.so with -lpthread -ldl -lrt, rather than passing those options only when linking the objects that are linked with libAria. -- Colin Watson Tue, 15 Oct 2013 16:27:20 +0100 libaria (2.7.5.2+repack-3) unstable; urgency=low * Removed statically linked library. * Corrected Multi-Arch config for the doc package. Also, generating documentation in a build-indep target. * Building python-ariapy package (SWIG generated bindings) * Building libaria-demo package * Added test target for dh_autotest. -- Srećko Jurić-Kavelj Wed, 19 Jun 2013 11:17:59 +0200 libaria (2.7.5.2+repack-2) unstable; urgency=low * libc6 dependency dropped * Converted to Multi-Arch -- Srećko Jurić-Kavelj Thu, 02 May 2013 18:41:11 +0200 libaria (2.7.5.2+repack-1) unstable; urgency=low * Initial release (Closes: #703357) * Repacked the original tarball to remove unnecesary non-source files. -- Srećko Jurić-Kavelj Sat, 30 Mar 2013 17:52:50 +0100 debian/libaria-dev.examples0000644000000000000000000000007612224611073013106 0ustar examples/*.cpp examples/Makefile examples/README.txt advanced