From b0765dd9323ff9bc92418599d326d337444d07f2 Mon Sep 17 00:00:00 2001
From: bra1nwave <brainwave@openmailbox.org>
Date: Mon, 3 Jun 2019 11:39:11 +0200
Subject: [PATCH] calibre: update to 3.44.0.

---
 srcpkgs/calibre/files/calibre-viewer.desktop | 13 -------------
 srcpkgs/calibre/files/calibre.desktop        | 13 -------------
 srcpkgs/calibre/template                     | 17 ++++++++---------
 3 files changed, 8 insertions(+), 35 deletions(-)
 delete mode 100644 srcpkgs/calibre/files/calibre-viewer.desktop
 delete mode 100644 srcpkgs/calibre/files/calibre.desktop

diff --git a/srcpkgs/calibre/files/calibre-viewer.desktop b/srcpkgs/calibre/files/calibre-viewer.desktop
deleted file mode 100644
index 41f7dd58a5d..00000000000
--- a/srcpkgs/calibre/files/calibre-viewer.desktop
+++ /dev/null
@@ -1,13 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Type=Application
-Name=Calibre-viewer
-GenericName=E-book viewer
-Comment=E-book viewer
-TryExec=ebook-viewer
-Exec=ebook-viewer
-Icon=/usr/share/calibre/images/viewer.png
-Terminal=false
-StartupNotify=false
-Categories=Application;Office;Viewer
-MimeType=application/x-sony-bbeb;application/epub+zip;text/lrs;application/x-mobipocket-ebook;application/x-topaz-ebook;application/x-kindle-application;application/x-mobipocket-subscription;application/x-mobipocket-subscription-magazine;application/x-mobi8-ebook
diff --git a/srcpkgs/calibre/files/calibre.desktop b/srcpkgs/calibre/files/calibre.desktop
deleted file mode 100644
index 7d6d91a2421..00000000000
--- a/srcpkgs/calibre/files/calibre.desktop
+++ /dev/null
@@ -1,13 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Type=Application
-Name=Calibre
-Comment=E-book library management
-Comment[de]=E-Book Bibliotheksverwaltung
-TryExec=calibre
-Exec=calibre
-Icon=/usr/share/calibre/images/library.png
-Terminal=false
-StartupNotify=false
-Categories=Application;Office;Viewer
-MimeType=application/x-sony-bbeb;application/epub+zip;text/lrs;application/x-mobipocket-ebook;application/x-topaz-ebook;application/x-kindle-application;application/x-mobipocket-subscription;application/x-mobipocket-subscription-magazine;application/x-mobi8-ebook
diff --git a/srcpkgs/calibre/template b/srcpkgs/calibre/template
index 295e5b01b68..d9adac86c10 100644
--- a/srcpkgs/calibre/template
+++ b/srcpkgs/calibre/template
@@ -1,14 +1,17 @@
 # Template file for 'calibre'
 pkgname=calibre
-version=3.42.0
+version=3.44.0
 revision=1
 build_style=python2-module
 pycompile_dirs="/usr/lib/calibre/"
 make_build_args="gui"
-hostmakedepends="pkg-config python-dateutil python-devel python-msgpack qt5-qmake"
+hostmakedepends="pkg-config python-BeautifulSoup4 python-Pillow python-PyQt5-svg
+ python-PyQt5-webkit python-apsw python-css-parser python-dateutil
+ python-devel python-html5-parser python-msgpack python-regex qt5-qmake
+ xdg-utils"
 makedepends="glib-devel libchmlib-devel libinput-devel libmagick-devel libmtp-devel
  libpodofo-devel libwmf-devel libxkbcommon-devel python-PyQt5-devel
- python-lxml qt5-devel sqlite-devel tslib-devel"
+ qt5-devel sqlite-devel tslib-devel"
 depends="desktop-file-utils optipng poppler-utils python-BeautifulSoup4
  python-CherryPy python-Markdown python-Pillow python-PyQt5-svg
  python-PyQt5-webkit python-Pygments python-apsw python-css-parser
@@ -20,7 +23,7 @@ maintainer="bra1nwave <brainwave@openmailbox.org>"
 license="GPL-3.0-only"
 homepage="https://calibre-ebook.com"
 distfiles="https://download.calibre-ebook.com/${version}/calibre-${version}.tar.xz"
-checksum=b51194aecd452e6cea9681889cd1b2f868d379b07413b1dcb8842c363487ad7a
+checksum=f15354b013cbf4090e1eeefdc150402dac589f51395f9c82424d2e8cec62a38d
 nocross=yes
 
 do_configure() {
@@ -30,17 +33,13 @@ do_configure() {
 		src/chardet
 
 	# Desktop integration (e.g. enforce arch defaults)
-	sed -e "/self.create_uninstaller()/,/os.rmdir(config_dir)/d" \
-		-e "/cc(\['xdg-desktop-menu', 'forceupdate'\])/d" \
-		-e "/cc(\['xdg-mime', 'install', MIME\])/d" \
+	sed -e "/import config_dir/,/os.rmdir(config_dir)/d" \
 		-e "s/'ctc-posml'/'text' not in mt and 'pdf' not in mt and 'xhtml'/" \
 		-e "s/^Name=calibre/Name=Calibre/g" \
 		-i  src/calibre/linux.py
 }
 
 do_install() {
-	vinstall ${FILESDIR}/calibre.desktop 644 usr/share/applications
-	vinstall ${FILESDIR}/calibre-viewer.desktop 644 usr/share/applications
 	python2 setup.py \
 		install --prefix=/usr --staging-root=${DESTDIR}/usr
 }
