diff options
author | jbeich <jbeich@FreeBSD.org> | 2016-12-18 01:32:35 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2016-12-18 01:32:35 +0800 |
commit | 3d75cbfb6388b097fbc16cf5d12dc7090657c9cb (patch) | |
tree | 49c19e26e6e7f312c6f03cc90bf608241f9a4547 /graphics | |
parent | e5626b64fdf7ec68e5473d1f28a492f4f491af0f (diff) | |
download | freebsd-ports-gnome-3d75cbfb6388b097fbc16cf5d12dc7090657c9cb.tar.gz freebsd-ports-gnome-3d75cbfb6388b097fbc16cf5d12dc7090657c9cb.tar.zst freebsd-ports-gnome-3d75cbfb6388b097fbc16cf5d12dc7090657c9cb.zip |
graphics/colmap: enable OPENMP on 10.2+ after r428641
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/colmap/Makefile | 14 | ||||
-rw-r--r-- | graphics/colmap/files/patch-pba-nostd | 74 |
2 files changed, 82 insertions, 6 deletions
diff --git a/graphics/colmap/Makefile b/graphics/colmap/Makefile index 25858138e586..5b87049ce773 100644 --- a/graphics/colmap/Makefile +++ b/graphics/colmap/Makefile @@ -3,6 +3,7 @@ PORTNAME= colmap DISTVERSION= 2.1-0 # synthetic tag DISTVERSIONSUFFIX= -g55fbe10 +PORTREVISION= 1 CATEGORIES= graphics MAINTAINER= jbeich@FreeBSD.org @@ -25,7 +26,7 @@ LIB_DEPENDS= libboost_filesystem.so:devel/boost-libs \ libfreeimage.so:graphics/freeimage \ libceres.so:math/ceres-solver -USES= cmake compiler:c++11-lib fortran localbase sqlite +USES= cmake compiler:${OPENMP}c++11-lib fortran localbase sqlite USE_GITHUB= yes USE_GL= gl glew glut USE_QT5= qmake_build buildtools_build core gui opengl_build widgets @@ -33,6 +34,7 @@ EXCLUDE= SQLite EXTRACT_AFTER_ARGS= ${EXCLUDE:S,^,--exclude src/ext/,} CMAKE_ARGS= -DBOOST_STATIC=off -DCUDA_ENABLED=off CFLAGS+= -DVL_OS_LINUX=1 +CXXFLAGS+= -fpermissive # libc++ <future> vs. g++49 CXXFLAGS+= -D_GLIBCXX_USE_C99 -D_GLIBCXX_USE_C99_MATH_TR1 \ -D_DECLARE_C99_LDBL_MATH # XXX ports/193528 LDFLAGS+= -Wl,--as-needed # gflags, glu, xi, xmu @@ -40,11 +42,9 @@ TEST_TARGET= test ARGS="-V" OPTIONS_DEFINE= DOCS OPENMP OPTIONS_DEFAULT= OPENMP ${MACHINE_CPU:tu} -.if !exists(/usr/bin/gcc) -# XXX ports/199603 + ports/210337 -# USES=compiler:gcc-c++11-lib fails to build -OPTIONS_EXCLUDE= OPENMP -.endif +# XXX ports/215138: exclude still broken +OPTIONS_EXCLUDE= ${OPTIONS_EXCLUDE_${OPSYS}_${OSREL}} # not OSREL:R +OPTIONS_EXCLUDE_FreeBSD_10.1= OPENMP OPTIONS_GROUP= SIMD OPTIONS_GROUP_SIMD= ${OPTIONS_GROUP_SIMD_${MACHINE_ARCH}} @@ -58,6 +58,8 @@ DOCS_PORTDOCS= * OPENMP_USES= compiler:openmp OPENMP_CMAKE_BOOL= OPENMP_ENABLED +# XXX ports/199603 + ports/210337 +OPENMP_VARS= OPENMP=gcc- .for _simd in ${OPTIONS_GROUP_SIMD} ${_simd}_DESC= ${MMX_DESC:S/MMX/${_simd}/} diff --git a/graphics/colmap/files/patch-pba-nostd b/graphics/colmap/files/patch-pba-nostd new file mode 100644 index 000000000000..d893b723837e --- /dev/null +++ b/graphics/colmap/files/patch-pba-nostd @@ -0,0 +1,74 @@ +In file included from src/./ext/PBA/pba.h:50:0, + from src/./optim/bundle_adjustment.h:29, + from src/./util/option_manager.h:34, + from src/./ui/bundle_adjustment_widget.h:25, + from src/ui/bundle_adjustment_widget.cc:17: +src/./ext/PBA/ConfigBA.h:24:12: error: 'vector' is already declared in this scope + using std::vector; + ^~~~~~ + +--- src/ext/PBA/ConfigBA.h.orig 2016-12-07 13:47:54 UTC ++++ src/ext/PBA/ConfigBA.h +@@ -21,7 +21,6 @@ + #ifndef CONFIG_BA_H + #define CONFIG_BA_H + #include <vector> +-using std::vector; + + namespace pba { + +@@ -181,7 +180,7 @@ class ConfigBA { + bool __matlab_format_stat; + char* __stat_filename; + const char* __driver_output; +- vector<float> __bundle_records; ++ std::vector<float> __bundle_records; + double __timer_record[NUM_TIMER]; + int __num_cpu_thread_all; + int __num_cpu_thread[NUM_FUNC]; +--- src/ext/PBA/SparseBundleCPU.h.orig 2016-12-07 13:47:54 UTC ++++ src/ext/PBA/SparseBundleCPU.h +@@ -146,7 +146,7 @@ class SparseBundleCPU : public ParallelB + SparseBundleCPU(const int num_threads); + + typedef avec<Float> VectorF; +- typedef vector<int> VectorI; ++ typedef std::vector<int> VectorI; + typedef float float_t; + + protected: // cpu data +@@ -204,8 +204,8 @@ class SparseBundleCPU : public ParallelB + VectorF _cuCameraQListW; + + protected: +- bool ProcessIndexCameraQ(vector<int>& qmap, vector<int>& qlist); +- void ProcessWeightCameraQ(vector<int>& cpnum, vector<int>& qmap, Float* qmapw, ++ bool ProcessIndexCameraQ(std::vector<int>& qmap, std::vector<int>& qlist); ++ void ProcessWeightCameraQ(std::vector<int>& cpnum, std::vector<int>& qmap, Float* qmapw, + Float* qlistw); + + protected: // internal functions +--- src/ext/PBA/SparseBundleCU.h.orig 2016-12-07 13:47:54 UTC ++++ src/ext/PBA/SparseBundleCU.h +@@ -40,7 +40,7 @@ class SparseBundleCU : public ParallelBA + const int* _camera_idx; + const int* _point_idx; + const int* _focal_mask; +- vector<float> _imgpt_datax; ++ std::vector<float> _imgpt_datax; + //////////////////////// + float _projection_sse; // sumed square error + protected: // cuda data +@@ -84,9 +84,9 @@ class SparseBundleCU : public ParallelBA + CuTexImage _cuCameraQListW; + + protected: +- bool ProcessIndexCameraQ(vector<int>& qmap, vector<int>& qlist); +- void ProcessWeightCameraQ(vector<int>& cpnum, vector<int>& qmap, +- vector<float>& qmapw, vector<float>& qlistw); ++ bool ProcessIndexCameraQ(std::vector<int>& qmap, std::vector<int>& qlist); ++ void ProcessWeightCameraQ(std::vector<int>& cpnum, std::vector<int>& qmap, ++ std::vector<float>& qmapw, std::vector<float>& qlistw); + + protected: // internal functions + int GetParameterLength(); |