From 2aa182b802e8f6702d3d27cf2303432ae8ad0266 Mon Sep 17 00:00:00 2001 From: michael barnes Date: Nov 11 2019 18:00:34 +0000 Subject: [PATCH 1/4] To move to v2.10.2 --- diff --git a/cloudcompare-big-endian.patch b/cloudcompare-big-endian.patch deleted file mode 100644 index 460d823..0000000 --- a/cloudcompare-big-endian.patch +++ /dev/null @@ -1,415 +0,0 @@ ---- CloudCompare-2.9.1/libs/qCC_io/ShpFilter.cpp 2017-11-03 12:30:42.000000000 +0100 -+++ ./ShpFilter.cpp 2018-02-23 14:19:46.837624000 +0100 -@@ -72,6 +72,34 @@ - SHP_MULTI_PATCH = 31 - }; - -+//DGM: by default qToLittleEndian and qFromLittleEndian only works for integer types! -+double swapD(double in) -+{ -+ //! Change the endianness (see https://stackoverflow.com/questions/41012414/convert-double-value-from-little-endian-to-big-endian) -+ std::array p; -+ memcpy(&p[0], &in, sizeof(double)); -+ std::reverse(p.begin(), p.end()); -+ memcpy(&in, &p[0], sizeof(double)); -+ return in; -+} -+ -+double qFromLittleEndianD(double in) -+{ -+#if Q_BYTE_ORDER == Q_BIG_ENDIAN -+ return swapD(in); -+#endif -+ return in; -+} -+ -+double qToLittleEndianD(double in) -+{ -+#if Q_BYTE_ORDER == Q_BIG_ENDIAN -+ return swapD(in); -+#endif -+ return in; -+} -+ -+ - //! Shape File Save dialog - class SaveSHPFileDialog : public QDialog, public Ui::SaveSHPFileDlg - { -@@ -271,10 +299,10 @@ - { - //The Bounding Box for the PolyLine stored in the order Xmin, Ymin, Xmax, Ymax - //DGM: ignored -- //double xMin = qFromLittleEndian(*reinterpret_cast(header )); -- //double xMax = qFromLittleEndian(*reinterpret_cast(header+ 8)); -- //double yMin = qFromLittleEndian(*reinterpret_cast(header+16)); -- //double yMax = qFromLittleEndian(*reinterpret_cast(header+24)); -+ //double xMin = qFromLittleEndianD(*reinterpret_cast(header )); -+ //double xMax = qFromLittleEndianD(*reinterpret_cast(header+ 8)); -+ //double yMin = qFromLittleEndianD(*reinterpret_cast(header+16)); -+ //double yMax = qFromLittleEndianD(*reinterpret_cast(header+24)); - } - - //Byte 32: NumParts (The number of parts in the PolyLine) -@@ -321,8 +349,8 @@ - //check for errors - if (file.error() != QFile::NoError) - return CC_FERR_READING; -- double x = qFromLittleEndian(*reinterpret_cast(header)); -- double y = qFromLittleEndian(*reinterpret_cast(header + 8)); -+ double x = qFromLittleEndianD(*reinterpret_cast(header)); -+ double y = qFromLittleEndianD(*reinterpret_cast(header + 8)); - points[i].x = static_cast(x + PShift.x); - points[i].y = static_cast(y + PShift.y); - points[i].z = 0; -@@ -337,8 +365,8 @@ - { - file.read(header, 16); - //DGM: ignored -- //double zMin = qFromLittleEndian(*reinterpret_cast(header )); -- //double zMax = qFromLittleEndian(*reinterpret_cast(header+8)); -+ //double zMin = qFromLittleEndianD(*reinterpret_cast(header )); -+ //double zMax = qFromLittleEndianD(*reinterpret_cast(header+8)); - } - - //Z coordinates (an array of length NumPoints) -@@ -349,7 +377,7 @@ - //check for errors - if (file.error() != QFile::NoError) - return CC_FERR_READING; -- double z = qFromLittleEndian(*reinterpret_cast(header)); -+ double z = qFromLittleEndianD(*reinterpret_cast(header)); - points[i].z = static_cast(z + PShift.z); - } - } -@@ -365,8 +393,8 @@ - //check for errors - if (file.error() != QFile::NoError) - return CC_FERR_READING; -- double mMin = qFromLittleEndian(*reinterpret_cast(header)); -- double mMax = qFromLittleEndian(*reinterpret_cast(header + 8)); -+ double mMin = qFromLittleEndianD(*reinterpret_cast(header)); -+ double mMax = qFromLittleEndianD(*reinterpret_cast(header + 8)); - - if (mMin != ESRI_NO_DATA && mMax != ESRI_NO_DATA) - { -@@ -391,7 +419,7 @@ - //check for errors - if (file.error() != QFile::NoError) - return CC_FERR_READING; -- double m = qFromLittleEndian(*reinterpret_cast(header)); -+ double m = qFromLittleEndianD(*reinterpret_cast(header)); - scalarValues[i] = (m == ESRI_NO_DATA ? NAN_VALUE : static_cast(m)); - } - } -@@ -509,10 +537,10 @@ - - //Byte 4: Box - { -- double xMin = qToLittleEndian(bbMing.u[X]); -- double xMax = qToLittleEndian(bbMaxg.u[X]); -- double yMin = qToLittleEndian(bbMing.u[Y]); -- double yMax = qToLittleEndian(bbMaxg.u[Y]); -+ double xMin = qToLittleEndianD(bbMing.u[X]); -+ double xMax = qToLittleEndianD(bbMaxg.u[X]); -+ double yMin = qToLittleEndianD(bbMing.u[Y]); -+ double yMax = qToLittleEndianD(bbMaxg.u[Y]); - //The Bounding Box for the PolyLine stored in the order Xmin, Ymin, Xmax, Ymax - /*Byte 4*/file.write((const char*)&xMin, 8); - /*Byte 12*/file.write((const char*)&yMin, 8); -@@ -595,8 +623,8 @@ - const CCVector3* P = vertices->getPoint(ii % realNumPoints); //warning: handle loop if polyline is closed - CCVector3d Pg = poly->toGlobal3d(*P); - -- double x = qToLittleEndian(Pg.u[X]); -- double y = qToLittleEndian(Pg.u[Y]); -+ double x = qToLittleEndianD(Pg.u[X]); -+ double y = qToLittleEndianD(Pg.u[Y]); - /*Byte 0*/file.write((const char*)&x, 8); - /*Byte 8*/file.write((const char*)&y, 8); - bytesWritten += 16; -@@ -608,8 +636,8 @@ - { - //Z boundaries - { -- double zMin = qToLittleEndian(bbMing.u[Z]); -- double zMax = qToLittleEndian(bbMaxg.u[Z]); -+ double zMin = qToLittleEndianD(bbMing.u[Z]); -+ double zMax = qToLittleEndianD(bbMaxg.u[Z]); - file.write((const char*)&zMin, 8); - file.write((const char*)&zMax, 8); - bytesWritten += 16; -@@ -622,7 +650,7 @@ - int32_t ii = (inverseOrder ? numPoints - 1 - i : i); - const CCVector3* P = vertices->getPoint(ii % realNumPoints); //warning: handle loop if polyline is closed - CCVector3d Pg = poly->toGlobal3d(*P); -- double z = qToLittleEndian(Pg.u[Z]); -+ double z = qToLittleEndianD(Pg.u[Z]); - file.write((const char*)&z, 8); - bytesWritten += 8; - } -@@ -651,8 +679,8 @@ - } - } - } -- mMin = qToLittleEndian(mMin); -- mMax = qToLittleEndian(mMax); -+ mMin = qToLittleEndianD(mMin); -+ mMax = qToLittleEndianD(mMax); - file.write((const char*)&mMin, 8); - file.write((const char*)&mMax, 8); - bytesWritten += 16; -@@ -660,13 +688,13 @@ - - //M values (for each part - just one here) - { -- double scalar = qToLittleEndian(ESRI_NO_DATA); -+ double scalar = qToLittleEndianD(ESRI_NO_DATA); - for (int32_t i = 0; i < numPoints; ++i) - { - if (hasSF) - { - scalar = static_cast(vertices->getPointScalarValue(i % realNumPoints)); //warning: handle loop if polyline is closed -- scalar = qToLittleEndian(scalar); -+ scalar = qToLittleEndianD(scalar); - } - file.write((const char*)&scalar, 8); - bytesWritten += 8; -@@ -686,10 +714,10 @@ - { - //The Bounding Box for the Cloud stored in the order Xmin, Ymin, Xmax, Ymax - //DGM: ignored -- //double xMin = qFromLittleEndian(*reinterpret_cast(header )); -- //double xMax = qFromLittleEndian(*reinterpret_cast(header+ 8)); -- //double yMin = qFromLittleEndian(*reinterpret_cast(header+16)); -- //double yMax = qFromLittleEndian(*reinterpret_cast(header+24)); -+ //double xMin = qFromLittleEndianD(*reinterpret_cast(header )); -+ //double xMax = qFromLittleEndianD(*reinterpret_cast(header+ 8)); -+ //double yMin = qFromLittleEndianD(*reinterpret_cast(header+16)); -+ //double yMax = qFromLittleEndianD(*reinterpret_cast(header+24)); - } - - //Byte 32: NumPoints (The total number of points) -@@ -708,8 +736,8 @@ - for (int32_t i = 0; i < numPoints; ++i) - { - file.read(header, 16); -- double x = qFromLittleEndian(*reinterpret_cast(header)); -- double y = qFromLittleEndian(*reinterpret_cast(header + 8)); -+ double x = qFromLittleEndianD(*reinterpret_cast(header)); -+ double y = qFromLittleEndianD(*reinterpret_cast(header + 8)); - CCVector3 P(static_cast(x + PShift.x), - static_cast(y + PShift.y), - 0); -@@ -724,8 +752,8 @@ - { - file.read(header, 16); - //DGM: ignored -- //double zMin = qFromLittleEndian(*reinterpret_cast(header )); -- //double zMax = qFromLittleEndian(*reinterpret_cast(header+8)); -+ //double zMin = qFromLittleEndianD(*reinterpret_cast(header )); -+ //double zMax = qFromLittleEndianD(*reinterpret_cast(header+8)); - } - - //Z coordinates (an array of length NumPoints) -@@ -733,7 +761,7 @@ - for (int32_t i = 0; i < numPoints; ++i) - { - file.read(header, 8); -- double z = qFromLittleEndian(*reinterpret_cast(header)); -+ double z = qFromLittleEndianD(*reinterpret_cast(header)); - const CCVector3* P = cloud->getPoint(i); - const_cast(P)->z = static_cast(z + PShift.z); - } -@@ -749,8 +777,8 @@ - ccScalarField* sf = 0; - { - file.read(header, 16); -- double mMin = qFromLittleEndian(*reinterpret_cast(header)); -- double mMax = qFromLittleEndian(*reinterpret_cast(header + 8)); -+ double mMin = qFromLittleEndianD(*reinterpret_cast(header)); -+ double mMax = qFromLittleEndianD(*reinterpret_cast(header + 8)); - - if (mMin != ESRI_NO_DATA && mMax != ESRI_NO_DATA) - { -@@ -770,7 +798,7 @@ - for (int32_t i = 0; i < numPoints; ++i) - { - file.read(header, 8); -- double m = qFromLittleEndian(*reinterpret_cast(header)); -+ double m = qFromLittleEndianD(*reinterpret_cast(header)); - ScalarType s = m == ESRI_NO_DATA ? NAN_VALUE : static_cast(m); - sf->addElement(s); - } -@@ -809,10 +837,10 @@ - - //Byte 4: Box - { -- double xMin = qToLittleEndian(bbMing.x); -- double xMax = qToLittleEndian(bbMaxg.x); -- double yMin = qToLittleEndian(bbMing.y); -- double yMax = qToLittleEndian(bbMaxg.y); -+ double xMin = qToLittleEndianD(bbMing.x); -+ double xMax = qToLittleEndianD(bbMaxg.x); -+ double yMin = qToLittleEndianD(bbMing.y); -+ double yMax = qToLittleEndianD(bbMaxg.y); - //The Bounding Box for the Cloud stored in the order Xmin, Ymin, Xmax, Ymax - /*Byte 4*/file.write((const char*)&xMin, 8); - /*Byte 12*/file.write((const char*)&yMin, 8); -@@ -836,8 +864,8 @@ - const CCVector3* P = cloud->getPoint(i); - CCVector3d Pg = cloud->toGlobal3d(*P); - -- double x = qToLittleEndian(Pg.x); -- double y = qToLittleEndian(Pg.y); -+ double x = qToLittleEndianD(Pg.x); -+ double y = qToLittleEndianD(Pg.y); - /*Byte 0*/file.write((const char*)&x, 8); - /*Byte 8*/file.write((const char*)&y, 8); - bytesWritten += 16; -@@ -846,8 +874,8 @@ - - //Z boundaries - { -- double zMin = qToLittleEndian(bbMing.z); -- double zMax = qToLittleEndian(bbMaxg.z); -+ double zMin = qToLittleEndianD(bbMing.z); -+ double zMax = qToLittleEndianD(bbMaxg.z); - file.write((const char*)&zMin, 8); - file.write((const char*)&zMax, 8); - bytesWritten += 16; -@@ -859,7 +887,7 @@ - { - const CCVector3* P = cloud->getPoint(i); - CCVector3d Pg = cloud->toGlobal3d(*P); -- double z = qToLittleEndian(Pg.z); -+ double z = qToLittleEndianD(Pg.z); - file.write((const char*)&z, 8); - bytesWritten += 8; - } -@@ -888,8 +916,8 @@ - } - } - } -- mMin = qToLittleEndian(mMin); -- mMax = qToLittleEndian(mMax); -+ mMin = qToLittleEndianD(mMin); -+ mMax = qToLittleEndianD(mMax); - file.write((const char*)&mMin, 8); - file.write((const char*)&mMax, 8); - bytesWritten += 16; -@@ -897,13 +925,13 @@ - - //M values - { -- double scalar = qToLittleEndian(ESRI_NO_DATA); -+ double scalar = qToLittleEndianD(ESRI_NO_DATA); - for (int32_t i = 0; i < numPoints; ++i) - { - if (hasSF) - { - scalar = static_cast(cloud->getPointScalarValue(i)); -- scalar = qToLittleEndian(scalar); -+ scalar = qToLittleEndianD(scalar); - } - file.write((const char*)&scalar, 8); - bytesWritten += 8; -@@ -918,8 +946,8 @@ - char buffer[16]; - file.read(buffer, 16); - -- double x = qFromLittleEndian(*reinterpret_cast(buffer)); -- double y = qFromLittleEndian(*reinterpret_cast(buffer + 8)); -+ double x = qFromLittleEndianD(*reinterpret_cast(buffer)); -+ double y = qFromLittleEndianD(*reinterpret_cast(buffer + 8)); - CCVector3 P(static_cast(x + PShift.x), - static_cast(y + PShift.y), - 0); -@@ -930,7 +958,7 @@ - //Z coordinate - { - file.read(buffer, 8); -- double z = qFromLittleEndian(*reinterpret_cast(buffer)); -+ double z = qFromLittleEndianD(*reinterpret_cast(buffer)); - P.z = static_cast(z + PShift.z); - } - } -@@ -957,7 +985,7 @@ - //Measure - { - file.read(buffer, 8); -- double m = qFromLittleEndian(*reinterpret_cast(buffer)); -+ double m = qFromLittleEndianD(*reinterpret_cast(buffer)); - if (m != ESRI_NO_DATA) - { - s = static_cast(m); -@@ -1144,10 +1172,10 @@ - _header += 4; - - //X and Y bounaries -- double xMin = qToLittleEndian(bbMinCorner.u[X]); -- double xMax = qToLittleEndian(bbMaxCorner.u[X]); -- double yMin = qToLittleEndian(bbMinCorner.u[Y]); -- double yMax = qToLittleEndian(bbMaxCorner.u[Y]); -+ double xMin = qToLittleEndianD(bbMinCorner.u[X]); -+ double xMax = qToLittleEndianD(bbMaxCorner.u[X]); -+ double yMin = qToLittleEndianD(bbMinCorner.u[Y]); -+ double yMax = qToLittleEndianD(bbMaxCorner.u[Y]); - //Byte 36: box X min - memcpy(_header, (const char*)&xMin, 8); - _header += 8; -@@ -1163,8 +1191,8 @@ - - //Z bounaries - //Unused, with value 0.0, if not Measured or Z type -- double zMin = outputShapeType < SHP_POINT_Z ? 0.0 : qToLittleEndian(bbMinCorner.u[Z]); -- double zMax = outputShapeType < SHP_POINT_Z ? 0.0 : qToLittleEndian(bbMaxCorner.u[Z]); -+ double zMin = outputShapeType < SHP_POINT_Z ? 0.0 : qToLittleEndianD(bbMinCorner.u[Z]); -+ double zMax = outputShapeType < SHP_POINT_Z ? 0.0 : qToLittleEndianD(bbMaxCorner.u[Z]); - //Byte 68: box Z min - memcpy(_header, (const char*)&zMin, 8); - _header += 8; -@@ -1447,25 +1475,25 @@ - - //X and Y bounaries - //Byte 36: box X min -- double xMin = qFromLittleEndian(*reinterpret_cast(_header)); -+ double xMin = qFromLittleEndianD(*reinterpret_cast(_header)); - _header += 8; - //Byte 44: box Y min -- double yMin = qFromLittleEndian(*reinterpret_cast(_header)); -+ double yMin = qFromLittleEndianD(*reinterpret_cast(_header)); - _header += 8; - //Byte 52: box X max -- //double xMax = qFromLittleEndian(*reinterpret_cast(_header)); -+ //double xMax = qFromLittleEndianD(*reinterpret_cast(_header)); - _header += 8; - //Byte 60: box Y max -- //double yMax = qFromLittleEndian(*reinterpret_cast(_header)); -+ //double yMax = qFromLittleEndianD(*reinterpret_cast(_header)); - _header += 8; - - //Z bounaries - //Unused, with value 0.0, if not Measured or Z type - //Byte 68: box Z min -- double zMin = qFromLittleEndian(*reinterpret_cast(_header)); -+ double zMin = qFromLittleEndianD(*reinterpret_cast(_header)); - _header += 8; - //Byte 76: box Z max -- //double zMax = qFromLittleEndian(*reinterpret_cast(_header)); -+ //double zMax = qFromLittleEndianD(*reinterpret_cast(_header)); - _header += 8; - - if (std::isnan(zMin)) -@@ -1482,10 +1510,10 @@ - - //M bounaries (M = measures) - //Byte 84: M min -- //double mMin = qFromLittleEndian(*reinterpret_cast(_header)); -+ //double mMin = qFromLittleEndianD(*reinterpret_cast(_header)); - _header += 8; - //Byte 92: M max -- //double mMax = qFromLittleEndian(*reinterpret_cast(_header)); -+ //double mMax = qFromLittleEndianD(*reinterpret_cast(_header)); - _header += 8; - } - assert(fileLength >= 100); diff --git a/cloudcompare-signed-chars.patch b/cloudcompare-signed-chars.patch deleted file mode 100644 index ef21e9e..0000000 --- a/cloudcompare-signed-chars.patch +++ /dev/null @@ -1,118 +0,0 @@ -From 457ee6699bfbe95a387bc53667c6b2ab39917d3b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Thu, 22 Feb 2018 17:23:25 +0100 -Subject: [PATCH] Be explicit about signed chars - -Chars being signed is apparently an implementation detail, see [1]. - -This was failing the build on various architectures: - - ppc64le aarch64 ppc64 s390x armv7hl - -With: - - CC/src/ChamferDistanceTransform.cpp:44:1: - error: narrowing conversion of '-1' from 'int' to 'char' inside { } - ... - -[1] https://stackoverflow.com/q/31634962/1839451 ---- - CC/src/ChamferDistanceTransform.cpp | 22 +++++++++++----------- - 1 file changed, 11 insertions(+), 11 deletions(-) - -diff --git a/CC/src/ChamferDistanceTransform.cpp b/CC/src/ChamferDistanceTransform.cpp -index 5cba46c6..026b2349 100644 ---- a/CC/src/ChamferDistanceTransform.cpp -+++ b/CC/src/ChamferDistanceTransform.cpp -@@ -26,7 +26,7 @@ - using namespace CCLib; - - //! Forward mask shifts and weights (Chamfer 3-4-5) --const char ForwardNeighbours345[14*4] = { -+const signed char ForwardNeighbours345[14*4] = { - -1,-1,-1, 5, - 0,-1,-1, 4, - 1,-1,-1, 5, -@@ -44,7 +44,7 @@ const char ForwardNeighbours345[14*4] = { - }; - - //! Backward mask shifts and weights (Chamfer 3-4-5) --const char BackwardNeighbours345[14*4] = { -+const signed char BackwardNeighbours345[14*4] = { - 0, 0, 0, 0, - 1, 0, 0, 3, - -1, 1, 0, 4, -@@ -62,7 +62,7 @@ const char BackwardNeighbours345[14*4] = { - }; - - //! Forward mask shifts and weights (Chamfer 1-1-1) --const char ForwardNeighbours111[14*4] = { -+const signed char ForwardNeighbours111[14*4] = { - -1,-1,-1, 1, - 0,-1,-1, 1, - 1,-1,-1, 1, -@@ -80,7 +80,7 @@ const char ForwardNeighbours111[14*4] = { - }; - - //! Backward masks shifts and weights (Chamfer 1-1-1) --const char BackwardNeighbours111[14*4] = { -+const signed char BackwardNeighbours111[14*4] = { - 0, 0, 0, 0, - 1, 0, 0, 1, - -1, 1, 0, 1, -@@ -101,7 +101,7 @@ const char BackwardNeighbours111[14*4] = { - // unsigned jStart, - // unsigned kStart, - // bool forward, --// const char neighbours[14][4], -+// const signed char neighbours[14][4], - // NormalizedProgress* normProgress/*=0*/) - //{ - // assert(!m_grid.empty()); -@@ -169,8 +169,8 @@ int ChamferDistanceTransform::propagateDistance(CC_CHAMFER_DISTANCE_TYPE type, G - return -1; - } - -- const char* fwNeighbours = 0; -- const char* bwNeighbours = 0; -+ const signed char* fwNeighbours = 0; -+ const signed char* bwNeighbours = 0; - switch (type) - { - case CHAMFER_111: -@@ -216,7 +216,7 @@ int ChamferDistanceTransform::propagateDistance(CC_CHAMFER_DISTANCE_TYPE type, G - { - for (unsigned char v=0; v<14; ++v) - { -- const char* fwNeighbour = fwNeighbours + 4*v; -+ const signed char* fwNeighbour = fwNeighbours + 4*v; - neighborShift[v] = static_cast(fwNeighbour[0]) + - static_cast(fwNeighbour[1]) * static_cast(m_rowSize) + - static_cast(fwNeighbour[2]) * static_cast(m_sliceSize); -@@ -233,7 +233,7 @@ int ChamferDistanceTransform::propagateDistance(CC_CHAMFER_DISTANCE_TYPE type, G - - for (unsigned char v=1; v<14; ++v) - { -- const char* fwNeighbour = fwNeighbours + 4*v; -+ const signed char* fwNeighbour = fwNeighbours + 4*v; - GridElement neighborVal = _grid[neighborShift[v]] + static_cast(fwNeighbour[3]); - minVal = std::min(minVal, neighborVal); - } -@@ -260,7 +260,7 @@ int ChamferDistanceTransform::propagateDistance(CC_CHAMFER_DISTANCE_TYPE type, G - { - for (unsigned char v=0; v<14; ++v) - { -- const char* bwNeighbour = bwNeighbours + 4*v; -+ const signed char* bwNeighbour = bwNeighbours + 4*v; - neighborShift[v] = static_cast(bwNeighbour[0]) + - static_cast(bwNeighbour[1]) * static_cast(m_rowSize) + - static_cast(bwNeighbour[2]) * static_cast(m_sliceSize); -@@ -279,7 +279,7 @@ int ChamferDistanceTransform::propagateDistance(CC_CHAMFER_DISTANCE_TYPE type, G - - for (unsigned char v=1; v<14; ++v) - { -- const char* bwNeighbour = bwNeighbours + 4*v; -+ const signed char* bwNeighbour = bwNeighbours + 4*v; - GridElement neighborVal = _grid[neighborShift[v]] + static_cast(bwNeighbour[3]); - minVal = std::min(minVal, neighborVal); - } diff --git a/cloudcompare.spec b/cloudcompare.spec index e11ce65..83fe3dd 100644 --- a/cloudcompare.spec +++ b/cloudcompare.spec @@ -18,12 +18,12 @@ %global edition Release %global cname CloudCompare Name: cloudcompare -Version: 2.9.1 -Release: 4%{?dist} +Version: 2.10.2 +Release: 1%{?dist} Summary: 3D point cloud and mesh processing software # Main part is GPLv2+ -# CCLib is LGPLv2+ +# CCLib is GPLv2+ # Plugins from Source1 and Source2 are MIT # dxflib is GPLv2+ # shapelib is (LGPLv2+ or MIT) @@ -45,12 +45,6 @@ Source2: https://github.com/%{cname}/normals_Hough/archive/%{nh_commit}/n Source3: %{name}.desktop Source4: ccviewer.desktop -# https://github.com/CloudCompare/CloudCompare/pull/648 -Patch0: %{name}-signed-chars.patch - -# https://github.com/CloudCompare/CloudCompare/issues/649 -Patch1: %{name}-big-endian.patch - BuildRequires: boost-devel BuildRequires: desktop-file-utils BuildRequires: cmake >= 3 @@ -59,6 +53,7 @@ BuildRequires: gcc-c++ BuildRequires: laszip-devel BuildRequires: libgomp BuildRequires: liblas-devel +BuildRequires: libjpeg-turbo-devel BuildRequires: pkgconfig(gdal) BuildRequires: pkgconfig(cunit) BuildRequires: pkgconfig(dri) @@ -131,19 +126,19 @@ This is the documentation. %prep %autosetup -n %{cname}-%{version} -p1 -rmdir plugins/qPoissonRecon/PoissonReconLib +rm -rf plugins/core/qPoissonRecon/PoissonReconLib tar -xf %{SOURCE1} -mv PoissonRecon-%{pr_commit} plugins/qPoissonRecon/PoissonReconLib +mv PoissonRecon-%{pr_commit} plugins/core/qPoissonRecon/PoissonReconLib -rmdir plugins/qHoughNormals/normals_Hough +rm -rf plugins/core/qHoughNormals/normals_Hough tar -xf %{SOURCE2} -mv normals_Hough-%{nh_commit} plugins/qHoughNormals/normals_Hough +mv normals_Hough-%{nh_commit} plugins/core/qHoughNormals/normals_Hough # fix spurious executable permissions # https://github.com/aboulch/normals_Hough/pull/5 # https://github.com/CloudCompare/normals_Hough/pull/3 # https://github.com/CloudCompare/CloudCompare/pull/650 -find plugins/qHoughNormals '(' -name '*.h' -o -name '*.hpp' ')' -exec chmod -x {} \; +find plugins/core/qHoughNormals '(' -name '*.h' -o -name '*.hpp' ')' -exec chmod -x {} \; # On 64bits, change /usr/lib/cloudcompare to /usr/lib64/cloudcompare sed -i 's|lib/%{name}|%{_lib}/%{name}|g' $(grep -r lib/%{name} -l) @@ -154,7 +149,7 @@ rm -rf doc/fr* # Remove bundle shapelib https://github.com/CloudCompare/CloudCompare/issues/497 rm -rf contrib/shapelib-* sed -i 's/add_subdirectory.*//' contrib/ShapeLibSupport.cmake -sed -i 's/ SHAPELIB / shp /g' plugins/qFacets/CMakeLists.txt contrib/ShapeLibSupport.cmake +sed -i 's/ SHAPELIB / shp /g' plugins/core/qFacets/CMakeLists.txt contrib/ShapeLibSupport.cmake %build mkdir build @@ -195,6 +190,7 @@ pushd build %else -DINSTALL_QRANSAC_SD_PLUGIN=OFF \ %endif + -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ .. # QRANSAC_SD_PLUGIN on other arches: fatal error: xmmintrin.h: No such file or directory @@ -226,7 +222,7 @@ desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE4} %files %doc README.md CONTRIBUTING.md CHANGELOG.md -%license license.txt license_headers.txt +%license license.txt %{_bindir}/%{name} %{_bindir}/%{cname} %{_bindir}/ccviewer diff --git a/sources b/sources index 43950db..2328e9b 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (CloudCompare-2.9.1.tar.gz) = f647197cdb500c3438fffdd8752a9a1016d91d7a535bd8a4fdfdcbab0df11b047b0f054881d0ba1e29db01fbc40f7dfcfb7233c5fc7f409417e43b4297fc6635 +SHA512 (CloudCompare-2.10.2.tar.gz) = 13fccb8bee499a064fea69873c7a26d0787ea5329f8135dd710922b73ab90710cb8ffd7797f6b988e7c523a688fd41166bdfafb35655e3d77831ab8d4add289b SHA512 (normals_Hough-61ba8056d72eedffadb838d9051cc8975ec7a825.tar.gz) = 2c3b3aa3d1288ee0d3bea8a5ff9da198b518c6e43993eb4a67cb91a13e7e8411e38e00c655c771a76f2c92139ce77ee295f1a1039cbab9565f642821aa5884ec SHA512 (PoissonRecon-f42872b45ac35bf85efc662d348bb5d8ac9e5577.tar.gz) = 9e5f23d03f3baef891421809dd4cf7fce5aeb703e21584c8e2fde348a0819102359dac83dcad98b4cafcdb7929e5868cf1c6f9c57087e5712c4142c9ab1781d5 From 613f6dde679a41bc7e4c104f1fb85463b11772f8 Mon Sep 17 00:00:00 2001 From: Michael Barnes Date: Nov 12 2019 10:19:54 +0000 Subject: [PATCH 2/4] Path correction --- diff --git a/cloudcompare.spec b/cloudcompare.spec index 83fe3dd..5194935 100644 --- a/cloudcompare.spec +++ b/cloudcompare.spec @@ -130,9 +130,9 @@ rm -rf plugins/core/qPoissonRecon/PoissonReconLib tar -xf %{SOURCE1} mv PoissonRecon-%{pr_commit} plugins/core/qPoissonRecon/PoissonReconLib -rm -rf plugins/core/qHoughNormals/normals_Hough +rm -rf plugins/core/qHoughNormals/src/normals_Hough tar -xf %{SOURCE2} -mv normals_Hough-%{nh_commit} plugins/core/qHoughNormals/normals_Hough +mv normals_Hough-%{nh_commit} plugins/core/qHoughNormals/src/normals_Hough # fix spurious executable permissions # https://github.com/aboulch/normals_Hough/pull/5 From 4677833a459ee9c41b1427f1b4c3aae1c9289db8 Mon Sep 17 00:00:00 2001 From: Michael Barnes Date: Nov 14 2019 13:12:03 +0000 Subject: [PATCH 3/4] submodules have changed --- diff --git a/cloudcompare.spec b/cloudcompare.spec index 5194935..72a0936 100644 --- a/cloudcompare.spec +++ b/cloudcompare.spec @@ -38,8 +38,8 @@ Source0: https://github.com/%{cname}/%{cname}/archive/v%{version}/%{cname %global pr_commit f42872b45ac35bf85efc662d348bb5d8ac9e5577 Source1: https://github.com/%{cname}/PoissonRecon/archive/%{pr_commit}/PoissonRecon-%{pr_commit}.tar.gz -%global nh_commit 61ba8056d72eedffadb838d9051cc8975ec7a825 -Source2: https://github.com/%{cname}/normals_Hough/archive/%{nh_commit}/normals_Hough-%{nh_commit}.tar.gz +%global e57_commit a6f2845e4591bd29dac5e644e35addb372dced97 +Source2: https://github.com/asmaloney/libE57Format/archive/%{e57_commit}/libE57Format-%{e57_commit}.tar.gz # desktop files Source3: %{name}.desktop @@ -126,19 +126,13 @@ This is the documentation. %prep %autosetup -n %{cname}-%{version} -p1 -rm -rf plugins/core/qPoissonRecon/PoissonReconLib +rmdir plugins/core/qPoissonRecon/PoissonReconLib tar -xf %{SOURCE1} mv PoissonRecon-%{pr_commit} plugins/core/qPoissonRecon/PoissonReconLib -rm -rf plugins/core/qHoughNormals/src/normals_Hough +rmdir contrib/libE57Format tar -xf %{SOURCE2} -mv normals_Hough-%{nh_commit} plugins/core/qHoughNormals/src/normals_Hough - -# fix spurious executable permissions -# https://github.com/aboulch/normals_Hough/pull/5 -# https://github.com/CloudCompare/normals_Hough/pull/3 -# https://github.com/CloudCompare/CloudCompare/pull/650 -find plugins/core/qHoughNormals '(' -name '*.h' -o -name '*.hpp' ')' -exec chmod -x {} \; +mv libE57Format-%{e57_commit} contrib/libE57Format # On 64bits, change /usr/lib/cloudcompare to /usr/lib64/cloudcompare sed -i 's|lib/%{name}|%{_lib}/%{name}|g' $(grep -r lib/%{name} -l) @@ -238,6 +232,10 @@ desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE4} %doc doc %changelog +* Thu Nov 14 2019 Michael Barnes - 2.10.2-1 +- Updated to 2.10.2 +- removed merged patches + * Wed Jul 24 2019 Fedora Release Engineering - 2.9.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index 2328e9b..dee25a6 100644 --- a/sources +++ b/sources @@ -1,3 +1,4 @@ SHA512 (CloudCompare-2.10.2.tar.gz) = 13fccb8bee499a064fea69873c7a26d0787ea5329f8135dd710922b73ab90710cb8ffd7797f6b988e7c523a688fd41166bdfafb35655e3d77831ab8d4add289b -SHA512 (normals_Hough-61ba8056d72eedffadb838d9051cc8975ec7a825.tar.gz) = 2c3b3aa3d1288ee0d3bea8a5ff9da198b518c6e43993eb4a67cb91a13e7e8411e38e00c655c771a76f2c92139ce77ee295f1a1039cbab9565f642821aa5884ec SHA512 (PoissonRecon-f42872b45ac35bf85efc662d348bb5d8ac9e5577.tar.gz) = 9e5f23d03f3baef891421809dd4cf7fce5aeb703e21584c8e2fde348a0819102359dac83dcad98b4cafcdb7929e5868cf1c6f9c57087e5712c4142c9ab1781d5 +SHA512 (libE57Format-a6f2845e4591bd29dac5e644e35addb372dced97.tar.gz) = 28cef452c453e45f7534d4b2f9dff9ecfb8ae3314017f816cc6cf35ba7a022b7745f6e5efeca3a89b851b2e61a94e0653e54d226909ac5c01b2bffec7661fdc6 + From 587cf1bb1ceb81e7844642bb0928b33113e77853 Mon Sep 17 00:00:00 2001 From: Michael Barnes Date: Nov 14 2019 13:25:31 +0000 Subject: [PATCH 4/4] submodule license corrected --- diff --git a/cloudcompare.spec b/cloudcompare.spec index 72a0936..f5f3b95 100644 --- a/cloudcompare.spec +++ b/cloudcompare.spec @@ -24,7 +24,8 @@ Summary: 3D point cloud and mesh processing software # Main part is GPLv2+ # CCLib is GPLv2+ -# Plugins from Source1 and Source2 are MIT +# Plugin from Source1 is MIT +# Source2 is Boostv1.0 # dxflib is GPLv2+ # shapelib is (LGPLv2+ or MIT) # as the result is compiled into one piece, it should be: