Bump
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
AUX 0001-HTML-Input-Dont-add-resources-that-exist-outside-the.patch 2420 BLAKE2B eafb4c38c87bdb708905b0c17b9d3466dad76c1f286f702b6c063c9af866ab8dc656af019eb10a70fa841cfda4e47e1eac9276abdd63d23cf2ffe69f377ad110 SHA512 083e7112f6bdabd0f1894a8afacc87a166ffdad7fa9c88683f05991249b2aa18de04c4e5d842991b0b49a6d0d76248093a7f6ed29a3d0c1a6725e8ab512982e7
|
||||
AUX 0001-PIL-11.0-changes-its-webp-features-output.patch 1223 BLAKE2B 959dc14e452dd1d19a67976fef43e7fc12ec7739d91710848e9f0cfd24966d553c74521a48a44f3b67d36256ef2041b20b8ee2201a855870270512a5937c36ba SHA512 365f55f94d3657a39a5495604f383e3ecda2ed9c4ab8e783b5117b59f2707f933722939049f4450e7629a3f91ce0c607d968427e6b05b9a00e275980b5b2c2ca
|
||||
AUX calibre-5.35.0-jxr-test.patch 827 BLAKE2B 0a94ac5b12ee2ec732d3ff68979c2060b0b218eee27409b3c351a9cc0b6bccce2260b8b387b442ae10f31483b20bd6d672f7d5424f7d9a8297a1bd14af2f7793 SHA512 259a3b4882bf0fbb01cb22974e219a621a2b337d6f638234a806148b11142fdbf9ac36ae38e71fcb7e18bd61362b34cf3c221ba1df317ec6ea8668591ad2d3ff
|
||||
AUX calibre-5.44.0-Fix-compatibility-with-zeroconf-0.73.patch 1065 BLAKE2B 7a74b7d7788340f96b326619f5e2bd916ff21644f0554b2507fcea439eec8217b8b002a2da3b99021fa576a6d3a6fd15d82222f005b8a4fbf37ab5016f33bdb9 SHA512 13f6fc949cc8c5c66013c772cd40429a679fa067d7828cc02e416ecbd556eafb56bebc80bc85a8b442feb3e6b94518450252e701e6426f5a2cde9d102312cf87
|
||||
AUX calibre-5.44.0-icu75.patch 1294 BLAKE2B 1f05f84e5653a7c3d9162fc1dc7d91fc73b3346323e05d3c379227deece394e0754a6c2d72223ef2453abf5b062ba3ad3b4705b110bd333e643fa0a35d0a0ad4 SHA512 3eecadbd27cb178f630b80b789d3e3a437d95e883b429473414fd08d9a412a9c32201b7b859d28446523426caff292580c244a86a1b7bb117fa2b7281fd15b5f
|
||||
AUX calibre-5.44.0-xss-backport.patch 1272 BLAKE2B 65be0f6b97b387b37faa86f79d84e150f0a2801a8f2bde95497ebf4f292f95a56bf9c49613d727446dfa9afdef6a4f108a28e1c02cb4343bbc717834ae544896 SHA512 d8ae8fbe64c40169efd4a2f090c194d5a032b2d7072b6f7763932597b227fb12f88712290fd902cf639d40fff48a8806226037d6bb89e8bb4d1a7a79d4bdc21f
|
||||
AUX calibre-7.0.0-jxr-test.patch 935 BLAKE2B bc38ea2f2d10ec4859ee03ab5d18048df4cf0af5ce4076efc013013bc975966390d618c43ce621675e3b8ee8f929bfaebaa72cf6bb7d8dea544bca77d9772b60 SHA512 db8da42fdcf5b5d5dfad35c128e394cf8f51e57dda6cd1a482803429738515fc1a8b338c711679a11acb93678f35f10883e1bf282e1443ccaafe2eb470fbbfee
|
||||
AUX calibre-7.17.0-qt-texttospeech.patch 1857 BLAKE2B c043883ffc42314d00754907ccbadbc6f1d4916f4d53b0cfe0a86403d251db26f07b26a169671683fd26816868e4f7538705c57024f1314d863edb39937bcee5 SHA512 246c1e8dc4f423b8d87d8e96b13d695c1efe1bd24c69b06fa82b8d655aad89d206ae1bc5998b9f2d160bcd1b87f4d0af41806ed17de711b445811a159d165a37
|
||||
AUX calibre-server-3.conf 541 BLAKE2B 06593633721e6adf2cf2077dffa83953eea46ccdcdc857ad468a9b74788326e9424f6ab9058be344dbbac8e49d343f5a1e53ddb486f2018b77319a7f8f713cf4 SHA512 12ef793a5b6ffd4413f780a13cad63927a95f15d17d85d4229eb5005ead68e51779abb822f9898ab5ae8c2094affeec1f9e85c34f109499739e6726b7641542a
|
||||
AUX calibre-server-3.init 1796 BLAKE2B f87d785d6f6fc10fa648d40944ec8538027854bb872d9a3be6b5b35b0abf3cda1e4e93874a9422914da5eb4287f193459733956e3f1e25e61bec0c214c552c99 SHA512 88110ded1b9c6cf8d3bfc3d5889654f77578f9d299e88daea9023767b930082e00fbddbb92a6e43c46d900248f3684232d93396ec1d0e784c7ec14b44783f98a
|
||||
AUX e9cc00560a28f56a303cca97630ab58e519dd9c8.patch 1335 BLAKE2B eb71cb5510d2259bbc7a4fe7b54652bb543aa3d26816654da7e22a6effb0c81770a91eccccecff5fe711d0495ff5b1ab378231e3cb10dd18f3faeb301acab1ba SHA512 211ea8c0fab1de5bd076eb965eda51ee1330a69e54251fc6a16e5aa0d6ef7721aea14a57a27eb75a99c8e37418aa15bd311e6f4d03f1f05d80cd87d2f00fb995
|
||||
DIST calibre-5.44.0.tar.xz 41015696 BLAKE2B c7053e728da20fccfa981ed4f56e24a4d5b382b7687c92ecb039b078fd4828de0529380093e4ab33f77d78aa54a59758c1620cf8f918937a9a64f13decdf77ee SHA512 3d79e76d820cd1a41605dfd4c1d992599a6e4a759e57a8383d42d86982177e4539313f59e647758ab1896ce5874cb2a93c7678bf962e332c44171651aabf0230
|
||||
DIST calibre-5.44.0.tar.xz.sig 566 BLAKE2B 413b95855d79bdb5b17ca5d760f834006797b4d3e413604f27d351a3392e16d647e772dc063306bf973e1156c34f68cb38152a66164bca849ebed5484e7f6065 SHA512 59957bf35a73f218241bf76cc86994d5af87cea11d3b0800e83f157bf0b2cfcaf4b6c1314562e74a1141d0c167fdb1619cb9a90e93b67f55dd55ceed77045059
|
||||
DIST calibre-7.16.0.tar.xz 44833684 BLAKE2B 2b609a0d014d43998f693a69c10f6d8b0165bf97f8c9d388cf4e1e398e7254b300d53b26e5ec24af651e03bb625bb088331dc77aa2ed6edea13de2beb0e75339 SHA512 5ea11badd972422299ce143e2aa33f58f7abcfd2837acba47d2a7aa6f0997a711245273205ed043c783e5e82bbaaf7cab44e5c03c00e274a03a4ba29be53a708
|
||||
DIST calibre-7.16.0.tar.xz.sig 566 BLAKE2B 1d09e8dd49ad53c88632dc23573fa9cd5403d45a308598ac4ed7d4f2dd5a84cc3ae6812ac652ff4a98fc5d67589ad1584411f7746b6b98468bf03a35a0585de6 SHA512 91f3897d95d234a8d673006273974d32cb6c5aa4953d247700d6d89d511c9b1450dc8e222eabf5d1e4d82de206e425ee440defaff38d1ca83efdbf4bcada7c7c
|
||||
DIST calibre-7.17.0.tar.xz 45053400 BLAKE2B 93149c4fab7a25e1239c4b8c72b766e5ffc71eb27d1206225bc8436f26d2c76f9323e0f0f63d8444291f02a5a7e94d4500715398a71df4ab2a5b16e325e7be73 SHA512 916337dc425916110528828bac0fbdc24db9496362c1e8dad67eafdfda42b90174fb6a4352400cd34af0f11268aabed82b166b3e4875f59e317359079e10bf3b
|
||||
DIST calibre-7.17.0.tar.xz.sig 566 BLAKE2B c041904919ef300f51ba7363daf7d2bc70fc8bb819ffef157e53c28f91b9716be56b1e95465180ecd67069241a5810b70ac08027f4837426a5426792fab05e49 SHA512 af88bcbf394ac6ec68c40d661545a17e956b31dd7797d1cc8490e090437206902a64c7a642cf1e34184e379c79066843959e1459eb1836bddbd615febbc85c07
|
||||
DIST calibre-7.19.0.tar.xz 45057708 BLAKE2B 888ddf4292b8c8931c811eb78d6e9b003139545947f2b7bf63fcd96d96caa050a0f93a30ed0313ccf9b4ebfb25c2df1be7f2806d5117a870d1ac34ad29669e39 SHA512 b1225d6d403a8c4dca321c108d270aa79cf65a450f7db90a4e4df5525e8c1c6eb06b4a2492de7b691f6a1a85ce09361dc3796311c46fa082d6e82829827022a7
|
||||
DIST calibre-7.19.0.tar.xz.sig 566 BLAKE2B 35a9f8987f0dfad0a14843f3db61f8b3442692dafdf9d253ed13c2071b7e8d9d4cec8012dad4b59b30013fdda790967cf42594a29c6a9a2a668bccda72ac2e72 SHA512 836a0138ed46b179fefe78bc678f6f8146fe5d8a1eb9111f02bcc804d96253281c918cc4ad7a3a860a3177babac9c6fd4b2e417361e59b7245d19bfa50f3f739
|
||||
DIST calibre-7.20.0.tar.xz 44795188 BLAKE2B 2ccb7fcd5acdf9f627d79f5656709a7eddee7545dd2c8a95bbb7d2dc61fb26dcf8c34c3c2d6b1514fdbb6b4d7c3fd3e98be72c778026c7b2bb4a42651c5e664b SHA512 3b6e2d4ed8d0755096b466f4bdcc8b6ca4810398caa2322c1efc30280680ff8b10dc5fb8cb763bed8fee82746e7c51c6f31f56e5d9689d5f43c671442004c532
|
||||
DIST calibre-7.20.0.tar.xz.sig 566 BLAKE2B 4d89a7781eb1500969ca75ddf01890bbfea6ecfde4e7173f062be6546e898f68a16e0ff7a3d76e5e17dc0abca617d381de24e18e72f4f05b5965b051f28e6cab SHA512 62dc9964c3a30477e22f832148fdaa57860559e2aaddccff107b37c399854ac3ca84097cd7072c2ee4e57403c7ed17286469f31f6efc3d790f63f438d9c78c79
|
||||
DIST calibre-7.21.0.tar.xz 44802864 BLAKE2B f86ce0f310ac5b38f3aa54ca6436ad9c22c465e5608089c0178fcc5ed87d988ffae50d6b760ae4281ce68315998a5e1c426f243b58bfae86a78e5479d824070d SHA512 0c2ee610833df83219c0c33b09e1374a8262f1630ccd48e3c4725c92922a3ac5d102ad83fc213457fb9de3efa4f5a2c98ff6dff039828e1661085a1054d7f631
|
||||
DIST calibre-7.21.0.tar.xz.sig 566 BLAKE2B 6410767553809878644ccae960b756b3b0571309bf4cbb61b9282586442243d41d1b2da578f97fbf7fbac573c7e9f84bc293e6b38e921850bce44bc7c87d74c8 SHA512 444492b958a01105cb60e8653f8b0e3c5c27a42876527b642f176a375459d3a5664b601aa8fa64c3d39ae486200cd456cd8691a055f7f7530225df106b1bd074
|
||||
DIST calibre-7.22.0.tar.xz 42428392 BLAKE2B e9b7e0dc6e92340ff76d99f44f8265a572d05afadb6b5b06312a6dfbc6b0540d49647686a3fbb367da67a31d680ec8982a46d7baeb2c8371b4eeea1f0eb6c1f8 SHA512 583a1e2bcdd05c350e57cb205fc95eb076210ea5c9156f95a08c63e27f418ecb735c0a68212514edaa05af61e780cf8377a1e1b76a89729ee13b4d5ed34359c7
|
||||
DIST calibre-7.22.0.tar.xz.sig 566 BLAKE2B d818c347043efcd8b01f68efdfdae43bf0315d45a7d8c52e8920972b8fa718b9551edb388a0531eb1781c8a959b31a16bb6f1dec517d3415b0a596d50c4d368e SHA512 9e72f286f01bf3ca76d702f0a8415635d5a352e06765f14a50fae828bea3f5c710200eb857075972e1bcfd176c05983421d899a13ef5aa9c3aa7e996bce80e5e
|
||||
EBUILD calibre-5.44.0-r5.ebuild 8984 BLAKE2B b5f9a34dadb013f347366ccbe2cc36168b85caf4a466188665d949d6116406664ba533290395046148d24104140aaa94b6caf5027444293c9fe17de43a27b4ca SHA512 43381007298d2f41cad354cd608e6f3b04192bb055836d9175d8c9204832f26d54297b0da0ddea4e6139ae058fb49ff761932978992928885b8197f193749804
|
||||
EBUILD calibre-7.16.0.ebuild 7987 BLAKE2B 61535b4bea3c99a8ac5cbe3b6738c91c3bdd0d30780a904102fc1b21799b835e922c034045bbfcf234f3a99890c0fa0203274ccefbdf570254dc946c65ea503b SHA512 090609b21ec694a22a89f27a516e10d5772bc5377c87e0fe2ff0b751c01d2a0cf9c4fa0512541a77e49483cbf7722a83e264b3bb0b45f3ee6f8d73e2b8f7054e
|
||||
EBUILD calibre-7.17.0.ebuild 8155 BLAKE2B e8045cf5f3e6557b0027ba84ce2c4e2558a1dd67f6007eee794ac2571c5277ed45b6c45b183d0144fe58c297af405637cb95c54ebdcfaaa96e6a9c117e7c3533 SHA512 07ba8a2a98a960111dec197e415b8ffcd9697a6d7e2278c7b417d6e89864713d7f0b1e7a015b23958f08db8fb5965e1c7502fc79508872c24b979d4b053eae38
|
||||
EBUILD calibre-7.19.0.ebuild 8374 BLAKE2B 80659908ab33bf598b3f3706c0c6b57cf477af6953e14f038544920862839864dc3dccc53f029e1fd45a62cc4d9f40719f1306ed44a474c6c8912977616639a6 SHA512 9a469b83c5c36b42e8d3e589a9a56cc7cf7be74bbf2e30f7d0987386de80882c8e8a538d7d873bf175f3bf5eacaf9fef09c93ddffa5e46b5d08aaebcf7d50566
|
||||
EBUILD calibre-7.20.0.ebuild 8400 BLAKE2B a36548f91272362a57c6286342855044cb39f7712ddfa9e55a3c72627ababc4eacdca6008741e63df056eb2ca7e5df0f59c22830ab988fcc3a8b683eb232ef79 SHA512 28a5034d892e24d61ffb0e40e0d996ce0a4dbb0faded49240d42803d920917457471efd86dd5706f64ab1075d917432daa9c482da0c3d302dcb78c41487d52a5
|
||||
EBUILD calibre-7.21.0.ebuild 8305 BLAKE2B cf08c0f9a5d1046632aa77f7d6e0ce2cb24551e716fe6f4c7614f508c8331841a574337b2678b0b79396f15d02df629247c7da16a90c0e925fb56d3567394230 SHA512 ec7852d1b70a18df376d10ea2d93b1147a3da58f3c635ecd6ac23c90c9f53f79b6da7a71d533334e62fc8b6f5aae6babfbbf8aaa3cc4fdb947516f999f7eda3c
|
||||
EBUILD calibre-7.22.0.ebuild 8337 BLAKE2B 93f2ebb81f4b2a0c15921b72b33bd13bdbef9f474b3def869a1f90862acab431edc37d25ab37a64c41763f2bf9503ab575c06fe980826950be6f23a04bc0cbe7 SHA512 27a8ed9283914061c446a519c8e88e29c4dde9c91e45f9f9385b74b6f635f1579d6345e28a8606fc238d65549d18176ab8f780b970731b2765f3901010732492
|
||||
MISC metadata.xml 662 BLAKE2B 102f4f537d2127c42311951cd5ca73e41a0ab948d85a037ed24c876382ffe628070d96b7310a337ac8efac61b32fd225b840b20fbe3f51e4cbf48ce073e95e7c SHA512 9929c8d731dfa112cf4b2ca67ddb269360a4f2cd84d9c0c0df6adfa2efe04669e1a45d9d7011f1dffe9e7ebf185e348478c2a1afa2bf2351e69b4f7e7c14da32
|
||||
@@ -1,265 +0,0 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
PYTHON_REQ_USE="sqlite,ssl"
|
||||
|
||||
inherit edo toolchain-funcs python-single-r1 qmake-utils verify-sig xdg
|
||||
|
||||
DESCRIPTION="Ebook management application"
|
||||
HOMEPAGE="https://calibre-ebook.com/"
|
||||
SRC_URI="
|
||||
https://download.calibre-ebook.com/${PV}/${P}.tar.xz
|
||||
verify-sig? ( https://calibre-ebook.com/signatures/${P}.tar.xz.sig )
|
||||
"
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/kovidgoyal.gpg
|
||||
|
||||
LICENSE="
|
||||
GPL-3+
|
||||
GPL-3
|
||||
GPL-2+
|
||||
GPL-2
|
||||
GPL-1+
|
||||
LGPL-3+
|
||||
LGPL-2.1+
|
||||
LGPL-2.1
|
||||
BSD
|
||||
MIT
|
||||
Old-MIT
|
||||
Apache-2.0
|
||||
public-domain
|
||||
|| ( Artistic GPL-1+ )
|
||||
CC-BY-3.0
|
||||
OFL-1.1
|
||||
PSF-2
|
||||
"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64"
|
||||
IUSE="ios speech +system-mathjax test +udisks unrar"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
|
||||
# Qt slotted dependencies are used because the libheadless.so plugin links to
|
||||
# QT_*_PRIVATE_ABI. It only uses core/gui/dbus.
|
||||
COMMON_DEPEND="${PYTHON_DEPS}
|
||||
>=app-text/hunspell-1.7:=
|
||||
>=app-text/podofo-0.9.6_pre20171027:=
|
||||
<app-text/podofo-0.10:=
|
||||
app-text/poppler[utils]
|
||||
dev-libs/hyphen:=
|
||||
>=dev-libs/icu-57.1:=
|
||||
dev-libs/openssl:=
|
||||
dev-libs/snowball-stemmer:=
|
||||
$(python_gen_cond_dep '
|
||||
>=dev-python/apsw-3.25.2_p1[${PYTHON_USEDEP}]
|
||||
dev-python/beautifulsoup4[${PYTHON_USEDEP}]
|
||||
dev-python/faust-cchardet[${PYTHON_USEDEP}]
|
||||
>=dev-python/css-parser-1.0.4[${PYTHON_USEDEP}]
|
||||
dev-python/dnspython[${PYTHON_USEDEP}]
|
||||
>=dev-python/feedparser-5.2.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/html2text-2019.8.11[${PYTHON_USEDEP}]
|
||||
>=dev-python/html5-parser-0.4.9[${PYTHON_USEDEP}]
|
||||
dev-python/jeepney[${PYTHON_USEDEP}]
|
||||
>=dev-python/lxml-3.8.0[${PYTHON_USEDEP}]
|
||||
dev-python/lxml-html-clean[${PYTHON_USEDEP}]
|
||||
>=dev-python/markdown-3.0.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/mechanize-0.3.5[${PYTHON_USEDEP}]
|
||||
>=dev-python/msgpack-0.6.2[${PYTHON_USEDEP}]
|
||||
>=dev-python/netifaces-0.10.5[${PYTHON_USEDEP}]
|
||||
>=dev-python/pillow-3.2.0[jpeg,truetype,webp,zlib,${PYTHON_USEDEP}]
|
||||
>=dev-python/psutil-4.3.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pychm-0.8.6[${PYTHON_USEDEP}]
|
||||
>=dev-python/pygments-2.3.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyqt5-5.15.5_pre2107091435[gui,widgets,network,printsupport,svg,${PYTHON_USEDEP}]
|
||||
>=dev-python/pyqtwebengine-5.15.5_pre2108100905[${PYTHON_USEDEP}]
|
||||
dev-python/regex[${PYTHON_USEDEP}]
|
||||
dev-python/zeroconf[${PYTHON_USEDEP}]
|
||||
')
|
||||
dev-qt/qtimageformats:5
|
||||
dev-qt/qtcore:5=
|
||||
dev-qt/qtdbus:5=
|
||||
dev-qt/qtgui:5=[jpeg,png]
|
||||
dev-qt/qtwidgets:5
|
||||
dev-util/desktop-file-utils
|
||||
dev-util/gtk-update-icon-cache
|
||||
media-fonts/liberation-fonts
|
||||
media-libs/fontconfig:=
|
||||
>=media-libs/freetype-2:=
|
||||
>=media-libs/libmtp-1.1.11:=
|
||||
>=media-gfx/optipng-0.7.6
|
||||
virtual/libusb:1=
|
||||
x11-misc/shared-mime-info
|
||||
>=x11-misc/xdg-utils-1.0.2-r2
|
||||
ios? (
|
||||
>=app-pda/usbmuxd-1.0.8
|
||||
>=app-pda/libimobiledevice-1.2.0
|
||||
)
|
||||
speech? ( $(python_gen_cond_dep 'app-accessibility/speech-dispatcher[python,${PYTHON_USEDEP}]') )
|
||||
system-mathjax? ( >=dev-libs/mathjax-3:= )
|
||||
udisks? ( virtual/libudev )
|
||||
unrar? ( dev-python/unrardll )
|
||||
"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
udisks? ( sys-fs/udisks:2 )"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
test? ( $(python_gen_cond_dep '>=dev-python/chardet-3.0.3[${PYTHON_USEDEP}]') )
|
||||
"
|
||||
BDEPEND="$(python_gen_cond_dep '
|
||||
>=dev-python/pyqt-builder-1.10.3[${PYTHON_USEDEP}]
|
||||
>=dev-python/sip-5[${PYTHON_USEDEP}]
|
||||
')
|
||||
>=virtual/podofo-build-0.9.6_pre20171027
|
||||
<virtual/podofo-build-0.10
|
||||
virtual/pkgconfig
|
||||
system-mathjax? ( dev-lang/rapydscript-ng )
|
||||
verify-sig? ( sec-keys/openpgp-keys-kovidgoyal )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
# Skip calling a binary (JxrDecApp) from libjxr which is used for tests
|
||||
# We don't (yet?) package libjxr and it seems to be dead upstream
|
||||
# (last commit in 2017)
|
||||
"${FILESDIR}/${PN}-5.35.0-jxr-test.patch"
|
||||
|
||||
# fix compatibility with recent versions of zeroconf
|
||||
"${FILESDIR}"/${PN}-5.44.0-Fix-compatibility-with-zeroconf-0.73.patch
|
||||
|
||||
# Security backport for CVE-2023-46303
|
||||
"${FILESDIR}"/0001-HTML-Input-Dont-add-resources-that-exist-outside-the.patch
|
||||
# bug #936270
|
||||
"${FILESDIR}"/${P}-icu75.patch
|
||||
# backport test-only fix for lxml 5
|
||||
"${FILESDIR}"/e9cc00560a28f56a303cca97630ab58e519dd9c8.patch
|
||||
# Security backport for CVE-2024-7008
|
||||
"${FILESDIR}"/${P}-xss-backport.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Warning:
|
||||
#
|
||||
# While it might be rather tempting to add yet another sed here,
|
||||
# please don't. There have been several bugs in Gentoo's packaging
|
||||
# of calibre from seds-which-become-stale. Please consider
|
||||
# creating a patch instead, but in any case, run the test suite
|
||||
# and ensure it passes.
|
||||
#
|
||||
# If in doubt about a problem, checking Fedora's packaging is recommended.
|
||||
|
||||
# Disable unnecessary privilege dropping for bug #287067.
|
||||
sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
|
||||
-i setup/install.py || die "sed failed to patch install.py"
|
||||
sed -e "/^ os.chdir(os.path.join(src_dir, 'build'))$/a\
|
||||
\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
|
||||
'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
|
||||
'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
|
||||
'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
|
||||
'-i', os.path.join(os.path.basename(src_dir), 'Makefile')])" \
|
||||
-e "s|open(self.j(bdir, '.qmake.conf'), 'wb').close()|open(self.j(bdir, '.qmake.conf'), 'wb').write(b'QMAKE_LFLAGS += ${LDFLAGS}')|" \
|
||||
-i setup/build.py || die "sed failed to patch build.py"
|
||||
|
||||
# This is only ever used at build time. It contains a small embedded copy
|
||||
# of the rapydscript-ng compiler usable inside of qtwebengine, if you don't
|
||||
# have rapydscript-ng (a nodejs package) itself installed. Its only purpose
|
||||
# is to build some resources that come bundled in dist tarballs already...
|
||||
# and which we may also need to regenerate e.g. to use system-mathjax.
|
||||
#
|
||||
# However, running qtwebengine violates the portage sandbox (among other
|
||||
# things, it tries to create directories in /usr! amazing) so this is a
|
||||
# wash anyway. The only real solution here is to package rapydscript-ng.
|
||||
#
|
||||
# We do not need it at build time, and *no one* needs it at install time.
|
||||
# Delete the cruft.
|
||||
rm -r resources/rapydscript/ || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# TODO: get qmake called by setup.py to respect CC and CXX too
|
||||
tc-export CC CXX
|
||||
|
||||
# bug 821871
|
||||
local MY_LIBDIR="${ESYSROOT}/usr/$(get_libdir)"
|
||||
export FT_LIB_DIR="${MY_LIBDIR}" HUNSPELL_LIB_DIR="${MY_LIBDIR}" PODOFO_LIB_DIR="${MY_LIBDIR}"
|
||||
export QMAKE="$(qt5_get_bindir)/qmake"
|
||||
|
||||
edo ${EPYTHON} setup.py build
|
||||
edo ${EPYTHON} setup.py gui
|
||||
|
||||
# A few different resources are bundled in the distfile by default, because
|
||||
# not all systems necessarily have them. We un-vendor them, using the
|
||||
# upstream integrated approach if possible. See setup/revendor.py and
|
||||
# consider migrating other resources to this if they do not use it, in
|
||||
# *preference* over manual rm'ing.
|
||||
edo ${EPYTHON} setup.py liberation_fonts \
|
||||
--path-to-liberation_fonts "${EPREFIX}"/usr/share/fonts/liberation-fonts \
|
||||
--system-liberation_fonts
|
||||
if use system-mathjax; then
|
||||
edo ${EPYTHON} setup.py mathjax --path-to-mathjax "${EPREFIX}"/usr/share/mathjax --system-mathjax
|
||||
edo ${EPYTHON} setup.py rapydscript
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# Skipped tests:
|
||||
local _test_excludes=(
|
||||
# unpackaged Python dependency: py7zr
|
||||
7z
|
||||
# tests if a completely unused module is bundled
|
||||
pycryptodome
|
||||
|
||||
$(usev !speech speech_dispatcher)
|
||||
$(usev !unrar test_unrar)
|
||||
|
||||
# undocumented reasons
|
||||
test_mem_leaks
|
||||
test_searching
|
||||
)
|
||||
|
||||
edo ${PYTHON} setup.py test "${_test_excludes[@]/#/--exclude-test-name=}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
|
||||
# File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
|
||||
# return _parse_localename(localename)
|
||||
# File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
|
||||
# raise ValueError, 'unknown locale: %s' % localename
|
||||
#ValueError: unknown locale: 46
|
||||
export -n LANG LANGUAGE ${!LC_*}
|
||||
export LC_ALL=C.utf8 # bug #709682
|
||||
|
||||
# Bug #295672 - Avoid sandbox violation in ~/.config by forcing
|
||||
# variables to point to our fake temporary $HOME.
|
||||
export HOME="${T}/fake_homedir"
|
||||
export CALIBRE_CONFIG_DIRECTORY="${HOME}/.config/calibre"
|
||||
mkdir -p "${CALIBRE_CONFIG_DIRECTORY}" || die
|
||||
|
||||
addpredict /dev/dri #665310
|
||||
|
||||
# If this directory doesn't exist, zsh completion won't install
|
||||
dodir /usr/share/zsh/site-functions
|
||||
|
||||
edo "${PYTHON}" setup.py install \
|
||||
--staging-root="${ED}/usr" \
|
||||
--prefix="${EPREFIX}/usr" \
|
||||
--libdir="${EPREFIX}/usr/$(get_libdir)" \
|
||||
--staging-libdir="${ED}/usr/$(get_libdir)" \
|
||||
--system-plugins-location="${EPREFIX}/usr/share/calibre/system-plugins"
|
||||
|
||||
cp -r man-pages/ "${ED}"/usr/share/man || die
|
||||
|
||||
find "${ED}"/usr/share -type d -empty -delete || die
|
||||
|
||||
python_fix_shebang "${ED}/usr/bin"
|
||||
|
||||
python_optimize "${ED}"/usr/$(get_libdir)/calibre "${D}/$(python_get_sitedir)"
|
||||
|
||||
newinitd "${FILESDIR}"/calibre-server-3.init calibre-server
|
||||
newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server
|
||||
}
|
||||
@@ -1,243 +0,0 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
PYTHON_REQ_USE="sqlite,ssl"
|
||||
|
||||
inherit edo toolchain-funcs python-single-r1 qmake-utils verify-sig xdg
|
||||
|
||||
DESCRIPTION="Ebook management application"
|
||||
HOMEPAGE="https://calibre-ebook.com/"
|
||||
SRC_URI="
|
||||
https://download.calibre-ebook.com/${PV}/${P}.tar.xz
|
||||
verify-sig? ( https://calibre-ebook.com/signatures/${P}.tar.xz.sig )
|
||||
"
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/kovidgoyal.gpg
|
||||
|
||||
LICENSE="
|
||||
GPL-3+
|
||||
GPL-3
|
||||
GPL-2+
|
||||
GPL-2
|
||||
GPL-1+
|
||||
LGPL-3+
|
||||
LGPL-2.1+
|
||||
LGPL-2.1
|
||||
BSD
|
||||
MIT
|
||||
Old-MIT
|
||||
Apache-2.0
|
||||
public-domain
|
||||
|| ( Artistic GPL-1+ )
|
||||
CC-BY-3.0
|
||||
OFL-1.1
|
||||
PSF-2
|
||||
"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~arm64"
|
||||
IUSE="+font-subsetting ios speech +system-mathjax test +udisks unrar"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
|
||||
# Qt slotted dependencies are used because the libheadless.so plugin links to
|
||||
# QT_*_PRIVATE_ABI. It only uses core/gui/dbus.
|
||||
COMMON_DEPEND="${PYTHON_DEPS}
|
||||
app-i18n/uchardet
|
||||
>=app-text/hunspell-1.7:=
|
||||
>=app-text/podofo-0.10.0:=
|
||||
app-text/poppler[utils]
|
||||
dev-libs/hyphen:=
|
||||
>=dev-libs/icu-57.1:=
|
||||
dev-libs/openssl:=
|
||||
dev-libs/snowball-stemmer:=
|
||||
$(python_gen_cond_dep '
|
||||
>=dev-python/apsw-3.25.2_p1[${PYTHON_USEDEP}]
|
||||
dev-python/beautifulsoup4[${PYTHON_USEDEP}]
|
||||
>=dev-python/css-parser-1.0.4[${PYTHON_USEDEP}]
|
||||
dev-python/dnspython[${PYTHON_USEDEP}]
|
||||
>=dev-python/feedparser-5.2.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/html2text-2019.8.11[${PYTHON_USEDEP}]
|
||||
>=dev-python/html5-parser-0.4.9[${PYTHON_USEDEP}]
|
||||
dev-python/jeepney[${PYTHON_USEDEP}]
|
||||
>=dev-python/lxml-3.8.0[${PYTHON_USEDEP}]
|
||||
dev-python/lxml-html-clean[${PYTHON_USEDEP}]
|
||||
>=dev-python/markdown-3.0.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/mechanize-0.3.5[${PYTHON_USEDEP}]
|
||||
>=dev-python/msgpack-0.6.2[${PYTHON_USEDEP}]
|
||||
>=dev-python/netifaces-0.10.5[${PYTHON_USEDEP}]
|
||||
>=dev-python/pillow-3.2.0[jpeg,truetype,webp,zlib,${PYTHON_USEDEP}]
|
||||
>=dev-python/psutil-4.3.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pychm-0.8.6[${PYTHON_USEDEP}]
|
||||
>=dev-python/pygments-2.3.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}]
|
||||
dev-python/pyqt6[gui,network,opengl,printsupport,quick,svg,widgets,${PYTHON_USEDEP}]
|
||||
dev-python/pyqt6-webengine[widgets,${PYTHON_USEDEP}]
|
||||
dev-python/regex[${PYTHON_USEDEP}]
|
||||
dev-python/xxhash[${PYTHON_USEDEP}]
|
||||
>=dev-python/zeroconf-0.75.0[${PYTHON_USEDEP}]
|
||||
')
|
||||
dev-qt/qtbase:6=[gui,widgets]
|
||||
dev-qt/qtimageformats:6
|
||||
dev-util/desktop-file-utils
|
||||
dev-util/gtk-update-icon-cache
|
||||
media-fonts/liberation-fonts
|
||||
media-libs/fontconfig:=
|
||||
>=media-libs/freetype-2:=
|
||||
>=media-libs/libmtp-1.1.11:=
|
||||
>=media-gfx/optipng-0.7.6
|
||||
virtual/libusb:1=
|
||||
x11-misc/shared-mime-info
|
||||
>=x11-misc/xdg-utils-1.0.2-r2
|
||||
font-subsetting? ( $(python_gen_cond_dep 'dev-python/fonttools[${PYTHON_USEDEP}]') )
|
||||
ios? (
|
||||
>=app-pda/usbmuxd-1.0.8
|
||||
>=app-pda/libimobiledevice-1.2.0
|
||||
)
|
||||
speech? ( $(python_gen_cond_dep 'app-accessibility/speech-dispatcher[python,${PYTHON_USEDEP}]') )
|
||||
system-mathjax? ( >=dev-libs/mathjax-3:= )
|
||||
udisks? ( virtual/libudev )
|
||||
unrar? ( dev-python/unrardll )
|
||||
"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
udisks? ( sys-fs/udisks:2 )"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
test? ( $(python_gen_cond_dep '>=dev-python/chardet-3.0.3[${PYTHON_USEDEP}]') )
|
||||
"
|
||||
BDEPEND="$(python_gen_cond_dep '
|
||||
>=dev-python/pyqt-builder-1.10.3[${PYTHON_USEDEP}]
|
||||
>=dev-python/sip-5[${PYTHON_USEDEP}]
|
||||
')
|
||||
virtual/pkgconfig
|
||||
system-mathjax? ( dev-lang/rapydscript-ng )
|
||||
verify-sig? ( sec-keys/openpgp-keys-kovidgoyal )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
# Skip calling a binary (JxrDecApp) from libjxr which is used for tests
|
||||
# We don't (yet?) package libjxr and it seems to be dead upstream
|
||||
# (last commit in 2017)
|
||||
"${FILESDIR}/${PN}-7.0.0-jxr-test.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Warning:
|
||||
#
|
||||
# While it might be rather tempting to add yet another sed here,
|
||||
# please don't. There have been several bugs in Gentoo's packaging
|
||||
# of calibre from seds-which-become-stale. Please consider
|
||||
# creating a patch instead, but in any case, run the test suite
|
||||
# and ensure it passes.
|
||||
#
|
||||
# If in doubt about a problem, checking Fedora's packaging is recommended.
|
||||
|
||||
# Disable unnecessary privilege dropping for bug #287067.
|
||||
sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
|
||||
-i setup/install.py || die "sed failed to patch install.py"
|
||||
|
||||
# This is only ever used at build time. It contains a small embedded copy
|
||||
# of the rapydscript-ng compiler usable inside of qtwebengine, if you don't
|
||||
# have rapydscript-ng (a nodejs package) itself installed. Its only purpose
|
||||
# is to build some resources that come bundled in dist tarballs already...
|
||||
# and which we may also need to regenerate e.g. to use system-mathjax.
|
||||
#
|
||||
# However, running qtwebengine violates the portage sandbox (among other
|
||||
# things, it tries to create directories in /usr! amazing) so this is a
|
||||
# wash anyway. The only real solution here is to package rapydscript-ng.
|
||||
#
|
||||
# We do not need it at build time, and *no one* needs it at install time.
|
||||
# Delete the cruft.
|
||||
rm -r resources/rapydscript/ || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# TODO: get qmake called by setup.py to respect CC and CXX too
|
||||
tc-export CC CXX
|
||||
|
||||
# bug 821871
|
||||
local MY_LIBDIR="${ESYSROOT}/usr/$(get_libdir)"
|
||||
export FT_LIB_DIR="${MY_LIBDIR}" HUNSPELL_LIB_DIR="${MY_LIBDIR}" PODOFO_LIB_DIR="${MY_LIBDIR}"
|
||||
export QMAKE="$(qt6_get_bindir)/qmake"
|
||||
|
||||
edo ${EPYTHON} setup.py build
|
||||
edo ${EPYTHON} setup.py gui
|
||||
|
||||
# A few different resources are bundled in the distfile by default, because
|
||||
# not all systems necessarily have them. We un-vendor them, using the
|
||||
# upstream integrated approach if possible. See setup/revendor.py and
|
||||
# consider migrating other resources to this if they do not use it, in
|
||||
# *preference* over manual rm'ing.
|
||||
edo ${EPYTHON} setup.py liberation_fonts \
|
||||
--path-to-liberation_fonts "${EPREFIX}"/usr/share/fonts/liberation-fonts \
|
||||
--system-liberation_fonts
|
||||
if use system-mathjax; then
|
||||
edo ${EPYTHON} setup.py mathjax --path-to-mathjax "${EPREFIX}"/usr/share/mathjax --system-mathjax
|
||||
edo ${EPYTHON} setup.py rapydscript
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# Skipped tests:
|
||||
local _test_excludes=(
|
||||
# unpackaged Python dependency: py7zr
|
||||
7z
|
||||
# unpackaged Python dependency: pyzstd
|
||||
test_zstd
|
||||
# tests if a completely unused module is bundled
|
||||
pycryptodome
|
||||
|
||||
$(usev !speech speech_dispatcher)
|
||||
$(usev !unrar test_unrar)
|
||||
|
||||
# undocumented reasons
|
||||
test_mem_leaks
|
||||
test_searching
|
||||
)
|
||||
|
||||
edo ${PYTHON} setup.py test "${_test_excludes[@]/#/--exclude-test-name=}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
|
||||
# File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
|
||||
# return _parse_localename(localename)
|
||||
# File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
|
||||
# raise ValueError, 'unknown locale: %s' % localename
|
||||
#ValueError: unknown locale: 46
|
||||
export -n LANG LANGUAGE ${!LC_*}
|
||||
export LC_ALL=C.utf8 # bug #709682
|
||||
|
||||
# Bug #295672 - Avoid sandbox violation in ~/.config by forcing
|
||||
# variables to point to our fake temporary $HOME.
|
||||
export HOME="${T}/fake_homedir"
|
||||
export CALIBRE_CONFIG_DIRECTORY="${HOME}/.config/calibre"
|
||||
mkdir -p "${CALIBRE_CONFIG_DIRECTORY}" || die
|
||||
|
||||
addpredict /dev/dri #665310
|
||||
|
||||
# If this directory doesn't exist, zsh completion won't install
|
||||
dodir /usr/share/zsh/site-functions
|
||||
|
||||
edo "${PYTHON}" setup.py install \
|
||||
--staging-root="${ED}/usr" \
|
||||
--prefix="${EPREFIX}/usr" \
|
||||
--libdir="${EPREFIX}/usr/$(get_libdir)" \
|
||||
--staging-libdir="${ED}/usr/$(get_libdir)" \
|
||||
--system-plugins-location="${EPREFIX}/usr/share/calibre/system-plugins"
|
||||
|
||||
cp -r man-pages/ "${ED}"/usr/share/man || die
|
||||
|
||||
find "${ED}"/usr/share -type d -empty -delete || die
|
||||
|
||||
python_fix_shebang "${ED}/usr/bin"
|
||||
|
||||
python_optimize "${ED}"/usr/$(get_libdir)/calibre "${D}/$(python_get_sitedir)"
|
||||
|
||||
newinitd "${FILESDIR}"/calibre-server-3.init calibre-server
|
||||
newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server
|
||||
}
|
||||
@@ -1,246 +0,0 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
PYTHON_REQ_USE="sqlite,ssl"
|
||||
|
||||
inherit edo toolchain-funcs python-single-r1 qmake-utils verify-sig xdg
|
||||
|
||||
DESCRIPTION="Ebook management application"
|
||||
HOMEPAGE="https://calibre-ebook.com/"
|
||||
SRC_URI="
|
||||
https://download.calibre-ebook.com/${PV}/${P}.tar.xz
|
||||
verify-sig? ( https://calibre-ebook.com/signatures/${P}.tar.xz.sig )
|
||||
"
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/kovidgoyal.gpg
|
||||
|
||||
LICENSE="
|
||||
GPL-3+
|
||||
GPL-3
|
||||
GPL-2+
|
||||
GPL-2
|
||||
GPL-1+
|
||||
LGPL-3+
|
||||
LGPL-2.1+
|
||||
LGPL-2.1
|
||||
BSD
|
||||
MIT
|
||||
Old-MIT
|
||||
Apache-2.0
|
||||
public-domain
|
||||
|| ( Artistic GPL-1+ )
|
||||
CC-BY-3.0
|
||||
OFL-1.1
|
||||
PSF-2
|
||||
"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~arm64"
|
||||
IUSE="+font-subsetting ios speech +system-mathjax test +udisks unrar"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
|
||||
# Qt slotted dependencies are used because the libheadless.so plugin links to
|
||||
# QT_*_PRIVATE_ABI. It only uses core/gui/dbus.
|
||||
COMMON_DEPEND="${PYTHON_DEPS}
|
||||
app-i18n/uchardet
|
||||
>=app-text/hunspell-1.7:=
|
||||
>=app-text/podofo-0.10.0:=
|
||||
app-text/poppler[utils]
|
||||
dev-libs/hyphen:=
|
||||
>=dev-libs/icu-57.1:=
|
||||
dev-libs/openssl:=
|
||||
dev-libs/snowball-stemmer:=
|
||||
$(python_gen_cond_dep '
|
||||
>=dev-python/apsw-3.25.2_p1[${PYTHON_USEDEP}]
|
||||
dev-python/beautifulsoup4[${PYTHON_USEDEP}]
|
||||
>=dev-python/css-parser-1.0.4[${PYTHON_USEDEP}]
|
||||
dev-python/dnspython[${PYTHON_USEDEP}]
|
||||
>=dev-python/feedparser-5.2.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/html2text-2019.8.11[${PYTHON_USEDEP}]
|
||||
>=dev-python/html5-parser-0.4.9[${PYTHON_USEDEP}]
|
||||
dev-python/jeepney[${PYTHON_USEDEP}]
|
||||
>=dev-python/lxml-3.8.0[${PYTHON_USEDEP}]
|
||||
dev-python/lxml-html-clean[${PYTHON_USEDEP}]
|
||||
>=dev-python/markdown-3.0.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/mechanize-0.3.5[${PYTHON_USEDEP}]
|
||||
>=dev-python/msgpack-0.6.2[${PYTHON_USEDEP}]
|
||||
>=dev-python/netifaces-0.10.5[${PYTHON_USEDEP}]
|
||||
>=dev-python/pillow-3.2.0[jpeg,truetype,webp,zlib,${PYTHON_USEDEP}]
|
||||
>=dev-python/psutil-4.3.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pychm-0.8.6[${PYTHON_USEDEP}]
|
||||
>=dev-python/pygments-2.3.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}]
|
||||
dev-python/pyqt6[gui,network,opengl,printsupport,quick,svg,widgets,${PYTHON_USEDEP}]
|
||||
dev-python/pyqt6-webengine[widgets,${PYTHON_USEDEP}]
|
||||
dev-python/regex[${PYTHON_USEDEP}]
|
||||
dev-python/xxhash[${PYTHON_USEDEP}]
|
||||
>=dev-python/zeroconf-0.75.0[${PYTHON_USEDEP}]
|
||||
')
|
||||
dev-qt/qtbase:6=[gui,widgets]
|
||||
dev-qt/qtimageformats:6
|
||||
dev-util/desktop-file-utils
|
||||
dev-util/gtk-update-icon-cache
|
||||
media-fonts/liberation-fonts
|
||||
media-libs/fontconfig:=
|
||||
>=media-libs/freetype-2:=
|
||||
>=media-libs/libmtp-1.1.11:=
|
||||
>=media-gfx/optipng-0.7.6
|
||||
virtual/libusb:1=
|
||||
x11-misc/shared-mime-info
|
||||
>=x11-misc/xdg-utils-1.0.2-r2
|
||||
font-subsetting? ( $(python_gen_cond_dep 'dev-python/fonttools[${PYTHON_USEDEP}]') )
|
||||
ios? (
|
||||
>=app-pda/usbmuxd-1.0.8
|
||||
>=app-pda/libimobiledevice-1.2.0
|
||||
)
|
||||
speech? ( $(python_gen_cond_dep 'app-accessibility/speech-dispatcher[python,${PYTHON_USEDEP}]') )
|
||||
system-mathjax? ( >=dev-libs/mathjax-3:= )
|
||||
udisks? ( virtual/libudev )
|
||||
unrar? ( dev-python/unrardll )
|
||||
"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
udisks? ( sys-fs/udisks:2 )"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
test? ( $(python_gen_cond_dep '>=dev-python/chardet-3.0.3[${PYTHON_USEDEP}]') )
|
||||
"
|
||||
BDEPEND="$(python_gen_cond_dep '
|
||||
>=dev-python/pyqt-builder-1.10.3[${PYTHON_USEDEP}]
|
||||
>=dev-python/sip-5[${PYTHON_USEDEP}]
|
||||
')
|
||||
virtual/pkgconfig
|
||||
system-mathjax? ( dev-lang/rapydscript-ng )
|
||||
verify-sig? ( sec-keys/openpgp-keys-kovidgoyal )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
# Skip calling a binary (JxrDecApp) from libjxr which is used for tests
|
||||
# We don't (yet?) package libjxr and it seems to be dead upstream
|
||||
# (last commit in 2017)
|
||||
"${FILESDIR}/${PN}-7.0.0-jxr-test.patch"
|
||||
# Don't test availability of PyQt6 tts module, which is not yet used.
|
||||
# Recheck this with future version bumps...
|
||||
"${FILESDIR}"/calibre-7.17.0-qt-texttospeech.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Warning:
|
||||
#
|
||||
# While it might be rather tempting to add yet another sed here,
|
||||
# please don't. There have been several bugs in Gentoo's packaging
|
||||
# of calibre from seds-which-become-stale. Please consider
|
||||
# creating a patch instead, but in any case, run the test suite
|
||||
# and ensure it passes.
|
||||
#
|
||||
# If in doubt about a problem, checking Fedora's packaging is recommended.
|
||||
|
||||
# Disable unnecessary privilege dropping for bug #287067.
|
||||
sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
|
||||
-i setup/install.py || die "sed failed to patch install.py"
|
||||
|
||||
# This is only ever used at build time. It contains a small embedded copy
|
||||
# of the rapydscript-ng compiler usable inside of qtwebengine, if you don't
|
||||
# have rapydscript-ng (a nodejs package) itself installed. Its only purpose
|
||||
# is to build some resources that come bundled in dist tarballs already...
|
||||
# and which we may also need to regenerate e.g. to use system-mathjax.
|
||||
#
|
||||
# However, running qtwebengine violates the portage sandbox (among other
|
||||
# things, it tries to create directories in /usr! amazing) so this is a
|
||||
# wash anyway. The only real solution here is to package rapydscript-ng.
|
||||
#
|
||||
# We do not need it at build time, and *no one* needs it at install time.
|
||||
# Delete the cruft.
|
||||
rm -r resources/rapydscript/ || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# TODO: get qmake called by setup.py to respect CC and CXX too
|
||||
tc-export CC CXX
|
||||
|
||||
# bug 821871
|
||||
local MY_LIBDIR="${ESYSROOT}/usr/$(get_libdir)"
|
||||
export FT_LIB_DIR="${MY_LIBDIR}" HUNSPELL_LIB_DIR="${MY_LIBDIR}" PODOFO_LIB_DIR="${MY_LIBDIR}"
|
||||
export QMAKE="$(qt6_get_bindir)/qmake"
|
||||
|
||||
edo ${EPYTHON} setup.py build
|
||||
edo ${EPYTHON} setup.py gui
|
||||
|
||||
# A few different resources are bundled in the distfile by default, because
|
||||
# not all systems necessarily have them. We un-vendor them, using the
|
||||
# upstream integrated approach if possible. See setup/revendor.py and
|
||||
# consider migrating other resources to this if they do not use it, in
|
||||
# *preference* over manual rm'ing.
|
||||
edo ${EPYTHON} setup.py liberation_fonts \
|
||||
--path-to-liberation_fonts "${EPREFIX}"/usr/share/fonts/liberation-fonts \
|
||||
--system-liberation_fonts
|
||||
if use system-mathjax; then
|
||||
edo ${EPYTHON} setup.py mathjax --path-to-mathjax "${EPREFIX}"/usr/share/mathjax --system-mathjax
|
||||
edo ${EPYTHON} setup.py rapydscript
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# Skipped tests:
|
||||
local _test_excludes=(
|
||||
# unpackaged Python dependency: py7zr
|
||||
7z
|
||||
# unpackaged Python dependency: pyzstd
|
||||
test_zstd
|
||||
# tests if a completely unused module is bundled
|
||||
pycryptodome
|
||||
|
||||
$(usev !speech speech_dispatcher)
|
||||
$(usev !unrar test_unrar)
|
||||
|
||||
# undocumented reasons
|
||||
test_mem_leaks
|
||||
test_searching
|
||||
)
|
||||
|
||||
edo ${PYTHON} setup.py test "${_test_excludes[@]/#/--exclude-test-name=}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
|
||||
# File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
|
||||
# return _parse_localename(localename)
|
||||
# File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
|
||||
# raise ValueError, 'unknown locale: %s' % localename
|
||||
#ValueError: unknown locale: 46
|
||||
export -n LANG LANGUAGE ${!LC_*}
|
||||
export LC_ALL=C.utf8 # bug #709682
|
||||
|
||||
# Bug #295672 - Avoid sandbox violation in ~/.config by forcing
|
||||
# variables to point to our fake temporary $HOME.
|
||||
export HOME="${T}/fake_homedir"
|
||||
export CALIBRE_CONFIG_DIRECTORY="${HOME}/.config/calibre"
|
||||
mkdir -p "${CALIBRE_CONFIG_DIRECTORY}" || die
|
||||
|
||||
addpredict /dev/dri #665310
|
||||
|
||||
# If this directory doesn't exist, zsh completion won't install
|
||||
dodir /usr/share/zsh/site-functions
|
||||
|
||||
edo "${PYTHON}" setup.py install \
|
||||
--staging-root="${ED}/usr" \
|
||||
--prefix="${EPREFIX}/usr" \
|
||||
--libdir="${EPREFIX}/usr/$(get_libdir)" \
|
||||
--staging-libdir="${ED}/usr/$(get_libdir)" \
|
||||
--system-plugins-location="${EPREFIX}/usr/share/calibre/system-plugins"
|
||||
|
||||
cp -r man-pages/ "${ED}"/usr/share/man || die
|
||||
|
||||
find "${ED}"/usr/share -type d -empty -delete || die
|
||||
|
||||
python_fix_shebang "${ED}/usr/bin"
|
||||
|
||||
python_optimize "${ED}"/usr/$(get_libdir)/calibre "${D}/$(python_get_sitedir)"
|
||||
|
||||
newinitd "${FILESDIR}"/calibre-server-3.init calibre-server
|
||||
newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server
|
||||
}
|
||||
@@ -1,254 +0,0 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
PYTHON_REQ_USE="sqlite,ssl"
|
||||
|
||||
inherit edo toolchain-funcs python-single-r1 qmake-utils verify-sig xdg
|
||||
|
||||
DESCRIPTION="Ebook management application"
|
||||
HOMEPAGE="https://calibre-ebook.com/"
|
||||
SRC_URI="
|
||||
https://download.calibre-ebook.com/${PV}/${P}.tar.xz
|
||||
verify-sig? ( https://calibre-ebook.com/signatures/${P}.tar.xz.sig )
|
||||
"
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/kovidgoyal.gpg
|
||||
|
||||
LICENSE="
|
||||
GPL-3+
|
||||
GPL-3
|
||||
GPL-2+
|
||||
GPL-2
|
||||
GPL-1+
|
||||
LGPL-3+
|
||||
LGPL-2.1+
|
||||
LGPL-2.1
|
||||
BSD
|
||||
MIT
|
||||
Old-MIT
|
||||
Apache-2.0
|
||||
public-domain
|
||||
|| ( Artistic GPL-1+ )
|
||||
CC-BY-3.0
|
||||
OFL-1.1
|
||||
PSF-2
|
||||
"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~arm64"
|
||||
IUSE="+font-subsetting ios speech +system-mathjax test +udisks unrar"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
|
||||
# Qt slotted dependencies are used because the libheadless.so plugin links to
|
||||
# QT_*_PRIVATE_ABI. It only uses core/gui/dbus.
|
||||
COMMON_DEPEND="${PYTHON_DEPS}
|
||||
app-i18n/uchardet
|
||||
>=app-text/hunspell-1.7:=
|
||||
>=app-text/podofo-0.10.0:=
|
||||
app-text/poppler[utils]
|
||||
dev-libs/hyphen:=
|
||||
>=dev-libs/icu-57.1:=
|
||||
dev-libs/openssl:=
|
||||
dev-libs/snowball-stemmer:=
|
||||
$(python_gen_cond_dep '
|
||||
>=dev-python/apsw-3.25.2_p1[${PYTHON_USEDEP}]
|
||||
dev-python/beautifulsoup4[${PYTHON_USEDEP}]
|
||||
>=dev-python/css-parser-1.0.4[${PYTHON_USEDEP}]
|
||||
dev-python/dnspython[${PYTHON_USEDEP}]
|
||||
>=dev-python/feedparser-5.2.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/html2text-2019.8.11[${PYTHON_USEDEP}]
|
||||
>=dev-python/html5-parser-0.4.9[${PYTHON_USEDEP}]
|
||||
dev-python/jeepney[${PYTHON_USEDEP}]
|
||||
>=dev-python/lxml-3.8.0[${PYTHON_USEDEP}]
|
||||
dev-python/lxml-html-clean[${PYTHON_USEDEP}]
|
||||
>=dev-python/markdown-3.0.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/mechanize-0.3.5[${PYTHON_USEDEP}]
|
||||
>=dev-python/msgpack-0.6.2[${PYTHON_USEDEP}]
|
||||
>=dev-python/netifaces-0.10.5[${PYTHON_USEDEP}]
|
||||
>=dev-python/pillow-3.2.0[jpeg,truetype,webp,zlib,${PYTHON_USEDEP}]
|
||||
>=dev-python/psutil-4.3.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pychm-0.8.6[${PYTHON_USEDEP}]
|
||||
>=dev-python/pygments-2.3.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}]
|
||||
dev-python/pyqt6[gui,network,opengl,printsupport,quick,svg,widgets,${PYTHON_USEDEP}]
|
||||
dev-python/pyqt6-webengine[widgets,${PYTHON_USEDEP}]
|
||||
dev-python/regex[${PYTHON_USEDEP}]
|
||||
dev-python/xxhash[${PYTHON_USEDEP}]
|
||||
>=dev-python/zeroconf-0.75.0[${PYTHON_USEDEP}]
|
||||
')
|
||||
dev-qt/qtbase:6=[gui,widgets]
|
||||
dev-qt/qtimageformats:6
|
||||
dev-util/desktop-file-utils
|
||||
dev-util/gtk-update-icon-cache
|
||||
media-fonts/liberation-fonts
|
||||
media-libs/fontconfig:=
|
||||
>=media-libs/freetype-2:=
|
||||
>=media-libs/libmtp-1.1.11:=
|
||||
>=media-gfx/optipng-0.7.6
|
||||
virtual/libusb:1=
|
||||
x11-misc/shared-mime-info
|
||||
>=x11-misc/xdg-utils-1.0.2-r2
|
||||
font-subsetting? ( $(python_gen_cond_dep 'dev-python/fonttools[${PYTHON_USEDEP}]') )
|
||||
ios? (
|
||||
>=app-pda/usbmuxd-1.0.8
|
||||
>=app-pda/libimobiledevice-1.2.0
|
||||
)
|
||||
speech? (
|
||||
$(python_gen_cond_dep 'app-accessibility/speech-dispatcher[python,${PYTHON_USEDEP}]')
|
||||
dev-python/pyqt6[multimedia,speech]
|
||||
)
|
||||
system-mathjax? ( >=dev-libs/mathjax-3:= )
|
||||
udisks? ( virtual/libudev )
|
||||
unrar? ( dev-python/unrardll )
|
||||
"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
udisks? ( sys-fs/udisks:2 )"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
test? ( $(python_gen_cond_dep '>=dev-python/chardet-3.0.3[${PYTHON_USEDEP}]') )
|
||||
"
|
||||
BDEPEND="$(python_gen_cond_dep '
|
||||
>=dev-python/pyqt-builder-1.10.3[${PYTHON_USEDEP}]
|
||||
>=dev-python/sip-5[${PYTHON_USEDEP}]
|
||||
')
|
||||
virtual/pkgconfig
|
||||
system-mathjax? ( dev-lang/rapydscript-ng )
|
||||
verify-sig? ( sec-keys/openpgp-keys-kovidgoyal )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
# Skip calling a binary (JxrDecApp) from libjxr which is used for tests
|
||||
# We don't (yet?) package libjxr and it seems to be dead upstream
|
||||
# (last commit in 2017)
|
||||
"${FILESDIR}/${PN}-7.0.0-jxr-test.patch"
|
||||
# fix tests with pillow 11
|
||||
"${FILESDIR}"/0001-PIL-11.0-changes-its-webp-features-output.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Warning:
|
||||
#
|
||||
# While it might be rather tempting to add yet another sed here,
|
||||
# please don't. There have been several bugs in Gentoo's packaging
|
||||
# of calibre from seds-which-become-stale. Please consider
|
||||
# creating a patch instead, but in any case, run the test suite
|
||||
# and ensure it passes.
|
||||
#
|
||||
# If in doubt about a problem, checking Fedora's packaging is recommended.
|
||||
|
||||
# Disable unnecessary privilege dropping for bug #287067.
|
||||
sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
|
||||
-i setup/install.py || die "sed failed to patch install.py"
|
||||
|
||||
# This is only ever used at build time. It contains a small embedded copy
|
||||
# of the rapydscript-ng compiler usable inside of qtwebengine, if you don't
|
||||
# have rapydscript-ng (a nodejs package) itself installed. Its only purpose
|
||||
# is to build some resources that come bundled in dist tarballs already...
|
||||
# and which we may also need to regenerate e.g. to use system-mathjax.
|
||||
#
|
||||
# However, running qtwebengine violates the portage sandbox (among other
|
||||
# things, it tries to create directories in /usr! amazing) so this is a
|
||||
# wash anyway. The only real solution here is to package rapydscript-ng.
|
||||
#
|
||||
# We do not need it at build time, and *no one* needs it at install time.
|
||||
# Delete the cruft.
|
||||
rm -r resources/rapydscript/ || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# TODO: get qmake called by setup.py to respect CC and CXX too
|
||||
tc-export CC CXX
|
||||
|
||||
# bug 821871
|
||||
local MY_LIBDIR="${ESYSROOT}/usr/$(get_libdir)"
|
||||
export FT_LIB_DIR="${MY_LIBDIR}" HUNSPELL_LIB_DIR="${MY_LIBDIR}" PODOFO_LIB_DIR="${MY_LIBDIR}"
|
||||
export QMAKE="$(qt6_get_bindir)/qmake"
|
||||
|
||||
edo ${EPYTHON} setup.py build
|
||||
edo ${EPYTHON} setup.py gui
|
||||
|
||||
# A few different resources are bundled in the distfile by default, because
|
||||
# not all systems necessarily have them. We un-vendor them, using the
|
||||
# upstream integrated approach if possible. See setup/revendor.py and
|
||||
# consider migrating other resources to this if they do not use it, in
|
||||
# *preference* over manual rm'ing.
|
||||
edo ${EPYTHON} setup.py liberation_fonts \
|
||||
--path-to-liberation_fonts "${EPREFIX}"/usr/share/fonts/liberation-fonts \
|
||||
--system-liberation_fonts
|
||||
if use system-mathjax; then
|
||||
edo ${EPYTHON} setup.py mathjax --path-to-mathjax "${EPREFIX}"/usr/share/mathjax --system-mathjax
|
||||
edo ${EPYTHON} setup.py rapydscript
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# Skipped tests:
|
||||
local _test_excludes=(
|
||||
# unpackaged Python dependency: py7zr
|
||||
7z
|
||||
# unpackaged Python dependency: pyzstd
|
||||
test_zstd
|
||||
# unpackaged TTS backend (optional at runtime): https://github.com/rhasspy/piper
|
||||
piper
|
||||
# tests if a completely unused module is bundled
|
||||
pycryptodome
|
||||
|
||||
$(usev !speech speech_dispatcher)
|
||||
$(usev !unrar test_unrar)
|
||||
|
||||
# undocumented reasons
|
||||
test_mem_leaks
|
||||
test_searching
|
||||
)
|
||||
|
||||
# Some of these tests weren't practical to split out into distinct tests, so
|
||||
# have a different control mechanism
|
||||
use speech || export SKIP_SPEECH_TESTS=1
|
||||
|
||||
edo ${PYTHON} setup.py test "${_test_excludes[@]/#/--exclude-test-name=}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
|
||||
# File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
|
||||
# return _parse_localename(localename)
|
||||
# File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
|
||||
# raise ValueError, 'unknown locale: %s' % localename
|
||||
#ValueError: unknown locale: 46
|
||||
export -n LANG LANGUAGE ${!LC_*}
|
||||
export LC_ALL=C.utf8 # bug #709682
|
||||
|
||||
# Bug #295672 - Avoid sandbox violation in ~/.config by forcing
|
||||
# variables to point to our fake temporary $HOME.
|
||||
export HOME="${T}/fake_homedir"
|
||||
export CALIBRE_CONFIG_DIRECTORY="${HOME}/.config/calibre"
|
||||
mkdir -p "${CALIBRE_CONFIG_DIRECTORY}" || die
|
||||
|
||||
addpredict /dev/dri #665310
|
||||
|
||||
# If this directory doesn't exist, zsh completion won't install
|
||||
dodir /usr/share/zsh/site-functions
|
||||
|
||||
edo "${PYTHON}" setup.py install \
|
||||
--staging-root="${ED}/usr" \
|
||||
--prefix="${EPREFIX}/usr" \
|
||||
--libdir="${EPREFIX}/usr/$(get_libdir)" \
|
||||
--staging-libdir="${ED}/usr/$(get_libdir)" \
|
||||
--system-plugins-location="${EPREFIX}/usr/share/calibre/system-plugins"
|
||||
|
||||
cp -r man-pages/ "${ED}"/usr/share/man || die
|
||||
|
||||
find "${ED}"/usr/share -type d -empty -delete || die
|
||||
|
||||
python_fix_shebang "${ED}/usr/bin"
|
||||
|
||||
python_optimize "${ED}"/usr/$(get_libdir)/calibre "${D}/$(python_get_sitedir)"
|
||||
|
||||
newinitd "${FILESDIR}"/calibre-server-3.init calibre-server
|
||||
newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server
|
||||
}
|
||||
@@ -1,255 +0,0 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
PYTHON_REQ_USE="sqlite,ssl"
|
||||
|
||||
inherit edo toolchain-funcs python-single-r1 qmake-utils verify-sig xdg
|
||||
|
||||
DESCRIPTION="Ebook management application"
|
||||
HOMEPAGE="https://calibre-ebook.com/"
|
||||
SRC_URI="
|
||||
https://download.calibre-ebook.com/${PV}/${P}.tar.xz
|
||||
verify-sig? ( https://calibre-ebook.com/signatures/${P}.tar.xz.sig )
|
||||
"
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/kovidgoyal.gpg
|
||||
|
||||
LICENSE="
|
||||
GPL-3+
|
||||
GPL-3
|
||||
GPL-2+
|
||||
GPL-2
|
||||
GPL-1+
|
||||
LGPL-3+
|
||||
LGPL-2.1+
|
||||
LGPL-2.1
|
||||
BSD
|
||||
MIT
|
||||
Old-MIT
|
||||
Apache-2.0
|
||||
public-domain
|
||||
|| ( Artistic GPL-1+ )
|
||||
CC-BY-3.0
|
||||
OFL-1.1
|
||||
PSF-2
|
||||
"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~arm64"
|
||||
IUSE="+font-subsetting ios speech +system-mathjax test +udisks unrar"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
|
||||
# Qt slotted dependencies are used because the libheadless.so plugin links to
|
||||
# QT_*_PRIVATE_ABI. It only uses core/gui/dbus.
|
||||
COMMON_DEPEND="${PYTHON_DEPS}
|
||||
app-i18n/uchardet
|
||||
>=app-text/hunspell-1.7:=
|
||||
>=app-text/podofo-0.10.0:=
|
||||
app-text/poppler[utils]
|
||||
dev-libs/hyphen:=
|
||||
>=dev-libs/icu-57.1:=
|
||||
dev-libs/openssl:=
|
||||
dev-libs/snowball-stemmer:=
|
||||
$(python_gen_cond_dep '
|
||||
>=dev-python/apsw-3.25.2_p1[${PYTHON_USEDEP}]
|
||||
dev-python/beautifulsoup4[${PYTHON_USEDEP}]
|
||||
>=dev-python/css-parser-1.0.4[${PYTHON_USEDEP}]
|
||||
dev-python/dnspython[${PYTHON_USEDEP}]
|
||||
>=dev-python/feedparser-5.2.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/html2text-2019.8.11[${PYTHON_USEDEP}]
|
||||
>=dev-python/html5-parser-0.4.9[${PYTHON_USEDEP}]
|
||||
dev-python/jeepney[${PYTHON_USEDEP}]
|
||||
>=dev-python/lxml-3.8.0[${PYTHON_USEDEP}]
|
||||
dev-python/lxml-html-clean[${PYTHON_USEDEP}]
|
||||
>=dev-python/markdown-3.0.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/mechanize-0.3.5[${PYTHON_USEDEP}]
|
||||
>=dev-python/msgpack-0.6.2[${PYTHON_USEDEP}]
|
||||
>=dev-python/netifaces-0.10.5[${PYTHON_USEDEP}]
|
||||
>=dev-python/pillow-3.2.0[jpeg,truetype,webp,zlib,${PYTHON_USEDEP}]
|
||||
>=dev-python/psutil-4.3.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pychm-0.8.6[${PYTHON_USEDEP}]
|
||||
>=dev-python/pygments-2.3.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}]
|
||||
dev-python/pyqt6[gui,network,opengl,printsupport,quick,svg,widgets,${PYTHON_USEDEP}]
|
||||
dev-python/pyqt6-webengine[widgets,${PYTHON_USEDEP}]
|
||||
dev-python/regex[${PYTHON_USEDEP}]
|
||||
dev-python/xxhash[${PYTHON_USEDEP}]
|
||||
>=dev-python/zeroconf-0.75.0[${PYTHON_USEDEP}]
|
||||
')
|
||||
dev-qt/qtbase:6=[gui,widgets]
|
||||
dev-qt/qtimageformats:6
|
||||
dev-util/desktop-file-utils
|
||||
dev-util/gtk-update-icon-cache
|
||||
media-fonts/liberation-fonts
|
||||
media-libs/fontconfig:=
|
||||
>=media-libs/freetype-2:=
|
||||
>=media-libs/libmtp-1.1.11:=
|
||||
>=media-gfx/optipng-0.7.6
|
||||
>=media-video/ffmpeg-6:=
|
||||
virtual/libusb:1=
|
||||
x11-misc/shared-mime-info
|
||||
>=x11-misc/xdg-utils-1.0.2-r2
|
||||
font-subsetting? ( $(python_gen_cond_dep 'dev-python/fonttools[${PYTHON_USEDEP}]') )
|
||||
ios? (
|
||||
>=app-pda/usbmuxd-1.0.8
|
||||
>=app-pda/libimobiledevice-1.2.0
|
||||
)
|
||||
speech? (
|
||||
$(python_gen_cond_dep 'app-accessibility/speech-dispatcher[python,${PYTHON_USEDEP}]')
|
||||
dev-python/pyqt6[multimedia,speech]
|
||||
)
|
||||
system-mathjax? ( >=dev-libs/mathjax-3:= )
|
||||
udisks? ( virtual/libudev )
|
||||
unrar? ( dev-python/unrardll )
|
||||
"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
udisks? ( sys-fs/udisks:2 )"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
test? ( $(python_gen_cond_dep '>=dev-python/chardet-3.0.3[${PYTHON_USEDEP}]') )
|
||||
"
|
||||
BDEPEND="$(python_gen_cond_dep '
|
||||
>=dev-python/pyqt-builder-1.10.3[${PYTHON_USEDEP}]
|
||||
>=dev-python/sip-5[${PYTHON_USEDEP}]
|
||||
')
|
||||
virtual/pkgconfig
|
||||
system-mathjax? ( dev-lang/rapydscript-ng )
|
||||
verify-sig? ( sec-keys/openpgp-keys-kovidgoyal )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
# Skip calling a binary (JxrDecApp) from libjxr which is used for tests
|
||||
# We don't (yet?) package libjxr and it seems to be dead upstream
|
||||
# (last commit in 2017)
|
||||
"${FILESDIR}/${PN}-7.0.0-jxr-test.patch"
|
||||
# fix tests with pillow 11
|
||||
"${FILESDIR}"/0001-PIL-11.0-changes-its-webp-features-output.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Warning:
|
||||
#
|
||||
# While it might be rather tempting to add yet another sed here,
|
||||
# please don't. There have been several bugs in Gentoo's packaging
|
||||
# of calibre from seds-which-become-stale. Please consider
|
||||
# creating a patch instead, but in any case, run the test suite
|
||||
# and ensure it passes.
|
||||
#
|
||||
# If in doubt about a problem, checking Fedora's packaging is recommended.
|
||||
|
||||
# Disable unnecessary privilege dropping for bug #287067.
|
||||
sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
|
||||
-i setup/install.py || die "sed failed to patch install.py"
|
||||
|
||||
# This is only ever used at build time. It contains a small embedded copy
|
||||
# of the rapydscript-ng compiler usable inside of qtwebengine, if you don't
|
||||
# have rapydscript-ng (a nodejs package) itself installed. Its only purpose
|
||||
# is to build some resources that come bundled in dist tarballs already...
|
||||
# and which we may also need to regenerate e.g. to use system-mathjax.
|
||||
#
|
||||
# However, running qtwebengine violates the portage sandbox (among other
|
||||
# things, it tries to create directories in /usr! amazing) so this is a
|
||||
# wash anyway. The only real solution here is to package rapydscript-ng.
|
||||
#
|
||||
# We do not need it at build time, and *no one* needs it at install time.
|
||||
# Delete the cruft.
|
||||
rm -r resources/rapydscript/ || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# TODO: get qmake called by setup.py to respect CC and CXX too
|
||||
tc-export CC CXX
|
||||
|
||||
# bug 821871
|
||||
local MY_LIBDIR="${ESYSROOT}/usr/$(get_libdir)"
|
||||
export FT_LIB_DIR="${MY_LIBDIR}" HUNSPELL_LIB_DIR="${MY_LIBDIR}" PODOFO_LIB_DIR="${MY_LIBDIR}"
|
||||
export QMAKE="$(qt6_get_bindir)/qmake"
|
||||
|
||||
edo ${EPYTHON} setup.py build
|
||||
edo ${EPYTHON} setup.py gui
|
||||
|
||||
# A few different resources are bundled in the distfile by default, because
|
||||
# not all systems necessarily have them. We un-vendor them, using the
|
||||
# upstream integrated approach if possible. See setup/revendor.py and
|
||||
# consider migrating other resources to this if they do not use it, in
|
||||
# *preference* over manual rm'ing.
|
||||
edo ${EPYTHON} setup.py liberation_fonts \
|
||||
--path-to-liberation_fonts "${EPREFIX}"/usr/share/fonts/liberation-fonts \
|
||||
--system-liberation_fonts
|
||||
if use system-mathjax; then
|
||||
edo ${EPYTHON} setup.py mathjax --path-to-mathjax "${EPREFIX}"/usr/share/mathjax --system-mathjax
|
||||
edo ${EPYTHON} setup.py rapydscript
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# Skipped tests:
|
||||
local _test_excludes=(
|
||||
# unpackaged Python dependency: py7zr
|
||||
7z
|
||||
# unpackaged Python dependency: pyzstd
|
||||
test_zstd
|
||||
# unpackaged TTS backend (optional at runtime): https://github.com/rhasspy/piper
|
||||
piper
|
||||
# tests if a completely unused module is bundled
|
||||
pycryptodome
|
||||
|
||||
$(usev !speech speech_dispatcher)
|
||||
$(usev !unrar test_unrar)
|
||||
|
||||
# undocumented reasons
|
||||
test_mem_leaks
|
||||
test_searching
|
||||
)
|
||||
|
||||
# Some of these tests weren't practical to split out into distinct tests, so
|
||||
# have a different control mechanism
|
||||
use speech || export SKIP_SPEECH_TESTS=1
|
||||
|
||||
edo ${PYTHON} setup.py test "${_test_excludes[@]/#/--exclude-test-name=}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
|
||||
# File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
|
||||
# return _parse_localename(localename)
|
||||
# File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
|
||||
# raise ValueError, 'unknown locale: %s' % localename
|
||||
#ValueError: unknown locale: 46
|
||||
export -n LANG LANGUAGE ${!LC_*}
|
||||
export LC_ALL=C.utf8 # bug #709682
|
||||
|
||||
# Bug #295672 - Avoid sandbox violation in ~/.config by forcing
|
||||
# variables to point to our fake temporary $HOME.
|
||||
export HOME="${T}/fake_homedir"
|
||||
export CALIBRE_CONFIG_DIRECTORY="${HOME}/.config/calibre"
|
||||
mkdir -p "${CALIBRE_CONFIG_DIRECTORY}" || die
|
||||
|
||||
addpredict /dev/dri #665310
|
||||
|
||||
# If this directory doesn't exist, zsh completion won't install
|
||||
dodir /usr/share/zsh/site-functions
|
||||
|
||||
edo "${PYTHON}" setup.py install \
|
||||
--staging-root="${ED}/usr" \
|
||||
--prefix="${EPREFIX}/usr" \
|
||||
--libdir="${EPREFIX}/usr/$(get_libdir)" \
|
||||
--staging-libdir="${ED}/usr/$(get_libdir)" \
|
||||
--system-plugins-location="${EPREFIX}/usr/share/calibre/system-plugins"
|
||||
|
||||
cp -r man-pages/ "${ED}"/usr/share/man || die
|
||||
|
||||
find "${ED}"/usr/share -type d -empty -delete || die
|
||||
|
||||
python_fix_shebang "${ED}/usr/bin"
|
||||
|
||||
python_optimize "${ED}"/usr/$(get_libdir)/calibre "${D}/$(python_get_sitedir)"
|
||||
|
||||
newinitd "${FILESDIR}"/calibre-server-3.init calibre-server
|
||||
newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server
|
||||
}
|
||||
@@ -1,253 +0,0 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
PYTHON_REQ_USE="sqlite,ssl"
|
||||
|
||||
inherit edo toolchain-funcs python-single-r1 qmake-utils verify-sig xdg
|
||||
|
||||
DESCRIPTION="Ebook management application"
|
||||
HOMEPAGE="https://calibre-ebook.com/"
|
||||
SRC_URI="
|
||||
https://download.calibre-ebook.com/${PV}/${P}.tar.xz
|
||||
verify-sig? ( https://calibre-ebook.com/signatures/${P}.tar.xz.sig )
|
||||
"
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/kovidgoyal.gpg
|
||||
|
||||
LICENSE="
|
||||
GPL-3+
|
||||
GPL-3
|
||||
GPL-2+
|
||||
GPL-2
|
||||
GPL-1+
|
||||
LGPL-3+
|
||||
LGPL-2.1+
|
||||
LGPL-2.1
|
||||
BSD
|
||||
MIT
|
||||
Old-MIT
|
||||
Apache-2.0
|
||||
public-domain
|
||||
|| ( Artistic GPL-1+ )
|
||||
CC-BY-3.0
|
||||
OFL-1.1
|
||||
PSF-2
|
||||
"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64"
|
||||
IUSE="+font-subsetting ios speech +system-mathjax test +udisks unrar"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
|
||||
# Qt slotted dependencies are used because the libheadless.so plugin links to
|
||||
# QT_*_PRIVATE_ABI. It only uses core/gui/dbus.
|
||||
COMMON_DEPEND="${PYTHON_DEPS}
|
||||
app-i18n/uchardet
|
||||
>=app-text/hunspell-1.7:=
|
||||
>=app-text/podofo-0.10.0:=
|
||||
app-text/poppler[utils]
|
||||
dev-libs/hyphen:=
|
||||
>=dev-libs/icu-57.1:=
|
||||
dev-libs/openssl:=
|
||||
dev-libs/snowball-stemmer:=
|
||||
$(python_gen_cond_dep '
|
||||
>=dev-python/apsw-3.25.2_p1[${PYTHON_USEDEP}]
|
||||
dev-python/beautifulsoup4[${PYTHON_USEDEP}]
|
||||
>=dev-python/css-parser-1.0.4[${PYTHON_USEDEP}]
|
||||
dev-python/dnspython[${PYTHON_USEDEP}]
|
||||
>=dev-python/feedparser-5.2.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/html2text-2019.8.11[${PYTHON_USEDEP}]
|
||||
>=dev-python/html5-parser-0.4.9[${PYTHON_USEDEP}]
|
||||
dev-python/jeepney[${PYTHON_USEDEP}]
|
||||
>=dev-python/lxml-3.8.0[${PYTHON_USEDEP}]
|
||||
dev-python/lxml-html-clean[${PYTHON_USEDEP}]
|
||||
>=dev-python/markdown-3.0.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/mechanize-0.3.5[${PYTHON_USEDEP}]
|
||||
>=dev-python/msgpack-0.6.2[${PYTHON_USEDEP}]
|
||||
>=dev-python/netifaces-0.10.5[${PYTHON_USEDEP}]
|
||||
>=dev-python/pillow-3.2.0[jpeg,truetype,webp,zlib,${PYTHON_USEDEP}]
|
||||
>=dev-python/psutil-4.3.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pychm-0.8.6[${PYTHON_USEDEP}]
|
||||
>=dev-python/pygments-2.3.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}]
|
||||
dev-python/pyqt6[gui,network,opengl,printsupport,quick,svg,widgets,${PYTHON_USEDEP}]
|
||||
dev-python/pyqt6-webengine[widgets,${PYTHON_USEDEP}]
|
||||
dev-python/regex[${PYTHON_USEDEP}]
|
||||
dev-python/xxhash[${PYTHON_USEDEP}]
|
||||
>=dev-python/zeroconf-0.75.0[${PYTHON_USEDEP}]
|
||||
')
|
||||
dev-qt/qtbase:6=[gui,widgets]
|
||||
dev-qt/qtimageformats:6
|
||||
dev-util/desktop-file-utils
|
||||
dev-util/gtk-update-icon-cache
|
||||
media-fonts/liberation-fonts
|
||||
media-libs/fontconfig:=
|
||||
>=media-libs/freetype-2:=
|
||||
>=media-libs/libmtp-1.1.11:=
|
||||
>=media-gfx/optipng-0.7.6
|
||||
>=media-video/ffmpeg-6:=
|
||||
virtual/libusb:1=
|
||||
x11-misc/shared-mime-info
|
||||
>=x11-misc/xdg-utils-1.0.2-r2
|
||||
font-subsetting? ( $(python_gen_cond_dep 'dev-python/fonttools[${PYTHON_USEDEP}]') )
|
||||
ios? (
|
||||
>=app-pda/usbmuxd-1.0.8
|
||||
>=app-pda/libimobiledevice-1.2.0
|
||||
)
|
||||
speech? (
|
||||
$(python_gen_cond_dep 'app-accessibility/speech-dispatcher[python,${PYTHON_USEDEP}]')
|
||||
dev-python/pyqt6[multimedia,speech]
|
||||
)
|
||||
system-mathjax? ( >=dev-libs/mathjax-3:= )
|
||||
udisks? ( virtual/libudev )
|
||||
unrar? ( dev-python/unrardll )
|
||||
"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
udisks? ( sys-fs/udisks:2 )"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
test? ( $(python_gen_cond_dep '>=dev-python/chardet-3.0.3[${PYTHON_USEDEP}]') )
|
||||
"
|
||||
BDEPEND="$(python_gen_cond_dep '
|
||||
>=dev-python/pyqt-builder-1.10.3[${PYTHON_USEDEP}]
|
||||
>=dev-python/sip-5[${PYTHON_USEDEP}]
|
||||
')
|
||||
virtual/pkgconfig
|
||||
system-mathjax? ( dev-lang/rapydscript-ng )
|
||||
verify-sig? ( sec-keys/openpgp-keys-kovidgoyal )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
# Skip calling a binary (JxrDecApp) from libjxr which is used for tests
|
||||
# We don't (yet?) package libjxr and it seems to be dead upstream
|
||||
# (last commit in 2017)
|
||||
"${FILESDIR}/${PN}-7.0.0-jxr-test.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Warning:
|
||||
#
|
||||
# While it might be rather tempting to add yet another sed here,
|
||||
# please don't. There have been several bugs in Gentoo's packaging
|
||||
# of calibre from seds-which-become-stale. Please consider
|
||||
# creating a patch instead, but in any case, run the test suite
|
||||
# and ensure it passes.
|
||||
#
|
||||
# If in doubt about a problem, checking Fedora's packaging is recommended.
|
||||
|
||||
# Disable unnecessary privilege dropping for bug #287067.
|
||||
sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
|
||||
-i setup/install.py || die "sed failed to patch install.py"
|
||||
|
||||
# This is only ever used at build time. It contains a small embedded copy
|
||||
# of the rapydscript-ng compiler usable inside of qtwebengine, if you don't
|
||||
# have rapydscript-ng (a nodejs package) itself installed. Its only purpose
|
||||
# is to build some resources that come bundled in dist tarballs already...
|
||||
# and which we may also need to regenerate e.g. to use system-mathjax.
|
||||
#
|
||||
# However, running qtwebengine violates the portage sandbox (among other
|
||||
# things, it tries to create directories in /usr! amazing) so this is a
|
||||
# wash anyway. The only real solution here is to package rapydscript-ng.
|
||||
#
|
||||
# We do not need it at build time, and *no one* needs it at install time.
|
||||
# Delete the cruft.
|
||||
rm -r resources/rapydscript/ || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# TODO: get qmake called by setup.py to respect CC and CXX too
|
||||
tc-export CC CXX
|
||||
|
||||
# bug 821871
|
||||
local MY_LIBDIR="${ESYSROOT}/usr/$(get_libdir)"
|
||||
export FT_LIB_DIR="${MY_LIBDIR}" HUNSPELL_LIB_DIR="${MY_LIBDIR}" PODOFO_LIB_DIR="${MY_LIBDIR}"
|
||||
export QMAKE="$(qt6_get_bindir)/qmake"
|
||||
|
||||
edo ${EPYTHON} setup.py build
|
||||
edo ${EPYTHON} setup.py gui
|
||||
|
||||
# A few different resources are bundled in the distfile by default, because
|
||||
# not all systems necessarily have them. We un-vendor them, using the
|
||||
# upstream integrated approach if possible. See setup/revendor.py and
|
||||
# consider migrating other resources to this if they do not use it, in
|
||||
# *preference* over manual rm'ing.
|
||||
edo ${EPYTHON} setup.py liberation_fonts \
|
||||
--path-to-liberation_fonts "${EPREFIX}"/usr/share/fonts/liberation-fonts \
|
||||
--system-liberation_fonts
|
||||
if use system-mathjax; then
|
||||
edo ${EPYTHON} setup.py mathjax --path-to-mathjax "${EPREFIX}"/usr/share/mathjax --system-mathjax
|
||||
edo ${EPYTHON} setup.py rapydscript
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# Skipped tests:
|
||||
local _test_excludes=(
|
||||
# unpackaged Python dependency: py7zr
|
||||
7z
|
||||
# unpackaged Python dependency: pyzstd
|
||||
test_zstd
|
||||
# unpackaged TTS backend (optional at runtime): https://github.com/rhasspy/piper
|
||||
piper
|
||||
# tests if a completely unused module is bundled
|
||||
pycryptodome
|
||||
|
||||
$(usev !speech speech_dispatcher)
|
||||
$(usev !unrar test_unrar)
|
||||
|
||||
# undocumented reasons
|
||||
test_mem_leaks
|
||||
test_searching
|
||||
)
|
||||
|
||||
# Some of these tests weren't practical to split out into distinct tests, so
|
||||
# have a different control mechanism
|
||||
use speech || export SKIP_SPEECH_TESTS=1
|
||||
|
||||
edo ${PYTHON} setup.py test "${_test_excludes[@]/#/--exclude-test-name=}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
|
||||
# File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
|
||||
# return _parse_localename(localename)
|
||||
# File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
|
||||
# raise ValueError, 'unknown locale: %s' % localename
|
||||
#ValueError: unknown locale: 46
|
||||
export -n LANG LANGUAGE ${!LC_*}
|
||||
export LC_ALL=C.utf8 # bug #709682
|
||||
|
||||
# Bug #295672 - Avoid sandbox violation in ~/.config by forcing
|
||||
# variables to point to our fake temporary $HOME.
|
||||
export HOME="${T}/fake_homedir"
|
||||
export CALIBRE_CONFIG_DIRECTORY="${HOME}/.config/calibre"
|
||||
mkdir -p "${CALIBRE_CONFIG_DIRECTORY}" || die
|
||||
|
||||
addpredict /dev/dri #665310
|
||||
|
||||
# If this directory doesn't exist, zsh completion won't install
|
||||
dodir /usr/share/zsh/site-functions
|
||||
|
||||
edo "${PYTHON}" setup.py install \
|
||||
--staging-root="${ED}/usr" \
|
||||
--prefix="${EPREFIX}/usr" \
|
||||
--libdir="${EPREFIX}/usr/$(get_libdir)" \
|
||||
--staging-libdir="${ED}/usr/$(get_libdir)" \
|
||||
--system-plugins-location="${EPREFIX}/usr/share/calibre/system-plugins"
|
||||
|
||||
cp -r man-pages/ "${ED}"/usr/share/man || die
|
||||
|
||||
find "${ED}"/usr/share -type d -empty -delete || die
|
||||
|
||||
python_fix_shebang "${ED}/usr/bin"
|
||||
|
||||
python_optimize "${ED}"/usr/$(get_libdir)/calibre "${D}/$(python_get_sitedir)"
|
||||
|
||||
newinitd "${FILESDIR}"/calibre-server-3.init calibre-server
|
||||
newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server
|
||||
}
|
||||
@@ -1,254 +0,0 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..13} )
|
||||
PYTHON_REQ_USE="sqlite,ssl"
|
||||
|
||||
inherit edo toolchain-funcs python-single-r1 qmake-utils verify-sig xdg
|
||||
|
||||
DESCRIPTION="Ebook management application"
|
||||
HOMEPAGE="https://calibre-ebook.com/"
|
||||
SRC_URI="
|
||||
https://download.calibre-ebook.com/${PV}/${P}.tar.xz
|
||||
verify-sig? ( https://calibre-ebook.com/signatures/${P}.tar.xz.sig )
|
||||
"
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/kovidgoyal.gpg
|
||||
|
||||
LICENSE="
|
||||
GPL-3+
|
||||
GPL-3
|
||||
GPL-2+
|
||||
GPL-2
|
||||
GPL-1+
|
||||
LGPL-3+
|
||||
LGPL-2.1+
|
||||
LGPL-2.1
|
||||
BSD
|
||||
MIT
|
||||
Old-MIT
|
||||
Apache-2.0
|
||||
public-domain
|
||||
|| ( Artistic GPL-1+ )
|
||||
CC-BY-3.0
|
||||
OFL-1.1
|
||||
PSF-2
|
||||
"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64"
|
||||
IUSE="+font-subsetting ios speech +system-mathjax test +udisks unrar"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
|
||||
# Qt slotted dependencies are used because the libheadless.so plugin links to
|
||||
# QT_*_PRIVATE_ABI. It only uses core/gui/dbus.
|
||||
COMMON_DEPEND="${PYTHON_DEPS}
|
||||
app-i18n/uchardet
|
||||
>=app-text/hunspell-1.7:=
|
||||
>=app-text/podofo-0.10.0:=
|
||||
app-text/poppler[utils]
|
||||
dev-libs/hyphen:=
|
||||
>=dev-libs/icu-57.1:=
|
||||
dev-libs/openssl:=
|
||||
dev-libs/snowball-stemmer:=
|
||||
$(python_gen_cond_dep '
|
||||
>=dev-python/apsw-3.25.2_p1[${PYTHON_USEDEP}]
|
||||
dev-python/beautifulsoup4[${PYTHON_USEDEP}]
|
||||
>=dev-python/css-parser-1.0.4[${PYTHON_USEDEP}]
|
||||
dev-python/dnspython[${PYTHON_USEDEP}]
|
||||
>=dev-python/feedparser-5.2.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/html2text-2019.8.11[${PYTHON_USEDEP}]
|
||||
>=dev-python/html5-parser-0.4.9[${PYTHON_USEDEP}]
|
||||
dev-python/jeepney[${PYTHON_USEDEP}]
|
||||
>=dev-python/lxml-3.8.0[${PYTHON_USEDEP}]
|
||||
dev-python/lxml-html-clean[${PYTHON_USEDEP}]
|
||||
>=dev-python/markdown-3.0.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/mechanize-0.3.5[${PYTHON_USEDEP}]
|
||||
>=dev-python/msgpack-0.6.2[${PYTHON_USEDEP}]
|
||||
>=dev-python/netifaces-0.10.5[${PYTHON_USEDEP}]
|
||||
>=dev-python/pillow-3.2.0[jpeg,truetype,webp,zlib,${PYTHON_USEDEP}]
|
||||
>=dev-python/psutil-4.3.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pychm-0.8.6[${PYTHON_USEDEP}]
|
||||
dev-python/pykakasi[${PYTHON_USEDEP}]
|
||||
>=dev-python/pygments-2.3.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}]
|
||||
dev-python/pyqt6[gui,network,opengl,printsupport,quick,svg,widgets,${PYTHON_USEDEP}]
|
||||
dev-python/pyqt6-webengine[widgets,${PYTHON_USEDEP}]
|
||||
dev-python/regex[${PYTHON_USEDEP}]
|
||||
dev-python/xxhash[${PYTHON_USEDEP}]
|
||||
>=dev-python/zeroconf-0.75.0[${PYTHON_USEDEP}]
|
||||
')
|
||||
dev-qt/qtbase:6=[gui,widgets]
|
||||
dev-qt/qtimageformats:6
|
||||
dev-util/desktop-file-utils
|
||||
dev-util/gtk-update-icon-cache
|
||||
media-fonts/liberation-fonts
|
||||
media-libs/fontconfig:=
|
||||
>=media-libs/freetype-2:=
|
||||
>=media-libs/libmtp-1.1.11:=
|
||||
>=media-gfx/optipng-0.7.6
|
||||
>=media-video/ffmpeg-6:=
|
||||
virtual/libusb:1=
|
||||
x11-misc/shared-mime-info
|
||||
>=x11-misc/xdg-utils-1.0.2-r2
|
||||
font-subsetting? ( $(python_gen_cond_dep 'dev-python/fonttools[${PYTHON_USEDEP}]') )
|
||||
ios? (
|
||||
>=app-pda/usbmuxd-1.0.8
|
||||
>=app-pda/libimobiledevice-1.2.0
|
||||
)
|
||||
speech? (
|
||||
$(python_gen_cond_dep 'app-accessibility/speech-dispatcher[python,${PYTHON_USEDEP}]')
|
||||
dev-python/pyqt6[multimedia,speech]
|
||||
)
|
||||
system-mathjax? ( >=dev-libs/mathjax-3:= )
|
||||
udisks? ( virtual/libudev )
|
||||
unrar? ( dev-python/unrardll )
|
||||
"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
udisks? ( sys-fs/udisks:2 )"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
test? ( $(python_gen_cond_dep '>=dev-python/chardet-3.0.3[${PYTHON_USEDEP}]') )
|
||||
"
|
||||
BDEPEND="$(python_gen_cond_dep '
|
||||
>=dev-python/pyqt-builder-1.10.3[${PYTHON_USEDEP}]
|
||||
>=dev-python/sip-5[${PYTHON_USEDEP}]
|
||||
')
|
||||
virtual/pkgconfig
|
||||
system-mathjax? ( dev-lang/rapydscript-ng )
|
||||
verify-sig? ( sec-keys/openpgp-keys-kovidgoyal )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
# Skip calling a binary (JxrDecApp) from libjxr which is used for tests
|
||||
# We don't (yet?) package libjxr and it seems to be dead upstream
|
||||
# (last commit in 2017)
|
||||
"${FILESDIR}/${PN}-7.0.0-jxr-test.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Warning:
|
||||
#
|
||||
# While it might be rather tempting to add yet another sed here,
|
||||
# please don't. There have been several bugs in Gentoo's packaging
|
||||
# of calibre from seds-which-become-stale. Please consider
|
||||
# creating a patch instead, but in any case, run the test suite
|
||||
# and ensure it passes.
|
||||
#
|
||||
# If in doubt about a problem, checking Fedora's packaging is recommended.
|
||||
|
||||
# Disable unnecessary privilege dropping for bug #287067.
|
||||
sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
|
||||
-i setup/install.py || die "sed failed to patch install.py"
|
||||
|
||||
# This is only ever used at build time. It contains a small embedded copy
|
||||
# of the rapydscript-ng compiler usable inside of qtwebengine, if you don't
|
||||
# have rapydscript-ng (a nodejs package) itself installed. Its only purpose
|
||||
# is to build some resources that come bundled in dist tarballs already...
|
||||
# and which we may also need to regenerate e.g. to use system-mathjax.
|
||||
#
|
||||
# However, running qtwebengine violates the portage sandbox (among other
|
||||
# things, it tries to create directories in /usr! amazing) so this is a
|
||||
# wash anyway. The only real solution here is to package rapydscript-ng.
|
||||
#
|
||||
# We do not need it at build time, and *no one* needs it at install time.
|
||||
# Delete the cruft.
|
||||
rm -r resources/rapydscript/ || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# TODO: get qmake called by setup.py to respect CC and CXX too
|
||||
tc-export CC CXX
|
||||
|
||||
# bug 821871
|
||||
local MY_LIBDIR="${ESYSROOT}/usr/$(get_libdir)"
|
||||
export FT_LIB_DIR="${MY_LIBDIR}" HUNSPELL_LIB_DIR="${MY_LIBDIR}" PODOFO_LIB_DIR="${MY_LIBDIR}"
|
||||
export QMAKE="$(qt6_get_bindir)/qmake"
|
||||
|
||||
edo ${EPYTHON} setup.py build
|
||||
edo ${EPYTHON} setup.py gui
|
||||
|
||||
# A few different resources are bundled in the distfile by default, because
|
||||
# not all systems necessarily have them. We un-vendor them, using the
|
||||
# upstream integrated approach if possible. See setup/revendor.py and
|
||||
# consider migrating other resources to this if they do not use it, in
|
||||
# *preference* over manual rm'ing.
|
||||
edo ${EPYTHON} setup.py liberation_fonts \
|
||||
--path-to-liberation_fonts "${EPREFIX}"/usr/share/fonts/liberation-fonts \
|
||||
--system-liberation_fonts
|
||||
if use system-mathjax; then
|
||||
edo ${EPYTHON} setup.py mathjax --path-to-mathjax "${EPREFIX}"/usr/share/mathjax --system-mathjax
|
||||
edo ${EPYTHON} setup.py rapydscript
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# Skipped tests:
|
||||
local _test_excludes=(
|
||||
# unpackaged Python dependency: py7zr
|
||||
7z
|
||||
# unpackaged Python dependency: pyzstd
|
||||
test_zstd
|
||||
# unpackaged TTS backend (optional at runtime): https://github.com/rhasspy/piper
|
||||
piper
|
||||
# tests if a completely unused module is bundled
|
||||
pycryptodome
|
||||
|
||||
$(usev !speech speech_dispatcher)
|
||||
$(usev !unrar test_unrar)
|
||||
|
||||
# undocumented reasons
|
||||
test_mem_leaks
|
||||
test_searching
|
||||
)
|
||||
|
||||
# Some of these tests weren't practical to split out into distinct tests, so
|
||||
# have a different control mechanism
|
||||
use speech || export SKIP_SPEECH_TESTS=1
|
||||
|
||||
edo ${PYTHON} setup.py test "${_test_excludes[@]/#/--exclude-test-name=}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
|
||||
# File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
|
||||
# return _parse_localename(localename)
|
||||
# File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
|
||||
# raise ValueError, 'unknown locale: %s' % localename
|
||||
#ValueError: unknown locale: 46
|
||||
export -n LANG LANGUAGE ${!LC_*}
|
||||
export LC_ALL=C.utf8 # bug #709682
|
||||
|
||||
# Bug #295672 - Avoid sandbox violation in ~/.config by forcing
|
||||
# variables to point to our fake temporary $HOME.
|
||||
export HOME="${T}/fake_homedir"
|
||||
export CALIBRE_CONFIG_DIRECTORY="${HOME}/.config/calibre"
|
||||
mkdir -p "${CALIBRE_CONFIG_DIRECTORY}" || die
|
||||
|
||||
addpredict /dev/dri #665310
|
||||
|
||||
# If this directory doesn't exist, zsh completion won't install
|
||||
dodir /usr/share/zsh/site-functions
|
||||
|
||||
edo "${PYTHON}" setup.py install \
|
||||
--staging-root="${ED}/usr" \
|
||||
--prefix="${EPREFIX}/usr" \
|
||||
--libdir="${EPREFIX}/usr/$(get_libdir)" \
|
||||
--staging-libdir="${ED}/usr/$(get_libdir)" \
|
||||
--system-plugins-location="${EPREFIX}/usr/share/calibre/system-plugins"
|
||||
|
||||
cp -r man-pages/ "${ED}"/usr/share/man || die
|
||||
|
||||
find "${ED}"/usr/share -type d -empty -delete || die
|
||||
|
||||
python_fix_shebang "${ED}/usr/bin"
|
||||
|
||||
python_optimize "${ED}"/usr/$(get_libdir)/calibre "${D}/$(python_get_sitedir)"
|
||||
|
||||
newinitd "${FILESDIR}"/calibre-server-3.init calibre-server
|
||||
newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
From 57190699030dc6746320e49695a67ce83c62d549 Mon Sep 17 00:00:00 2001
|
||||
From: Kovid Goyal <kovid@kovidgoyal.net>
|
||||
Date: Sun, 28 May 2023 14:03:15 +0530
|
||||
Subject: [PATCH] HTML Input: Dont add resources that exist outside the folder
|
||||
hierarchy rooted at the parent folder of the input HTML file by default
|
||||
|
||||
(cherry picked from commit bbbddd2bf4ef4ddb467b0aeb0abe8765ed7f8a6b)
|
||||
---
|
||||
.../ebooks/conversion/plugins/html_input.py | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/src/calibre/ebooks/conversion/plugins/html_input.py b/src/calibre/ebooks/conversion/plugins/html_input.py
|
||||
index 6f9c2084ea..742f3e0279 100644
|
||||
--- a/src/calibre/ebooks/conversion/plugins/html_input.py
|
||||
+++ b/src/calibre/ebooks/conversion/plugins/html_input.py
|
||||
@@ -64,6 +64,16 @@ class HTMLInput(InputFormatPlugin):
|
||||
)
|
||||
),
|
||||
|
||||
+ OptionRecommendation(name='allow_local_files_outside_root',
|
||||
+ recommended_value=False, level=OptionRecommendation.LOW,
|
||||
+ help=_('Normally, resources linked to by the HTML file or its children will only be allowed'
|
||||
+ ' if they are in a sub-folder of the original HTML file. This option allows including'
|
||||
+ ' local files from any location on your computer. This can be a security risk if you'
|
||||
+ ' are converting untrusted HTML and expecting to distribute the result of the conversion.'
|
||||
+ )
|
||||
+ ),
|
||||
+
|
||||
+
|
||||
}
|
||||
|
||||
def convert(self, stream, opts, file_ext, log,
|
||||
@@ -76,6 +86,7 @@ def convert(self, stream, opts, file_ext, log,
|
||||
if hasattr(stream, 'name'):
|
||||
basedir = os.path.dirname(stream.name)
|
||||
fname = os.path.basename(stream.name)
|
||||
+ self.root_dir_of_input = os.path.abspath(basedir) + os.sep
|
||||
|
||||
if file_ext != 'opf':
|
||||
if opts.dont_package:
|
||||
@@ -250,6 +261,11 @@ def link_to_local_path(self, link_, base=None):
|
||||
frag = l.fragment
|
||||
if not link:
|
||||
return None, None
|
||||
+ link = os.path.abspath(os.path.realpath(link))
|
||||
+ if not link.startswith(self.root_dir_of_input):
|
||||
+ if not self.opts.allow_local_files_outside_root:
|
||||
+ self.log.warn('Not adding {} as it is outside the document root: {}'.format(link, self.root_dir_of_input))
|
||||
+ return None, None
|
||||
return link, frag
|
||||
|
||||
def resource_adder(self, link_, base=None):
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
From a961ddbfcb96461fd830ccd6facb81d69cc679d8 Mon Sep 17 00:00:00 2001
|
||||
From: Kovid Goyal <kovid@kovidgoyal.net>
|
||||
Date: Tue, 29 Oct 2024 06:08:04 +0530
|
||||
Subject: [PATCH] PIL 11.0 changes its webp features output
|
||||
|
||||
---
|
||||
src/calibre/test_build.py | 8 +++-----
|
||||
1 file changed, 3 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/calibre/test_build.py b/src/calibre/test_build.py
|
||||
index 4e3d740705..91c32eba38 100644
|
||||
--- a/src/calibre/test_build.py
|
||||
+++ b/src/calibre/test_build.py
|
||||
@@ -436,16 +436,14 @@ def test_imaging(self):
|
||||
out = StringIO()
|
||||
features.pilinfo(out=out, supported_formats=False)
|
||||
out = out.getvalue()
|
||||
- for line in '''\
|
||||
+ lines = '''\
|
||||
--- PIL CORE support ok
|
||||
--- FREETYPE2 support ok
|
||||
--- WEBP support ok
|
||||
- --- WEBP Transparency support ok
|
||||
- --- WEBPMUX support ok
|
||||
- --- WEBP Animation support ok
|
||||
--- JPEG support ok
|
||||
--- ZLIB (PNG/ZIP) support ok
|
||||
- '''.splitlines():
|
||||
+ '''.splitlines()
|
||||
+ for line in lines:
|
||||
self.assertIn(line.strip(), out)
|
||||
with Image.open(I('lt.png', allow_user_override=False)) as i:
|
||||
self.assertGreaterEqual(i.size, (20, 20))
|
||||
--
|
||||
2.45.2
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
Avoid calling libjxr's JxrDecApp as we currently don't package it.
|
||||
--- a/src/calibre/utils/img.py
|
||||
+++ b/src/calibre/utils/img.py
|
||||
@@ -118,8 +118,6 @@
|
||||
i = QImage()
|
||||
if not i.loadFromData(data):
|
||||
q = what(None, data)
|
||||
- if q == 'jxr':
|
||||
- return load_jxr_data(data)
|
||||
raise NotImage(f'Not a valid image (detected type: {q})')
|
||||
return i
|
||||
|
||||
@@ -645,11 +643,6 @@
|
||||
despeckle_image(img)
|
||||
remove_borders_from_image(img)
|
||||
image_to_data(img, fmt='GIF')
|
||||
- raw = subprocess.Popen([get_exe_path('JxrDecApp'), '-h'],
|
||||
- creationflags=subprocess.DETACHED_PROCESS if iswindows else 0,
|
||||
- stdout=subprocess.PIPE).stdout.read()
|
||||
- if b'JPEG XR Decoder Utility' not in raw:
|
||||
- raise SystemExit('Failed to run JxrDecApp')
|
||||
# }}}
|
||||
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
From 5d8d85c649b181747d182f676cfd76f843bd61f0 Mon Sep 17 00:00:00 2001
|
||||
From: Kovid Goyal <kovid@kovidgoyal.net>
|
||||
Date: Sun, 1 Oct 2023 15:08:59 +0530
|
||||
Subject: [PATCH] Fix compatibility with zeroconf >= 0.73
|
||||
|
||||
Fixes #2038 (fix compatibility with newer zeroconf)
|
||||
---
|
||||
src/calibre/devices/smart_device_app/driver.py | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/calibre/devices/smart_device_app/driver.py b/src/calibre/devices/smart_device_app/driver.py
|
||||
index 87608f305b..b41c3a0063 100644
|
||||
--- a/src/calibre/devices/smart_device_app/driver.py
|
||||
+++ b/src/calibre/devices/smart_device_app/driver.py
|
||||
@@ -2175,6 +2175,8 @@ def monkeypatch_zeroconf():
|
||||
# "monkeypatch" zeroconf with a function without the check
|
||||
try:
|
||||
from zeroconf._utils.name import service_type_name
|
||||
+ # zeroconf 0.73 uses an lru cache so we need __wrapped__
|
||||
+ service_type_name = getattr(service_type_name, '__wrapped__', service_type_name)
|
||||
service_type_name.__kwdefaults__['strict'] = False
|
||||
except ImportError:
|
||||
import zeroconf
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
logical changes backported from:
|
||||
https://github.com/kovidgoyal/calibre/commit/a3d3d8d33e314ccabb5099e78e4056a79b7c9aa2
|
||||
https://bugs.gentoo.org/936270
|
||||
|
||||
diff -rup a/setup/build.py b/setup/build.py
|
||||
--- a/setup/build.py 2022-06-17 04:35:27.000000000 +0200
|
||||
+++ b/setup/build.py 2024-07-19 11:51:56.374389213 +0200
|
||||
@@ -65,6 +65,8 @@ class Extension:
|
||||
self.cflags.insert(0, '-std=c++11')
|
||||
elif kwargs.get('needs_c++14'):
|
||||
self.cflags.insert(0, '-std=c++14')
|
||||
+ elif kwargs.get('needs_c++17'):
|
||||
+ self.cflags.insert(0, '-std=c++17')
|
||||
else:
|
||||
if kwargs.get('needs_c99'):
|
||||
self.cflags.insert(0, '-std=c99')
|
||||
diff -rup a/setup/extensions.json b/setup/extensions.json
|
||||
--- a/setup/extensions.json 2022-06-17 04:35:27.000000000 +0200
|
||||
+++ b/setup/extensions.json 2024-07-19 11:52:11.253389395 +0200
|
||||
@@ -75,7 +75,7 @@
|
||||
"name": "sqlite_extension",
|
||||
"headers": "calibre/utils/cpp_binding.h",
|
||||
"sources": "calibre/db/sqlite_extension.cpp",
|
||||
- "needs_c++14": true,
|
||||
+ "needs_c++17": true,
|
||||
"libraries": "icudata icui18n icuuc icuio stemmer",
|
||||
"windows_libraries": "icudt icuin icuuc icuio libstemmer",
|
||||
"lib_dirs": "!icu_lib_dirs",
|
||||
@@ -1,33 +0,0 @@
|
||||
Changelog:
|
||||
|
||||
Only relevant if you embed the calibre server within a larger server, it
|
||||
means attackers who can convince users to click on a specially crafted
|
||||
link, can run JavaScript code with the same origin as the larger server
|
||||
calibre is embedded in.
|
||||
|
||||
From e75f85919a3c3a5f2d87861050d8483d66561c06 Mon Sep 17 00:00:00 2001
|
||||
From: Kovid Goyal <kovid@kovidgoyal.net>
|
||||
Date: Tue, 30 Jul 2024 13:40:21 +0530
|
||||
Subject: [PATCH] Fix #2075130 [Private
|
||||
bug](https://bugs.launchpad.net/calibre/+bug/2075130)
|
||||
|
||||
---
|
||||
src/calibre/srv/legacy.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/calibre/srv/legacy.py b/src/calibre/srv/legacy.py
|
||||
index 055228ebee..85586b07a6 100644
|
||||
--- a/src/calibre/srv/legacy.py
|
||||
+++ b/src/calibre/srv/legacy.py
|
||||
@@ -255,7 +255,7 @@ def browse(ctx, rd, rest):
|
||||
if rest.startswith('book/'):
|
||||
# implementation of https://bugs.launchpad.net/calibre/+bug/1698411
|
||||
# redirect old server book URLs to new URLs
|
||||
- redirect = ctx.url_for(None) + '#book_id=' + rest[5:] + "&panel=book_details"
|
||||
+ redirect = ctx.url_for(None) + '#book_id=' + int(rest[5:]) + "&panel=book_details"
|
||||
from lxml import etree as ET
|
||||
return html(ctx, rd, endpoint,
|
||||
E.html(E.head(
|
||||
--
|
||||
2.44.2
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
diff --git a/src/calibre/utils/img.py b/src/calibre/utils/img.py
|
||||
index b61627b63e..ff51c76e75 100644
|
||||
--- a/src/calibre/utils/img.py
|
||||
+++ b/src/calibre/utils/img.py
|
||||
@@ -129,8 +129,6 @@ def image_from_data(data):
|
||||
i = QImage()
|
||||
if not i.loadFromData(data):
|
||||
q = what(None, data)
|
||||
- if q == 'jxr':
|
||||
- return load_jxr_data(data)
|
||||
raise NotImage(f'Not a valid image (detected type: {q})')
|
||||
return i
|
||||
|
||||
@@ -693,13 +691,6 @@ def test(): # {{{
|
||||
despeckle_image(img)
|
||||
remove_borders_from_image(img)
|
||||
image_to_data(img, fmt='GIF')
|
||||
- p = subprocess.Popen([get_exe_path('JxrDecApp'), '-h'],
|
||||
- creationflags=subprocess.DETACHED_PROCESS if iswindows else 0,
|
||||
- stdout=subprocess.PIPE)
|
||||
- raw, _ = p.communicate()
|
||||
- p.wait()
|
||||
- if b'JPEG XR Decoder Utility' not in raw:
|
||||
- raise SystemExit('Failed to run JxrDecApp')
|
||||
# }}}
|
||||
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
From 6d87aa054724155c9413e5692fa1f242f9cc0efc Mon Sep 17 00:00:00 2001
|
||||
From: Eli Schwartz <eschwartz93@gmail.com>
|
||||
Date: Fri, 23 Aug 2024 02:20:00 -0400
|
||||
Subject: [PATCH] tests: delete qt TTS assert which is not yet used
|
||||
|
||||
It will be used in future versions of calibre, and should likely be
|
||||
gated on USE=speech.
|
||||
---
|
||||
src/calibre/test_build.py | 6 +-----
|
||||
1 file changed, 1 insertion(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/calibre/test_build.py b/src/calibre/test_build.py
|
||||
index 4f19363680..898caad665 100644
|
||||
--- a/src/calibre/test_build.py
|
||||
+++ b/src/calibre/test_build.py
|
||||
@@ -314,7 +314,7 @@ def test_apsw(self):
|
||||
def test_qt(self):
|
||||
if is_sanitized:
|
||||
raise unittest.SkipTest('Skipping Qt build test as sanitizer is enabled')
|
||||
- from qt.core import QApplication, QFontDatabase, QImageReader, QLoggingCategory, QNetworkAccessManager, QSslSocket, QTextToSpeech, QTimer
|
||||
+ from qt.core import QApplication, QFontDatabase, QImageReader, QLoggingCategory, QNetworkAccessManager, QSslSocket, QTimer
|
||||
QLoggingCategory.setFilterRules('''qt.webenginecontext.debug=true''')
|
||||
if hasattr(os, 'geteuid') and os.geteuid() == 0:
|
||||
# likely a container build, webengine cannot run as root with sandbox
|
||||
@@ -348,10 +348,6 @@ def test_qt(self):
|
||||
try:
|
||||
ensure_app()
|
||||
self.assertGreaterEqual(len(QFontDatabase.families()), 5, 'The QPA headless plugin is not able to locate enough system fonts via fontconfig')
|
||||
- available_tts_engines = tuple(x for x in QTextToSpeech.availableEngines() if x != 'mock')
|
||||
- self.assertTrue(available_tts_engines)
|
||||
-
|
||||
- self.assertGreaterEqual
|
||||
from calibre.ebooks.oeb.transforms.rasterize import rasterize_svg
|
||||
img = rasterize_svg(as_qimage=True)
|
||||
self.assertFalse(img.isNull())
|
||||
--
|
||||
2.44.2
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
# /etc/conf.d/calibre-server
|
||||
# Change this to the user you want to run calibre-server as.
|
||||
# You may specify a group too, after a colon
|
||||
# NOTE: This must be set and not to root!
|
||||
CALIBRE_USER=
|
||||
|
||||
# Set the path of the library to serve.
|
||||
# Defaults to the default location for CALIBRE_USER.
|
||||
#CALIBRE_LIBRARY='<user home directory>/Calibre Library'
|
||||
|
||||
# Extra options to pass to calibre-server.
|
||||
# See the calibre-server man page for more options.
|
||||
#CALIBRE_SERVER_OPTS="--userdb /srv/calibre/users.sqlite --enable-auth --worker-count 10 --port 8080"
|
||||
@@ -1,58 +0,0 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License, v2 or later
|
||||
|
||||
depend() {
|
||||
need net
|
||||
need localmount
|
||||
after bootmisc
|
||||
}
|
||||
|
||||
checkconfig() {
|
||||
if [ "${CALIBRE_USER}" = "" -o "${CALIBRE_USER}" = "root" ] ; then
|
||||
eerror "Please edit /etc/conf.d/calibre-server"
|
||||
eerror "You have to specify a user to run calibre-server as, as we will not run it as root!"
|
||||
eerror "Modify CALIBRE_USER to your needs (you can also add a group, after a colon)"
|
||||
return 1
|
||||
fi
|
||||
if ! getent passwd "${CALIBRE_USER%:*}" >/dev/null ; then
|
||||
eerror "Please edit /etc/conf.d/calibre-server"
|
||||
eerror "Your user has to exist!"
|
||||
return 1
|
||||
fi
|
||||
if [ "${CALIBRE_USER%:*}" != "${CALIBRE_USER}" ] ; then
|
||||
if ! getent group "${CALIBRE_USER#*:}" >/dev/null ; then
|
||||
eerror "Please edit /etc/conf.d/calibre-server"
|
||||
eerror "Your group has to exist too!"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
if [ "${CALIBRE_LIBRARY}" = "" ] ; then
|
||||
CALIBRE_USER_HOME=$(getent passwd "${CALIBRE_USER%:*}" | cut -d ':' -f 6)
|
||||
CALIBRE_LIBRARY="${CALIBRE_USER_HOME}/Calibre Library"
|
||||
fi
|
||||
if [ ! -d "${CALIBRE_LIBRARY}" ] ; then
|
||||
eerror "Please edit /etc/conf.d/calibre-server"
|
||||
eerror "The Calibre library, '${CALIBRE_LIBRARY},' does not exist."
|
||||
eerror "Please modify CALIBRE_LIBRARY to point to a valid library."
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
start() {
|
||||
checkconfig || return $?
|
||||
local pidfile=/var/run/calibre-server.pid
|
||||
ebegin "Starting calibre-server"
|
||||
start-stop-daemon --user "${CALIBRE_USER}" \
|
||||
--pidfile "${pidfile}" --make-pidfile --background --exec /usr/bin/calibre-server \
|
||||
-- ${CALIBRE_OPTS} "${CALIBRE_LIBRARY}"
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping calibre-server"
|
||||
start-stop-daemon --stop --user "${CALIBRE_USER}" \
|
||||
--pidfile /var/run/calibre-server.pid
|
||||
eend $?
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
From e9cc00560a28f56a303cca97630ab58e519dd9c8 Mon Sep 17 00:00:00 2001
|
||||
From: Kovid Goyal <kovid@kovidgoyal.net>
|
||||
Date: Mon, 8 Jan 2024 09:12:35 +0530
|
||||
Subject: [PATCH] Fix #2048475 [Tests fail with lxml
|
||||
5.0](https://bugs.launchpad.net/calibre/+bug/2048475)
|
||||
|
||||
---
|
||||
src/calibre/utils/xml_parse.py | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/calibre/utils/xml_parse.py b/src/calibre/utils/xml_parse.py
|
||||
index a31c6ed83ed7..339538b90057 100644
|
||||
--- a/src/calibre/utils/xml_parse.py
|
||||
+++ b/src/calibre/utils/xml_parse.py
|
||||
@@ -36,6 +36,11 @@ def safe_xml_fromstring(string_or_bytes, recover=True):
|
||||
return ans
|
||||
|
||||
|
||||
+def unsafe_xml_fromstring(string_or_bytes):
|
||||
+ parser = etree.XMLParser(resolve_entities=True)
|
||||
+ return fs(string_or_bytes, parser=parser)
|
||||
+
|
||||
+
|
||||
def find_tests():
|
||||
import unittest, tempfile, os
|
||||
from calibre.constants import iswindows
|
||||
@@ -61,7 +66,7 @@ def t(tid, val, expected, safe=True):
|
||||
raw = templ.format(id=tid, val=val)
|
||||
err = None
|
||||
try:
|
||||
- root = safe_xml_fromstring(raw) if safe else etree.fromstring(raw)
|
||||
+ root = safe_xml_fromstring(raw) if safe else unsafe_xml_fromstring(raw)
|
||||
except Exception as e:
|
||||
err = str(e)
|
||||
root = None
|
||||
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>eschwartz@gentoo.org</email>
|
||||
<name>Eli Schwartz</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">kovidgoyal/calibre</remote-id>
|
||||
<changelog>https://calibre-ebook.com/whats-new</changelog>
|
||||
</upstream>
|
||||
<use>
|
||||
<flag name="font-subsetting">Enable font subsetting support</flag>
|
||||
<flag name="system-mathjax">Use a system copy of mathjax</flag>
|
||||
<flag name="unrar">Enable support for comic books compressed with the non-free Rar format</flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
||||
@@ -1,11 +0,0 @@
|
||||
AUX dblatex-0.3.11-encode.patch 752 BLAKE2B a9dfa9fd76219f346bcae7781fa4cb3174f1723901891618a480baa290599586080692743409a70e5a606d44c7bddaa4449735fd34beab83f90602ecc0482903 SHA512 4750f800d99a425eeccf84c87dbdfac6d1c0c2ff394c191ed239ca329dbac13c861d5d74014202bc4fd430c806fcfee0bdafc62b0ab94e9b910429d916590545
|
||||
AUX dblatex-0.3.11-inkscape-1.0.patch 4051 BLAKE2B 0c21ab019da8dec6ea093963f79382241bc6326f70aa84b2aaa53502e1ed84c7bcb68e95581b6a480b10869f53709000003e1ef0ba71c79d5cc1ebe6434d0968 SHA512 fd33e2388de5d830288ce25cfe4dd0f933333118cbea3c68b66b8f171476b5ac29fc7fb43ac26bd38e362e676f36cf0297e2c643be948e2d5f6c796c68eb3c67
|
||||
AUX dblatex-0.3.11-no-inkscape-dependency.patch 753 BLAKE2B 2199d6068d86be9a0a63bb7cc034f54e8edf59434127e495d5878dfb761c990f9f106fbc0436513220ade66bb107030093f41c8e4777e6ccb279259aff912d06 SHA512 08f4e4473359a2633a785cd34fc3a89feaab8619843a93c5ffba0bf00e31aff2d1ce5a54aeea3eb51e63385b3480df1f196f54cdd568ff49558860460faa1c8f
|
||||
AUX dblatex-0.3.11-path-logging.patch 554 BLAKE2B 7b078b4f0bacaffb3449122b561c264de8c8970fe4cbf5459c5ec651aecd3e3ccb7dcc95bfcc8277686133bc3187a5952edd1bc88dae11c2ddac3aa4060333b4 SHA512 ae08b08a435393bf94039edd8b74457a1d4475d8473fa450b41a993ca4ded08f79566bf2dc78144df977fe1f975e1c60b9d02b2dc4579f8c7d65839946e3de05
|
||||
AUX dblatex-0.3.11-setup.patch 1751 BLAKE2B a83e41c4fa68eaee1b6e80404cd5486e64f117ca07314463ca0369cd3bc9d64dbdeb8f5fa2f44bee2704c37dda0e1564c461c7d39b1439aa76800032dd96acad SHA512 f77a82876fe28fdc6f9cc689c8b789fd09e703ca4625207fe81a35b1491bcd46a398eb78781fac60c33ac2efcd3d0957fb3604f8a54cd411b0fd4031016ef5fc
|
||||
AUX python3.12-adjust-submodule-imports.patch 1338 BLAKE2B 449bf9535269583f41552c07c856d1e12fecf7a8785d635c6a5baa11b2d39e138c6c93e2c0e07daacaee042e006e37463e638280c5d093ffc4df361fdc02ce49 SHA512 18180ce417099f1c5d000afffb6f4edf11afb81246bb15d2b8d25fb161fe0e454cb72360f4dffcad93071a5ee925ea19ba77202f4e59862650a7d9a09d0c2765
|
||||
AUX python3.12-replace-imp-by-importlib.patch 3710 BLAKE2B ccbcfa3401208b925dfd96d905f3185e220f5cf28f22875c22c020369470137f96ad4fb37961fc9ff692b69fe25f7a4d4a2aa98a9b5c22ecb02791da2cc3ef72 SHA512 b8f5bf187e583759bbb92eecc081baac0221f4cda7f444eef3e772f11021c3d91a70955738efbc4ea9e99d8fe32ef121376a98fbcf828147fe3919fcce2eb8a0
|
||||
DIST dblatex3-0.3.12.tar.bz2 1693272 BLAKE2B 9310ce5db3b5f92e183f2656c5b1881edaf0208ae4f78f853332c844258fa38d443921fc42c03301773b1451ce272a538c305d765acbdc6eafbdcf25ebf5d2d3 SHA512 5bfa774c8dbe362775f6bbb5e1196e5a2bb1af239778133c12ddc725406ced67f3ff422433a2a1aa02d4431e9be58ba12e918379deb81fcd5b96533d2bdf029a
|
||||
EBUILD dblatex-0.3.12-r1.ebuild 1977 BLAKE2B 21bf43eb0f8576d2e52cdc147ebc574c621d7ed46a0a8841d2a3b247918287664e3fd275411da3267073375571d27e09ee9c108a326e793446aa5bbcbb6cfa79 SHA512 b69408291dc8ba9f03deafdaef0b187309fde222cd81741d1652580ca2cb2d0ac2e58fe5680cae815a1f3c73c113a8cfeff58f5de31beedd55299b993aec6f59
|
||||
EBUILD dblatex-0.3.12-r2.ebuild 2103 BLAKE2B bc7934c7cbde43f169892ad15866545b7685c757b46eb0bef7dc05d1771f6b0ecd72934b3660ea2d7176f61e6b414a268d9623d53013a68d3e039fc1a09ef579 SHA512 f3cdfea792324d2bacdd4b8c7894f89c8366ff4f6735061e531a4e1d12f5b3749e2ede46cd0c74181f85d64342923c95c830ac31d323ddab82757e7bec7a2dd5
|
||||
MISC metadata.xml 908 BLAKE2B e13f176739b3fb7a63a5eaeb704afa1c0b4e9740ea25dec54656c283cf9f8f614096aae407df8822414e054eaad0082c738c0a5a2acc91a51ce3f6b729fc37d6 SHA512 a39c4073b4cec1753724d16bcca023c9306eeac79bc7f008c6e090f85c4661733810c9864b91b9552fbbec242c01a312780ee780d11724ce26399bad3c9a0899
|
||||
@@ -1,69 +0,0 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
|
||||
# Breaks installation of /usr/bin/dblatex, bug #906788
|
||||
#DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{9..12} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Transform DocBook using TeX macros"
|
||||
HOMEPAGE="http://dblatex.sourceforge.net/"
|
||||
SRC_URI="https://downloads.sourceforge.net/project/dblatex/dblatex/${P}/${PN}3-${PV}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv ~s390 sparc x86"
|
||||
IUSE="inkscape test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
app-text/docbook-xml-dtd:4.5
|
||||
dev-libs/kpathsea
|
||||
dev-libs/libxslt
|
||||
dev-libs/libxslt
|
||||
dev-texlive/texlive-fontutils
|
||||
dev-texlive/texlive-latex
|
||||
dev-texlive/texlive-latexextra
|
||||
dev-texlive/texlive-latexrecommended
|
||||
dev-texlive/texlive-mathscience
|
||||
dev-texlive/texlive-pictures
|
||||
dev-texlive/texlive-xetex
|
||||
gnome-base/librsvg
|
||||
media-gfx/imagemagick
|
||||
media-gfx/transfig
|
||||
inkscape? ( media-gfx/inkscape )
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="${RDEPEND}
|
||||
test? ( ~${CATEGORY}/${P} )"
|
||||
|
||||
S="${WORKDIR}/${PN}3-${PV}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-0.3.11-path-logging.patch"
|
||||
"${FILESDIR}/${PN}-0.3.11-setup.patch"
|
||||
"${FILESDIR}/${PN}-0.3.11-encode.patch"
|
||||
)
|
||||
|
||||
python_prepare_all() {
|
||||
# Manual page is precomressed, but we will use our own compression later.
|
||||
gunzip docs/manpage/dblatex.1.gz || die
|
||||
# If we dont have inkscape we need to use an alternative SVG converter
|
||||
use inkscape || eapply "${FILESDIR}/${PN}-0.3.11-no-inkscape-dependency.patch"
|
||||
# If we use inscape however we want to make dblatex compatible with v1.0
|
||||
use inkscape && eapply "${FILESDIR}/${PN}-0.3.11-inkscape-1.0.patch"
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
distutils-r1_python_install_all
|
||||
# Move package documentation to a folder name containing version number
|
||||
mv "${D}"/usr/share/doc/${PN} "${D}"/usr/share/doc/${PF} || die
|
||||
}
|
||||
|
||||
python_test_all() {
|
||||
emake -C tests/mathml
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
|
||||
# Breaks installation of /usr/bin/dblatex, bug #906788
|
||||
#DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{9..12} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Transform DocBook using TeX macros"
|
||||
HOMEPAGE="http://dblatex.sourceforge.net/"
|
||||
SRC_URI="https://downloads.sourceforge.net/project/dblatex/dblatex/${P}/${PN}3-${PV}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv ~s390 sparc x86"
|
||||
IUSE="inkscape test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
app-text/docbook-xml-dtd:4.5
|
||||
dev-libs/kpathsea
|
||||
dev-libs/libxslt
|
||||
dev-libs/libxslt
|
||||
dev-texlive/texlive-fontutils
|
||||
dev-texlive/texlive-latex
|
||||
dev-texlive/texlive-latexextra
|
||||
dev-texlive/texlive-latexrecommended
|
||||
dev-texlive/texlive-mathscience
|
||||
dev-texlive/texlive-pictures
|
||||
dev-texlive/texlive-xetex
|
||||
gnome-base/librsvg
|
||||
media-gfx/imagemagick
|
||||
>=media-gfx/fig2dev-3.2.9-r1
|
||||
inkscape? ( media-gfx/inkscape )
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="${RDEPEND}
|
||||
test? ( ~${CATEGORY}/${P} )"
|
||||
|
||||
S="${WORKDIR}/${PN}3-${PV}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-0.3.11-path-logging.patch"
|
||||
"${FILESDIR}/${PN}-0.3.11-setup.patch"
|
||||
"${FILESDIR}/${PN}-0.3.11-encode.patch"
|
||||
"${FILESDIR}/python3.12-replace-imp-by-importlib.patch"
|
||||
"${FILESDIR}/python3.12-adjust-submodule-imports.patch"
|
||||
)
|
||||
|
||||
python_prepare_all() {
|
||||
# Manual page is precomressed, but we will use our own compression later.
|
||||
gunzip docs/manpage/dblatex.1.gz || die
|
||||
# If we dont have inkscape we need to use an alternative SVG converter
|
||||
use inkscape || eapply "${FILESDIR}/${PN}-0.3.11-no-inkscape-dependency.patch"
|
||||
# If we use inscape however we want to make dblatex compatible with v1.0
|
||||
use inkscape && eapply "${FILESDIR}/${PN}-0.3.11-inkscape-1.0.patch"
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
distutils-r1_python_install_all
|
||||
# Move package documentation to a folder name containing version number
|
||||
mv "${D}"/usr/share/doc/${PN} "${D}"/usr/share/doc/${PF} || die
|
||||
}
|
||||
|
||||
python_test_all() {
|
||||
emake -C tests/mathml
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
diff -Naur dblatex-0.3.11py3-orig/lib/dbtexmf/dblatex/rawtex.py dblatex-0.3.11py3/lib/dbtexmf/dblatex/rawtex.py
|
||||
--- dblatex-0.3.11py3-orig/lib/dbtexmf/dblatex/rawtex.py 2020-01-29 13:48:34.000000000 -0800
|
||||
+++ dblatex-0.3.11py3/lib/dbtexmf/dblatex/rawtex.py 2020-07-13 23:49:56.296767535 -0700
|
||||
@@ -101,10 +101,14 @@
|
||||
|
||||
# If something done, replace the figure in the tex file
|
||||
if newfig != fig:
|
||||
+ if isinstance(fig, str):
|
||||
+ fig = fig.encode("utf-8")
|
||||
+ if isinstance(newfig, str):
|
||||
+ newfig = newfig.encode("utf-8")
|
||||
line = re.sub(br"{"+fig+br"}", br"{"+newfig+br"}", line)
|
||||
|
||||
return line
|
||||
-
|
||||
+
|
||||
|
||||
def main():
|
||||
c = RawLatex()
|
||||
@@ -1,107 +0,0 @@
|
||||
diff -Naur dblatex-0.3.11py3-orig/docs/custom/dblatex.xconf dblatex-0.3.11py3/docs/custom/dblatex.xconf
|
||||
--- dblatex-0.3.11py3-orig/docs/custom/dblatex.xconf 2020-01-29 13:48:32.000000000 -0800
|
||||
+++ dblatex-0.3.11py3/docs/custom/dblatex.xconf 2020-07-14 01:05:42.883435133 -0700
|
||||
@@ -18,7 +18,7 @@
|
||||
<imagedata>
|
||||
<converter src="svg" dst="*" docformat="pdf">
|
||||
<command>
|
||||
- inkscape -z -D --export-dpi=600 --export-%(dst)s=%(output)s %(input)s
|
||||
+ inkscape -D --export-dpi=600 --export-filename=%(output)s %(input)s
|
||||
</command>
|
||||
</converter>
|
||||
</imagedata>
|
||||
diff -Naur dblatex-0.3.11py3-orig/docs/xhtml/manual/sec-specs.html dblatex-0.3.11py3/docs/xhtml/manual/sec-specs.html
|
||||
--- dblatex-0.3.11py3-orig/docs/xhtml/manual/sec-specs.html 2020-01-29 13:49:23.000000000 -0800
|
||||
+++ dblatex-0.3.11py3/docs/xhtml/manual/sec-specs.html 2020-07-14 01:06:19.012860710 -0700
|
||||
@@ -36,7 +36,7 @@
|
||||
<imagedata>
|
||||
<converter src="svg" dst="*" docformat="pdf">
|
||||
<command>
|
||||
- inkscape -z -D --export-dpi=600 --export-%(dst)s=%(output)s %(input)s
|
||||
+ inkscape -D --export-dpi=600 --export-filename=%(output)s %(input)s
|
||||
</command>
|
||||
</converter>
|
||||
</imagedata>
|
||||
diff -Naur dblatex-0.3.11py3-orig/lib/dbtexmf/core/imagedata.py dblatex-0.3.11py3/lib/dbtexmf/core/imagedata.py
|
||||
--- dblatex-0.3.11py3-orig/lib/dbtexmf/core/imagedata.py 2020-01-29 13:48:33.000000000 -0800
|
||||
+++ dblatex-0.3.11py3/lib/dbtexmf/core/imagedata.py 2020-07-14 01:02:56.729388831 -0700
|
||||
@@ -47,16 +47,16 @@
|
||||
|
||||
|
||||
class PoolManager:
|
||||
- def __init__(self):
|
||||
+ def __init__(self):
|
||||
self._used_pool = None
|
||||
self._pending_pools = []
|
||||
-
|
||||
+
|
||||
def set_pool(self, pool):
|
||||
self._used_pool = pool
|
||||
for p in self._pending_pools:
|
||||
pool.preprend(p)
|
||||
self._pending_pools = []
|
||||
-
|
||||
+
|
||||
def prepend_pool(self, pool):
|
||||
if self._used_pool:
|
||||
self._used_pool.prepend(pool)
|
||||
@@ -73,7 +73,7 @@
|
||||
self.format_pool = PoolManager()
|
||||
|
||||
_image_setup = ImageSetup()
|
||||
-
|
||||
+
|
||||
def image_setup():
|
||||
global _image_setup
|
||||
return _image_setup
|
||||
@@ -181,7 +181,7 @@
|
||||
class SvgConverter(ImageConverter):
|
||||
def __init__(self, imgsrc, imgdst="", docformat="", backend=""):
|
||||
ImageConverter.__init__(self, imgsrc="svg", imgdst=imgdst)
|
||||
- self.add_command(["inkscape", "-z", "-D", "--export-%(dst)s=%(output)s",
|
||||
+ self.add_command(["inkscape", "-D", "--export-filename=%(output)s",
|
||||
"%(input)s"])
|
||||
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
ImageFormatPool.__init__(self)
|
||||
# There can be a mismatch between PDF-1.4 images and PDF-1.3
|
||||
# document produced by XeTeX
|
||||
- self.add_rule(FormatRule(docformat="pdf", backend="xetex",
|
||||
+ self.add_rule(FormatRule(docformat="pdf", backend="xetex",
|
||||
imgdst="png"))
|
||||
self.add_rule(FormatRule(docformat="pdf", imgdst="pdf"))
|
||||
self.add_rule(FormatRule(docformat="dvi", imgdst="eps"))
|
||||
@@ -318,7 +318,7 @@
|
||||
Copy the file in the working directory if its path contains characters
|
||||
unsupported by latex, like spaces.
|
||||
"""
|
||||
- # Encode to expected output format. If encoding is OK and
|
||||
+ # Encode to expected output format. If encoding is OK and
|
||||
# supported by tex, just return the encoded path
|
||||
newfig = self._path_encode(fig)
|
||||
if newfig and newfig.find(b" ") == -1:
|
||||
@@ -350,7 +350,7 @@
|
||||
if (ext):
|
||||
realfig = self.find(fig)
|
||||
return (realfig, ext[1:])
|
||||
-
|
||||
+
|
||||
# Lookup for the best suited available figure
|
||||
if (self.output_format == "pdf"):
|
||||
formats = ("png", "pdf", "jpg", "eps", "gif", "fig", "svg")
|
||||
@@ -369,7 +369,7 @@
|
||||
format = ""
|
||||
|
||||
return (realfig, format)
|
||||
-
|
||||
+
|
||||
def find(self, fig):
|
||||
# First, the obvious absolute path case
|
||||
if os.path.isabs(fig):
|
||||
@@ -385,4 +385,4 @@
|
||||
return realfig
|
||||
|
||||
return None
|
||||
-
|
||||
+
|
||||
@@ -1,14 +0,0 @@
|
||||
diff -Naur dblatex-0.3.11py3/lib/dbtexmf/core/imagedata.py dblatex-0.3.11py3-new/lib/dbtexmf/core/imagedata.py
|
||||
--- dblatex-0.3.11py3/lib/dbtexmf/core/imagedata.py 2020-01-29 13:48:33.000000000 -0800
|
||||
+++ dblatex-0.3.11py3-new/lib/dbtexmf/core/imagedata.py 2020-02-25 00:45:35.627054621 -0800
|
||||
@@ -181,8 +181,8 @@
|
||||
class SvgConverter(ImageConverter):
|
||||
def __init__(self, imgsrc, imgdst="", docformat="", backend=""):
|
||||
ImageConverter.__init__(self, imgsrc="svg", imgdst=imgdst)
|
||||
- self.add_command(["inkscape", "-z", "-D", "--export-%(dst)s=%(output)s",
|
||||
- "%(input)s"])
|
||||
+ self.add_command(["rsvg-convert", "-f", "%(dst)s", "-o","%(output)s",
|
||||
+ "%(input)s"])
|
||||
|
||||
|
||||
class FormatRule:
|
||||
@@ -1,15 +0,0 @@
|
||||
diff -Naur dblatex-0.3.11py3/scripts/dblatex dblatex-0.3.11py3-new/scripts/dblatex
|
||||
--- dblatex-0.3.11py3/scripts/dblatex 2020-01-29 13:48:34.000000000 -0800
|
||||
+++ dblatex-0.3.11py3-new/scripts/dblatex 2020-02-25 01:04:16.169346434 -0800
|
||||
@@ -1,8 +1,10 @@
|
||||
#! /usr/bin/env python
|
||||
import sys
|
||||
import os
|
||||
+import logging
|
||||
|
||||
-package_base = os.path.join(os.path.dirname(sys.argv[0]), "..")
|
||||
+logging.basicConfig()
|
||||
+package_base = "/usr/share/dblatex"
|
||||
sys.path.insert(0, os.path.realpath(os.path.join(package_base, "lib")))
|
||||
|
||||
from dbtexmf.dblatex import dblatex
|
||||
@@ -1,47 +0,0 @@
|
||||
diff -Naur dblatex-0.3.11py3/setup.py dblatex-0.3.11py3-new/setup.py
|
||||
--- dblatex-0.3.11py3/setup.py 2020-01-29 13:48:34.000000000 -0800
|
||||
+++ dblatex-0.3.11py3-new/setup.py 2020-02-27 20:25:21.669297793 -0800
|
||||
@@ -26,7 +26,6 @@
|
||||
from distutils import log
|
||||
from subprocess import Popen, PIPE
|
||||
sys.path.append("lib")
|
||||
-from contrib.debian.installer import DebianInstaller
|
||||
|
||||
#
|
||||
# Build the command line script
|
||||
@@ -192,7 +191,7 @@
|
||||
log.info("running build_doc")
|
||||
htmldir = os.path.join("docs", "xhtml")
|
||||
pdfdocs = glob.glob(os.path.join("docs", "[mr]*.pdf"))
|
||||
- manpage = os.path.join("docs", "manpage", "dblatex.1.gz")
|
||||
+ manpage = os.path.join("docs", "manpage", "dblatex.1")
|
||||
|
||||
# Lazy check to avoid a rebuild for nothing
|
||||
if (not(self.force) and os.path.exists(htmldir) and len(pdfdocs) >= 2
|
||||
@@ -368,15 +367,12 @@
|
||||
status += "no"
|
||||
mis_stys.append(sty)
|
||||
print(status)
|
||||
-
|
||||
+
|
||||
if mis_stys:
|
||||
raise OSError("not found: %s" % ", ".join(mis_stys))
|
||||
|
||||
def run(self):
|
||||
- if self.install_layout == "deb":
|
||||
- db = DebianInstaller(self)
|
||||
- else:
|
||||
- db = None
|
||||
+ db = None
|
||||
|
||||
if not(db) and not(self.nodeps):
|
||||
try:
|
||||
@@ -515,7 +511,7 @@
|
||||
data_files=[('share/dblatex', ['xsl', 'latex', 'etc/schema']),
|
||||
('share/doc/dblatex', pdfdocs),
|
||||
('share/doc/dblatex', htmldoc),
|
||||
- ('share/man/man1', ['docs/manpage/dblatex.1.gz'])],
|
||||
+ ('share/man/man1', ['docs/manpage/dblatex.1'])],
|
||||
scripts=['scripts/dblatex'],
|
||||
cmdclass={'build': Build,
|
||||
'build_scripts': BuildScripts,
|
||||
@@ -1,46 +0,0 @@
|
||||
Description: Python 3.12 compatibility: adjust submodule imports
|
||||
importlib imports behave differently in py 3.11 and py 3.12: py 3.12
|
||||
requires explicit imports of the submodules.
|
||||
.
|
||||
While fixing this, reduce the imports to the used submodules. Currently,
|
||||
the base is still imported automatically.
|
||||
Forwarded: https://sourceforge.net/p/dblatex/patches/13/
|
||||
Author: Michael J Gruber <github@grubix.eu>
|
||||
Last-Update: 2023-07-06
|
||||
|
||||
--- a/lib/dbtexmf/core/dbtex.py
|
||||
+++ b/lib/dbtexmf/core/dbtex.py
|
||||
@@ -15,7 +15,8 @@
|
||||
except ImportError:
|
||||
from urllib.request import pathname2url
|
||||
import glob
|
||||
-import importlib
|
||||
+import importlib.machinery
|
||||
+import importlib.util
|
||||
from optparse import OptionParser
|
||||
from io import open
|
||||
|
||||
--- a/lib/dbtexmf/dblatex/grubber/plugins.py
|
||||
+++ b/lib/dbtexmf/dblatex/grubber/plugins.py
|
||||
@@ -4,7 +4,8 @@
|
||||
Mechanisms to dynamically load extra modules to help the LaTeX compilation.
|
||||
All the modules must be derived from the TexModule class.
|
||||
"""
|
||||
-import importlib
|
||||
+import importlib.machinery
|
||||
+import importlib.util
|
||||
|
||||
from os.path import *
|
||||
from dbtexmf.dblatex.grubber.msg import _, msg
|
||||
--- a/lib/dbtexmf/xslt/xslt.py
|
||||
+++ b/lib/dbtexmf/xslt/xslt.py
|
||||
@@ -2,7 +2,8 @@
|
||||
# Very simple plugin loader for Xslt classes
|
||||
#
|
||||
import os
|
||||
-import importlib
|
||||
+import importlib.machinery
|
||||
+import importlib.util
|
||||
import glob
|
||||
import sys
|
||||
|
||||
@@ -1,112 +0,0 @@
|
||||
Description: Python 3.12 compatibility: Replace imp by importlib
|
||||
Forwarded: https://sourceforge.net/p/dblatex/patches/12/
|
||||
Author: Miro Hrončok <mhroncok@redhat.com>
|
||||
Last-Update: 2023-06-15
|
||||
|
||||
--- a/lib/dbtexmf/core/dbtex.py
|
||||
+++ b/lib/dbtexmf/core/dbtex.py
|
||||
@@ -15,7 +15,7 @@
|
||||
except ImportError:
|
||||
from urllib.request import pathname2url
|
||||
import glob
|
||||
-import imp
|
||||
+import importlib
|
||||
from optparse import OptionParser
|
||||
from io import open
|
||||
|
||||
@@ -540,15 +540,14 @@
|
||||
|
||||
def load_plugin(self, pathname):
|
||||
moddir, modname = os.path.split(pathname)
|
||||
- try:
|
||||
- filemod, path, descr = imp.find_module(modname, [moddir])
|
||||
- except ImportError:
|
||||
- try:
|
||||
- filemod, path, descr = imp.find_module(modname)
|
||||
- except ImportError:
|
||||
- failed_exit("Error: '%s' module not found" % modname)
|
||||
- mod = imp.load_module(modname, filemod, path, descr)
|
||||
- filemod.close()
|
||||
+ spec = importlib.machinery.PathFinder.find_spec(modname, [moddir])
|
||||
+ if not spec:
|
||||
+ spec = importlib.machinery.PathFinder.find_spec(modname)
|
||||
+ if not spec:
|
||||
+ failed_exit("Error: '%s' module not found" % modname)
|
||||
+ mod = importlib.util.module_from_spec(spec)
|
||||
+ spec.loader.exec_module(mod)
|
||||
+ sys.modules[modname] = mod
|
||||
return mod
|
||||
|
||||
def run_setup(self, options):
|
||||
--- a/lib/dbtexmf/dblatex/grubber/plugins.py
|
||||
+++ b/lib/dbtexmf/dblatex/grubber/plugins.py
|
||||
@@ -4,7 +4,7 @@
|
||||
Mechanisms to dynamically load extra modules to help the LaTeX compilation.
|
||||
All the modules must be derived from the TexModule class.
|
||||
"""
|
||||
-import imp
|
||||
+import importlib
|
||||
|
||||
from os.path import *
|
||||
from dbtexmf.dblatex.grubber.msg import _, msg
|
||||
@@ -108,17 +108,16 @@
|
||||
"""
|
||||
if name in self.modules:
|
||||
return 2
|
||||
- try:
|
||||
- file, path, descr = imp.find_module(name, [""])
|
||||
- except ImportError:
|
||||
+ spec = importlib.machinery.PathFinder.find_spec(name, [""])
|
||||
+ if not spec:
|
||||
if not self.path:
|
||||
return 0
|
||||
- try:
|
||||
- file, path, descr = imp.find_module(name, self.path)
|
||||
- except ImportError:
|
||||
- return 0
|
||||
- module = imp.load_module(name, file, path, descr)
|
||||
- file.close()
|
||||
+ spec = importlib.machinery.PathFinder.find_spec(name, self.path)
|
||||
+ if not spec:
|
||||
+ return 0
|
||||
+ module = importlib.util.module_from_spec(spec)
|
||||
+ spec.loader.exec_module(module)
|
||||
+ sys.modules[name] = module
|
||||
self.modules[name] = module
|
||||
return 1
|
||||
|
||||
--- a/lib/dbtexmf/xslt/xslt.py
|
||||
+++ b/lib/dbtexmf/xslt/xslt.py
|
||||
@@ -2,20 +2,21 @@
|
||||
# Very simple plugin loader for Xslt classes
|
||||
#
|
||||
import os
|
||||
-import imp
|
||||
+import importlib
|
||||
import glob
|
||||
+import sys
|
||||
|
||||
def load(modname):
|
||||
- try:
|
||||
- file, path, descr = imp.find_module(modname, [""])
|
||||
- except ImportError:
|
||||
- try:
|
||||
- file, path, descr = imp.find_module(modname,
|
||||
- [os.path.dirname(__file__)])
|
||||
- except ImportError:
|
||||
- raise ValueError("Xslt '%s' not found" % modname)
|
||||
- mod = imp.load_module(modname, file, path, descr)
|
||||
- file.close()
|
||||
+ spec = importlib.machinery.PathFinder.find_spec(modname, [""])
|
||||
+ if not spec:
|
||||
+ spec = importlib.machinery.PathFinder.find_spec(modname,
|
||||
+ [os.path.dirname(__file__)])
|
||||
+ if not spec:
|
||||
+ raise ValueError("Xslt '%s' not found" % modname)
|
||||
+
|
||||
+ mod = importlib.util.module_from_spec(spec)
|
||||
+ spec.loader.exec_module(mod)
|
||||
+ sys.modules[modname] = mod
|
||||
o = mod.Xslt()
|
||||
return o
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person" proxied="yes">
|
||||
<email>zoltan@sinustrom.info</email>
|
||||
<name>Zoltan Puskas</name>
|
||||
</maintainer>
|
||||
<maintainer type="project" proxied="proxy">
|
||||
<email>proxy-maint@gentoo.org</email>
|
||||
<name>Proxy Maintainers</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="inkscape">Use inkscape to convert SVG. Disable to use <pkg>gnome-base/librsvg</pkg> instead.</flag>
|
||||
</use>
|
||||
<longdescription>
|
||||
dbaltex is an opensource DocBook to LaTeX publishing software
|
||||
that originally started as DB2LaTeX clone, but now is more
|
||||
feature rich and easier to use.
|
||||
</longdescription>
|
||||
<upstream>
|
||||
<remote-id type="sourceforge">dblatex</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
@@ -1,4 +1,4 @@
|
||||
DIST icy_draw_linux_0.3.0.zip 5599069 BLAKE2B 48079706da8113baedcf9ce7cf4abae3e0f55a3ec952881e3c2e430b81f15cbb30e3f9059fc04e5b02f2f928d55ba5b7a0c4f9e0e4c13f4a82d07ddd86a89b5a SHA512 941ed619aba22845b6389a5519a530157601a1ab8158eeb03f497f5a282265b7ba88084f1df62a43099964495e39ddb33e902c32ae585a3624e799dcdca2795a
|
||||
EBUILD icy-draw-0.3.0.ebuild 1104 BLAKE2B 4ce69d0cfbdb5f0d1602745552ad9e158c70540eb3b74e382dc8e321904879a83c0c62e63b3885b76085dcb1c7090715e9a47eea31ae1f807924eefc355c5589 SHA512 623f4e350268b31450463de7c494c8d972575f64bcc6c10fbde9c064ab44a3da4b48016fe27dfded87d70445f9cdee7c7b020260aa01179fcdd73d5e8daa2568
|
||||
DIST icy_draw_linux_0.4.1.zip 5744308 BLAKE2B 4e66b329e671028f0aad66faeaac48b2b8ef1022fce8a93d52563950307b0507119ecec5685062bc90849f6935440bef50e86424d816c0bba5b876865cc1692a SHA512 3aeda30b282fd50bf3e457792de140a913a36944266204aa1ffacc895e6b606cb9873e718cfc1825f9991fc6e223afdb3fe82edfc2e3c529ab969e41b68eff1d
|
||||
EBUILD icy-draw-0.4.1.ebuild 1006 BLAKE2B 3a70ff692253f85bf6c78ea557bf82ab87a324dd98e339c40b4492b1d9727049d3e1af571155174d3a4383081953330a2a5147eb99c14fdbba04809c8d324bd4 SHA512 83957c2bb952e903beb1490d6610bcbe0c1e1540a27948f0c473f698215dfb32b1d78680aed89a1cf280cccfe8dc46bf06347c41b9ce72814b7874787ee66971
|
||||
MISC ChangeLog 889 BLAKE2B 216bbbfe9b264ef06f5b56748af1ea7366fa49f2406604264b7d22ce8f464ffd7491a57912d7cf1be7d3dc030578960acca895236d6e06fd017f02a9138f0b7f SHA512 09aa97933a9709827b6e3c01ce8a3829cb3d494f7fdac570faa30da6fac440c752391d8dcaf7d03c5cd1163686e8921c1bf4ad75827e4b8df05bbcde03548488
|
||||
MISC metadata.xml 408 BLAKE2B 66a3e2838d5c5f95c7463733cd13b1230ef3ca005ec0c5dac797561be30f950da98dfa41eeb4d43cf97500c9a2e0d04c57b0b084d60107072a988dd7c4d16ded SHA512 9cac3e4a07c425e87274de776e03d243e462341168235cd3991ef4706aa1a902cf6591ae8e965b9c4ed370fc2ebef3ca805a9c761d05c4b994ae8667198b267c
|
||||
|
||||
@@ -8,8 +8,7 @@ inherit unpacker pam xdg-utils
|
||||
DESCRIPTION="Is a drawing tool supporting almost all ANSI formats."
|
||||
HOMEPAGE="https://github.com/mkrueger/icy_tools"
|
||||
|
||||
#SRC_URI="https://github.com/mkrueger/icy_tools/releases/download/IcyTerm${PV}/icy_term_linux_${PV}.zip"
|
||||
SRC_URI="https://github.com/mkrueger/icy_tools/releases/download/0.0.1/icy_draw_linux_${PV}.zip"
|
||||
SRC_URI="https://github.com/mkrueger/icy_tools/releases/download/IcyDraw${PV}/icy_draw_linux_${PV}.zip"
|
||||
|
||||
LICENSE="apache"
|
||||
|
||||
Reference in New Issue
Block a user