Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Nov 2015 17:18:10 +0000 (UTC)
From:      Raphael Kubo da Costa <rakuco@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r402166 - in head/cad/meshlab: . files
Message-ID:  <201511211718.tALHIAft004868@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rakuco
Date: Sat Nov 21 17:18:10 2015
New Revision: 402166
URL: https://svnweb.freebsd.org/changeset/ports/402166

Log:
  Simplify Makefile and use the right flags when building.
  
  Remove the custom do-configure and do-build target. The targets existed
  because upstream's build instructions mention external.pro and
  meshlab_full.pro need to be processed and built separately and Uses/qmake.mk
  does not handle the multi-.pro case. do-build, however, was simply calling
  ${MAKE} and discarding both ${MAKE_ENV} and ${MAKE_ARGS} which, among other
  things, resulted in no parallel builds and additional compiler flags like
  -std=c++11 being omitted.
  
  Instead, patch meshlab_full.pro and add external/external.pro as one of the
  directory dependencies there along with the rest of the MeshLab code. Given
  the way the QMake files are written in the port, this only helps a bit with
  parallelism: each subdirectory is processed serially, but all files in them
  can be built in parallel. Since a lot of the code is in plugin directories
  with 1 or 2 files, the port still takes some time to build. The upside is
  that it means external/ will always be built before the rest, which is what
  we need.
  
  As mentioned, the compiler flags in the build will change. However, I'm not
  bumping PORTREVISION yet because it will come with the next commit updating
  math/mpir.

Added:
  head/cad/meshlab/files/patch-meshlab__full.pro   (contents, props changed)
  head/cad/meshlab/files/patch-meshlabplugins-filter_photosynth-downloader.cpp   (contents, props changed)
Modified:
  head/cad/meshlab/Makefile

Modified: head/cad/meshlab/Makefile
==============================================================================
--- head/cad/meshlab/Makefile	Sat Nov 21 16:58:37 2015	(r402165)
+++ head/cad/meshlab/Makefile	Sat Nov 21 17:18:10 2015	(r402166)
@@ -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

Added: head/cad/meshlab/files/patch-meshlab__full.pro
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/cad/meshlab/files/patch-meshlab__full.pro	Sat Nov 21 17:18:10 2015	(r402166)
@@ -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

Added: head/cad/meshlab/files/patch-meshlabplugins-filter_photosynth-downloader.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/cad/meshlab/files/patch-meshlabplugins-filter_photosynth-downloader.cpp	Sat Nov 21 17:18:10 2015	(r402166)
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511211718.tALHIAft004868>