[packages/SoQt] - updated to 1.6.0 (relicensed on BSD; uses cmake now) - updated pc patch - added apidocs

qboosh qboosh at pld-linux.org
Tue Dec 1 21:34:52 CET 2020


commit f5cf276d12c0c3c9423a24cd0838067d461f3903
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Dec 1 21:35:14 2020 +0100

    - updated to 1.6.0 (relicensed on BSD; uses cmake now)
    - updated pc patch
    - added apidocs

 SoQt-pc.patch |  45 +++++++++++++++-------
 SoQt.spec     | 117 ++++++++++++++++++++++++++++++++++++++++++++++------------
 2 files changed, 124 insertions(+), 38 deletions(-)
---
diff --git a/SoQt.spec b/SoQt.spec
index cbc0d50..b65edb0 100644
--- a/SoQt.spec
+++ b/SoQt.spec
@@ -1,28 +1,43 @@
 #
 # Conditional build:
+%bcond_without	apidocs		# API documentation
 %bcond_without	static_libs	# static library
+%bcond_with	qt4		# Qt4 instead of Qt5
 
 Summary:	Qt GUI component toolkit library for Coin
 Summary(pl.UTF-8):	Biblioteka komponentu graficznego interfejsu Qt dla biblioteki Coin
 Name:		SoQt
-Version:	1.5.0
-Release:	3
-License:	GPL v2 or Coin PEL
+Version:	1.6.0
+Release:	1
+License:	BSD
 Group:		X11/Libraries
-Source0:	https://bitbucket.org/Coin3D/coin/downloads/%{name}-%{version}.tar.gz
-# Source0-md5:	9f1e582373d66f556b1db113a93ac68e
+#Source0Download: https://github.com/coin3d/soqt/releases
+Source0:	https://github.com/coin3d/soqt/releases/download/SoQt-%{version}/soqt-%{version}-src.tar.gz
+# Source0-md5:	724996aedad2a33760dc36f08ceeda22
 Patch0:		%{name}-pc.patch
-URL:		http://www.coin3d.org/lib/soqt/
-BuildRequires:	Coin-devel
+URL:		https://github.com/coin3d/soqt
+BuildRequires:	Coin-devel >= 4.0.0
 BuildRequires:	OpenGL-GLX-devel
+%if %{with qt4}
 BuildRequires:	QtCore-devel >= 4
 BuildRequires:	QtGui-devel >= 4
 BuildRequires:	QtOpenGL-devel >= 4
-BuildRequires:	automake
+%else
+BuildRequires:	Qt5Core-devel >= 5
+BuildRequires:	Qt5Gui-devel >= 5
+BuildRequires:	Qt5OpenGL-devel >= 5
+BuildRequires:	Qt5Widgets-devel >= 5
+%endif
+BuildRequires:	cmake >= 3.0
+%{?with_apidocs:BuildRequires:	doxygen}
 BuildRequires:	libstdc++-devel
 BuildRequires:	pkgconfig
+%if %{with qt4}
 BuildRequires:	qt4-build >= 4
-BuildRequires:	sed >= 4.0
+%else
+BuildRequires:	qt5-build >= 5
+%endif
+BuildRequires:	rpmbuild(macros) >= 1.752
 BuildRequires:	xorg-lib-libX11-devel
 BuildRequires:	xorg-lib-libXext-devel
 BuildRequires:	xorg-lib-libXmu-devel
@@ -44,9 +59,17 @@ Summary:	Header files for SoQt library
 Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki SoQt
 Group:		X11/Development/Libraries
 Requires:	%{name} = %{version}-%{release}
-Requires:	Coin-devel
-Requires:	OpenGL-GLX-devel
+Requires:	Coin-devel >= 4.0.0
+%if %{with qt4}
 Requires:	QtCore-devel >= 4
+Requires:	QtGui-devel >= 4
+Requires:	QtOpenGL-devel >= 4
+%else
+Requires:	Qt5Core-devel >= 5
+Requires:	Qt5Gui-devel >= 5
+Requires:	Qt5OpenGL-devel >= 5
+Requires:	Qt5Widgets-devel >= 5
+%endif
 
 %description devel
 Header files for SoQt library.
@@ -66,29 +89,68 @@ Static SoQt library.
 %description static -l pl.UTF-8
 Statyczna biblioteka SoQt.
 
+%package apidocs
+Summary:	API documentation for SoQt library
+Summary(pl.UTF-8):	Dokumentacja API biblioteki SoQt
+Group:		Documentation
+%{?noarchpackage}
+
+%description apidocs
+API documentation for SoQt library.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki SoQt.
+
 %prep
-%setup -q
+%setup -q -n soqt
 %patch0 -p1
 
 %build
-# -DHAVE_GLX is not passed properly from configure
-CXXFLAGS="%{rpmcxxflags} -DHAVE_GLX"
-%configure \
-	%{?with_static_libs:--enable-static}
+install -d builddir
+cd builddir
+%cmake .. \
+%if %{with apidocs}
+	-DSOQT_BUILD_DOCUMENTATION=ON \
+	-DSOQT_BUILD_DOC_MAN=ON \
+%endif
+	%{?with_qt4:-DSOQT_USE_QT5=OFF}
 
-# GL is missing; cannot rebuild auto* because of missing m4 files
-%{__sed} -i -e '/^LIBS =/s/$/ -lGL/' src/Inventor/Qt/Makefile
+%{__make}
+cd ..
+
+%if %{with static_libs}
+install -d builddir-static
+cd builddir-static
+%cmake .. \
+	-DSOQT_BUILD_SHARED_LIBS=OFF \
+	%{?with_qt4:-DSOQT_USE_QT5=OFF}
 
 %{__make}
+cd ..
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} install \
+%if %{with static_libs}
+%{__make} -C builddir-static install \
+	DESTDIR=$RPM_BUILD_ROOT
+%endif
+
+%{__make} -C builddir install \
 	DESTDIR=$RPM_BUILD_ROOT
 
 # obsoleted by pkg-config
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/libSoQt.la
+#%{__rm} $RPM_BUILD_ROOT%{_libdir}/libSoQt.la
+
+%if %{with apidocs}
+# packaged as %doc
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/html
+# to common names etc.
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/man3/{_*_,components,devices,misc,viewers}.3
+%endif
+# bogus location
+%{__rm} -r $RPM_BUILD_ROOT%{_infodir}/SoQt1
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -101,19 +163,26 @@ rm -rf $RPM_BUILD_ROOT
 %doc AUTHORS BUGS.txt COPYING ChangeLog FAQ NEWS README
 %attr(755,root,root) %{_libdir}/libSoQt.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libSoQt.so.20
+%{_datadir}/SoQt
 
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libSoQt.so
-%attr(755,root,root) %{_bindir}/soqt-config
 %{_includedir}/Inventor/Qt
 %{_pkgconfigdir}/SoQt.pc
-%{_aclocaldir}/soqt.m4
-%{_datadir}/Coin/conf/soqt-default.cfg
-%{_mandir}/man1/soqt-config.1*
+%{_libdir}/cmake/SoQt-%{version}
+%if %{with apidocs}
+%{_mandir}/man3/SoQt*.3*
+%endif
 
 %if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libSoQt.a
 %endif
+
+%if %{with apidocs}
+%files apidocs
+%defattr(644,root,root,755)
+%doc builddir/html/*.{css,html,js,png}
+%endif
diff --git a/SoQt-pc.patch b/SoQt-pc.patch
index d3afcf8..48db77f 100644
--- a/SoQt-pc.patch
+++ b/SoQt-pc.patch
@@ -1,16 +1,33 @@
---- SoQt-1.5.0/SoQt.pc.in.orig	2010-03-02 23:57:41.000000000 +0100
-+++ SoQt-1.5.0/SoQt.pc.in	2014-11-05 21:11:21.861846303 +0100
-@@ -8,10 +8,10 @@
- Name: SoQt
- Description: a Qt Gui-toolkit binding for Coin
- Version: @SOQT_VERSION@
--Requires: Coin
-+Requires: Coin QtCore
+--- soqt/SoQt.pc.cmake.in.orig	2019-12-24 01:35:10.000000000 +0100
++++ soqt/SoQt.pc.cmake.in	2020-12-01 21:29:56.792591735 +0100
+@@ -1,13 +1,13 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=${prefix}
+-bindir=${exec_prefix}/bin
+-libdir=${exec_prefix}/lib
+-includedir=${prefix}/include
+-datarootdir=${prefix}/share
+-datadir=${datarootdir}
+-docdir=${datarootdir}/doc/@PROJECT_NAME_LOWER@
+-infodir=${datarootdir}/info
+-mandir=${datarootdir}/man
++bindir=@CMAKE_INSTALL_FULL_BINDIR@
++libdir=@CMAKE_INSTALL_FULL_LIBDIR@
++includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
++datarootdir=@CMAKE_INSTALL_FULL_DATAROOTDIR@
++datadir=@CMAKE_INSTALL_FULL_DATADIR@
++docdir=@CMAKE_INSTALL_FULL_DOCDIR@
++infodir=@CMAKE_INSTALL_FULL_INFODIR@
++mandir=@CMAKE_INSTALL_FULL_MANDIR@
+ htmldir=${docdir}/html
+ 
+ Name: @PROJECT_NAME@
+@@ -15,7 +15,7 @@
+ Version: @PROJECT_VERSION@
+ Requires: Coin, @PACKAGE_ADDITIONAL_REQUIREMENTS@
  Conflicts:
--Libs: -L${libdir} @SOGUI_EXTRA_LDFLAGS@ @SOGUI_EXTRA_LIBS@
--Cflags: -I${includedir} @SOGUI_EXTRA_CFLAGS@ @SOGUI_EXTRA_CPPFLAGS@
-+Libs: -L${libdir}
-+Cflags: -I${includedir}
+-Libs: -L${libdir} @SOQT_EXTRA_LDFLAGS@ @SOQT_EXTRA_LIBS@
++Libs: -L${libdir} -lSoQt @SOQT_EXTRA_LDFLAGS@ @SOQT_EXTRA_LIBS@
+ Cflags: -I${includedir} @SOQT_EXTRA_CFLAGS@ @SOQT_EXTRA_CPPFLAGS@
  
- soqt_host=@host@
- compiler=@COIN_COMPILER@
+ frameworkdir=@frameworkdir@
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/SoQt.git/commitdiff/f5cf276d12c0c3c9423a24cd0838067d461f3903



More information about the pld-cvs-commit mailing list