diff options
author | piernov | 2024-10-30 14:36:23 +0100 |
---|---|---|
committer | piernov | 2024-10-30 14:36:23 +0100 |
commit | c22027f447456313489a78d05cc0103d8b9f2159 (patch) | |
tree | c8689aef420c35e95cb22109977219a35d898932 | |
download | aur-c22027f447456313489a78d05cc0103d8b9f2159.tar.gz |
openeb3 3.1.2-1
-rw-r--r-- | .SRCINFO | 29 | ||||
-rw-r--r-- | PKGBUILD | 39 | ||||
-rw-r--r-- | fix-build.patch | 92 | ||||
-rw-r--r-- | python-version.patch | 18 |
4 files changed, 178 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..621c37c595c3 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,29 @@ +pkgbase = openeb3 + pkgdesc = Open source SDK for event based cameras by Prophesee with support for EVK1 + pkgver = 3.1.2 + pkgrel = 1 + url = https://github.com/prophesee-ai/openeb + arch = any + license = custom + makedepends = git + depends = opencv + depends = boost + depends = eigen + depends = libusb + depends = glew + depends = glfw + depends = hdf5 + depends = ffmpeg + depends = openscenegraph + depends = libcanberra + optdepends = cuda: machine learning samples + provides = openeb + conflicts = openeb-git + source = openeb::git+https://github.com/prophesee-ai/openeb#tag=3.1.2 + source = fix-build.patch + source = python-version.patch + sha256sums = 2f977d673ae345747d04cd224f8263e6b7f1cde58d46aa43a1bf0425fa548ab7 + sha256sums = c6c341a17aab158179d741720fe7b175a9991514ac5d9030ea4b2f1344de55c4 + sha256sums = bf2109e7df3e9d77735458d991b27a89fc99d7fae9721c1cffe6330c48045acc + +pkgname = openeb3 diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..63020ecb4000 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: piernov <piernov@piernov.org> + +pkgname=openeb3 +_pkgname=openeb +pkgdesc="Open source SDK for event based cameras by Prophesee with support for EVK1" +pkgver=3.1.2 +pkgrel=1 +arch=('any') +license=(custom) +url="https://github.com/prophesee-ai/openeb" +depends=(opencv boost eigen libusb glew glfw hdf5 ffmpeg openscenegraph libcanberra) +optdepends=('cuda: machine learning samples') +makedepends=('git') +conflicts=('openeb-git') +provides=('openeb') +source=("${_pkgname}::git+https://github.com/prophesee-ai/openeb#tag=${pkgver}" + "fix-build.patch" + "python-version.patch") +sha256sums=('2f977d673ae345747d04cd224f8263e6b7f1cde58d46aa43a1bf0425fa548ab7' + 'c6c341a17aab158179d741720fe7b175a9991514ac5d9030ea4b2f1344de55c4' + 'bf2109e7df3e9d77735458d991b27a89fc99d7fae9721c1cffe6330c48045acc') + +prepare() { + cd "${_pkgname}" + patch -p1 -i "${srcdir}/fix-build.patch" + patch -p1 -i "${srcdir}/python-version.patch" +} + +build() { + cmake -B build -S "${_pkgname}" \ + -DBUILD_TESTING=off \ + -DCMAKE_INSTALL_PREFIX='/usr' \ + -Wno-dev + cmake --build build --config Release +} + +package() { + DESTDIR="$pkgdir" cmake --install build +} diff --git a/fix-build.patch b/fix-build.patch new file mode 100644 index 000000000000..d034011f6234 --- /dev/null +++ b/fix-build.patch @@ -0,0 +1,92 @@ +diff --git a/sdk/modules/base/cpp/include/metavision/sdk/base/utils/object_pool.h b/sdk/modules/base/cpp/include/metavision/sdk/base/utils/object_pool.h +index 765989e..572b3dd 100644 +--- a/sdk/modules/base/cpp/include/metavision/sdk/base/utils/object_pool.h ++++ b/sdk/modules/base/cpp/include/metavision/sdk/base/utils/object_pool.h +@@ -16,6 +16,7 @@ + #include <stack> + #include <memory> + #include <mutex> ++#include <stdexcept> + #include <type_traits> + #include <exception> + +diff --git a/sdk/modules/core/cpp/apps/metavision_player/src/main.cpp b/sdk/modules/core/cpp/apps/metavision_player/src/main.cpp +index 60c7fa9..e96673f 100644 +--- a/sdk/modules/core/cpp/apps/metavision_player/src/main.cpp ++++ b/sdk/modules/core/cpp/apps/metavision_player/src/main.cpp +@@ -97,15 +97,15 @@ bool parse_command_line(int argc, const char *argv[], Parameters &app_params) { + } + + // Check extension of provided output files +- if (boost::filesystem::extension(app_params.out_bias_file) != ".bias") { ++ if (boost::filesystem::path(app_params.out_bias_file).extension() != ".bias") { + MV_LOG_ERROR() << "Wrong extension for provided output bias file: supported extension is '.bias'"; + return false; + } +- if (boost::filesystem::extension(app_params.out_png_file) != ".png") { ++ if (boost::filesystem::path(app_params.out_png_file).extension() != ".png") { + MV_LOG_ERROR() << "Wrong extension for provided output PNG file: supported extension is '.png'"; + return false; + } +- if (boost::filesystem::extension(app_params.out_avi_file) != ".avi") { ++ if (boost::filesystem::path(app_params.out_avi_file).extension() != ".avi") { + MV_LOG_ERROR() << "Wrong extension for provided output AVI file: supported extension is '.avi'"; + return false; + } +diff --git a/sdk/modules/driver/cpp/src/biases.cpp b/sdk/modules/driver/cpp/src/biases.cpp +index 581ada6..146f13d 100644 +--- a/sdk/modules/driver/cpp/src/biases.cpp ++++ b/sdk/modules/driver/cpp/src/biases.cpp +@@ -30,7 +30,7 @@ Biases::~Biases() {} + + void Biases::set_from_file(const std::string &biases_filename) { + // Check extension +- const auto extension = boost::filesystem::extension(biases_filename); ++ const auto extension = boost::filesystem::path(biases_filename).extension().string(); + if (extension != ".bias") { + throw CameraException(CameraErrorCode::WrongExtension, + "For bias file '" + biases_filename + +@@ -99,7 +99,7 @@ void Biases::set_from_file(const std::string &biases_filename) { + } + + void Biases::save_to_file(const std::string &dest_file) const { +- const auto extension = boost::filesystem::extension(dest_file); ++ const auto extension = boost::filesystem::path(dest_file).extension().string(); + if (extension != ".bias") { + throw CameraException(CameraErrorCode::WrongExtension, + "For bias file '" + dest_file + +diff --git a/sdk/modules/driver/cpp/src/camera.cpp b/sdk/modules/driver/cpp/src/camera.cpp +index 983c8b6..6bc9f18 100644 +--- a/sdk/modules/driver/cpp/src/camera.cpp ++++ b/sdk/modules/driver/cpp/src/camera.cpp +@@ -151,7 +151,7 @@ void Camera::Private::open_raw_file(const std::string &rawfile, const Future::Ra + throw CameraException(CameraErrorCode::NotARegularFile); + } + +- if (boost::filesystem::extension(rawfile) != ".raw") { ++ if (boost::filesystem::path(rawfile).extension().string() != ".raw") { + throw CameraException(CameraErrorCode::WrongExtension, + "Expected .raw as extension for the provided input file " + rawfile + "."); + } +@@ -346,7 +346,7 @@ void Camera::Private::start_recording(const std::string &rawfile_path) { + check_events_stream_instance(); + + stop_recording(); +- std::string base_path = boost::filesystem::change_extension(rawfile_path, "").string(); ++ std::string base_path = boost::filesystem::path(rawfile_path).replace_extension("").string(); + + // Log biases + if (biases_) { +diff --git a/utils/cpp/profiling/include/metavision/utils/profiling/utils/chrome_tracing_events.h b/utils/cpp/profiling/include/metavision/utils/profiling/utils/chrome_tracing_events.h +index a5462fa..eb1abe0 100644 +--- a/utils/cpp/profiling/include/metavision/utils/profiling/utils/chrome_tracing_events.h ++++ b/utils/cpp/profiling/include/metavision/utils/profiling/utils/chrome_tracing_events.h +@@ -9,6 +9,8 @@ + #ifndef METAVISION_UTILS_PROFILING_CHROME_TRACING_EVENTS_H + #define METAVISION_UTILS_PROFILING_CHROME_TRACING_EVENTS_H + ++#include <cstdint> ++ + #include "metavision/utils/profiling/utils/chrome_tracing_constants.h" + + namespace Profiling { diff --git a/python-version.patch b/python-version.patch new file mode 100644 index 000000000000..56c803d6c97f --- /dev/null +++ b/python-version.patch @@ -0,0 +1,18 @@ +diff --color --unified --recursive --text openeb.orig/cmake/custom_functions/python3.cmake openeb.new/cmake/custom_functions/python3.cmake +--- openeb.orig/cmake/custom_functions/python3.cmake 2023-03-15 20:23:19.745655351 +0100 ++++ openeb.new/cmake/custom_functions/python3.cmake 2023-03-15 20:24:03.045154659 +0100 +@@ -126,12 +126,12 @@ + + # this variable is used to create all python versions packages variables for cpack + # but not all of them will be generated, only the one indicated by PYBIND11_PYTHON_VERSIONS +- set (PYTHON3_ALL_VERSIONS "3.6;3.7;3.8") ++ set (PYTHON3_ALL_VERSIONS "3.6;3.7;3.8;3.10;3.11;3.12") + + # this variable is used to set the default version for package dependency, i.e this version + # is always available for the current installation + if (UNIX AND NOT APPLE AND (NOT DEFINED PYTHON3_DEFAULT_VERSION)) +- set (PYTHON3_DEFAULT_VERSION "3.6") ++ set (PYTHON3_DEFAULT_VERSION "3.12") + find_program(_lsb_release_exec lsb_release) + if (_lsb_release_exec) + execute_process(COMMAND ${_lsb_release_exec} -cs |