public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Laurent Rineau <laurent.rineau@cgal.org>
To: git-commits@fedoraproject.org
Subject: [rpms/libQGLViewer] epel10: Try to fix compilation errors on ARMv7
Date: Mon, 30 Nov 2026 13:54:52 GMT	[thread overview]
Message-ID: <179604689210.1.11543135020710849932.rpms-libQGLViewer-a33ce0fb1c4d@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/libQGLViewer
Branch : epel10
Commit : a33ce0fb1c4df6d318bb3557b97704257332c0e8
Author : Laurent Rineau <laurent.rineau@cgal.org>
Date   : 2016-07-15T13:53:19+02:00
Stats  : +78/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/libQGLViewer/c/a33ce0fb1c4df6d318bb3557b97704257332c0e8?branch=epel10

Log:
Try to fix compilation errors on ARMv7

---
diff --git a/libQGLViewer-2.6.3-qreal.patch b/libQGLViewer-2.6.3-qreal.patch
new file mode 100644
index 0000000..4aeb0f3
--- /dev/null
+++ b/libQGLViewer-2.6.3-qreal.patch
@@ -0,0 +1,70 @@
+diff --git a/QGLViewer/vec.h b/QGLViewer/vec.h
+index 6d52178..e4e1461 100644
+--- a/QGLViewer/vec.h
++++ b/QGLViewer/vec.h
+@@ -134,8 +134,8 @@ public:
+ 	}
+ 
+ #ifndef DOXYGEN
+-	/*! This method is deprecated since version 2.0. Use operator const double* instead. */
+-	const double* address() const { qWarning("Vec::address() is deprecated, use operator const double* instead."); return operator const double*(); }
++	/*! This method is deprecated since version 2.0. Use operator const qreal* instead. */
++	const qreal* address() const { qWarning("Vec::address() is deprecated, use operator const qreal* instead."); return operator const qreal*(); }
+ #endif
+ 
+ 	/*! Conversion operator returning the memory address of the vector.
+@@ -146,7 +146,7 @@ public:
+   glNormal3dv(normal);
+   glVertex3dv(pos);
+   \endcode */
+-	operator const double*() const {
++	operator const qreal*() const {
+ #ifdef QGLVIEWER_UNION_NOT_SUPPORTED
+ 		return &x;
+ #else
+@@ -156,8 +156,8 @@ public:
+ 
+ 	/*! Non const conversion operator returning the memory address of the vector.
+ 
+-  Useful to pass a Vec to a method that requires and fills a \c double*, as provided by certain libraries. */
+-	operator double*() {
++  Useful to pass a Vec to a method that requires and fills a \c qreal*, as provided by certain libraries. */
++	operator qreal*() {
+ #ifdef QGLVIEWER_UNION_NOT_SUPPORTED
+ 		return &x;
+ #else
+diff --git a/QGLViewer/quaternion.cpp b/QGLViewer/quaternion.cpp
+index 8ddac9e..d63637d 100644
+--- a/QGLViewer/quaternion.cpp
++++ b/QGLViewer/quaternion.cpp
+@@ -126,18 +126,6 @@ void Quaternion::setFromRotationMatrix(const qreal m[3][3])
+ }
+ 
+ #ifndef DOXYGEN
+-void Quaternion::setFromRotationMatrix(const float m[3][3])
+-{
+-	qWarning("setFromRotationMatrix now expects a double[3][3] parameter");
+-
+-	qreal mat[3][3];
+-	for (int i=0; i<3; ++i)
+-		for (int j=0; j<3; ++j)
+-			mat[i][j] = qreal(m[i][j]);
+-
+-	setFromRotationMatrix(mat);
+-}
+-
+ void Quaternion::setFromRotatedBase(const Vec& X, const Vec& Y, const Vec& Z)
+ {
+ 	qWarning("setFromRotatedBase is deprecated, use setFromRotatedBasis instead");
+diff --git a/QGLViewer/quaternion.h b/QGLViewer/quaternion.h
+index 49f27e8..0ed7bed 100644
+--- a/QGLViewer/quaternion.h
++++ b/QGLViewer/quaternion.h
+@@ -104,7 +104,6 @@ public:
+ 	{ q[0]=q0;    q[1]=q1;    q[2]=q2;    q[3]=q3; }
+ 
+ #ifndef DOXYGEN
+-	void setFromRotationMatrix(const float m[3][3]);
+ 	void setFromRotatedBase(const Vec& X, const Vec& Y, const Vec& Z);
+ #endif
+ 	void setFromRotationMatrix(const qreal m[3][3]);

diff --git a/libQGLViewer.spec b/libQGLViewer.spec
index f068161..7f9a312 100644
--- a/libQGLViewer.spec
+++ b/libQGLViewer.spec
@@ -16,6 +16,13 @@ Patch0:         libQGLViewer-2.6.3-exit.patch
 # them back.
 Patch1:         libQGLViewer-2.6.3-dbg.patch
 
+# libQGLViewer-2.6.3 does not compile on armv7:
+#    vec.h: In member function 'qglviewer::Vec::operator const double*() const':
+#    vec.h:175:10: error: cannot convert 'const qreal* {aka const float*}' to 'const double*' in return
+#       return v_;
+#              ^~
+Patch2:        libQGLViewer-2.6.3-qreal.patch
+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  qt4-devel qt5-qtbase-devel
@@ -76,6 +83,7 @@ BuildArch: noarch
 %setup -q -n %{name}-%{version}
 %patch0 -p1 -b .exit
 %patch1 -p1 -b .dbg
+%patch2 -p1 -b .qreal
 
 # Fix permissions
 chmod a-x examples/*/*.vcproj

                 reply	other threads:[~2026-11-30 13:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179604689210.1.11543135020710849932.rpms-libQGLViewer-a33ce0fb1c4d@fedoraproject.org \
    --to=laurent.rineau@cgal.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox