Browse Source

Add Microsoft Office OOXML thumbnailer (Plasma 5 version)

master
Fincer 7 years ago
parent
commit
081018bdd0
3 changed files with 99 additions and 0 deletions
  1. +17
    -0
      Readme.md
  2. +40
    -0
      kde-thumbnailer-ooxml-kf5/PKGBUILD
  3. +42
    -0
      kde-thumbnailer-ooxml-kf5/port-to-qt5.patch

+ 17
- 0
Readme.md View File

@ -123,6 +123,23 @@ Plasma 5 Dolphin service menu script for hacking and breaking PDF password prote
FORMAT: Arch Linux PKGBUILD script.
**kde-thumbnailer-ooxml-kf5**
--------------
Plasma 5 thumbnailer for Microsoft Office Open XML Documents.
According to the developer:
*This plugin should support all ooxml documents with thumbnails saved, including docx pptx ppsx xlsx files. However, most docx and xlsx documents do not have thumbnail image saved along with document body, you may not see the previews.*
*It only depends on qt and kde library. It is shipped with internal libkowmf copy for rendering wmf graphics from calligra suite. You do not need any office suite installed to make this plugin work.*
Homepage:
[KDE Office Open XML Document Thumbnailer](https://www.linux-apps.com/content/show.php?content=149048)
FORMAT: Arch Linux PKGBUILD script + a patch file.
**kdegraphics-dreamdesktop**
--------------


+ 40
- 0
kde-thumbnailer-ooxml-kf5/PKGBUILD View File

@ -0,0 +1,40 @@
_pkgname=kde-thumbnailer-ooxml
pkgname=${_pkgname}-kf5
pkgver=1.1
pkgrel=1
pkgdesc="Microsoft Office Open XML document thumbnailer for KDE"
url="http://kde-apps.org/content/show.php?content=149048"
arch=('i686' 'x86_64')
license=('GPL' 'LGPL' 'FDL')
groups=('kde' 'kdegraphics')
depends=('kdelibs4support' 'zlib')
makedepends=('cmake' 'extra-cmake-modules' 'kdoctools' 'qt5-tools' 'kdesignerplugin')
source=("https://dl.opendesktop.org/api/files/download/id/1460971619/149048-kde-thumbnailer-ooxml-1.1.tar.bz2"
port-to-qt5.patch)
sha1sums=('445acee9c3f78077a70944cba2253432849d6d8e'
'3ac44a6954ca77aa238af845e846566c9ba761b3')
prepare() {
cd "${srcdir}"/${_pkgname}
rm -rf build
mkdir -p build
patch -Np1 -i $srcdir/port-to-qt5.patch
}
build() {
mkdir build
cd build
cd "${srcdir}"/${_pkgname}
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLIB_INSTALL_DIR=lib \
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
-DSYSCONF_INSTALL_DIR=/etc \
-DBUILD_TESTING=OFF
make
}
package() {
cd "${srcdir}"/${_pkgname}
make DESTDIR="${pkgdir}" install
}

+ 42
- 0
kde-thumbnailer-ooxml-kf5/port-to-qt5.patch View File

@ -0,0 +1,42 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,11 +1,21 @@
project(kde-thumbnailer-ooxml)
-cmake_minimum_required(VERSION 2.6)
+cmake_minimum_required(VERSION 2.8.12)
-find_package(KDE4 REQUIRED)
-include(KDE4Defaults)
+set(SHARED_MIME_INFO_MINIMUM_VERSION "0.30")
-add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
-include_directories(${QT_INCLUDES} ${KDE4_INCLUDES})
+find_package(ECM REQUIRED NO_MODULE)
+set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
+
+include(KDEInstallDirs)
+include(KDECompilerSettings)
+include(KDECMakeSettings)
+include(FeatureSummary)
+
+find_package(Qt5 REQUIRED COMPONENTS Widgets)
+find_package(KF5 REQUIRED COMPONENTS KDELibs4Support KIO Archive)
+
+add_definitions(${QT_DEFINITIONS})
+include_directories(${QT_INCLUDES})
set(libkowmf_SRCS
libkowmf/WmfAbstractBackend.cpp
@@ -17,9 +27,9 @@
set(ooxmlthumbnail_SRCS ooxmlcreator.cpp ${libkowmf_SRCS})
-kde4_add_plugin(ooxmlthumbnail ${ooxmlthumbnail_SRCS})
-target_link_libraries(ooxmlthumbnail
- ${KDE4_KIO_LIBS}
+add_library(ooxmlthumbnail MODULE ${libkowmf_SRCS})
+target_link_libraries(ooxmlthumbnail PRIVATE
+ KF5::KDELibs4Support KF5::KIOCore KF5::Archive
${QT_QTXML_LIBRARY}
)

Loading…
Cancel
Save