# Contributor: Bart Ribbers # Maintainer: Bart Ribbers pkgname=okular pkgver=19.12.3 pkgrel=0 arch="all !armhf" # armhf blocked by kirigami2 -> qt5-qtdeclarative url="https://kde.org/applications/office/org.kde.okular" pkgdesc="A universal document viewer" license="GPL-2.0-or-later AND LGPL-2.0-or-later" makedepends="extra-cmake-modules qt5-qtbase-dev qt5-qtspeech-dev karchive-dev kbookmarks-dev kcompletion-dev kconfig-dev kconfigwidgets-dev kcoreaddons-dev kcrash-dev kiconthemes-dev kio-dev kparts-dev threadweaver-dev kwindowsystem-dev kdoctools-dev kjs-dev kwallet-dev kactivities-dev phonon-dev purpose-dev zlib-dev poppler-qt5-dev kirigami2-dev qca-dev kpty-dev" checkdepends="xvfb-run" source="https://download.kde.org/stable/release-service/$pkgver/src/okular-$pkgver.tar.xz CVE-2020-9359.patch " subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-mobile" # secfixes: # 19.12.3-r0: # - CVE-2020-9359 build() { cmake -B build \ -DCMAKE_BUILD_TYPE=None \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DBUILD_OKULARKIRIGAMI=ON \ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ -DCMAKE_C_FLAGS="$CFLAGS -D_GNU_SOURCE" make -C build } check() { cd build # All other tests are broken, require OpenGL, etc CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest -R "^shelltest" } package() { DESTDIR="$pkgdir" make -C build install } mobile() { depends="kirigami2" mkdir -p "$subpkgdir"/usr/bin mkdir -p "$subpkgdir"/usr/lib/qt5 mkdir -p "$subpkgdir"/usr/share/applications mv "$pkgdir"/usr/bin/okularkirigami "$subpkgdir"/usr/bin/ mv "$pkgdir"/usr/lib/qt5/qml "$subpkgdir"/usr/lib/qt5/ mv "$pkgdir"/usr/share/applications/org.kde.okular.kirigami.desktop "$subpkgdir"/usr/share/applications/ mv "$pkgdir"/usr/share/applications/org.kde.mobile.okular_plucker.desktop "$subpkgdir"/usr/share/applications/ } sha512sums="ccc3c357fefe04691bba7bc803321789c3a1fdad4cfc610e9c425b2373efd94340fa2ceb2e357569ad14f1c0c69ef0db8079d9bc082a6d5708ccbfb3b65d8b3d okular-19.12.3.tar.xz 2d8870f1aa63defcf2ecfd42c0dfb0d474af6885c2448566704795d7caa2e9c20e5ede284db58139ea5736d5d0074d23c023a89f359d09fd6051d1f03f561903 CVE-2020-9359.patch"