From 73016380f11d2b20195395c5ae013b2bec632832 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 02 2019 22:34:00 +0000 Subject: import okular-4.10.5-7.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6f859d5 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/okular-4.10.5.tar.xz diff --git a/.okular.metadata b/.okular.metadata new file mode 100644 index 0000000..37235b6 --- /dev/null +++ b/.okular.metadata @@ -0,0 +1 @@ +8009cd23f844691c18001dbfe98a8e2f5a9f30b9 SOURCES/okular-4.10.5.tar.xz diff --git a/SOURCES/kdegraphics-4.5.1-okular_dt.patch b/SOURCES/kdegraphics-4.5.1-okular_dt.patch new file mode 100644 index 0000000..89985e5 --- /dev/null +++ b/SOURCES/kdegraphics-4.5.1-okular_dt.patch @@ -0,0 +1,10 @@ +diff -up kdegraphics-4.5.1/okular/shell/okular.desktop.dt kdegraphics-4.5.1/okular/shell/okular.desktop +--- kdegraphics-4.5.1/okular/shell/okular.desktop.dt 2010-07-23 16:14:57.000000000 -0500 ++++ kdegraphics-4.5.1/okular/shell/okular.desktop 2010-09-07 12:31:01.260797812 -0500 +@@ -117,5 +117,5 @@ Icon=okular + Type=Application + X-DocPath=okular/index.html + InitialPreference=7 +-Categories=Qt;KDE;Graphics;Office;Viewer; ++Categories=Qt;KDE;Graphics;VectorGraphics;Viewer; + MimeType=application/vnd.kde.okular-archive; diff --git a/SOURCES/kdegraphics-4.5.80-OkularConfig-dont-hardcode-paths.patch b/SOURCES/kdegraphics-4.5.80-OkularConfig-dont-hardcode-paths.patch new file mode 100644 index 0000000..9b8b18b --- /dev/null +++ b/SOURCES/kdegraphics-4.5.80-OkularConfig-dont-hardcode-paths.patch @@ -0,0 +1,30 @@ +diff -ur kdegraphics-4.5.80/okular/OkularConfig.cmake kdegraphics-4.5.80-OkularConfig-dont-hardcode-paths/okular/OkularConfig.cmake +--- kdegraphics-4.5.80/okular/OkularConfig.cmake 2010-10-05 13:38:39.000000000 +0200 ++++ kdegraphics-4.5.80-OkularConfig-dont-hardcode-paths/okular/OkularConfig.cmake 2010-11-22 22:12:53.000000000 +0100 +@@ -1,18 +1,13 @@ +-# get from the full path to OkularConfig.cmake up to the base dir dir: +-get_filename_component( _okularBaseDir ${CMAKE_CURRENT_LIST_FILE} PATH) +-get_filename_component( _okularBaseDir ${_okularBaseDir} PATH) +-get_filename_component( _okularBaseDir ${_okularBaseDir} PATH) +-get_filename_component( _okularBaseDir ${_okularBaseDir} PATH) +- +- + # find the full paths to the library and the includes: + find_path(OKULAR_INCLUDE_DIR okular/core/document.h +- HINTS ${_okularBaseDir}/include +- NO_DEFAULT_PATH) +- +-find_library(OKULAR_CORE_LIBRARY okularcore +- HINTS ${_okularBaseDir}/lib +- NO_DEFAULT_PATH) ++ PATHS ++ ${INCLUDE_INSTALL_DIR} ++ ${KDE4_INCLUDE_DIR}) ++ ++find_library(OKULAR_CORE_LIBRARY okularcore ++ PATHS ++ ${LIB_INSTALL_DIR} ++ ${KDE4_LIB_DIR}) + + set(OKULAR_LIBRARIES ${OKULAR_CORE_LIBRARY}) + diff --git a/SOURCES/okular-4.10-cmake.patch b/SOURCES/okular-4.10-cmake.patch new file mode 100644 index 0000000..5b24ef2 --- /dev/null +++ b/SOURCES/okular-4.10-cmake.patch @@ -0,0 +1,12 @@ +diff -up okular-4.10.2/active/CMakeLists.txt.me okular-4.10.2/active/CMakeLists.txt +--- okular-4.10.2/active/CMakeLists.txt.me 2013-04-09 17:34:36.086464571 +0200 ++++ okular-4.10.2/active/CMakeLists.txt 2013-04-09 17:35:02.737461052 +0200 +@@ -4,7 +4,5 @@ macro_log_feature(ACTIVEAPP_FOUND "Activ + + if (ACTIVEAPP_FOUND) + add_subdirectory( app ) ++ add_subdirectory( components ) + endif (ACTIVEAPP_FOUND) +- +-add_subdirectory( components ) +- diff --git a/SOURCES/okular-add-information-about-substituting-font.patch b/SOURCES/okular-add-information-about-substituting-font.patch new file mode 100644 index 0000000..f5c5e80 --- /dev/null +++ b/SOURCES/okular-add-information-about-substituting-font.patch @@ -0,0 +1,88 @@ +diff --git a/core/fontinfo.cpp b/core/fontinfo.cpp +index 59ea79f..a102632 100644 +--- a/core/fontinfo.cpp ++++ b/core/fontinfo.cpp +@@ -27,6 +27,7 @@ class Okular::FontInfoPrivate + bool operator==( const FontInfoPrivate &rhs ) const + { + return name == rhs.name && ++ substituteName == rhs.substituteName && + type == rhs.type && + embedType == rhs.embedType && + file == rhs.file && +@@ -35,6 +36,7 @@ class Okular::FontInfoPrivate + } + + QString name; ++ QString substituteName; + FontInfo::FontType type; + FontInfo::EmbedType embedType; + bool canBeExtracted; +@@ -67,6 +69,16 @@ void FontInfo::setName( const QString& name ) + d->name = name; + } + ++QString FontInfo::substituteName() const ++{ ++ return d->substituteName; ++} ++ ++void FontInfo::setSubstituteName( const QString& substituteName ) ++{ ++ d->substituteName = substituteName; ++} ++ + FontInfo::FontType FontInfo::type() const + { + return d->type; +diff --git a/core/fontinfo.h b/core/fontinfo.h +index d11b3b0..a7f5e78 100644 +--- a/core/fontinfo.h ++++ b/core/fontinfo.h +@@ -84,6 +84,16 @@ class OKULAR_EXPORT FontInfo + */ + void setName( const QString& name ); + ++ /** ++ * Returns the substitute name for the font. ++ */ ++ QString substituteName() const; ++ ++ /** ++ * Sets a new substitute name for the font. ++ */ ++ void setSubstituteName (const QString& substituteName ); ++ + /** + * Returns the type of the font. + */ +diff --git a/generators/poppler/generator_pdf.cpp b/generators/poppler/generator_pdf.cpp +index 7d27f6e..71dec86 100644 +--- a/generators/poppler/generator_pdf.cpp ++++ b/generators/poppler/generator_pdf.cpp +@@ -827,6 +827,7 @@ Okular::FontInfo::List PDFGenerator::fontsForPage( int page ) + { + Okular::FontInfo of; + of.setName( font.name() ); ++ of.setSubstituteName( font.substituteName() ); + of.setType( convertPopplerFontInfoTypeToOkularFontInfoType( font.type() ) ); + of.setEmbedType( embedTypeForPopplerFontInfo( font) ); + of.setFile( font.file() ); +diff --git a/ui/propertiesdialog.cpp b/ui/propertiesdialog.cpp +index dd7bb5c..ad61859 100644 +--- a/ui/propertiesdialog.cpp ++++ b/ui/propertiesdialog.cpp +@@ -368,7 +368,12 @@ QVariant FontsListModel::data( const QModelIndex &index, int role ) const + return descriptionForFontType( m_fonts.at( index.row() ).type() ); + break; + case 2: +- return pathOrDescription( m_fonts.at( index.row() ) ); ++ QString pathOrDesc = pathOrDescription( m_fonts.at( index.row() ) ); ++ QString substituteName = m_fonts.at( index.row() ).substituteName(); ++ if (m_fonts.at( index.row() ).embedType() == Okular::FontInfo::NotEmbedded && !substituteName.isEmpty()) { ++ return QString("%1 (substituting with %2)").arg(pathOrDesc).arg(substituteName); ++ } ++ return pathOrDesc; + break; + } + break; diff --git a/SOURCES/okular-gcc-overflow.patch b/SOURCES/okular-gcc-overflow.patch new file mode 100644 index 0000000..c337f1f --- /dev/null +++ b/SOURCES/okular-gcc-overflow.patch @@ -0,0 +1,12 @@ +diff -up okular-4.9.5/generators/dvi/special.cpp.me okular-4.9.5/generators/dvi/special.cpp +--- okular-4.9.5/generators/dvi/special.cpp.me 2013-01-30 17:57:45.269341954 +0100 ++++ okular-4.9.5/generators/dvi/special.cpp 2013-01-31 13:23:54.897936518 +0100 +@@ -480,7 +480,7 @@ void dviRenderer::TPIC_addPath_special(c + if (TPIC_path.size() == 0) + number_of_elements_in_path = 0; + if (TPIC_path.size() == number_of_elements_in_path) +- TPIC_path.resize(number_of_elements_in_path+100); ++ TPIC_path.resize(number_of_elements_in_path+100U); + TPIC_path.setPoint(number_of_elements_in_path++, x, y); + } + diff --git a/SPECS/okular.spec b/SPECS/okular.spec new file mode 100644 index 0000000..19a780a --- /dev/null +++ b/SPECS/okular.spec @@ -0,0 +1,355 @@ +Name: okular +Summary: A document viewer +Version: 4.10.5 +Release: 7%{?dist} + +License: GPLv2 +URL: https://projects.kde.org/projects/kde/kdegraphics/okular +%global revision %(echo %{version} | cut -d. -f3) +%if %{revision} >= 50 +%global stable unstable +%else +%global stable stable +%endif +Source0: http://download.kde.org/%{stable}/%{version}/src/%{name}-%{version}.tar.xz + +## upstreamable patches +# okular.desktop : Categories=-Office,+VectorGraphics (http://bugzilla.redhat.com/591089) +Patch50: kdegraphics-4.5.1-okular_dt.patch + +# don't hardcode paths in OkularConfig.cmake +Patch51: kdegraphics-4.5.80-OkularConfig-dont-hardcode-paths.patch + +# get rif of gcc overflow warning +Patch52: okular-gcc-overflow.patch + +# don't build component if ACTIVEAPP_FOUND FALSE +Patch53: okular-4.10-cmake.patch + +Patch54: okular-add-information-about-substituting-font.patch + +%if 0%{?fedora} +BuildRequires: chmlib-devel +BuildRequires: ebook-tools-devel +BuildRequires: plasma-mobile-devel +BuildRequires: pkgconfig(ddjvuapi) +%endif +BuildRequires: desktop-file-utils +BuildRequires: kdelibs4-devel >= %{version} +BuildRequires: libkipi-devel >= %{version} +BuildRequires: libjpeg-devel +BuildRequires: libtiff-devel +BuildRequires: pkgconfig(libspectre) +BuildRequires: pkgconfig(poppler-qt4) +BuildRequires: pkgconfig(qca2) +BuildRequires: pkgconfig(qimageblitz) + +# kio_msits migrates from kdegraphics, which had Epoch: 7 +%define kio_msits_epoch 7 +Requires: %{name}-part%{?_isa} = %{version}-%{release} +%if 0%{?fedora} +Requires: kio_msits = %{kio_msits_epoch}:%{version}-%{release} +%endif +Requires: kde-runtime >= 4.10.5 + +%description +%{summary}. + +%package active +Summary: Document viewer for plasma active +# todo: test/confirm this dep is sufficient (or too much) -- rex +Requires: %{name}-part%{?_isa} = %{version}-%{release} +%description active +%{summary}. + +%package devel +Summary: Development files for %{name} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: kdelibs4-devel +%description devel +%{summary}. + +%package libs +Summary: Runtime files for %{name} +# when split occurred +Conflicts: kdegraphics < 7:4.6.95-10 +%description libs +%{summary}. + +%package part +Summary: Okular kpart plugin +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +%description part +%{summary}. + +%package -n kio_msits +Epoch: %{kio_msits_epoch} +Summary: A kioslave for displaying WinHelp files +%description -n kio_msits +%{summary}. + + + +%prep +%setup -q + +%patch50 -p2 -b .okular_dt +%patch51 -p2 -b .OkularConfig +%patch52 -p1 -b .overflow +%patch53 -p1 -b .cmake +%patch54 -p1 -b .add-information-about-substituting-font + +%build +mkdir -p %{_target_platform} +pushd %{_target_platform} +%{cmake_kde4} .. +popd + +make %{?_smp_mflags} -C %{_target_platform} + + +%install +rm -rf %{buildroot} + +make install/fast DESTDIR=%{buildroot} -C %{_target_platform} + +%find_lang %{name} --with-kde --without-mo + + +%check +desktop-file-validate %{buildroot}%{_kde4_datadir}/applications/kde4/%{name}.desktop + + +%post +touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null || : + +%posttrans +gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null || : +update-desktop-database -q &> /dev/null ||: + +%postun +if [ $1 -eq 0 ] ; then +touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null || : +gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null || : +update-desktop-database -q &> /dev/null ||: +fi + +%files -f %{name}.lang +%doc COPYING +%{_kde4_bindir}/okular* +%{_kde4_datadir}/applications/kde4/okular.desktop +%{_kde4_datadir}/applications/kde4/okularApplication_*.desktop +%{_kde4_iconsdir}/hicolor/*/*/* +%{_mandir}/man1/okular.1* + +%if 0%{?fedora} +%files active +%{_kde4_appsdir}/plasma/packages/org.kde.active.documentviewer/ +%{_kde4_bindir}/active-documentviewer +%{_kde4_datadir}/applications/kde4/active-documentviewer.desktop +# not sure if this is best put here or not -- rex +%{_kde4_libdir}/kde4/imports/org/kde/okular/ +%endif + +%files devel +%{_kde4_includedir}/okular/ +%{_kde4_libdir}/libokularcore.so +%{_kde4_libdir}/cmake/Okular/ + +%post libs -p /sbin/ldconfig +%postun libs -p /sbin/ldconfig + +%files libs +%{_kde4_appsdir}/kconf_update/okular.upd +%{_kde4_libdir}/libokularcore.so.2* + +%files part +%{_kde4_appsdir}/okular/ +%{_kde4_datadir}/config.kcfg/*.kcfg +%{_kde4_datadir}/kde4/services/libokularGenerator*.desktop +%{_kde4_datadir}/kde4/services/okular[A-Z]*.desktop +%{_kde4_datadir}/kde4/services/okular_part.desktop +%{_kde4_datadir}/kde4/servicetypes/okularGenerator.desktop +%{_kde4_libdir}/kde4/okularGenerator*.so +%{_kde4_libdir}/kde4/okularpart.so +%if 0%{?fedora} +%files -n kio_msits +%{_kde4_libdir}/kde4/kio_msits.so +%{_kde4_datadir}/kde4/services/msits.protocol +%endif + + +%changelog +* Tue May 07 2019 Jan Grulich - 4.10.5-7 +- Fix patch adding information about substituting font + Resolves: bz#1458037 + +* Fri Feb 01 2019 Jan Grulich - 4.10.5-6 +- Fix broken dependency on kde-runtime + Resolves: bz#1670723 + +* Thu Jan 17 2019 Jan Grulich - 4.10.5-5 +- Add information about substituting font + Resolves: bz#1458037 + +* Fri Jan 24 2014 Daniel Mach - 4.10.5-4 +- Mass rebuild 2014-01-24 + +* Fri Dec 27 2013 Daniel Mach - 4.10.5-3 +- Mass rebuild 2013-12-27 + +* Tue Sep 10 2013 Than Ngo - 4.10.5-2 +- don't build djvulibre in rhel + +* Sun Jun 30 2013 Than Ngo - 4.10.5-1 +- 4.10.5 + +* Sat Jun 01 2013 Rex Dieter - 4.10.4-1 +- 4.10.4 + +* Mon May 06 2013 Than Ngo - 4.10.3-1 +- 4.10.3 + +* Tue Apr 09 2013 Than Ngo - 4.10.2-3 +- don't build component if ACTIVEAPP_FOUND FALSE + +* Fri Apr 05 2013 Than Ngo - 4.10.2-2 +- BR on plasma-mobile-devel only in fedora + +* Sun Mar 31 2013 Rex Dieter - 4.10.2-1 +- 4.10.2 + +* Sun Mar 03 2013 Rex Dieter - 4.10.1-1 +- 4.10.1 + +* Thu Jan 31 2013 Than Ngo - 4.10.0-1 +- 4.10.0 +- get rid of gcc overflow warning + +* Tue Jan 22 2013 Rex Dieter 4.9.98-2 +- filename encoding fix (#747976, kde#313700) + +* Sun Jan 20 2013 Rex Dieter - 4.9.98-1 +- 4.9.98 + +* Fri Jan 04 2013 Rex Dieter - 4.9.97-1 +- 4.9.97 + +* Thu Dec 20 2012 Rex Dieter - 4.9.95-1 +- 4.9.95 + +* Tue Dec 04 2012 Rex Dieter - 4.9.90-1 +- 4.9.90 + +* Mon Dec 03 2012 Than Ngo - 4.9.4-1 +- 4.9.4 + +* Sat Nov 03 2012 Rex Dieter - 4.9.3-1 +- 4.9.3 + +* Wed Oct 24 2012 Rex Dieter 4.9.2-2 +- rebuild (libjpeg-turbo v8) + +* Fri Sep 28 2012 Rex Dieter - 4.9.2-1 +- 4.9.2 + +* Mon Sep 03 2012 Than Ngo - 7 :4.9.1-1 +- 4.9.1 + +* Sat Aug 18 2012 Rex Dieter 4.9.0-3 +- followup fix for KXMLGUIClient (hang on close) + +* Sun Aug 12 2012 Rex Dieter 4.9.0-2 +- KXMLGUIClient memory corruption warning (kde#261538) + +* Thu Jul 26 2012 Lukas Tinkl - 4.9.0-1 +- 4.9.0 + +* Fri Jul 20 2012 Fedora Release Engineering - 4.8.97-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Wed Jul 11 2012 Rex Dieter - 4.8.97-1 +- 4.8.97 + +* Wed Jun 27 2012 Rex Dieter - 4.8.95-1 +- 4.8.95 + +* Sat Jun 09 2012 Rex Dieter - 4.8.90-1 +- 4.8.90 + +* Sat May 26 2012 Jaroslav Reznik - 4.8.80-1 +- 4.8.80 + +* Wed May 16 2012 Marek Kasik - 4.8.3-4 +- Rebuild (poppler-0.20.0) + +* Wed May 09 2012 Than Ngo - 4.8.3-3 +- add fedora/rhel condition + +* Tue May 08 2012 Rex Dieter 4.8.3-2 +- rebuild (libtiff) + +* Mon Apr 30 2012 Jaroslav Reznik - 4.8.3-1 +- 4.8.3 + +* Fri Mar 30 2012 Rex Dieter - 4.8.2-1 +- 4.8.2 + +* Wed Mar 07 2012 Rex Dieter 4.8.1-2 +- s/kdebase-runtime/kde-runtime/ + +* Mon Mar 05 2012 Jaroslav Reznik - 4.8.1-1 +- 4.8.1 + +* Sun Jan 22 2012 Rex Dieter - 4.8.0-1 +- 4.8.0 + +* Wed Jan 04 2012 Radek Novacek - 4.7.97-1 +- 4.7.97 + +* Wed Dec 21 2011 Radek Novacek - 4.7.95-1 +- 4.7.95 + +* Sun Dec 04 2011 Rex Dieter - 4.7.90-1 +- 4.7.90 + +* Fri Nov 25 2011 Jaroslav Reznik 4.7.80-1 +- 4.7.80 (beta 1) + +* Tue Nov 15 2011 Rex Dieter 4.7.3-2 +- okular-part subpkg +- BR: libjpeg-devel + +* Sat Oct 29 2011 Rex Dieter 4.7.3-1 +- 4.7.3 +- more pkgconfig-style deps + +* Wed Oct 05 2011 Rex Dieter 4.7.2-1 +- 4.7.2 + +* Tue Sep 06 2011 Than Ngo - 4.7.1-1 +- 4.7.1 + +* Tue Jul 26 2011 Jaroslav Reznik 4.7.0-1 +- 4.7.0 + +* Mon Jul 18 2011 Rex Dieter 4.6.95-4 +- %%postun: +update-desktop-database + +* Mon Jul 18 2011 Rex Dieter 4.6.95-3 +- BR: pkgconfig(qca2) + +* Fri Jul 15 2011 Rex Dieter 4.6.95-2 +- bump release + +* Mon Jul 11 2011 Rex Dieter 4.6.95-1 +- 4.6.95 +- fix URL + +* Wed Jul 06 2011 Rex Dieter 4.6.90-3 +- fix Source URL +- Conflicts: kdegraphics < 7:4.6.90-10 + +* Tue Jul 05 2011 Rex Dieter 4.6.90-2 +- first try +