Added app-text/calibre-7.24.0
This commit is contained in:
27
app-text/calibre/files/calibre-7.0.0-jxr-test.patch
Normal file
27
app-text/calibre/files/calibre-7.0.0-jxr-test.patch
Normal file
@ -0,0 +1,27 @@
|
||||
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')
|
||||
# }}}
|
||||
|
||||
|
13
app-text/calibre/files/calibre-server-3.conf
Normal file
13
app-text/calibre/files/calibre-server-3.conf
Normal file
@ -0,0 +1,13 @@
|
||||
# /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"
|
58
app-text/calibre/files/calibre-server-3.init
Normal file
58
app-text/calibre/files/calibre-server-3.init
Normal file
@ -0,0 +1,58 @@
|
||||
#!/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 $?
|
||||
}
|
Reference in New Issue
Block a user