deskutils/calibre: Update version 1.44.0 => 1.45.0 plus clean-up
The PR as provided did not pass stage checks. Not only were there new installed files not represented in the pkg-plist, but patching the html files caused the .orig versions to be installed too. That required a post-patch target to remove as well as the updated pkg-plist. A long standing issue that was non-fatal on FreeBSD but fatal on DragonFly involved the use of the calibre RC script. The calibre.in template is filled in at ${WRKDIR}/calibre, the same exact location for the default configure directory. FreeBSD handled that problem like this: "No write acces [sic] to /work/a/ports/deskutils/calibre/work/calibre using a temporary dir instead" But the error code returned by DragonFly caused this message there: "OSError: [Errno 20] Not a directory: '/wrkdirs/deskutils/calibre/ work/calibre/global.py'" The solution was to set CALIBRE_CONFIG_DIRECTORY to another location. Strangely this directory is removed by the build later. Another change I made was to move XDG_CONFIG_HOME from ${STAGEDIR}/.config to ${WRKDIR}/xdg-config where it doesn't need to be deleted as a post-install step. Strangely, this directory is empty after the build, so all this XDG_CONFIG_HOME can probably be removed completely. The remaining changes were wrapping lines to respect an 80-column limit and unmasking install commands. PR: 191957 Submitted by: maintainer (Rusty Nejdl)
This commit is contained in:
parent
3e77d628c9
commit
d50a777123
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=362498
@ -2,7 +2,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= calibre
|
||||
PORTVERSION= 1.44.0
|
||||
PORTVERSION= 1.45.0
|
||||
CATEGORIES= deskutils python
|
||||
MASTER_SITES= SF/${PORTNAME}/${PORTVERSION}/
|
||||
|
||||
@ -67,22 +67,27 @@ MAKE_ENV+= FC_INC_DIR="${LOCALBASE}/include/fontconfig" \
|
||||
PODOFO_LIB_DIR="${LOCALBASE}/lib" \
|
||||
PODOFO_INC_DIR="${LOCALBASE}/include/podofo" \
|
||||
WITH_USB=yes \
|
||||
CALIBRE_CONFIG_DIRECTORY=${WRKDIR}/calibre-config \
|
||||
XDG_DATA_DIRS=${STAGEDIR}${PREFIX}/share \
|
||||
XDG_CONFIG_HOME=${STAGEDIR}/.config
|
||||
XDG_CONFIG_HOME=${WRKDIR}/xdg-config
|
||||
|
||||
post-patch:
|
||||
@${FIND} ${WRKSRC}/resources/content_server -name "*.orig" -delete
|
||||
|
||||
do-build:
|
||||
@${MKDIR} ${WRKDIR}/calibre-config ${WRKDIR}/xdg-config
|
||||
@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} \
|
||||
${PYSETUP} build)
|
||||
|
||||
do-install:
|
||||
${MKDIR} ${STAGEDIR}/.config
|
||||
.for dir in bash-completion desktop-directories gnome/apps mime/packages icons/hicolor/128x128/apps zsh/site-functions
|
||||
.for dir in bash-completion desktop-directories gnome/apps mime/packages \
|
||||
icons/hicolor/128x128/apps zsh/site-functions
|
||||
${MKDIR} ${STAGEDIR}${PREFIX}/share/${dir}
|
||||
.endfor
|
||||
${MKDIR} ${STAGEDIR}${PREFIX}/lib/${PYTHON_VERSION}/site-packages
|
||||
@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} \
|
||||
${PYSETUP} ${INSTALL} --prefix ${PREFIX} --staging-root ${STAGEDIR}${PREFIX})
|
||||
@${RM} ${STAGEDIR}${PREFIX}/bin/calibre-uninstall
|
||||
@${RM} -r ${STAGEDIR}/.config
|
||||
(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} \
|
||||
${PYSETUP} install --prefix ${PREFIX} \
|
||||
--staging-root ${STAGEDIR}${PREFIX})
|
||||
${RM} ${STAGEDIR}${PREFIX}/bin/calibre-uninstall
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (calibre-1.44.0.tar.xz) = b2a49485ece16454169dfdd9da7481fabf0ae644b8e53f3fd114de4ceecf6992
|
||||
SIZE (calibre-1.44.0.tar.xz) = 36438768
|
||||
SHA256 (calibre-1.45.0.tar.xz) = 40d4fbe7da0f1af1e8cf767cd6e247ad3f448b207bccaf0a3c10c42de7fd2e3d
|
||||
SIZE (calibre-1.45.0.tar.xz) = 36470032
|
||||
|
@ -59,7 +59,7 @@ calibre_start()
|
||||
command_args="${command_args} --password=${calibre_password}"
|
||||
fi
|
||||
if [ ! -z "${calibre_url_prefix}" ]; then
|
||||
command_args="${command_args} --url-prefx=${calibre_url_prefix}"
|
||||
command_args="${command_args} --url-prefix=${calibre_url_prefix}"
|
||||
fi
|
||||
|
||||
calibre_home=${calibre_home:-$(getent passwd ${calibre_user} | awk -F: '{print $6}')}
|
||||
|
20
deskutils/calibre/files/patch-calibre_browse.html
Normal file
20
deskutils/calibre/files/patch-calibre_browse.html
Normal file
@ -0,0 +1,20 @@
|
||||
--- resources/content_server/browse/browse.html.orig 2014-07-18 13:16:04.000000000 -0500
|
||||
+++ resources/content_server/browse/browse.html 2014-07-18 13:17:42.000000000 -0500
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>..:: calibre {library} ::.. {title}</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=100" />
|
||||
- <link rel="icon" type="image/x-icon" href="http://calibre-ebook.com/favicon.ico" />
|
||||
+ <link rel="icon" type="image/x-icon" href="{prefix}/static/favicon.ico" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="{prefix}/static/browse/browse.css" />
|
||||
<link type="text/css" href="{prefix}/static/jquery_ui/css/humanity-custom/jquery-ui-1.8.5.custom.css" rel="stylesheet" />
|
||||
@@ -62,8 +62,6 @@
|
||||
<input type="image"
|
||||
src="{prefix}/static/button-donate.png"
|
||||
name="submit"></input>
|
||||
- <img alt="" src="https://www.paypal.com/en_US/i/scr/pixel.gif"
|
||||
- width="1" height="1"></img>
|
||||
</div>
|
||||
</form>
|
||||
<div id="calibre-home-link" title="Go to the calibre website"></div>
|
10
deskutils/calibre/files/patch-calibre_content.py
Normal file
10
deskutils/calibre/files/patch-calibre_content.py
Normal file
@ -0,0 +1,10 @@
|
||||
--- src/calibre/library/server/content.py.orig 2014-07-18 13:13:33.000000000 -0500
|
||||
+++ src/calibre/library/server/content.py 2014-07-18 13:14:11.000000000 -0500
|
||||
@@ -111,6 +111,7 @@
|
||||
'png' : 'image/png',
|
||||
'gif' : 'image/gif',
|
||||
'html' : 'text/html',
|
||||
+ 'ico' : 'image/x-icon',
|
||||
}[fname.rpartition('.')[-1].lower()]
|
||||
except KeyError:
|
||||
raise cherrypy.HTTPError(404, '%r not a valid resource type'%name)
|
11
deskutils/calibre/files/patch-calibre_index.html
Normal file
11
deskutils/calibre/files/patch-calibre_index.html
Normal file
@ -0,0 +1,11 @@
|
||||
--- resources/content_server/index.html.orig 2014-07-18 13:18:05.000000000 -0500
|
||||
+++ resources/content_server/index.html 2014-07-18 13:18:28.000000000 -0500
|
||||
@@ -8,7 +8,7 @@
|
||||
<script type="text/javascript" src="{prefix}/static/date.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="{prefix}/static/jquery.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="{prefix}/static/gui.js" charset="utf-8"></script>
|
||||
- <link rel="icon" href="http://calibre-ebook.com/favicon.ico" type="image/x-icon" />
|
||||
+ <link rel="icon" href="{prefix}/static/favicon.ico" type="image/x-icon" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="banner">
|
@ -372,6 +372,7 @@ lib/calibre/calibre/ebooks/metadata/xmp.py
|
||||
lib/calibre/calibre/ebooks/metadata/zip.py
|
||||
lib/calibre/calibre/ebooks/mobi/__init__.py
|
||||
lib/calibre/calibre/ebooks/mobi/debug/__init__.py
|
||||
lib/calibre/calibre/ebooks/mobi/debug/containers.py
|
||||
lib/calibre/calibre/ebooks/mobi/debug/headers.py
|
||||
lib/calibre/calibre/ebooks/mobi/debug/index.py
|
||||
lib/calibre/calibre/ebooks/mobi/debug/main.py
|
||||
@ -381,6 +382,7 @@ lib/calibre/calibre/ebooks/mobi/huffcdic.py
|
||||
lib/calibre/calibre/ebooks/mobi/langcodes.py
|
||||
lib/calibre/calibre/ebooks/mobi/mobiml.py
|
||||
lib/calibre/calibre/ebooks/mobi/reader/__init__.py
|
||||
lib/calibre/calibre/ebooks/mobi/reader/containers.py
|
||||
lib/calibre/calibre/ebooks/mobi/reader/headers.py
|
||||
lib/calibre/calibre/ebooks/mobi/reader/index.py
|
||||
lib/calibre/calibre/ebooks/mobi/reader/markup.py
|
||||
@ -1009,6 +1011,7 @@ lib/calibre/calibre/gui2/tweak_book/diff/main.py
|
||||
lib/calibre/calibre/gui2/tweak_book/diff/view.py
|
||||
lib/calibre/calibre/gui2/tweak_book/editor/__init__.py
|
||||
lib/calibre/calibre/gui2/tweak_book/editor/canvas.py
|
||||
lib/calibre/calibre/gui2/tweak_book/editor/help.py
|
||||
lib/calibre/calibre/gui2/tweak_book/editor/image.py
|
||||
lib/calibre/calibre/gui2/tweak_book/editor/insert_resource.py
|
||||
lib/calibre/calibre/gui2/tweak_book/editor/smart/__init__.py
|
||||
@ -1531,6 +1534,12 @@ share/applications/calibre-lrfviewer.desktop
|
||||
%%DATADIR%%/dictionaries/es-ES/es-ES.dic
|
||||
%%DATADIR%%/dictionaries/es-ES/locales
|
||||
%%DATADIR%%/ebook-convert-complete.pickle
|
||||
%%DATADIR%%/editor-help/css.json
|
||||
%%DATADIR%%/editor-help/html.json
|
||||
%%DATADIR%%/editor-help/mathml.json
|
||||
%%DATADIR%%/editor-help/opf2.json
|
||||
%%DATADIR%%/editor-help/opf3.json
|
||||
%%DATADIR%%/editor-help/svg.json
|
||||
%%DATADIR%%/fonts/calibreSymbols.otf
|
||||
%%DATADIR%%/fonts/liberation/LiberationMono-Bold.ttf
|
||||
%%DATADIR%%/fonts/liberation/LiberationMono-BoldItalic.ttf
|
||||
@ -2010,6 +2019,7 @@ share/mime/application/x-sony-bbeb.xml
|
||||
share/mime/application/x-topaz-ebook.xml
|
||||
share/mime/packages/calibre-mimetypes.xml
|
||||
share/mime/text/lrs.xml
|
||||
share/zsh/site-functions/_calibre
|
||||
@dirrmtry share/mime/text
|
||||
@dirrmtry share/mime/packages
|
||||
@dirrmtry share/mime/application
|
||||
@ -2088,6 +2098,7 @@ share/mime/text/lrs.xml
|
||||
@dirrm %%DATADIR%%/images
|
||||
@dirrm %%DATADIR%%/fonts/liberation
|
||||
@dirrm %%DATADIR%%/fonts
|
||||
@dirrm %%DATADIR%%/editor-help
|
||||
@dirrm %%DATADIR%%/dictionaries/es-ES
|
||||
@dirrm %%DATADIR%%/dictionaries/en-US
|
||||
@dirrm %%DATADIR%%/dictionaries/en-GB
|
||||
|
Loading…
Reference in New Issue
Block a user