From a97e34e0ff260a027b5cd04ece07d50d1a2faf81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Fri, 24 Feb 2023 09:37:41 +0700 Subject: [PATCH 1/2] mathjax: update to 3.2.2. --- srcpkgs/mathjax/template | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/srcpkgs/mathjax/template b/srcpkgs/mathjax/template index b45842d9b956..50df1084fa88 100644 --- a/srcpkgs/mathjax/template +++ b/srcpkgs/mathjax/template @@ -1,6 +1,6 @@ # Template file for 'mathjax' pkgname=mathjax -version=2.7.9 +version=3.2.2 revision=1 depends="font-util" short_desc="JavaScript display engine for LaTeX, MathML and AsciiMath" @@ -8,15 +8,9 @@ maintainer="Orphaned " license="Apache-2.0" homepage="https://www.mathjax.org/" distfiles="https://github.com/mathjax/MathJax/archive/${version}.tar.gz" -checksum=c9167279c87da044f2ff910ad573a02ce90354cb59440ae568eb86e1630f65df -font_dirs="/usr/share/fonts/mathjax" +checksum=4206b9645a97f431018d0b6c4021c98607d49ba4dc129f4f2ecce675e2fcba11 do_install() { vmkdir usr/share/mathjax - vmkdir usr/share/fonts/mathjax - vcopy "MathJax.js config extensions fonts jax localization" usr/share/mathjax - for d in Asana-Math Gyre-{Pagella,Termes} Latin-Modern Neo-Euler STIX-Web TeX; do - ln -sfr ${DESTDIR}/usr/share/mathjax/fonts/HTML-CSS/${d}/otf/*.otf \ - ${DESTDIR}/usr/share/fonts/mathjax - done + vcopy "es5/*" usr/share/mathjax } From 3f5966f0582a459abc62c316b640b2b5c8e2158b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Mon, 8 Aug 2022 21:42:34 +0700 Subject: [PATCH 2/2] calibre: update to 6.13.0 --- srcpkgs/calibre/patches/disable-update.patch | 25 ----- srcpkgs/calibre/template | 111 +++++++++++++++---- 2 files changed, 89 insertions(+), 47 deletions(-) delete mode 100644 srcpkgs/calibre/patches/disable-update.patch diff --git a/srcpkgs/calibre/patches/disable-update.patch b/srcpkgs/calibre/patches/disable-update.patch deleted file mode 100644 index 539b083e0fa4..000000000000 --- a/srcpkgs/calibre/patches/disable-update.patch +++ /dev/null @@ -1,25 +0,0 @@ -copied from Fedora Linux (https://src.fedoraproject.org/rpms/calibre/blob/rawhide/f/calibre-no-update.patch) -diff -Nur calibre-2.9.0.orig/src/calibre/gui2/update.py calibre-2.9.0/src/calibre/gui2/update.py ---- calibre-2.9.0.orig/src/calibre/gui2/update.py 2014-11-08 21:43:22.888681538 -0700 -+++ calibre-2.9.0/src/calibre/gui2/update.py 2014-11-08 21:45:27.363383815 -0700 -@@ -63,20 +63,6 @@ - while not self.shutdown_event.is_set(): - calibre_update_version = NO_CALIBRE_UPDATE - plugins_update_found = 0 -- try: -- version = get_newest_version() -- if version[:2] > numeric_version[:2]: -- calibre_update_version = version -- except Exception as e: -- prints('Failed to check for calibre update:', as_unicode(e)) -- try: -- update_plugins = get_plugin_updates_available(raise_error=True) -- if update_plugins is not None: -- plugins_update_found = len(update_plugins) -- except Exception as e: -- prints('Failed to check for plugin update:', as_unicode(e)) -- if calibre_update_version != NO_CALIBRE_UPDATE or plugins_update_found > 0: -- self.signal.update_found.emit(calibre_update_version, plugins_update_found) - self.shutdown_event.wait(self.INTERVAL) - - def shutdown(self): diff --git a/srcpkgs/calibre/template b/srcpkgs/calibre/template index 49c132d0c187..e58c2ccbc832 100644 --- a/srcpkgs/calibre/template +++ b/srcpkgs/calibre/template @@ -1,37 +1,51 @@ # Template file for 'calibre' pkgname=calibre -version=5.44.0 -revision=2 +version=6.13.0 +revision=1 +build_wrksrc=calibre build_style=python3-module pycompile_dirs="/usr/lib/calibre/" -hostmakedepends="pkg-config python3-BeautifulSoup4 python3-Pillow python3-PyQt5-svg - python3-PyQt5-webengine python3-apsw python3-css-parser python3-dateutil - python3-devel python3-html5-parser python3-msgpack python3-regex qt5-qmake - libpodofo-devel python3-PyQt-builder python3-PyQt5-devel qt5-host-tools - python3-zeroconf xdg-utils rapydscript-ng" -makedepends="libinput-devel libmagick-devel libmtp-devel - libpodofo-devel libwmf-devel libxkbcommon-devel python3-PyQt5-devel - qt5-devel sqlite-devel tslib-devel hunspell-devel hyphen-devel libstemmer-devel" +hostmakedepends="pkg-config cmake python3-BeautifulSoup4 python3-Pillow + python3-apsw python3-css-parser python3-dateutil sip qt6-base python3-py7zr + python3-html5-parser python3-msgpack python3-regex python3-mechanize + mathjax liberation-fonts-ttf python3-zeroconf xdg-utils rapydscript-ng + python3-PyQt-builder python3-Markdown" +makedepends="libinput-devel libmagick-devel libmtp-devel libstemmer-devel + libpodofo-devel libwmf-devel libxkbcommon-devel poppler-cpp-devel + freetype-devel uchardet-devel openssl-devel icu-devel libusb-devel + sqlite-devel tslib-devel hunspell-devel hyphen-devel libstemmer-devel + python3-pyqt6-devel python3-pyqt6-webengine-devel" depends="desktop-file-utils optipng poppler-utils python3-BeautifulSoup4 - python3-Markdown python3-Pillow python3-PyQt5-svg python3-zeroconf - python3-PyQt5-webengine python3-PyQt5-webchannel python3-Pygments python3-apsw + qt6-imageformats python3-Pygments python3-pycryptodome + python3-Markdown python3-Pillow python3-zeroconf python3-Pygments python3-apsw python3-css-parser python3-cssselect python3-dateutil python3-jeepney python3-dnspython python3-feedparser python3-html5-parser python3-mechanize python3-msgpack python3-netifaces python3-psutil python3-regex python3-html2text - python3-pychm python3-cchardet qt5-webengine speech-dispatcher python3-sgmllib" -# should check if python3-pycryptodome is still needed -checkdepends="${depends} libjpeg-turbo-tools jxrlib python3-pycryptodome" + python3-pychm python3-cchardet speech-dispatcher python3-sgmllib + python3-html5lib python3-mechanize python3-py7zr mathjax liberation-fonts-ttf + python3-pyqt6-network python3-pyqt6-dbus python3-pyqt6-opengl-widgets + python3-pyqt6-widgets python3-pyqt6-gui python3-pyqt6-declarative + python3-pyqt6-printsupport python3-pyqt6-webchannel python3-pyqt6-svg + python3-pyqt6-webengine" +checkdepends="${depends} libjpeg-turbo-tools jxrlib" short_desc="Ebook management application" maintainer="skmpz " license="GPL-3.0-only" homepage="https://calibre-ebook.com" changelog="https://raw.githubusercontent.com/kovidgoyal/calibre/master/Changelog.txt" -distfiles="https://download.calibre-ebook.com/${version}/calibre-${version}.tar.xz" -checksum=6ffaa3eafd36a24355e5957f0f838db6db6d3456cfa17cb4d139fd94ebaf88ec +_lover=7.4.3.2 +distfiles="https://download.calibre-ebook.com/${version}/calibre-${version}.tar.xz + https://download.documentfoundation.org/libreoffice/src/${_lover%.*}/libreoffice-dictionaries-${_lover}.tar.xz" +checksum="eb40f34b7106e3f36d37e0b65dacb5cec863665c68fb2350592dbc1ec133aea3 + 3a55d5807b763827f820c4aee0a0fd9f44520e70629c9eb9748e1f8c57c64389" python_version=3 lib32disabled=yes nocross=yes +post_extract() { + mv calibre-${version} calibre +} + do_configure() { # Remove unneeded files and libs rm -rf resources/${pkgname}-portable.* @@ -41,36 +55,89 @@ do_configure() { -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" + cat >"${XBPS_WRAPPERDIR}/sip-qmake" <<-_EOF + #!/bin/sh + exec /usr/lib/qt6/bin/qmake \\ + "\$@" \\ + PREFIX=/usr \\ + QT_INSTALL_PREFIX=/usr \\ + LIB=/usr/lib \\ + QMAKE_CC="$CC" QMAKE_CXX="$CXX" \\ + QMAKE_LINK="$CXX" QMAKE_LINK_C="$CC" \\ + QMAKE_CFLAGS+="$CFLAGS" \\ + QMAKE_CXXFLAGS+="$CXXFLAGS" \\ + QMAKE_LFLAGS+="$LDFLAGS" \\ + CONFIG+=no_qt_rpath + _EOF + chmod 755 ${XBPS_WRAPPERDIR}/sip-qmake } do_build() { + export QMAKE=${XBPS_WRAPPERDIR}/sip-qmake python3 setup.py build python3 setup.py gui + python3 setup.py kakasi + python3 setup.py hyphenation \ + --path-to-hyphenation "$wrksrc/libreoffice-${_lover}/dictionaries" + python3 setup.py liberation_fonts \ + --system-liberation_fonts \ + --path-to-liberation_fonts /usr/share/fonts/TTF + python3 setup.py mathjax \ + --path-to-mathjax /usr/share/mathjax --system-mathjax + python3 setup.py iso639 + python3 setup.py iso3166 + # python3 setup.py recent_uas python3 setup.py rapydscript + python3 setup.py translations + python3 setup.py resources \ + --path-to-hyphenation "$wrksrc/libreoffice-${_lover}/dictionaries" \ + --system-liberation_fonts \ + --path-to-liberation_fonts /usr/share/fonts/TTF \ + --path-to-mathjax /usr/share/mathjax --system-mathjax } do_check() { + export QMAKE=${XBPS_WRAPPERDIR}/sip-qmake # qt test crashes without any error messages # disabled for now # unrar test fails because python3-unrardll isn't packaged # searching test case fails (non-deterministic) - # 7z tests disabled (missing python-py7zr dependencies) # test_dom_load case fails python3 setup.py test \ --exclude-test-name unrar \ --exclude-test-name qt \ --exclude-test-name searching \ - --exclude-test-name 7z \ --exclude-test-name test_dom_load } do_install() { + export QMAKE=${XBPS_WRAPPERDIR}/sip-qmake vmkdir usr/share/zsh/site-functions + vmkdir usr/share/man python3 setup.py \ install --prefix=/usr --staging-root=${DESTDIR}/usr + vcopy "man-pages/*" usr/share/man - for m in man-pages/man1/*.1; do - vman "${m}" - done + # fake some user-agent, otherwise we need to build recent_uas target, + # which generates a (very long) list from current data, + cat <<-'EOF' >${DESTDIR}/usr/share/calibre/user-agent-data.json +{ + "chrome_versions": [ + {"chrome_version":"110.0.5481","date":"2023-02-07","webkit_version":"110"}, + {"chrome_version":"109.0.5414","date":"2023-01-10","webkit_version":"109"} + ], + "common_user_agents": [ + "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36", + "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36" + ], + "desktop_platforms": ["Windows NT 10.0; Win64; x64"], + "firefox_versions": ["110.0","109.0","108.0","102.0"], + "timestamp": "2023-02-24T04:17:21.721566+00:00", + "user_agents_popularity": { + "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36": 252652, + "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36": 115713 + } +} + EOF }