Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
27c35ebb5f | ||
|
|
edba125b5a |
3 changed files with 159 additions and 1 deletions
21
3Depict-0.0.20-s390_preprocessor_fix.patch
Normal file
21
3Depict-0.0.20-s390_preprocessor_fix.patch
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
diff -r 522fed67ed37 src/backend/APT/APTFileIO.cpp
|
||||||
|
--- src/backend/APT/APTFileIO.cpp Mon Aug 28 13:47:41 2017 +0100
|
||||||
|
+++ src/backend/APT/APTFileIO.cpp Mon Aug 28 13:49:44 2017 +0100
|
||||||
|
@@ -956,7 +956,7 @@
|
||||||
|
ASSERT(forceEndian < 3);
|
||||||
|
#ifdef __LITTLE_ENDIAN__
|
||||||
|
endianFlip=(forceEndian == 2);
|
||||||
|
-#elif __BIG_ENDIAN
|
||||||
|
+#elif defined(__BIG_ENDIAN__)
|
||||||
|
endianFlip=(forceEndian == 1);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
@@ -1225,7 +1225,7 @@
|
||||||
|
|
||||||
|
//assign the ID as the mass to charge
|
||||||
|
h.setMassToCharge(*( (short*)(buffer+12) ));
|
||||||
|
-#elif __BIG_ENDIAN__
|
||||||
|
+#elif defined(__BIG_ENDIAN__)
|
||||||
|
{
|
||||||
|
Point3D pt((float*)(buffer));
|
||||||
|
pt.switchEndian();
|
||||||
127
3Depict-0.0.20-short_type_fix.patch
Normal file
127
3Depict-0.0.20-short_type_fix.patch
Normal file
|
|
@ -0,0 +1,127 @@
|
||||||
|
diff -r f7be487d31b2 src/backend/APT/APTFileIO.cpp
|
||||||
|
--- src/backend/APT/APTFileIO.cpp Sun Aug 27 05:07:02 2017 +0100
|
||||||
|
+++ src/backend/APT/APTFileIO.cpp Sun Aug 27 05:08:00 2017 +0100
|
||||||
|
@@ -22,6 +22,7 @@
|
||||||
|
#include "../../common/stringFuncs.h"
|
||||||
|
#include "../../common/basics.h"
|
||||||
|
#include "../../common/translation.h"
|
||||||
|
+#include "../../common/endianTest.h"
|
||||||
|
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
|
@@ -1230,9 +1231,9 @@
|
||||||
|
pt.switchEndian();
|
||||||
|
h.setPos(pt);
|
||||||
|
|
||||||
|
- uint16_t s;
|
||||||
|
- s =*( (uint16_t*)(buffer+12) );
|
||||||
|
- shortSwapBytes(s);
|
||||||
|
+ uint16_t *s;
|
||||||
|
+ s =( (uint16_t*)(buffer+12) );
|
||||||
|
+ uint16_tSwapBytes(s);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
diff -r f7be487d31b2 src/backend/APT/ionhit.cpp
|
||||||
|
--- src/backend/APT/ionhit.cpp Sun Aug 27 05:07:02 2017 +0100
|
||||||
|
+++ src/backend/APT/ionhit.cpp Sun Aug 27 05:08:00 2017 +0100
|
||||||
|
@@ -75,14 +75,12 @@
|
||||||
|
pos=p;
|
||||||
|
}
|
||||||
|
|
||||||
|
-#ifdef __LITTLE_ENDIAN__
|
||||||
|
void IonHit::switchEndian()
|
||||||
|
{
|
||||||
|
|
||||||
|
pos.switchEndian();
|
||||||
|
floatSwapBytes(&(massToCharge));
|
||||||
|
}
|
||||||
|
-#endif
|
||||||
|
|
||||||
|
const IonHit &IonHit::operator=(const IonHit &obj)
|
||||||
|
{
|
||||||
|
diff -r f7be487d31b2 src/backend/APT/ionhit.h
|
||||||
|
--- src/backend/APT/ionhit.h Sun Aug 27 05:07:02 2017 +0100
|
||||||
|
+++ src/backend/APT/ionhit.h Sun Aug 27 05:08:00 2017 +0100
|
||||||
|
@@ -64,9 +64,8 @@
|
||||||
|
//returns true if any of the 4 data pts are +-inf
|
||||||
|
bool hasInf();
|
||||||
|
|
||||||
|
-#ifdef __LITTLE_ENDIAN__
|
||||||
|
+ //!Flip the endian of the point contained in this class
|
||||||
|
void switchEndian();
|
||||||
|
-#endif
|
||||||
|
//this does the endian switch for you
|
||||||
|
//but you must supply a valid array.
|
||||||
|
void makePosData(float *floatArr) const;
|
||||||
|
diff -r f7be487d31b2 src/common/endianTest.h
|
||||||
|
--- src/common/endianTest.h Sun Aug 27 05:07:02 2017 +0100
|
||||||
|
+++ src/common/endianTest.h Sun Aug 27 05:08:00 2017 +0100
|
||||||
|
@@ -25,10 +25,12 @@
|
||||||
|
#include <endian.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
+#include <stdint.h>
|
||||||
|
|
||||||
|
#ifdef __BYTE_ORDER
|
||||||
|
//if both are not defined it is TRUE!
|
||||||
|
-#if __BYTE_ORDER == __BIG_ENDIAN
|
||||||
|
+// on F28 ppc64, is defined as __ORDER_BIG_ENDIAN
|
||||||
|
+#if (__BYTE_ORDER == __BIG_ENDIAN) || (__BYTE_ORDER == __ORDER_BIG_ENDIAN)
|
||||||
|
#ifndef __BIG_ENDIAN__
|
||||||
|
#define __BIG_ENDIAN__
|
||||||
|
#endif
|
||||||
|
@@ -69,14 +71,14 @@
|
||||||
|
|
||||||
|
*inFloat=fb.f;
|
||||||
|
}
|
||||||
|
-inline void shortSwapBytes(short *inShort)
|
||||||
|
+inline void uint16_tSwapBytes(uint16_t *inShort)
|
||||||
|
{
|
||||||
|
//Use a union to avoid strict-aliasing error
|
||||||
|
- union ShortSwapUnion{
|
||||||
|
- short s;
|
||||||
|
+ union Uint16SwapUnion{
|
||||||
|
+ uint16_t s;
|
||||||
|
char c[2];
|
||||||
|
} ;
|
||||||
|
- ShortSwapUnion sa,sb;
|
||||||
|
+ Uint16SwapUnion sa,sb;
|
||||||
|
sa.s = *inShort;
|
||||||
|
|
||||||
|
sb.c[0] = sa.c[1];
|
||||||
|
diff -r f7be487d31b2 src/common/mathfuncs.cpp
|
||||||
|
--- src/common/mathfuncs.cpp Sun Aug 27 05:07:02 2017 +0100
|
||||||
|
+++ src/common/mathfuncs.cpp Sun Aug 27 05:08:00 2017 +0100
|
||||||
|
@@ -455,7 +455,6 @@
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
-#ifdef __LITTLE_ENDIAN__
|
||||||
|
|
||||||
|
void Point3D::switchEndian()
|
||||||
|
{
|
||||||
|
@@ -463,7 +462,6 @@
|
||||||
|
floatSwapBytes(&value[1]);
|
||||||
|
floatSwapBytes(&value[2]);
|
||||||
|
}
|
||||||
|
-#endif
|
||||||
|
|
||||||
|
std::ostream& operator<<(std::ostream &stream, const Point3D &pt)
|
||||||
|
{
|
||||||
|
diff -r f7be487d31b2 src/common/mathfuncs.h
|
||||||
|
--- src/common/mathfuncs.h Sun Aug 27 05:07:02 2017 +0100
|
||||||
|
+++ src/common/mathfuncs.h Sun Aug 27 05:08:00 2017 +0100
|
||||||
|
@@ -174,10 +174,9 @@
|
||||||
|
static Point3D centroid(const Point3D *p, unsigned int n);
|
||||||
|
|
||||||
|
static Point3D centroid(const std::vector<Point3D> &p);
|
||||||
|
-#ifdef __LITTLE_ENDIAN__
|
||||||
|
- //!Flip the endian state for data stored in this point
|
||||||
|
+
|
||||||
|
+ //!Flip the endian state for data stored in this point
|
||||||
|
void switchEndian();
|
||||||
|
-#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
//IMPORTANT!!!
|
||||||
12
3Depict.spec
12
3Depict.spec
|
|
@ -1,6 +1,6 @@
|
||||||
Name: 3Depict
|
Name: 3Depict
|
||||||
Version: 0.0.20
|
Version: 0.0.20
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
Summary: Valued 3D point cloud visualization and analysis
|
Summary: Valued 3D point cloud visualization and analysis
|
||||||
Group: Applications/Engineering
|
Group: Applications/Engineering
|
||||||
|
|
||||||
|
|
@ -40,6 +40,10 @@ Patch1: %{name}-%{version}-font-path.patch
|
||||||
#Implementes tapsim loading for big-endian
|
#Implementes tapsim loading for big-endian
|
||||||
# this is to fix a failed scratch build on ppc64
|
# this is to fix a failed scratch build on ppc64
|
||||||
Patch2: %{name}-%{version}-tapsim-endian.patch
|
Patch2: %{name}-%{version}-tapsim-endian.patch
|
||||||
|
#Fixes for build under s390/ppc64, due to endianness problems
|
||||||
|
Patch3: %{name}-%{version}-s390_preprocessor_fix.patch
|
||||||
|
#Fixes for build under s390/ppc64, due to type problems
|
||||||
|
Patch4: %{name}-%{version}-short_type_fix.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This software is designed to help users visualize and analyze 3D point clouds
|
This software is designed to help users visualize and analyze 3D point clouds
|
||||||
|
|
@ -54,6 +58,8 @@ useful for general scalar valued point data purposes.
|
||||||
%patch0
|
%patch0
|
||||||
%patch1
|
%patch1
|
||||||
%patch2
|
%patch2
|
||||||
|
%patch3
|
||||||
|
%patch4
|
||||||
|
|
||||||
%if 0%{?fedora} > 24
|
%if 0%{?fedora} > 24
|
||||||
# Installation directory has changed
|
# Installation directory has changed
|
||||||
|
|
@ -119,6 +125,10 @@ mv docs/manual-latex/manual.pdf %{name}-%{version}-manual.pdf
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Oct 12 2017 D Haley <mycae(a!t)gmx.com> - 0.0.20-5
|
||||||
|
- Bump for GSL rebuild
|
||||||
|
- Add fixes for s390/ppc64
|
||||||
|
|
||||||
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.20-4
|
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.20-4
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue