dupeguru: fix build with sphinx-1.7.1 Bump PKGREVISION.diff -r1.4 -r1.5 pkgsrc/sysutils/dupeguru/Makefile
(wiz)
@@ -1,18 +1,18 @@ | @@ -1,18 +1,18 @@ | |||
1 | # $NetBSD: Makefile,v 1.4 2018/02/16 12:43:52 wiz Exp $ | 1 | # $NetBSD: Makefile,v 1.5 2018/03/14 17:11:26 wiz Exp $ | |
2 | 2 | |||
3 | DISTNAME= dupeguru-src-4.0.3 | 3 | DISTNAME= dupeguru-src-4.0.3 | |
4 | PKGNAME= ${DISTNAME:S/-src//} | 4 | PKGNAME= ${DISTNAME:S/-src//} | |
5 | PKGREVISION= 1 | 5 | PKGREVISION= 2 | |
6 | CATEGORIES= sysutils | 6 | CATEGORIES= sysutils | |
7 | MASTER_SITES= https://download.hardcoded.net/ | 7 | MASTER_SITES= https://download.hardcoded.net/ | |
8 | 8 | |||
9 | MAINTAINER= pkgsrc-users@NetBSD.org | 9 | MAINTAINER= pkgsrc-users@NetBSD.org | |
10 | HOMEPAGE= https://www.hardcoded.net/dupeguru/ | 10 | HOMEPAGE= https://www.hardcoded.net/dupeguru/ | |
11 | COMMENT= Find duplicate files | 11 | COMMENT= Find duplicate files | |
12 | LICENSE= gnu-gpl-v3 | 12 | LICENSE= gnu-gpl-v3 | |
13 | 13 | |||
14 | BUILD_DEPENDS+= ${PYPKGPREFIX}-polib>=1.0.4:../../devel/py-polib | 14 | BUILD_DEPENDS+= ${PYPKGPREFIX}-polib>=1.0.4:../../devel/py-polib | |
15 | BUILD_DEPENDS+= ${PYPKGPREFIX}-sphinx>=1.3.4nb1:../../textproc/py-sphinx | 15 | BUILD_DEPENDS+= ${PYPKGPREFIX}-sphinx>=1.3.4nb1:../../textproc/py-sphinx | |
16 | DEPENDS+= ${PYPKGPREFIX}-qt5-[0-9]*:../../x11/py-qt5 | 16 | DEPENDS+= ${PYPKGPREFIX}-qt5-[0-9]*:../../x11/py-qt5 | |
17 | DEPENDS+= ${PYPKGPREFIX}-hsaudiotag3k-[0-9]*:../../audio/py-hsaudiotag3k | 17 | DEPENDS+= ${PYPKGPREFIX}-hsaudiotag3k-[0-9]*:../../audio/py-hsaudiotag3k | |
18 | DEPENDS+= ${PYPKGPREFIX}-Send2Trash-[0-9]*:../../sysutils/py-Send2Trash | 18 | DEPENDS+= ${PYPKGPREFIX}-Send2Trash-[0-9]*:../../sysutils/py-Send2Trash | |
@@ -34,18 +34,19 @@ INSTALLATION_DIRS= bin share/application | @@ -34,18 +34,19 @@ INSTALLATION_DIRS= bin share/application | |||
34 | do-build: | 34 | do-build: | |
35 | cd ${WRKSRC} && ${PYTHONBIN} build.py | 35 | cd ${WRKSRC} && ${PYTHONBIN} build.py | |
36 | ${CHMOD} +x ${WRKSRC}/run.py | 36 | ${CHMOD} +x ${WRKSRC}/run.py | |
37 | 37 | |||
38 | do-install: | 38 | do-install: | |
39 | rm -rf ${WRKSRC}/build/dupeguru-arch | 39 | rm -rf ${WRKSRC}/build/dupeguru-arch | |
40 | cd ${WRKSRC} && ${PYTHONBIN} package.py --arch | 40 | cd ${WRKSRC} && ${PYTHONBIN} package.py --arch | |
41 | cd ${WRKSRC}/build/dupeguru-arch && pax -pp -rw * ${DESTDIR}${PREFIX}/share/dupeguru | 41 | cd ${WRKSRC}/build/dupeguru-arch && pax -pp -rw * ${DESTDIR}${PREFIX}/share/dupeguru | |
42 | ${RM} -rf ${DESTDIR}${PREFIX}/share/dupeguru/hsaudiotag | 42 | ${RM} -rf ${DESTDIR}${PREFIX}/share/dupeguru/hsaudiotag | |
43 | ${RM} -rf ${DESTDIR}${PREFIX}/share/dupeguru/send2trash | 43 | ${RM} -rf ${DESTDIR}${PREFIX}/share/dupeguru/send2trash | |
44 | ${LN} -s ${DESTDIR}${PREFIX}/share/dupeguru/run.py ${DESTDIR}${PREFIX}/bin/dupeguru | 44 | ${LN} -s ${DESTDIR}${PREFIX}/share/dupeguru/run.py ${DESTDIR}${PREFIX}/bin/dupeguru | |
45 | ${INSTALL_DATA} ${WRKSRC}/build/dupeguru-arch/dupeguru.desktop ${DESTDIR}${PREFIX}/share/applications | 45 | ${INSTALL_DATA} ${WRKSRC}/build/dupeguru-arch/dupeguru.desktop ${DESTDIR}${PREFIX}/share/applications | |
46 | ${RM} -f ${DESTDIR}${PREFIX}/share/dupeguru/qt/platform.py.orig | 46 | ${RM} -f ${DESTDIR}${PREFIX}/share/dupeguru/qt/platform.py.orig | |
47 | ${RM} -f ${DESTDIR}${PREFIX}/share/dupeguru/hscommon/sphinxgen.py.orig | |||
47 | 48 | |||
48 | .include "../../lang/python/application.mk" | 49 | .include "../../lang/python/application.mk" | |
49 | .include "../../lang/python/extension.mk" | 50 | .include "../../lang/python/extension.mk" | |
50 | .include "../../sysutils/desktop-file-utils/desktopdb.mk" | 51 | .include "../../sysutils/desktop-file-utils/desktopdb.mk" | |
51 | .include "../../mk/bsd.pkg.mk" | 52 | .include "../../mk/bsd.pkg.mk" |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.2 2018/02/16 12:43:52 wiz Exp $ | 1 | @comment $NetBSD: PLIST,v 1.3 2018/03/14 17:11:26 wiz Exp $ | |
2 | bin/dupeguru | 2 | bin/dupeguru | |
3 | share/applications/dupeguru.desktop | 3 | share/applications/dupeguru.desktop | |
4 | share/dupeguru/core/__init__.py | 4 | share/dupeguru/core/__init__.py | |
5 | share/dupeguru/core/__init__.pyc | 5 | share/dupeguru/core/__init__.pyc | |
6 | share/dupeguru/core/app.py | 6 | share/dupeguru/core/app.py | |
7 | share/dupeguru/core/app.pyc | 7 | share/dupeguru/core/app.pyc | |
8 | share/dupeguru/core/directories.py | 8 | share/dupeguru/core/directories.py | |
9 | share/dupeguru/core/directories.pyc | 9 | share/dupeguru/core/directories.pyc | |
10 | share/dupeguru/core/engine.py | 10 | share/dupeguru/core/engine.py | |
11 | share/dupeguru/core/engine.pyc | 11 | share/dupeguru/core/engine.pyc | |
12 | share/dupeguru/core/export.py | 12 | share/dupeguru/core/export.py | |
13 | share/dupeguru/core/export.pyc | 13 | share/dupeguru/core/export.pyc | |
14 | share/dupeguru/core/fs.py | 14 | share/dupeguru/core/fs.py | |
@@ -171,26 +171,27 @@ share/dupeguru/help/_sources/quick_start | @@ -171,26 +171,27 @@ share/dupeguru/help/_sources/quick_start | |||
171 | share/dupeguru/help/_sources/reprioritize.rst.txt | 171 | share/dupeguru/help/_sources/reprioritize.rst.txt | |
172 | share/dupeguru/help/_sources/results.rst.txt | 172 | share/dupeguru/help/_sources/results.rst.txt | |
173 | share/dupeguru/help/_sources/scan.rst.txt | 173 | share/dupeguru/help/_sources/scan.rst.txt | |
174 | share/dupeguru/help/_static/ajax-loader.gif | 174 | share/dupeguru/help/_static/ajax-loader.gif | |
175 | share/dupeguru/help/_static/alert_info_32.png | 175 | share/dupeguru/help/_static/alert_info_32.png | |
176 | share/dupeguru/help/_static/alert_warning_32.png | 176 | share/dupeguru/help/_static/alert_warning_32.png | |
177 | share/dupeguru/help/_static/basic.css | 177 | share/dupeguru/help/_static/basic.css | |
178 | share/dupeguru/help/_static/bg-page.png | 178 | share/dupeguru/help/_static/bg-page.png | |
179 | share/dupeguru/help/_static/bullet_orange.png | 179 | share/dupeguru/help/_static/bullet_orange.png | |
180 | share/dupeguru/help/_static/comment-bright.png | 180 | share/dupeguru/help/_static/comment-bright.png | |
181 | share/dupeguru/help/_static/comment-close.png | 181 | share/dupeguru/help/_static/comment-close.png | |
182 | share/dupeguru/help/_static/comment.png | 182 | share/dupeguru/help/_static/comment.png | |
183 | share/dupeguru/help/_static/doctools.js | 183 | share/dupeguru/help/_static/doctools.js | |
184 | share/dupeguru/help/_static/documentation_options.js | |||
184 | share/dupeguru/help/_static/down-pressed.png | 185 | share/dupeguru/help/_static/down-pressed.png | |
185 | share/dupeguru/help/_static/down.png | 186 | share/dupeguru/help/_static/down.png | |
186 | share/dupeguru/help/_static/file.png | 187 | share/dupeguru/help/_static/file.png | |
187 | share/dupeguru/help/_static/haiku.css | 188 | share/dupeguru/help/_static/haiku.css | |
188 | share/dupeguru/help/_static/jquery-3.2.1.js | 189 | share/dupeguru/help/_static/jquery-3.2.1.js | |
189 | share/dupeguru/help/_static/jquery.js | 190 | share/dupeguru/help/_static/jquery.js | |
190 | share/dupeguru/help/_static/minus.png | 191 | share/dupeguru/help/_static/minus.png | |
191 | share/dupeguru/help/_static/plus.png | 192 | share/dupeguru/help/_static/plus.png | |
192 | share/dupeguru/help/_static/pygments.css | 193 | share/dupeguru/help/_static/pygments.css | |
193 | share/dupeguru/help/_static/searchtools.js | 194 | share/dupeguru/help/_static/searchtools.js | |
194 | share/dupeguru/help/_static/underscore-1.3.1.js | 195 | share/dupeguru/help/_static/underscore-1.3.1.js | |
195 | share/dupeguru/help/_static/underscore.js | 196 | share/dupeguru/help/_static/underscore.js | |
196 | share/dupeguru/help/_static/up-pressed.png | 197 | share/dupeguru/help/_static/up-pressed.png |
@@ -1,7 +1,8 @@ | @@ -1,7 +1,8 @@ | |||
1 | $NetBSD: distinfo,v 1.1 2017/09/26 11:22:39 wiz Exp $ | 1 | $NetBSD: distinfo,v 1.2 2018/03/14 17:11:26 wiz Exp $ | |
2 | 2 | |||
3 | SHA1 (dupeguru-src-4.0.3.tar.gz) = a794780e187a36d45c384395e9bd8c2b8f5018bf | 3 | SHA1 (dupeguru-src-4.0.3.tar.gz) = a794780e187a36d45c384395e9bd8c2b8f5018bf | |
4 | RMD160 (dupeguru-src-4.0.3.tar.gz) = 5cd2b7f93276fcd8f09b699cfec5246f7dc5abed | 4 | RMD160 (dupeguru-src-4.0.3.tar.gz) = 5cd2b7f93276fcd8f09b699cfec5246f7dc5abed | |
5 | SHA512 (dupeguru-src-4.0.3.tar.gz) = dc8a5a122ad1d3d235825a498fb75b192566d3b5a33382ebb0002a361428af5cc453b143002ea3f57a9cb6ee30ce49f0b9f5a54bce2a90364fb1b92e102a289a | 5 | SHA512 (dupeguru-src-4.0.3.tar.gz) = dc8a5a122ad1d3d235825a498fb75b192566d3b5a33382ebb0002a361428af5cc453b143002ea3f57a9cb6ee30ce49f0b9f5a54bce2a90364fb1b92e102a289a | |
6 | Size (dupeguru-src-4.0.3.tar.gz) = 686580 bytes | 6 | Size (dupeguru-src-4.0.3.tar.gz) = 686580 bytes | |
7 | SHA1 (patch-hscommon_sphinxgen.py) = cd558d14733d394e7adf2b6b0c826dda5eed689f | |||
7 | SHA1 (patch-qt_platform.py) = e97e226b53f57f8c4e9bf21f4726e024bb0b2d67 | 8 | SHA1 (patch-qt_platform.py) = e97e226b53f57f8c4e9bf21f4726e024bb0b2d67 |
$NetBSD: patch-hscommon_sphinxgen.py,v 1.1 2018/03/14 17:11:26 wiz Exp $
Fix build with sphinx-1.7.1.
https://github.com/hsoft/hscommon/commit/17a12618074ccb1e2e66df566c55c621dd8503a7
--- hscommon/sphinxgen.py.orig 2016-08-17 02:02:50.000000000 +0000
+++ hscommon/sphinxgen.py
@@ -9,7 +9,8 @@
import os.path as op
import re
-from pkg_resources import load_entry_point
+from distutils.version import LooseVersion
+from pkg_resources import load_entry_point, get_distribution
from .build import read_changelog_file, filereplace
@@ -60,14 +61,21 @@ def gen(basepath, destpath, changelogpat
filereplace(changelogtmpl, changelog_out, changelog='\n'.join(rendered_logs))
conf_out = op.join(basepath, 'conf.py')
filereplace(confpath, conf_out, **confrepl)
- # We used to call sphinx-build with print_and_do(), but the problem was that the virtualenv
- # of the calling python wasn't correctly considered and caused problems with documentation
- # relying on autodoc (which tries to import the module to auto-document, but fail because of
- # missing dependencies which are in the virtualenv). Here, we do exactly what is done when
- # calling the command from bash.
- cmd = load_entry_point('Sphinx', 'console_scripts', 'sphinx-build')
- try:
- cmd(['sphinx-build', basepath, destpath])
- except SystemExit:
- print("Sphinx called sys.exit(), but we're cancelling it because we don't actually want to exit")
-
+ if LooseVersion(get_distribution("sphinx").version) >= LooseVersion("1.7.0"):
+ from sphinx.cmd.build import build_main as sphinx_build
+ # Call the sphinx_build function, which is the same as doing sphinx-build from cli
+ try:
+ sphinx_build([basepath, destpath])
+ except SystemExit:
+ print("Sphinx called sys.exit(), but we're cancelling it because we don't actually want to exit")
+ else:
+ # We used to call sphinx-build with print_and_do(), but the problem was that the virtualenv
+ # of the calling python wasn't correctly considered and caused problems with documentation
+ # relying on autodoc (which tries to import the module to auto-document, but fail because of
+ # missing dependencies which are in the virtualenv). Here, we do exactly what is done when
+ # calling the command from bash.
+ cmd = load_entry_point('Sphinx', 'console_scripts', 'sphinx-build')
+ try:
+ cmd(['sphinx-build', basepath, destpath])
+ except SystemExit:
+ print("Sphinx called sys.exit(), but we're cancelling it because we don't actually want to exit")