aboutsummaryrefslogtreecommitdiff
path: root/cad
diff options
context:
space:
mode:
authorRaphael Kubo da Costa <rakuco@FreeBSD.org>2015-11-21 17:18:10 +0000
committerRaphael Kubo da Costa <rakuco@FreeBSD.org>2015-11-21 17:18:10 +0000
commitce2719a49bb49c109b8961c39fc6551c14e2109d (patch)
tree01a945f264bf0ac6994e1fe748a71e80cc6bc99e /cad
parente27876bc6a0a2358058cc8d7ac39104929c2ae01 (diff)
Notes
Diffstat (limited to 'cad')
-rw-r--r--cad/meshlab/Makefile12
-rw-r--r--cad/meshlab/files/patch-meshlab__full.pro13
-rw-r--r--cad/meshlab/files/patch-meshlabplugins-filter_photosynth-downloader.cpp17
3 files changed, 33 insertions, 9 deletions
diff --git a/cad/meshlab/Makefile b/cad/meshlab/Makefile
index 01019113f230..6fb3dfbcfbe2 100644
--- a/cad/meshlab/Makefile
+++ b/cad/meshlab/Makefile
@@ -26,9 +26,11 @@ USE_LDCONFIG= yes
DOS2UNIX_FILES= external/structuresynth/ssynth/SyntopiaCore/GLEngine/Object3D.h \
external/structuresynth/ssynth/SyntopiaCore/GLEngine/Raytracer/VoxelStepper.cpp \
meshlabplugins/edit_arc3D/fillImage.cpp \
- meshlabplugins/filter_csg/intercept.h
+ meshlabplugins/filter_csg/intercept.h \
+ meshlabplugins/filter_photosynth/downloader.cpp
EXTRACT_CMD= gtar
+QMAKE_SOURCE_PATH= ${WRKSRC}/meshlab_full.pro
WRKSRC= ${WRKDIR}/${PORTNAME}/src
pre-configure:
@@ -44,14 +46,6 @@ pre-configure:
${REINPLACE_CMD} -e '/^CONFIG +=/s|$$| debug|'
.endif
-do-configure:
- cd ${WRKSRC}/external && ${QMAKE} ${QMAKE_ARGS} -recursive external.pro
- cd ${WRKSRC} && ${QMAKE} -spec ${QMAKESPEC} -recursive meshlab_full.pro
-
-do-build:
- cd ${WRKSRC}/external && ${MAKE}
- cd ${WRKSRC} && ${MAKE}
-
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/lib/meshlab/plugins
cd ${WRKSRC}/distrib/plugins && ${INSTALL_LIB} *.so ${STAGEDIR}${PREFIX}/lib/meshlab/plugins
diff --git a/cad/meshlab/files/patch-meshlab__full.pro b/cad/meshlab/files/patch-meshlab__full.pro
new file mode 100644
index 000000000000..f58150ba34fb
--- /dev/null
+++ b/cad/meshlab/files/patch-meshlab__full.pro
@@ -0,0 +1,13 @@
+Make external libraries part of the default build. They are currently built
+before the rest, as qmake will recurse into each subdirectory in order.
+--- meshlab_full.pro.bak 2015-11-21 16:25:23.812658000 +0100
++++ meshlab_full.pro 2015-11-21 16:25:32.892417000 +0100
+@@ -1,7 +1,7 @@
+ #config += debug_and_release
+ TEMPLATE = subdirs
+ CONFIG += ordered
+-SUBDIRS = common \
++SUBDIRS = external common \
+ meshlab \
+ meshlabserver \
+ # IO plugins
diff --git a/cad/meshlab/files/patch-meshlabplugins-filter_photosynth-downloader.cpp b/cad/meshlab/files/patch-meshlabplugins-filter_photosynth-downloader.cpp
new file mode 100644
index 000000000000..e57927cf60c4
--- /dev/null
+++ b/cad/meshlab/files/patch-meshlabplugins-filter_photosynth-downloader.cpp
@@ -0,0 +1,17 @@
+Prevents the following build error:
+
+downloader.cpp:686:23: error: non-constant-expression cannot be narrowed from type 'unsigned char' to 'char' in initializer list [-Wc++11-narrowing]
+ char reversed[] = { bytes[3],bytes[2],bytes[1],bytes[0] };
+ ^~~~~~~~
+downloader.cpp:686:23: note: insert an explicit cast to silence this issue
+--- meshlabplugins/filter_photosynth/downloader.cpp.orig 2013-05-22 15:09:13 UTC
++++ meshlabplugins/filter_photosynth/downloader.cpp
+@@ -683,7 +683,7 @@
+ if(error)
+ return -1;
+ }
+- char reversed[] = { bytes[3],bytes[2],bytes[1],bytes[0] };
++ unsigned char reversed[] = { bytes[3],bytes[2],bytes[1],bytes[0] };
+
+ float *f = (float *)(& reversed[0]);
+ return*f;