summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Cornu2015-07-17 10:13:52 +0200
committerNicolas Cornu2015-07-17 10:13:52 +0200
commit740640c13bacc03a2015b77e71b10b096108a259 (patch)
tree96807423ce1933a5f268b5a3ddbe469a9f19467f
downloadaur-740640c13bacc03a2015b77e71b10b096108a259.tar.gz
Initial commit
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD35
-rw-r--r--without_qiprobe.patch110
3 files changed, 164 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..f48b7a6b96ed
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = libqi
+ pkgdesc = Qi library from Aldebaran
+ pkgver = 2.1.3
+ pkgrel = 1
+ url = https://github.com/aldebaran/libqi
+ arch = i686
+ arch = x86_64
+ license = BSD3
+ makedepends = qibuild
+ depends = boost
+ options = strip
+ options = staticlibs
+ source = https://github.com/aldebaran/libqi/archive/v2.1.3.tar.gz
+ source = without_qiprobe.patch
+ sha1sums = 778b4b82da7ca3c5522244e73fd901962a025271
+ sha1sums = aedb17967843f9745d6ef9a2a2c183b669e94939
+
+pkgname = libqi
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..879c8b1833fb
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: Nicolas Cornu <ncornu@aldebaran.com>
+
+pkgname=libqi
+pkgver=2.1.3
+pkgrel=1
+pkgdesc="Qi library from Aldebaran"
+arch=('i686' 'x86_64')
+url="https://github.com/aldebaran/libqi"
+license=('BSD3')
+depends=('boost')
+options=('strip' 'staticlibs')
+makedepends=('qibuild')
+source=("${url}/archive/v${pkgver}.tar.gz"
+ "without_qiprobe.patch")
+
+sha1sums=('778b4b82da7ca3c5522244e73fd901962a025271'
+ 'aedb17967843f9745d6ef9a2a2c183b669e94939')
+
+prepare() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ patch -p1 -i "$srcdir/without_qiprobe.patch"
+}
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ mkdir -p BUILD && cd BUILD
+ cmake .. -DQI_WITH_TESTS=OFF -DQI_DIR=../sdk/cmake -DWITH_PROBES=OFF -DCMAKE_INSTALL_PREFIX:PATH=/usr
+ make
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}/BUILD
+ make install DESTDIR=${pkgdir}
+}
diff --git a/without_qiprobe.patch b/without_qiprobe.patch
new file mode 100644
index 000000000000..1f59edee2030
--- /dev/null
+++ b/without_qiprobe.patch
@@ -0,0 +1,110 @@
+Only in libqi-2.1.3: BUILD
+diff -puZ -r libqi-2.1.3old/CMakeLists.txt libqi-2.1.3/CMakeLists.txt
+--- libqi-2.1.3old/CMakeLists.txt 2014-11-13 19:07:49.000000000 +0100
++++ libqi-2.1.3/CMakeLists.txt 2015-03-26 17:40:29.294386931 +0100
+@@ -28,12 +28,17 @@ qi_add_optional_package(BOOST_LOCALE "En
+ enable_testing()
+ include(CMakeDependentOption)
+
+-find_package(qiprobes)
+-qiprobes_create_probe(tp_qi
+- src/tp_qi.in.h
+- PROVIDER_NAME qi_qi)
+-qiprobes_instrument_files(tp_qi
+- src/eventloop.cpp)
++if (WITH_PROBES)
++ find_package(qiprobes)
++ qiprobes_create_probe(tp_qi
++ src/tp_qi.in.h
++ PROVIDER_NAME qi_qi)
++ qiprobes_instrument_files(tp_qi
++ src/eventloop.cpp)
++ set(_tp_qi "tp_qi")
++else()
++ set(_tp_qi "")
++endif()
+
+ set(H
+ qi/details/eventloop.hxx
+@@ -157,7 +162,7 @@ list(APPEND C ${_out})
+ include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
+ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/external")
+
+-qi_create_lib(qi ${_libtype} ${H} ${C} SUBMODULE tp_qi)
++qi_create_lib(qi ${_libtype} ${H} ${C} SUBMODULE ${_tp_qi})
+
+ if (WITH_QT_QTCORE)
+ qi_use_lib(qi QT_QTCORE)
+Only in libqi-2.1.3/examples/qitranslate/po: share
+diff -puZ -r libqi-2.1.3old/src/eventloop.cpp libqi-2.1.3/src/eventloop.cpp
+--- libqi-2.1.3old/src/eventloop.cpp 2014-11-13 19:07:49.000000000 +0100
++++ libqi-2.1.3/src/eventloop.cpp 2015-03-26 17:40:29.294386931 +0100
+@@ -16,7 +16,11 @@
+ #include <qi/future.hpp>
+
+ #include "eventloop_p.hpp"
+-#include "tp_qi.h"
++#ifdef WITH_PROBES
++# include "tp_qi.h"
++#else
++# define tracepoint(...)
++#endif
+
+ qiLogCategory("qi.eventloop");
+
+diff -puZ -r libqi-2.1.3old/tests/CMakeLists.txt libqi-2.1.3/tests/CMakeLists.txt
+--- libqi-2.1.3old/tests/CMakeLists.txt 2014-11-13 19:07:49.000000000 +0100
++++ libqi-2.1.3/tests/CMakeLists.txt 2015-03-26 18:13:47.511017563 +0100
+@@ -1,29 +1,31 @@
+ ## Copyright (c) 2012 Aldebaran Robotics. All rights reserved.
+ ## Use of this source code is governed by a BSD-style license that can be
+ ## found in the COPYING file.
+-if(${QIBUILD_VERSION} VERSION_GREATER "3.1")
+- qi_create_test_helper(testlaunch testlaunch.cpp)
+- qi_create_test_helper(testlaunchloop testlaunchloop.cpp)
+- qi_create_test_helper(check_env check_env.cpp)
+- qi_create_test_helper(check_machineid check_machineid.cpp)
+- qi_create_test_helper(test_application test_application.cpp)
+-else()
+- qi_create_bin(testlaunch NO_INSTALL testlaunch.cpp)
+- qi_create_bin(testlaunchloop NO_INSTALL testlaunchloop.cpp)
+- qi_create_bin(check_env NO_INSTALL check_env.cpp)
+- qi_create_bin(check_machineid NO_INSTALL check_machineid.cpp)
+- qi_create_bin(test_application NO_INSTALL test_application.cpp)
+-endif()
++if(QI_WITH_TESTS)
++ if(${QIBUILD_VERSION} VERSION_GREATER "3.1")
++ qi_create_test_helper(testlaunch testlaunch.cpp)
++ qi_create_test_helper(testlaunchloop testlaunchloop.cpp)
++ qi_create_test_helper(check_env check_env.cpp)
++ qi_create_test_helper(check_machineid check_machineid.cpp)
++ qi_create_test_helper(test_application test_application.cpp)
++ else()
++ qi_create_bin(testlaunch NO_INSTALL testlaunch.cpp)
++ qi_create_bin(testlaunchloop NO_INSTALL testlaunchloop.cpp)
++ qi_create_bin(check_env NO_INSTALL check_env.cpp)
++ qi_create_bin(check_machineid NO_INSTALL check_machineid.cpp)
++ qi_create_bin(test_application NO_INSTALL test_application.cpp)
++ endif()
+
+-qi_use_lib(testlaunchloop QI)
+-qi_use_lib(check_env QI)
+-qi_use_lib(check_machineid QI)
+-qi_use_lib(test_application QI)
++ qi_use_lib(testlaunchloop QI)
++ qi_use_lib(check_env QI)
++ qi_use_lib(check_machineid QI)
++ qi_use_lib(test_application QI)
+
+-set_target_properties(testlaunch PROPERTIES FOLDER tests)
+-set_target_properties(testlaunchloop PROPERTIES FOLDER tests)
+-set_target_properties(check_env PROPERTIES FOLDER tests)
+-set_target_properties(test_application PROPERTIES FOLDER tests)
++ set_target_properties(testlaunch PROPERTIES FOLDER tests)
++ set_target_properties(testlaunchloop PROPERTIES FOLDER tests)
++ set_target_properties(check_env PROPERTIES FOLDER tests)
++ set_target_properties(test_application PROPERTIES FOLDER tests)
++endif()
+
+ qi_create_gtest(test_qiclock SRC test_qiclock.cpp DEPENDS QI GTEST)
+ qi_create_gtest(test_qipath SRC test_qipath.cpp ../src/utils.cpp DEPENDS QI GTEST)