diff options
author | rakuco <rakuco@FreeBSD.org> | 2015-11-22 01:18:10 +0800 |
---|---|---|
committer | rakuco <rakuco@FreeBSD.org> | 2015-11-22 01:18:10 +0800 |
commit | dc2f866ccf38525cd4c3afe175c7f36046422c0c (patch) | |
tree | 01a945f264bf0ac6994e1fe748a71e80cc6bc99e /cad | |
parent | 09397c574cbf6c4f8ea02555a18d79249caa628d (diff) | |
download | freebsd-ports-gnome-dc2f866ccf38525cd4c3afe175c7f36046422c0c.tar.gz freebsd-ports-gnome-dc2f866ccf38525cd4c3afe175c7f36046422c0c.tar.zst freebsd-ports-gnome-dc2f866ccf38525cd4c3afe175c7f36046422c0c.zip |
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.
Diffstat (limited to 'cad')
-rw-r--r-- | cad/meshlab/Makefile | 12 | ||||
-rw-r--r-- | cad/meshlab/files/patch-meshlab__full.pro | 13 | ||||
-rw-r--r-- | cad/meshlab/files/patch-meshlabplugins-filter_photosynth-downloader.cpp | 17 |
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; |