From 3cb6d7297f79b00f8dfbf87b7b31703c7f29f923 Mon Sep 17 00:00:00 2001 From: Johannes Brechtmann Date: Fri, 20 Apr 2018 06:48:11 +0200 Subject: [PATCH] flann: add patch from alpine to unbreak --- srcpkgs/flann/patches/cmake.patch | 72 +++++++++++++++++++++++++++++++ srcpkgs/flann/template | 2 +- 2 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/flann/patches/cmake.patch diff --git a/srcpkgs/flann/patches/cmake.patch b/srcpkgs/flann/patches/cmake.patch new file mode 100644 index 00000000000..c1c94635f82 --- /dev/null +++ b/srcpkgs/flann/patches/cmake.patch @@ -0,0 +1,72 @@ +source: https://git.alpinelinux.org/cgit/aports/tree/testing/flann/cmake.patch?id=fe5137a340af202cefe6b67601af0133b6b660bd +reason: cmake 3.11 fails without it + +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} + diff --git a/srcpkgs/flann/template b/srcpkgs/flann/template index 86c6034b611..ab9b9935d53 100644 --- a/srcpkgs/flann/template +++ b/srcpkgs/flann/template @@ -1,8 +1,8 @@ -broken="https://build.voidlinux.eu/builders/i686_builder/builds/8824/steps/shell_3/logs/stdio" # Template file for 'flann' pkgname=flann version=1.9.1 revision=3 +patch_args="-Np1" build_style=cmake makedepends="gtest-devel hdf5-devel" short_desc="Fast library for approximate nearest neighbors"