summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorbartus2019-08-30 11:36:53 +0200
committerbartus2019-08-30 11:36:53 +0200
commitcda28f425edbaa961d5417737a52b7e9f43e81d5 (patch)
treeb891770140d1243e02496396f0585f606ed991b3
downloadaur-cda28f425edbaa961d5417737a52b7e9f43e81d5.tar.gz
Init
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD54
-rw-r--r--ctest.patch79
3 files changed, 155 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..3dc2d74de3d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = uncertainty-framework
+ pkgdesc = Uncertainty estimation framework for a surface from motion dataset
+ pkgver = 1.2.0
+ pkgrel = 1
+ url = http://alicevision.github.io/
+ arch = i686
+ arch = x86_64
+ license = MPL2
+ makedepends = boost
+ makedepends = cmake
+ makedepends = git
+ makedepends = gflags
+ makedepends = cuda
+ depends = magma
+ depends = ceres-solver
+ source = UncertaintyTE::git+https://github.com/alicevision/UncertaintyTE.git
+ source = ctest.patch
+ sha256sums = SKIP
+ sha256sums = abf50924a78ec9628212c5b7086592d302155cf50dcc6f4c49a92d57b9a3b020
+
+pkgname = uncertainty-framework
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..458bf7f7596
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,54 @@
+# Maintainer : bartus <arch-user-repoᘓbartus.33mail.com>
+# shellcheck disable=SC2034
+# vim:set sw=2 ts=2 et:
+
+_name=UncertaintyTE
+pkgname=uncertainty-framework
+pkgver=1.2.0
+pkgrel=1
+pkgdesc="Uncertainty estimation framework for a surface from motion dataset"
+arch=('i686' 'x86_64')
+url="http://alicevision.github.io/"
+license=('MPL2')
+groups=()
+conflicts=()
+provides=()
+depends=(magma ceres-solver)
+makedepends=(boost cmake git gflags cuda)
+source=("${_name}::git+https://github.com/alicevision/${_name}.git"
+ "ctest.patch")
+sha256sums=('SKIP'
+ 'abf50924a78ec9628212c5b7086592d302155cf50dcc6f4c49a92d57b9a3b020')
+
+_CMAKE_FLAGS=( -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release )
+_CMAKE_FLAGS+=( -DMAGMA_ROOT=/opt/magma )
+_CMAKE_FLAGS+=( -DUNC_ALICEVISION_SUPPORT=ON -DUNC_BUILD_TESTS=ON -DUNC_MKL_SUPPORT=ON )
+# test if we can build matlab module
+pacman -Qq matlab && _CMAKE_FLAGS+=( -DUNC_MATLAB_SUPPORT=ON -DUNC_BUILD_MEX=ON )
+
+prepare() {
+ cd ${srcdir}/${_name}
+ git apply -v ${srcdir}/*.patch
+}
+
+pkgver() {
+ grep -oP "VERSION \K.*(?=\))" <(pcregrep -Mo -e '(?s)^PROJECT.*?\)' ${srcdir}/${_name}/CMakeLists.txt)
+}
+
+build() {
+ cd ${srcdir}
+ mkdir -p build && cd build
+ cmake --trace --debug ${_CMAKE_FLAGS[*]} ${srcdir}/${_name}
+ make all
+}
+
+
+package() {
+ cd ${srcdir}/build
+ make DESTDIR=${pkgdir} install
+}
+
+check() {
+ cd ${srcdir}/build/src
+ ctest
+}
diff --git a/ctest.patch b/ctest.patch
new file mode 100644
index 00000000000..bbccf9f4eed
--- /dev/null
+++ b/ctest.patch
@@ -0,0 +1,79 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 06636b3..d7bc1f3 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -17,6 +17,31 @@ message(STATUS "CMAKE_CONFIGURATION_TYPES: ${CMAKE_CONFIGURATION_TYPES}")
+ message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
+ message(STATUS "---------------------------------------------------------")
+
++
++# -----------------------------------------------------------------------------
++# UNIT TEST macro
++# -----------------------------------------------------------------------------
++macro(UNIT_TEST NAMESPACE NAME EXTRA_LIBS)
++ if(UNC_BUILD_TESTS)
++ add_executable(${NAMESPACE}_test_${NAME} ${NAME}_test.cpp)
++
++ set_property(TARGET ${NAMESPACE}_test_${NAME} PROPERTY FOLDER uncertaintyTE/test)
++
++ target_link_libraries(${NAMESPACE}_test_${NAME}
++ ${EXTRA_LIBS} # Extra libs MUST be first.
++ ${BOOST_LIBRARIES} uncertaintyTE)
++
++ target_include_directories(${NAMESPACE}_test_${NAME}
++ PUBLIC
++ .
++ ${INCLUDE_DIRS})
++
++ add_test(NAME ${NAMESPACE}_test_${NAME}
++ WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
++ COMMAND $<TARGET_FILE:${NAMESPACE}_test_${NAME}> --log_level=all)
++ endif()
++endmacro()
++
+ # Guard against in-source builds
+ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
+ message(FATAL_ERROR "In-source builds not allowed.")
+@@ -264,31 +289,6 @@ if(WIN32)
+ message("Please add the library path to your project (e.g. 'c:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2017.4.210/windows/compiler/lib/intel64_win')")
+ endif()
+
+-
+-# -----------------------------------------------------------------------------
+-# UNIT TEST macro
+-# -----------------------------------------------------------------------------
+-macro(UNIT_TEST NAMESPACE NAME EXTRA_LIBS)
+- if(UNC_BUILD_TESTS)
+- add_executable(${NAMESPACE}_test_${NAME} ${NAME}_test.cpp)
+-
+- set_property(TARGET ${NAMESPACE}_test_${NAME} PROPERTY FOLDER uncertaintyTE/test)
+-
+- target_link_libraries(${NAMESPACE}_test_${NAME}
+- ${EXTRA_LIBS} # Extra libs MUST be first.
+- ${BOOST_LIBRARIES} uncertainty_shared)
+-
+- target_include_directories(${NAMESPACE}_test_${NAME}
+- PUBLIC
+- .
+- ${INCLUDE_DIRS})
+-
+- add_test(NAME ${NAMESPACE}_test_${NAME}
+- WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
+- COMMAND $<TARGET_file:${NAMESPACE}_test_${NAME}> --log_level=all)
+- endif()
+-endmacro()
+-
+ # -----------------------------------------------------------------------------
+ # STATUS
+ # -----------------------------------------------------------------------------
+diff --git a/src/test_eigValues/CMakeLists.txt b/src/test_eigValues/CMakeLists.txt
+index 79f39c7..8a3c5b6 100644
+--- a/src/test_eigValues/CMakeLists.txt
++++ b/src/test_eigValues/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ # Add unit test
+ if(UNC_BUILD_TESTS)
+ # List of unit tests
+- UNIT_TEST(cov covarianceEigenValues uncertainty)
++ UNIT_TEST(cov covarianceEigenValues uncertaintyTE)
+ ENDIF()