diff options
author | Bradley J Chambers <brad.chambers@gmail.com> | 2018-04-03 12:19:24 -0400 |
---|---|---|
committer | Carlo Landmeter <clandmeter@alpinelinux.org> | 2018-04-11 15:21:29 +0000 |
commit | fe5137a340af202cefe6b67601af0133b6b660bd (patch) | |
tree | 016a0f3c80bee0f6add116eead42cddc0e27d3b5 /testing/flann | |
parent | 4284c820c58bbb60a7fd3d2097bca9ba7f651594 (diff) | |
download | aports-fe5137a340af202cefe6b67601af0133b6b660bd.tar.bz2 aports-fe5137a340af202cefe6b67601af0133b6b660bd.tar.xz |
testing/flann: add aport
Diffstat (limited to 'testing/flann')
-rw-r--r-- | testing/flann/APKBUILD | 36 | ||||
-rw-r--r-- | testing/flann/cmake.patch | 68 |
2 files changed, 104 insertions, 0 deletions
diff --git a/testing/flann/APKBUILD b/testing/flann/APKBUILD new file mode 100644 index 0000000000..07f15aea6f --- /dev/null +++ b/testing/flann/APKBUILD @@ -0,0 +1,36 @@ +# Contributor: Bradley J Chambers <brad.chambers@gmail.com> +# Maintainer: Bradley J Chambers <brad.chambers@gmail.com> +pkgname=flann +pkgver=1.9.1 +pkgrel=0 +pkgdesc="Fast Library for Approximate Nearest Neighbors" +url="https://www.cs.ubc.ca/research/flann/" +arch="all" +license="BSD-3-Clause" +# FLANN tests are broken, test data is invalid +options="!check" +depends="" +makedepends="cmake" +subpackages="$pkgname-dev" +source="$pkgname-$pkgver.tar.gz::https://github.com/mariusmuja/$pkgname/archive/$pkgver.tar.gz + cmake.patch" +builddir="$srcdir/$pkgname-$pkgver" + +build() { + cd "$builddir" + + mkdir build && cd build + cmake .. \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=ON + make +} + +package() { + cd "$builddir"/build + make DESTDIR="$pkgdir" install +} + +sha512sums="0da78bb14111013318160dd3dee1f93eb6ed077b18439fd6496017b62a8a6070cc859cfb3e08dad4c614e48d9dc1da5f7c4a21726ee45896d360506da074a6f7 flann-1.9.1.tar.gz +786558070bb50e60f4f133242d9b77ce72d248aaa45012345c1d768cf648d9d083698663c4ba54f63ae301fc2fe09859a32b12ef0bff20c53e45d57b424c9f48 cmake.patch" diff --git a/testing/flann/cmake.patch b/testing/flann/cmake.patch new file mode 100644 index 0000000000..77f2976b4f --- /dev/null +++ b/testing/flann/cmake.patch @@ -0,0 +1,68 @@ +diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt +index 49c53f0..9f19406 100644 +--- a/src/cpp/CMakeLists.txt ++++ b/src/cpp/CMakeLists.txt +@@ -28,25 +28,25 @@ if (BUILD_CUDA_LIB) + set_property(TARGET flann_cuda_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC) + endif() + +-if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC) +- add_library(flann_cpp SHARED "") +- set_target_properties(flann_cpp PROPERTIES LINKER_LANGUAGE CXX) +- target_link_libraries(flann_cpp -Wl,-whole-archive flann_cpp_s -Wl,-no-whole-archive) +- +- if (BUILD_CUDA_LIB) +- cuda_add_library(flann_cuda SHARED "") +- set_target_properties(flann_cuda PROPERTIES LINKER_LANGUAGE CXX) +- target_link_libraries(flann_cuda -Wl,-whole-archive flann_cuda_s -Wl,-no-whole-archive) +- set_property(TARGET flann_cpp_s PROPERTY COMPILE_DEFINITIONS FLANN_USE_CUDA) +- # target_link_libraries(flann_cuda cudpp_x86_64) +- endif() +-else() ++#if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC) ++# add_library(flann_cpp SHARED "") ++# set_target_properties(flann_cpp PROPERTIES LINKER_LANGUAGE CXX) ++# target_link_libraries(flann_cpp -Wl,-whole-archive flann_cpp_s -Wl,-no-whole-archive) ++# ++# if (BUILD_CUDA_LIB) ++# cuda_add_library(flann_cuda SHARED "") ++# set_target_properties(flann_cuda PROPERTIES LINKER_LANGUAGE CXX) ++# target_link_libraries(flann_cuda -Wl,-whole-archive flann_cuda_s -Wl,-no-whole-archive) ++# set_property(TARGET flann_cpp_s PROPERTY COMPILE_DEFINITIONS FLANN_USE_CUDA) ++# # target_link_libraries(flann_cuda cudpp_x86_64) ++# endif() ++#else() + add_library(flann_cpp SHARED ${CPP_SOURCES}) + if (BUILD_CUDA_LIB) + cuda_add_library(flann_cuda SHARED ${CPP_SOURCES}) + set_property(TARGET flann_cpp PROPERTY COMPILE_DEFINITIONS FLANN_USE_CUDA) + endif() +-endif() ++#endif() + + set_target_properties(flann_cpp PROPERTIES + VERSION ${FLANN_VERSION} +@@ -82,17 +82,17 @@ if (BUILD_C_BINDINGS) + endif() + set_property(TARGET flann_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC) + +- if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC) +- add_library(flann SHARED "") +- set_target_properties(flann PROPERTIES LINKER_LANGUAGE CXX) +- target_link_libraries(flann -Wl,-whole-archive flann_s -Wl,-no-whole-archive) +- else() ++ #if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC) ++ # add_library(flann SHARED "") ++ # set_target_properties(flann PROPERTIES LINKER_LANGUAGE CXX) ++ # target_link_libraries(flann -Wl,-whole-archive flann_s -Wl,-no-whole-archive) ++ #else() + add_library(flann SHARED ${C_SOURCES}) + + if(MINGW AND OPENMP_FOUND) + target_link_libraries(flann gomp) + endif() +- endif() ++ #endif() + + set_target_properties(flann PROPERTIES + VERSION ${FLANN_VERSION} |