From e3e98144c32d8f56cd0297ac884001f0e91fb9aa Mon Sep 17 00:00:00 2001 From: jbeich Date: Wed, 19 Jul 2017 06:51:10 +0000 Subject: MFH: r446135 graphics/colmap: try to unbreak on non-x86 g++5: error: unrecognized command line option '-mfpmath=sse' Reported by: pkg-fallout (aarch64) Approved by: ports-secteam blanket --- graphics/colmap/Makefile | 2 +- graphics/colmap/files/patch-no-sse | 50 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 graphics/colmap/files/patch-no-sse diff --git a/graphics/colmap/Makefile b/graphics/colmap/Makefile index 7ef6173..af7a7a5 100644 --- a/graphics/colmap/Makefile +++ b/graphics/colmap/Makefile @@ -2,7 +2,7 @@ PORTNAME= colmap DISTVERSION= 2.1 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= graphics MAINTAINER= jbeich@FreeBSD.org diff --git a/graphics/colmap/files/patch-no-sse b/graphics/colmap/files/patch-no-sse new file mode 100644 index 0000000..5b3204e --- /dev/null +++ b/graphics/colmap/files/patch-no-sse @@ -0,0 +1,50 @@ +build: don't force SSE on i386 + +--- src/ext/PBA/CMakeLists.txt.orig 2017-06-15 14:32:01 UTC ++++ src/ext/PBA/CMakeLists.txt +@@ -1,7 +1,3 @@ +-if(NOT IS_MSVC) +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -O3 -pthread -march=core2 -mfpmath=sse -Wno-c++11-narrowing") +-endif() +- + if(CUDA_ENABLED) + # Fix for Ubuntu 16.04. + add_definitions("-D_FORCE_INLINES") +--- src/ext/PBA/SparseBundleCPU.cpp.orig 2017-06-15 14:32:01 UTC ++++ src/ext/PBA/SparseBundleCPU.cpp +@@ -52,15 +52,16 @@ using std::max; + #if defined(_M_ARM) && _M_ARM >= 7 && !defined(DISABLE_CPU_NEON) + #include + #define CPUPBA_USE_NEON +-#elif defined(__ARM_NEON__) && !defined(DISABLE_CPU_NEON) ++#elif defined(__ARM_NEON) && !defined(DISABLE_CPU_NEON) + #include + #define CPUPBA_USE_NEON + #endif +-#elif defined(CPUPBA_USE_AVX) // Using AVX ++#elif defined(__AVX__) && !defined(DISABLE_CPU_AVX) // Using AVX + #include ++#define CPUPBA_USE_AVX + #undef CPUPBA_USE_SSE + #undef POINT_DATA_ALIGN4 +-#elif !defined(DISABLE_CPU_SSE) // Using SSE ++#elif defined(__SSE__) && !defined(DISABLE_CPU_SSE) // Using SSE + #define CPUPBA_USE_SSE + #include + #include +--- src/ext/SiftGPU/CMakeLists.txt.orig 2017-06-15 14:32:01 UTC ++++ src/ext/SiftGPU/CMakeLists.txt +@@ -1,13 +1,9 @@ + set(SIFT_GPU_ENABLE_OPENCL FALSE) +-set(SIFT_GPU_ENABLE_SSE TRUE) + set(SIFT_GPU_ENABLE_DEVIL FALSE) + set(SIFT_GPU_PREFER_GLUT TRUE) + + if(NOT IS_MSVC) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") +- if(SIFT_GPU_ENABLE_SSE) +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=core2 -mfpmath=sse") +- endif() + endif() + + if(SIFT_GPU_PREFER_GLUT) -- cgit v1.1