On 2019/10/19 14:11, Pavel Korovin wrote:
> Stuart, thank you for comments!
> 
> Please find the updated diff attached.
> Looking for OKs to commit.
> 
> -- 
> With best regards,
> Pavel Korovin

Here's an updated diff for Makefile (I won't include the rest of the 3k line
diff) that cleans up post-build and drops devel/gmake from BUILD_DEPENDS.

I am just using CPUS=${MAKE_JOBS}, because that is the long-term result
that we want (it seems quite possibly that the breakage is a sphinx bug;
our in-tree sphinx is very old) and there's no real expectation that a
user setting MAKE_JOBS to anything other than 1 will work. (As you know
but commenting for other readers, we do need to override the default
which sets multiple jobs automatically based on #cpus).


Index: Makefile
===================================================================
RCS file: /cvs/ports/sysutils/ansible/Makefile,v
retrieving revision 1.110
diff -u -p -r1.110 Makefile
--- Makefile    2 Oct 2019 07:55:22 -0000       1.110
+++ Makefile    19 Oct 2019 13:22:27 -0000
@@ -3,7 +3,7 @@
 COMMENT-main =         ssh based config management framework
 COMMENT-html =         offline Ansible documentation in HTML format
 
-MODPY_EGG_VERSION =    2.8.5
+MODPY_EGG_VERSION =    2.8.6
 DISTNAME =             ansible-${MODPY_EGG_VERSION}
 PKGNAME-main =         ${PKGNAME}
 PKGNAME-html =         ansible-html-${MODPY_EGG_VERSION}
@@ -26,19 +26,24 @@ MODPY_SETUPTOOLS =  Yes
 MODPY_VERSION =                ${MODPY_DEFAULT_VERSION_3}
 
 BUILD_DEPENDS =                textproc/py-sphinx${MODPY_FLAVOR} \
-                       textproc/py-sphinx-notfound-page${MODPY_FLAVOR}
+                       textproc/py-sphinx-notfound-page${MODPY_FLAVOR} \
+                       textproc/py-yaml${MODPY_FLAVOR}
 RUN_DEPENDS =          net/py-netaddr${MODPY_FLAVOR} \
                        security/py-cryptodome${MODPY_FLAVOR} \
                        security/py-paramiko${MODPY_FLAVOR} \
                        security/py-passlib${MODPY_FLAVOR} \
                        textproc/py-yaml${MODPY_FLAVOR} \
                        www/py-jinja2${MODPY_FLAVOR}
-RUN_DEPENDS-html =     ${BUILD_PKGPATH},-main
+RUN_DEPENDS-html =
+
+USE_GMAKE =            Yes
 
 PKG_ARCH-html =                *
 
 NO_TEST =              Yes
 
+MODPY_ADJ_FILES =      docs/bin/*.py
+
 DOCDIR =               ${PREFIX}/share/doc/ansible
 EXDIR =                        ${PREFIX}/share/examples/ansible
 PLUGINDIR =            ${PREFIX}/share/ansible_plugins
@@ -50,10 +55,15 @@ pre-configure:
                ${WRKSRC}/examples/ansible.cfg \
                ${WRKSRC}/docs/man/man1/*.1
 
-# "_build" to be revisited in case SEPARATE_BUILD is changed
+pre-build:
+       ln -sf ${LOCALBASE}/bin/sphinx-build${MODPY_BIN_SUFFIX} \
+               ${WRKDIR}/bin/sphinx-build
+
 post-build:
-       cd ${WRKSRC}/docs/docsite; \
-       ${LOCALBASE}/bin/sphinx-build${MODPY_BIN_SUFFIX} -M html rst _build -j 
${MAKE_JOBS}
+       ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} -C ${WRKSRC}/docs/docsite \
+           ANSIBLE_LOCAL_TEMP=./tmp CPUS=${MAKE_JOBS} all
+       sed -i -e "s,/_prefix_start_/_prefix_end_/,,g" \
+               ${WRKSRC}/docs/docsite/_build/html/404.html
 
 post-install:
        ${INSTALL_DATA_DIR} ${EXDIR}/scripts ${DOCDIR}

Reply via email to