public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/libQGLViewer] epel10: Add support for Qt5
@ 2026-11-30 13:54 Laurent Rineau
0 siblings, 0 replies; only message in thread
From: Laurent Rineau @ 2026-11-30 13:54 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/libQGLViewer
Branch : epel10
Commit : 83463090e414c1c65e36faf6858df26b97e8628d
Author : Laurent Rineau <laurent.rineau@cgal.org>
Date : 2015-08-03T19:19:14+02:00
Stats : +111/-3 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/libQGLViewer/c/83463090e414c1c65e36faf6858df26b97e8628d?branch=epel10
Log:
Add support for Qt5
---
diff --git a/libQGLViewer-2.5.1-qflag.patch b/libQGLViewer-2.5.1-qflag.patch
new file mode 100644
index 0000000..d1b76dc
--- /dev/null
+++ b/libQGLViewer-2.5.1-qflag.patch
@@ -0,0 +1,12 @@
+diff -up libQGLViewer-2.5.1/QGLViewer/saveSnapshot.cpp~ libQGLViewer-2.5.1/QGLViewer/saveSnapshot.cpp
+--- libQGLViewer-2.5.1/QGLViewer/saveSnapshot.cpp~ 2014-02-13 09:39:04.000000000 +0100
++++ libQGLViewer-2.5.1/QGLViewer/saveSnapshot.cpp 2015-03-26 17:48:20.461539135 +0100
+@@ -542,7 +542,7 @@ void QGLViewer::saveSnapshot(bool automa
+ QString fileName;
+ QString selectedFormat = FDFormatString[snapshotFormat()];
+ fileName = QFileDialog::getSaveFileName(this, "Choose a file name to save under", snapshotFileName(), formats, &selectedFormat,
+- overwrite?QFileDialog::DontConfirmOverwrite:QFlag(0));
++ QFlag(overwrite?QFileDialog::DontConfirmOverwrite:0));
+ setSnapshotFormat(Qtformat[selectedFormat]);
+
+ if (checkFileName(fileName, this, snapshotFormat()))
diff --git a/libQGLViewer.spec b/libQGLViewer.spec
index d63a436..3ebc132 100644
--- a/libQGLViewer.spec
+++ b/libQGLViewer.spec
@@ -1,6 +1,6 @@
Name: libQGLViewer
Version: 2.5.1
-Release: 6%{?dist}
+Release: 8%{?dist}
Summary: Qt based OpenGL generic 3D viewer library
Group: System Environment/Libraries
@@ -16,19 +16,35 @@ Patch0: libQGLViewer-2.3.1-exit.patch
# them back.
Patch1: libQGLViewer-2.5.1-dbg.patch
+# Compilation error
+Patch2: libQGLViewer-2.5.1-qflag.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: qt4-devel
+BuildRequires: qt4-devel qt5-qtbase-devel
%description
%{name} is a C++ library based on Qt that eases the creation of OpenGL
3D viewers. It provides some of the typical 3D viewer functionality, such
as the possibility to move the camera using the mouse, which lacks in most
of the other APIs. Other features include mouse manipulated frames,
-interpolated keyFrames, object selection, stereo display, screenshot saving
+interpolated key-frames, object selection, stereo display, screenshot saving
and much more. It can be used by OpenGL beginners as well as to create
complex applications, being fully customizable and easy to extend.
+%package qt5
+Summary: Qt5 version of %{name}
+Group: Development/Libraries
+Requires: qt5-qtbase
+
+%description qt5
+%{name} is a C++ library based on Qt that eases the creation of OpenGL
+3D viewers. It provides some of the typical 3D viewer functionality, such
+as the possibility to move the camera using the mouse, which lacks in most
+of the other APIs. Other features include mouse manipulated frames,
+interpolated key-frames, object selection, stereo display, screenshot saving
+and much more. It can be used by OpenGL beginners as well as to create
+complex applications, being fully customizable and easy to extend.
%package devel
Summary: Development files for %{name}
@@ -40,6 +56,16 @@ Requires: qt4-devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
+%package qt5-devel
+Summary: Development files for %{name} using Qt5
+Group: Development/Libraries
+Requires: %{name}-qt5 = %{version}-%{release}
+Requires: qt5-qtbase-devel
+
+%description qt5-devel
+The %{name}-devel package contains libraries and header files for
+developing applications that use %{name} and Qt5.
+
%package doc
Summary: API documentation, demos and example programs for %{name}
@@ -53,11 +79,39 @@ BuildArch: noarch
%setup -q -n %{name}-%{version}
%patch0 -p1 -b .exit
%patch1 -p1 -b .dbg
+%patch2 -p1 -b .qflag
+
+rm -rf ../%{name}-%{version}-qt5
+cp -a ../%{name}-%{version} ../%{name}-%{version}-qt5
+sed -i -e 's/TARGET = QGLViewer/TARGET = QGLViewer-qt5/' ../%{name}-%{version}-qt5/QGLViewer/QGLViewer.pro
%build
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
+%{!?_qt4_qmake: %define _qt4_qmake /usr/bin/qmake-qt4}
+%{!?qmake_qt4: %define qmake_qt4 \
+ %{_qt4_qmake} \\\
+ QMAKE_CFLAGS_DEBUG="${CFLAGS:-%optflags}" \\\
+ QMAKE_CFLAGS_RELEASE="${CFLAGS:-%optflags}" \\\
+ QMAKE_CXXFLAGS_DEBUG="${CXXFLAGS:-%optflags}" \\\
+ QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS:-%optflags}" \\\
+ QMAKE_LFLAGS_DEBUG="${LDFLAGS:-%{?__global_ldflags}}" \\\
+ QMAKE_LFLAGS_RELEASE="${LDFLAGS:-%{?__global_ldflags}}" \\\
+ QMAKE_STRIP=
+}
+%{!?_qt5_qmake: %define _qt5_qmake /usr/bin/qmake-qt5}
+%{!?qmake_qt5: %define qmake_qt5 \
+ %{_qt5_qmake} \\\
+ QMAKE_CFLAGS_DEBUG="${CFLAGS:-%optflags}" \\\
+ QMAKE_CFLAGS_RELEASE="${CFLAGS:-%optflags}" \\\
+ QMAKE_CXXFLAGS_DEBUG="${CXXFLAGS:-%optflags}" \\\
+ QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS:-%optflags}" \\\
+ QMAKE_LFLAGS_DEBUG="${LDFLAGS:-%{?__global_ldflags}}" \\\
+ QMAKE_LFLAGS_RELEASE="${LDFLAGS:-%{?__global_ldflags}}" \\\
+ QMAKE_STRIP=
+}
+
cd QGLViewer
%{qmake_qt4} \
LIB_DIR=%{_libdir} \
@@ -74,6 +128,18 @@ cd ../designerPlugin
%{qmake_qt4} LIB_DIR=../QGLViewer
make %{?_smp_mflags}
+cd ../../%{name}-%{version}-qt5/QGLViewer
+%{qmake_qt5} \
+ LIB_DIR=%{_libdir} \
+ DOC_DIR=%{_pkgdocdir} \
+ INCLUDE_DIR=%{_includedir} \
+ TARGET_x=%{name}-qt5.so.%{version}
+# The TARGET_x variable gives the SONAME. However, qmake behavior is not
+# correct when the SONAME is customized: it create wrong symbolic links
+# that must be cleaned after the installation.
+
+make %{?_smp_mflags}
+
%install
rm -rf $RPM_BUILD_ROOT
cd QGLViewer
@@ -88,6 +154,14 @@ rm $RPM_BUILD_ROOT%{_libdir}/libQGLViewer.so.?.? \
cd ../designerPlugin
make -e INSTALL_ROOT=$RPM_BUILD_ROOT install STRIP=/usr/bin/true
+cd ../../%{name}-%{version}-qt5/QGLViewer
+make -f Makefile -e INSTALL_ROOT=$RPM_BUILD_ROOT install_target install_include STRIP=/usr/bin/true
+find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
+rm $RPM_BUILD_ROOT%{_libdir}/libQGLViewer-qt5.prl
+# Clean symbolic links
+rm $RPM_BUILD_ROOT%{_libdir}/libQGLViewer-qt5.so.?.?
+rm $RPM_BUILD_ROOT%{_libdir}/libQGLViewer-qt5.so.%{version}\\* || true
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -96,6 +170,10 @@ rm -rf $RPM_BUILD_ROOT
%postun -p /sbin/ldconfig
+%post qt5 -p /sbin/ldconfig
+
+%postun qt5 -p /sbin/ldconfig
+
%files
%defattr(-,root,root,-)
@@ -108,12 +186,30 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/libQGLViewer.so
%{_libdir}/qt4/plugins/designer/libqglviewerplugin.so
+%files qt5
+%defattr(-,root,root,-)
+%doc README LICENCE CHANGELOG GPL_EXCEPTION
+%{_libdir}/libQGLViewer-qt5.so.%{version}
+
+%files qt5-devel
+%defattr(-,root,root,-)
+%{_includedir}/QGLViewer/
+%{_libdir}/libQGLViewer-qt5.so
+
%files doc
%defattr(-,root,root,-)
%doc doc
%doc examples
%changelog
+* Mon Aug 3 2015 Laurent Rineau <lrineau@renoir.geometryfactory.com> - 2.5.1-8
+- Fix the build on Rawhide
+
+* Mon Aug 3 2015 Laurent Rineau <lrineau@renoir.geometryfactory.com> - 2.5.1-7
+- Add the support for Qt5
+- Define missing macros if needed
+- Add post/postun for the qt5 sub-package
+
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-30 13:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-30 13:54 [rpms/libQGLViewer] epel10: Add support for Qt5 Laurent Rineau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox