svn commit: r428788 - in head/graphics/colmap: . files
Jan Beich
jbeich at FreeBSD.org
Sat Dec 17 17:32:37 UTC 2016
Author: jbeich
Date: Sat Dec 17 17:32:35 2016
New Revision: 428788
URL: https://svnweb.freebsd.org/changeset/ports/428788
Log:
graphics/colmap: enable OPENMP on 10.2+ after r428641
Added:
head/graphics/colmap/files/patch-pba-nostd (contents, props changed)
Modified:
head/graphics/colmap/Makefile (contents, props changed)
Modified: head/graphics/colmap/Makefile
==============================================================================
--- head/graphics/colmap/Makefile Sat Dec 17 17:31:26 2016 (r428787)
+++ head/graphics/colmap/Makefile Sat Dec 17 17:32:35 2016 (r428788)
@@ -3,6 +3,7 @@
PORTNAME= colmap
DISTVERSION= 2.1-0 # synthetic tag
DISTVERSIONSUFFIX= -g55fbe10
+PORTREVISION= 1
CATEGORIES= graphics
MAINTAINER= jbeich at FreeBSD.org
@@ -25,7 +26,7 @@ LIB_DEPENDS= libboost_filesystem.so:deve
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}/}
Added: head/graphics/colmap/files/patch-pba-nostd
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/graphics/colmap/files/patch-pba-nostd Sat Dec 17 17:32:35 2016 (r428788)
@@ -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();
More information about the svn-ports-head
mailing list