[packages/qt4-assistant-compat] - new - build-system patch and separate QAssistantClient, QtAssistant files taken from Debian

qboosh qboosh at pld-linux.org
Wed Dec 26 08:51:12 CET 2012


commit aeb93799464c94fbeb71a50cfcc134fe60cb4ccc
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Dec 26 08:52:26 2012 +0100

    - new
    - build-system patch and separate QAssistantClient, QtAssistant files taken from Debian

 QAssistantClient                        |   1 +
 QtAssistant                             |   5 +
 qt4-assistant-compat-build-system.patch |  48 ++++++++
 qt4-assistant-compat.spec               | 203 ++++++++++++++++++++++++++++++++
 4 files changed, 257 insertions(+)
---
diff --git a/qt4-assistant-compat.spec b/qt4-assistant-compat.spec
new file mode 100644
index 0000000..aecf981
--- /dev/null
+++ b/qt4-assistant-compat.spec
@@ -0,0 +1,203 @@
+#
+# Conditional build:
+%bcond_without	static_libs	# don't build static libraries
+#
+Summary:	Qt Assistant compatibility binary (legacy)
+Summary(pl.UTF-8):	Program Qt Assistant (stara wersja)
+Name:		qt4-assistant-compat
+Version:	4.6.3
+Release:	1
+License:	LGPL v2.1 with Nokia Qt exception or GPL v3
+Group:		X11/Development/Tools
+Source0:	ftp://ftp.qt.nokia.com/qt/source/qt-assistant-qassistantclient-library-compat-src-%{version}.tar.gz
+# Source0-md5:	a20148e0488d5c12ab35ccc107dcc64d
+Source1:	QAssistantClient
+Source2:	QtAssistant
+Patch0:		%{name}-build-system.patch
+URL:		http://qt.nokia.com/
+BuildRequires:	QtCore-devel >= 4.7
+BuildRequires:	QtGui-devel >= 4.7
+BuildRequires:	QtNetwork-devel >= 4.7
+BuildRequires:	qt4-linguist >= 4.7
+BuildRequires:	qt4-qmake >= 4.7
+BuildRequires:	sed >= 4.0
+Obsoletes:	qt-assistant < %{version}-2
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define		_qtdir		%{_libdir}/qt4
+
+%description
+Qt is a complete C++ application development framework, which includes
+a class library and tools for multiplatform development and
+internationalization. Using Qt, a single source code tree can build
+applications that run natively on different platforms (Windows,
+Unix/Linux, Mac OS X, embedded Linux).
+
+This package contains the Qt Assistant compatibility version, based on
+Assistant Document Profile (.adp) files, and the associated
+QtAssistantClient library, for compatibility with applications
+providing help in that format.
+
+New applications should use the new version of Qt Assistant introduced
+in Qt 4.4, based on the Qt Help Framework also introduced in Qt 4.4,
+instead.
+
+%description -l pl.UTF-8
+Qt oferuje kompletny system do tworzenia i rozwijania aplikacji w
+języku C++, w którego skład wchodzi biblioteka z klasami oraz
+wieloplatformowymi narzędziami do rozwijania i tłumaczenia aplikacji.
+Z pomocą Qt jeden kod źródłowy może być natywnie uruchamiany na
+różnych platformach (Windows, Unix/Linux, Mac OS X).
+
+Ten pakiet zawiera starą wersję programu Qt Assistant, opartą na
+plikach .adp (Assistant Document Profile) oraz powiązanej bibliotece
+QtAssistantClient, służącą kompatybilności z aplikacjami
+udostępniającymi pomoc w tym formacie.
+
+Nowe aplikacje powinny używać nowej wersji programu Qt Assistant
+wprowadzonej w Qt 4.4, opartej na szkielecie Qt Help, wprowadzonym
+także w Qt 4.4.
+
+%package -n QtAssistant-compat
+Summary:	Qt AssistantClient compatibility library
+Summary(pl.UTF-8):	Biblioteka kompatybilności Qt AssistantClient
+Group:		X11/Libraries
+Requires:	QtCore >= 4.7
+Requires:	QtGui >= 4.7
+Requires:	QtNetwork >= 4.7
+#Provides:	QtAssistant = %{version}-2
+Obsoletes:	QtAssistant < %{version}-2
+
+%description -n QtAssistant-compat
+Qt is a complete C++ application development framework, which includes
+a class library and tools for multiplatform development and
+internationalization. Using Qt, a single source code tree can build
+applications that run natively on different platforms (Windows,
+Unix/Linux, Mac OS X, embedded Linux).
+
+This package contains the files necessary to run applications using
+the deprecated QAssistantClient class, which is used together with the
+legacy Assistant Document Profile (.adp) version of Qt Assistant.
+
+This library is obsolete. It is provided to keep old source code
+working. It is strongly advised against using it in new code. New code
+should use the Qt Help Framework introduced in Qt 4.4 and/or the
+version of Qt Assistant based on it (also introduced in Qt 4.4)
+instead.
+
+%description -n QtAssistant-compat -l pl.UTF-8
+Qt oferuje kompletny system do tworzenia i rozwijania aplikacji w
+języku C++, w którego skład wchodzi biblioteka z klasami oraz
+wieloplatformowymi narzędziami do rozwijania i tłumaczenia aplikacji.
+Z pomocą Qt jeden kod źródłowy może być natywnie uruchamiany na
+różnych platformach (Windows, Unix/Linux, Mac OS X).
+
+Ten pakiet zawiera pliki potrzebne do uruchamiania aplikacji
+wykorzystujących przestarzałą klasę QAssistantClient, która jest
+używana wraz ze starą wersją programu Qt Assistant, opartą na plikach
+.adp (Assistant Document Profile).
+
+Ta biblioteka jest przestarzała. Jest dostarczana tylko w celu
+zachowania działania starego kodu, nie powinna być używana w nowym
+kodzie. Nowe programy powinny wykorzystywać szkielet Qt Help
+wprowadzony w Qt 4.4 oraz opartą na nim wersję programu Qt Assistant
+(także wprowadzoną w Qt 4.4).
+
+%package -n QtAssistant-compat-devel
+Summary:	Qt AssistantClient compatibility library - development files
+Summary(pl.UTF-8):	Biblioteka kompatybilności Qt AssistantClient - pliki programistyczne
+Group:		X11/Development/Libraries
+Requires:	QtCore-devel >= 4.7
+Requires:	QtGui-devel >= 4.7
+Requires:	QtNetwork-devel >= 4.7
+#Provides:	QtAssistant-devel = %{version}-2
+Obsoletes:	QtAssistant-devel < %{version}-2
+
+%description -n QtAssistant-compat-devel
+Qt AssistantClient compatibility library - development files.
+
+%description -n QtAssistant-compat-devel -l pl.UTF-8
+Biblioteka kompatybilności Qt AssistantClient - pliki programistyczne.
+
+%prep
+%setup -q -n qt-assistant-qassistantclient-library-compat-version-%{version}
+%patch0 -p1
+
+%build
+cd lib
+qmake-qt4 \
+	CONFIG+=create_prl \
+	QMAKE_CXX="%{__cxx}" \
+	QMAKE_CXXFLAGS_RELEASE="%{rpmcxxflags}" \
+	QMAKE_LFLAGS_RELEASE="%{rpmldflags}"
+%{__make}
+cd ..
+qmake-qt4
+%{__make}
+cd translations
+lrelease-qt4 *.ts
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/qt4/mkspecs/features,%{_includedir}/qt4/Qt}
+
+%{__make} -C lib install \
+	INSTALL_ROOT=$RPM_BUILD_ROOT
+
+%{__make} install \
+	INSTALL_ROOT=$RPM_BUILD_ROOT
+
+cp -p features/assistant.prf $RPM_BUILD_ROOT%{_datadir}/qt4/mkspecs/features
+cp -p %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/qt4/QtAssistant
+
+# kill builddir
+%{__sed} -i -e "s,$PWD/lib,%{_libdir}," $RPM_BUILD_ROOT%{_libdir}/lib*.prl
+
+ln -sf ../%{_lib}/qt4/bin/assistant_adp $RPM_BUILD_ROOT%{_bindir}/assistant_adp
+
+for file in translations/*.qm ; do
+	[ ! -f $file ] && continue
+	eval "`echo $file | sed -r 's:.*/([a-zA-Z]+(_[a-zA-Z]{3,})?)_(([a-z]{2}_[A-Z]{2})|([a-z]{2}))\.qm$:MOD=\1 ; lang=\3:'`"
+	MOD=qt4-$MOD
+	install	-d $RPM_BUILD_ROOT%{_localedir}/$lang/LC_MESSAGES
+	cp $file $RPM_BUILD_ROOT%{_localedir}/$lang/LC_MESSAGES/$MOD.qm
+done
+
+cd $RPM_BUILD_ROOT%{_includedir}/qt4/Qt
+ln -sf ../QtAssistant/* .
+cd -
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-n QtAssistant-compat -p /sbin/ldconfig
+%postun	-n QtAssistant-compat -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/assistant_adp
+%attr(755,root,root) %{_qtdir}/bin/assistant_adp
+%lang(de) %{_localedir}/de/LC_MESSAGES/qt4-assistant_adp.qm
+%lang(ja) %{_localedir}/ja/LC_MESSAGES/qt4-assistant_adp.qm
+%lang(pl) %{_localedir}/pl/LC_MESSAGES/qt4-assistant_adp.qm
+%lang(ru) %{_localedir}/ru/LC_MESSAGES/qt4-assistant_adp.qm
+%lang(zh_CN) %{_localedir}/zh_CN/LC_MESSAGES/qt4-assistant_adp.qm
+%lang(zh_TW) %{_localedir}/zh_TW/LC_MESSAGES/qt4-assistant_adp.qm
+
+%files -n QtAssistant-compat
+%defattr(644,root,root,755)
+%doc LGPL_EXCEPTION.txt
+%attr(755,root,root) %{_libdir}/libQtAssistantClient.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/libQtAssistantClient.so.4
+%{_includedir}/qt4/QtAssistant
+%{_includedir}/qt4/Qt/QAssistantClient
+%{_includedir}/qt4/Qt/QtAssistant
+%{_includedir}/qt4/Qt/qassistantclient.h
+%{_includedir}/qt4/Qt/qassistantclient_global.h
+
+%files -n QtAssistant-compat-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libQtAssistantClient.so
+%{_libdir}/libQtAssistantClient.prl
+%{_pkgconfigdir}/QtAssistantClient.pc
+%{_datadir}/qt4/mkspecs/features/assistant.prf
diff --git a/QAssistantClient b/QAssistantClient
new file mode 100644
index 0000000..a710549
--- /dev/null
+++ b/QAssistantClient
@@ -0,0 +1 @@
+#include "qassistantclient.h"
diff --git a/QtAssistant b/QtAssistant
new file mode 100644
index 0000000..8d37117
--- /dev/null
+++ b/QtAssistant
@@ -0,0 +1,5 @@
+#ifndef QT_QTASSISTANT_MODULE_H
+#define QT_QTASSISTANT_MODULE_H
+#include <QtNetwork/QtNetwork>
+#include "qassistantclient.h"
+#endif
diff --git a/qt4-assistant-compat-build-system.patch b/qt4-assistant-compat-build-system.patch
new file mode 100644
index 0000000..3266ced
--- /dev/null
+++ b/qt4-assistant-compat-build-system.patch
@@ -0,0 +1,48 @@
+Description: several workarounds for the build system which is completely broken
+Author: Fathi Boudra <fabo at debian.org>
+
+--- a/compat.pro
++++ b/compat.pro
+@@ -66,8 +66,6 @@ TRANSLATIONS = translations/assistant_ad
+     translations/assistant_adp_zh_CN.ts \
+     translations/assistant_adp_zh_TW.ts
+ 
+-unix:!contains(QT_CONFIG, zlib):LIBS += -lz
+-
+ contains(CONFIG, static): {
+     win32 {
+         exists($$[QT_INSTALL_PLUGINS]/imageformats/qjpeg.lib) {
+@@ -81,3 +79,7 @@ contains(CONFIG, static): {
+         }        
+     }
+ }
++
++target.path = $$[QT_INSTALL_BINS]
++INSTALLS += target
++
+--- a/lib/lib.pro
++++ b/lib/lib.pro
+@@ -16,8 +16,8 @@ HEADERS         = qassistantclient.h \
+                   qassistantclient_global.h
+ SOURCES         = qassistantclient.cpp
+ 
+-DESTDIR                = ../../../../lib
+-DLLDESTDIR             = ../../../../bin
++DESTDIR                = lib
++DLLDESTDIR             = bin
+ 
+ unix {
+         QMAKE_CFLAGS += $$QMAKE_CFLAGS_SHLIB
+@@ -62,7 +62,7 @@ win32 {
+ }
+ 
+ qt_install_headers {
+-    assistant_headers.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES
++    assistant_headers.files = qassistantclient.h qassistantclient_global.h
+     assistant_headers.path = $$[QT_INSTALL_HEADERS]/QtAssistant
+     INSTALLS        += assistant_headers
+ }
+--- /dev/null
++++ b/lib/QtAssistant/qassistantclient_global.h
+@@ -0,0 +1 @@
++#include "../qassistantclient_global.h"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/qt4-assistant-compat.git/commitdiff/aeb93799464c94fbeb71a50cfcc134fe60cb4ccc



More information about the pld-cvs-commit mailing list