Commit 9684214b authored by Bart Ribbers's avatar Bart Ribbers Committed by Leo
Browse files

testing/okular: new aport

parent bc63ffb9
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=okular
pkgver=19.04.2
pkgrel=0
arch="all"
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/applications/$pkgver/src/$pkgname-$pkgver.tar.xz
musl-fixes.patch
enable-kirigami-desktop-file.patch"
subpackages="$pkgname-doc $pkgname-lang $pkgname-mobile"
build() {
cmake \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_OKULARKIRIGAMI=ON
make
}
check() {
# All other tests are broken, require OpenGL, etc
CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest -R "^shelltest"
}
package() {
DESTDIR="$pkgdir" make install
}
mobile() {
depends="kirigami2"
mkdir -p "$subpkgdir"/usr/bin
mkdir -p "$subpkgdir"/usr/share/applications
mv "$pkgdir"/usr/bin/okularkirigami "$subpkgdir"/usr/bin/
mv "$pkgdir"/usr/share/applications/org.kde.okular.kirigami.desktop "$subpkgdir"/usr/share/applications/
}
sha512sums="1bf79a5d72bdfbcf7caa4104b56cc1e5f5b72e0390521d2cac9a86ae8d66d495632a8af203bffb987fc6d40da41af0c54a8ebce3023b486dbc3eebbd35a866f7 okular-19.04.2.tar.xz
41245d4e13603d82047ef8222f212d7f0ac72de4415a8c6409e537249da52a5669e1f3d64b99db376fe384b36abfa6362ccf5686a4f0558837b7b5a8f61530b9 musl-fixes.patch
63d8f3ea3515e70cc015f2deaaee9d61313177656ee56a9a5a3d3a71823fbdabd0da9a3b57c02ba8d1e8d71d2886fdf628bdb70650d14589e8de8f38c19f439f enable-kirigami-desktop-file.patch"
diff --git a/mobile/app/package/metadata.desktop b/mobile/app/package/metadata.desktop
index 55b6547..639cad8 100644
--- a/mobile/app/package/metadata.desktop
+++ b/mobile/app/package/metadata.desktop
@@ -112,7 +112,7 @@ GenericName[zh_TW]=文件檢視器
Type=Application
Exec=okularkirigami
Icon=okular
-NoDisplay=true
+NoDisplay=false
X-KDE-ParentApp=
X-KDE-PluginInfo-Author=Marco Martin
X-KDE-PluginInfo-Email=mart@kde.org
diff --git a/core/synctex/synctex_parser.c b/core/synctex/synctex_parser.c
index 4c1923b9a..de6c92d24 100644
--- a/core/synctex/synctex_parser.c
+++ b/core/synctex/synctex_parser.c
@@ -8199,7 +8199,7 @@ static int _synctex_updater_print_gz(synctex_updater_p updater, const char * for
char * buffer;
va_list va;
va_start(va, format);
- if (vasprintf(&buffer, format, va) < 0) {
+ if (vsprintf(&buffer, format, va) < 0) {
_synctex_error("Out of memory...");
} else if ((result = (int)strlen(buffer))) {
result = gzwrite(updater->file.as_gzFile, buffer, (unsigned)result);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment