From cfaa02dd5476473da3f2819e9859153d4871b95fbfc5f3c901eabce755f3288f Mon Sep 17 00:00:00 2001 From: Andrey Karepin Date: Sun, 11 Jan 2015 08:30:55 +0000 Subject: [PATCH] Accepting request 280652 from home:DarkSS Please add a link from network/libqxmpp to network/libqxmpp-qt5 to make Qt5 build. OBS-URL: https://build.opensuse.org/request/show/280652 OBS-URL: https://build.opensuse.org/package/show/network/libqxmpp?expand=0&rev=16 --- libqxmpp-qt5.changes | 6 ++ libqxmpp-qt5.patch | 38 +++++++++++ libqxmpp-qt5.spec | 153 +++++++++++++++++++++++++++++++++++++++++++ libqxmpp.changes | 24 +++++++ libqxmpp.spec | 79 ++++++++++++++-------- qxmpp-0.8.0.tar.gz | 3 - v0.8.2.tar.gz | 3 + 7 files changed, 277 insertions(+), 29 deletions(-) create mode 100644 libqxmpp-qt5.changes create mode 100644 libqxmpp-qt5.patch create mode 100644 libqxmpp-qt5.spec delete mode 100644 qxmpp-0.8.0.tar.gz create mode 100644 v0.8.2.tar.gz diff --git a/libqxmpp-qt5.changes b/libqxmpp-qt5.changes new file mode 100644 index 0000000..a2b88e6 --- /dev/null +++ b/libqxmpp-qt5.changes @@ -0,0 +1,6 @@ +------------------------------------------------------------------- +Fri Jan 9 21:07:02 UTC 2015 - dap.darkness@gmail.com + +- Initial build. +- Added libqxmpp-qt5.patch to implement Qt5 alternative. + diff --git a/libqxmpp-qt5.patch b/libqxmpp-qt5.patch new file mode 100644 index 0000000..03f41ac --- /dev/null +++ b/libqxmpp-qt5.patch @@ -0,0 +1,38 @@ +diff --git a/qxmpp.pri b/qxmpp.pri +index e5dbb9c..8c8561d 100644 +--- a/qxmpp.pri ++++ b/qxmpp.pri +@@ -8,7 +8,7 @@ QXMPP_INCLUDEPATH = $$PWD/src/base $$PWD/src/client $$PWD/src/server + CONFIG(debug, debug|release) { + QXMPP_LIBRARY_NAME = qxmpp_d + } else { +- QXMPP_LIBRARY_NAME = qxmpp ++ QXMPP_LIBRARY_NAME = qxmpp-qt5 + } + + # Determine library type (shared or staticlib) +diff --git a/src/src.pro b/src/src.pro +index 954738c..32204cd 100644 +--- a/src/src.pro ++++ b/src/src.pro +@@ -40,7 +40,7 @@ HEADERS += $$INSTALL_HEADERS + + # Installation + headers.files = $$INSTALL_HEADERS +-headers.path = $$PREFIX/include/qxmpp ++headers.path = $$PREFIX/include/qxmpp-qt5 + target.path = $$PREFIX/$$LIBDIR + INSTALLS += headers target + +diff --git a/qxmpp.pro b/qxmpp.pro +index a309a48..ad5cbad 100644 +--- a/qxmpp.pro ++++ b/qxmpp.pro +@@ -6,7 +6,6 @@ TEMPLATE = subdirs + SUBDIRS = src + android | ios { + } else { +- SUBDIRS += tests examples + } + + !isEmpty(QXMPP_USE_DOXYGEN) { diff --git a/libqxmpp-qt5.spec b/libqxmpp-qt5.spec new file mode 100644 index 0000000..b492930 --- /dev/null +++ b/libqxmpp-qt5.spec @@ -0,0 +1,153 @@ +# +# spec file for package libqxmpp-qt5 +# +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +%define build_qt4 0 +%define build_qt5 1 + +Name: libqxmpp-qt5 +Version: 0.8.2 +Release: 0 +Summary: Qt XMPP Library +License: LGPL-2.0+ +Group: System/Libraries +Url: http://qxmpp.org +Source0: https://github.com/qxmpp-project/qxmpp/archive/v%{version}.tar.gz +Source1: baselibs.conf +Patch0: libqxmpp-qt5.patch + +BuildRequires: fdupes +%if %build_qt4 +BuildRequires: pkgconfig(QtCore) +%endif +%if %build_qt5 +BuildRequires: pkgconfig(Qt5Network) +BuildRequires: pkgconfig(Qt5Xml) +%endif +BuildRequires: pkgconfig(opus) +BuildRequires: pkgconfig(speex) +BuildRequires: pkgconfig(theora) +BuildRequires: pkgconfig(vpx) + +%description +QXmpp is a cross-platform C++ XMPP client library. It is based on Qt and C++. + +QXmpp is pretty intuitive and easy to use. It uses Qt extensively. Qt is the only +third party library it is dependent on. Users need to a have working knowledge of +C++ and Qt basics (Signals and Slots and Qt data types). The underlying TCP socket +and the XMPP RFCs (RFC3920 and RFC3921) have been encapsulated into classes and +functions. Therefore the user would not be bothered with these details. But it is +always recommended to the advanced users to read and enjoy the low level details. + +%package -n %{name}-0 +Summary: Qt XMPP Library +Group: System/Libraries + +%description -n %{name}-0 +QXmpp is a cross-platform C++ XMPP client library. It is based on Qt and C++. + +QXmpp is pretty intuitive and easy to use. It uses Qt extensively. Qt is the only +third party library it is dependent on. Users need to a have working knowledge of +C++ and Qt basics (Signals and Slots and Qt data types). The underlying TCP socket +and the XMPP RFCs (RFC3920 and RFC3921) have been encapsulated into classes and +functions. Therefore the user would not be bothered with these details. But it is +always recommended to the advanced users to read and enjoy the low level details. + +%package -n %{name}-devel + +Summary: Qxmpp Development Files +Group: Development/Libraries/C and C++ +%if %build_qt4 +Requires: %{name}0 = %{version} +%endif +%if %build_qt5 +Requires: %{name}-0 = %{version} +%endif + +%description -n %{name}-devel +It's a development package for qxmpp. + +QXmpp is a cross-platform C++ XMPP client library. It is based on Qt and C++. + +%package doc +Summary: Qxmpp library documentation +Group: Documentation/HTML +BuildArch: noarch + +%description doc +This packages provides documentation of Qxmpp library API. + +%prep +%setup -q -n qxmpp-%{version} +%if %build_qt5 +%patch0 -p1 +%endif +# A hack vs. "E: arch-independent-package-contains-binary-or-object" +# after %%check. +cp -r examples doc/ + +%build +%if %build_qt4 +qmake \ +%endif +%if %build_qt5 +qmake-qt5 \ +%endif + PREFIX=%{_prefix} \ + LIBDIR=%{_lib} \ + QMAKE_STRIP="" \ + QMAKE_CXXFLAGS+="%{optflags}" \ + QXMPP_USE_OPUS=1 \ + QXMPP_USE_SPEEX=1 \ + QXMPP_USE_THEORA=1 \ + QXMPP_USE_VPX=1 + +make V=1 %{?_smp_mflags} + +%install +%makeinstall INSTALL_ROOT=%{buildroot} +%fdupes %{buildroot}%{_datadir}/doc/qxmpp/ + +%check +make V=1 %{?_smp_mflags} check + +%post -n %{name}-0 -p /sbin/ldconfig + +%postun -n %{name}-0 -p /sbin/ldconfig + +%files -n %{name}-0 +%defattr(-,root,root) +%doc AUTHORS CHANGELOG LICENSE.LGPL README* +%{_libdir}/%{name}.so.* + +%files -n %{name}-devel +%defattr(-,root,root) +%{_libdir}/%{name}.so +%if %build_qt4 +%{_includedir}/qxmpp +%{_libdir}/pkgconfig/qxmpp.pc +%endif +%if %build_qt5 +%{_includedir}/qxmpp-qt5 +%{_libdir}/pkgconfig/qxmpp-qt5.pc +%endif + +%files doc +%defattr(-,root,root) +%doc doc/examples + +%changelog diff --git a/libqxmpp.changes b/libqxmpp.changes index d06db37..30dcaf6 100644 --- a/libqxmpp.changes +++ b/libqxmpp.changes @@ -1,3 +1,27 @@ +------------------------------------------------------------------- +Fri Jan 9 19:38:51 UTC 2015 - dap.darkness@gmail.com + +- update to 0.8.2 + * Refactor HTML documentation so that "make docs" works in + out-of-source builds. + * Add support for Opus audio codec. + * Enable error concealment for VPX video codec. + * Use QString() instead of "" for default methods arguments, + to enable building project which use QT_NO_CAST_FROM_ASCII. + * Add support for legacy SSL. + * Add XEP-0333: Chat Markers attributes to QXmppMessage. + * Add QXmppClient::socketErrorString + to retrieve socket error string. + * Add equality/inequality operators for QXmppVCardIq. + * Add "make check" command to run tests. +-packaging + * Switched to tarball from github. + * Added libqxmpp-qt5.patch to implement Qt5 alternative. + * Switched to pkgconfig() at Requires section. + * Broken old distros: SLE11, openSUSE~11.4. + * Let make be verbose. + * Added check section. + ------------------------------------------------------------------- Thu Mar 27 17:09:56 UTC 2014 - dap.darkness@gmail.com diff --git a/libqxmpp.spec b/libqxmpp.spec index bfad31b..a131cef 100644 --- a/libqxmpp.spec +++ b/libqxmpp.spec @@ -1,7 +1,7 @@ # # spec file for package libqxmpp # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,24 +16,33 @@ # +%define build_qt4 1 +%define build_qt5 0 + Name: libqxmpp -Version: 0.8.0 +Version: 0.8.2 Release: 0 Summary: Qt XMPP Library License: LGPL-2.0+ Group: System/Libraries Url: http://qxmpp.org -Source0: http://download.qxmpp.org/qxmpp-%{version}.tar.gz +Source0: https://github.com/qxmpp-project/qxmpp/archive/v%{version}.tar.gz Source1: baselibs.conf -BuildRequires: fdupes -BuildRequires: libqt4-devel -BuildRequires: libtheora-devel -%if 0%{?suse_version} >= 1140 -BuildRequires: libvpx-devel -%endif -BuildRequires: speex-devel +# PATCH-FEATURE-OPENSUSE to make Qt5 build. +Patch0: libqxmpp-qt5.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: fdupes +%if %build_qt4 +BuildRequires: pkgconfig(QtCore) +%endif +%if %build_qt5 +BuildRequires: pkgconfig(Qt5Network) +BuildRequires: pkgconfig(Qt5Xml) +%endif +BuildRequires: pkgconfig(opus) +BuildRequires: pkgconfig(speex) +BuildRequires: pkgconfig(theora) +BuildRequires: pkgconfig(vpx) %description QXmpp is a cross-platform C++ XMPP client library. It is based on Qt and C++. @@ -48,8 +57,6 @@ always recommended to the advanced users to read and enjoy the low level details %package -n %{name}0 Summary: Qt XMPP Library Group: System/Libraries -Provides: libqxmpp-lc1 = %{version} -Obsoletes: libqxmpp-lc1 < %{version} %description -n %{name}0 QXmpp is a cross-platform C++ XMPP client library. It is based on Qt and C++. @@ -65,9 +72,12 @@ always recommended to the advanced users to read and enjoy the low level details Summary: Qxmpp Development Files Group: Development/Libraries/C and C++ -Requires: libqxmpp0 = %{version} -Provides: libqxmpp-lc-devel = %{version} -Obsoletes: libqxmpp-lc-devel < %{version} +%if %build_qt4 +Requires: %{name}0 = %{version} +%endif +%if %build_qt5 +Requires: %{name}-0 = %{version} +%endif %description -n %{name}-devel It's a development package for qxmpp. @@ -77,51 +87,68 @@ QXmpp is a cross-platform C++ XMPP client library. It is based on Qt and C++. %package doc Summary: Qxmpp library documentation Group: Documentation/HTML -%if 0%{?suse_version} > 1110 BuildArch: noarch -%endif %description doc This packages provides documentation of Qxmpp library API. %prep %setup -q -n qxmpp-%{version} +%if %build_qt5 +%patch0 -p1 +%endif +# A hack vs. "E: arch-independent-package-contains-binary-or-object" +# after %%check. +cp -r examples doc/ %build +%if %build_qt4 qmake \ +%endif +%if %build_qt5 +qmake-qt5 \ +%endif PREFIX=%{_prefix} \ LIBDIR=%{_lib} \ QMAKE_STRIP="" \ QMAKE_CXXFLAGS+="%{optflags}" \ -%if 0%{?suse_version} >= 1140 - QXMPP_USE_VPX=1 \ -%endif + QXMPP_USE_OPUS=1 \ QXMPP_USE_SPEEX=1 \ - QXMPP_USE_THEORA=1 + QXMPP_USE_THEORA=1 \ + QXMPP_USE_VPX=1 -make %{?_smp_mflags} +make V=1 %{?_smp_mflags} %install %makeinstall INSTALL_ROOT=%{buildroot} %fdupes %{buildroot}%{_datadir}/doc/qxmpp/ +%check +make V=1 %{?_smp_mflags} check + %post -n %{name}0 -p /sbin/ldconfig %postun -n %{name}0 -p /sbin/ldconfig %files -n %{name}0 %defattr(-,root,root) -%doc AUTHORS CHANGELOG LICENSE.LGPL README +%doc AUTHORS CHANGELOG LICENSE.LGPL README* %{_libdir}/%{name}.so.* %files -n %{name}-devel %defattr(-,root,root) -%{_includedir}/qxmpp %{_libdir}/%{name}.so +%if %build_qt4 +%{_includedir}/qxmpp %{_libdir}/pkgconfig/qxmpp.pc +%endif +%if %build_qt5 +%{_includedir}/qxmpp-qt5 +%{_libdir}/pkgconfig/qxmpp-qt5.pc +%endif %files doc %defattr(-,root,root) -%doc %{_datadir}/doc/qxmpp +%doc doc/examples %changelog diff --git a/qxmpp-0.8.0.tar.gz b/qxmpp-0.8.0.tar.gz deleted file mode 100644 index 10f0735..0000000 --- a/qxmpp-0.8.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6a5e40b67bfbc2315f2b8bc0210e7556b0b9903e18b4f68267072f3421f74712 -size 1115730 diff --git a/v0.8.2.tar.gz b/v0.8.2.tar.gz new file mode 100644 index 0000000..2c12407 --- /dev/null +++ b/v0.8.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:518e156198a10404d7d3eae55ab4b91528e9422f636e7856cc8bfe59a8ceb326 +size 282577