commit: 2f565e2703c06c2c82c0b5fb3bdbcaa0a09d2eec Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sat Jan 11 06:35:13 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat Jan 11 06:36:35 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f565e27
dev-vcs/git: fix USE=doc * Fix parallel build w/ USE=doc for finding asciidoc.conf * Hack around issues with old Makefiles not knowing about out-of-source build artifacts from Meson Closes: https://bugs.gentoo.org/947827 Signed-off-by: Sam James <sam <AT> gentoo.org> dev-vcs/git/files/git-2.48.0-doc-deps.patch | 18 ++++++++++++++++++ dev-vcs/git/git-2.48.0.ebuild | 21 +++++++++++++++++---- dev-vcs/git/git-9999-r1.ebuild | 17 +++++++++++++---- dev-vcs/git/git-9999-r2.ebuild | 17 +++++++++++++---- dev-vcs/git/git-9999-r3.ebuild | 17 +++++++++++++---- 5 files changed, 74 insertions(+), 16 deletions(-) diff --git a/dev-vcs/git/files/git-2.48.0-doc-deps.patch b/dev-vcs/git/files/git-2.48.0-doc-deps.patch new file mode 100644 index 000000000000..83efd62ab38d --- /dev/null +++ b/dev-vcs/git/files/git-2.48.0-doc-deps.patch @@ -0,0 +1,18 @@ +--- a/Documentation/technical/meson.build ++++ b/Documentation/technical/meson.build +@@ -42,6 +42,7 @@ api_index = custom_target( + '@OUTPUT@', + ], + env: script_environment, ++ depends: documentation_deps, + input: api_docs, + output: 'api-index.txt', + ) +@@ -60,6 +61,7 @@ foreach article : api_docs + articles + command: asciidoc_html_options, + input: article, + output: fs.stem(article) + '.html', ++ depends: documentation_deps, + install: true, + install_dir: get_option('datadir') / 'doc/git-doc/technical', + ) diff --git a/dev-vcs/git/git-2.48.0.ebuild b/dev-vcs/git/git-2.48.0.ebuild index 8d8904831f08..9aea3ab17bb8 100644 --- a/dev-vcs/git/git-2.48.0.ebuild +++ b/dev-vcs/git/git-2.48.0.ebuild @@ -148,6 +148,10 @@ REQUIRED_USE=" RESTRICT="!test? ( test )" +PATCHES=( + "${FILESDIR}"/${PN}-2.48.0-doc-deps.patch +) + pkg_setup() { if use subversion && has_version "dev-vcs/subversion[dso]" ; then ewarn "Per Gentoo bugs #223747, #238586, when subversion is built" @@ -193,7 +197,7 @@ src_configure() { ) # For non-live, we use a downloaded docs tarball instead. - if [[ ${PV} == *9999 ]] ; then + if [[ ${PV} == *9999 ]] || use doc ; then emesonargs+=( -Ddocs="man$(usev doc ',html')" ) @@ -248,8 +252,13 @@ src_compile() { git_emake -C contrib/mw-to-git fi - git_emake -C contrib/diff-highlight + if use doc ; then + # Workaround fragments that still use the Makefile and can't + # find the bits from Meson's out-of-source build + ln -s "${BUILD_DIR}"/Documentation/asciidoc.conf "${S}"/Documentation/asciidoc.conf || die + fi + git_emake -C contrib/diff-highlight git_emake -C contrib/subtree git-subtree # git-subtree.1 requires the full USE=doc dependency stack use doc && git_emake -C contrib/subtree git-subtree.html git-subtree.1 @@ -274,11 +283,17 @@ src_install() { dobin contrib/credential/osxkeychain/git-credential-osxkeychain fi + if use doc ; then + cp -r "${ED}"/usr/share/doc/git-doc/. "${ED}"/usr/share/doc/${PF}/html || die + rm -rf "${ED}"/usr/share/doc/git-doc/ || die + fi + # Depending on the tarball and manual rebuild of the documentation, the # manpages may exist in either OR both of these directories. find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157] find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157] dodoc README* Documentation/{SubmittingPatches,CodingGuidelines} + use doc && dodir /usr/share/doc/${PF}/html local d for d in / /howto/ /technical/ ; do @@ -290,8 +305,6 @@ src_install() { fi done docinto / - # Upstream does not ship this pre-built :-( - use doc && doinfo Documentation/{git,gitman}.info newbashcomp contrib/completion/git-completion.bash ${PN} bashcomp_alias git gitk diff --git a/dev-vcs/git/git-9999-r1.ebuild b/dev-vcs/git/git-9999-r1.ebuild index 8d8904831f08..6e9f44d049fa 100644 --- a/dev-vcs/git/git-9999-r1.ebuild +++ b/dev-vcs/git/git-9999-r1.ebuild @@ -193,7 +193,7 @@ src_configure() { ) # For non-live, we use a downloaded docs tarball instead. - if [[ ${PV} == *9999 ]] ; then + if [[ ${PV} == *9999 ]] || use doc ; then emesonargs+=( -Ddocs="man$(usev doc ',html')" ) @@ -248,8 +248,13 @@ src_compile() { git_emake -C contrib/mw-to-git fi - git_emake -C contrib/diff-highlight + if use doc ; then + # Workaround fragments that still use the Makefile and can't + # find the bits from Meson's out-of-source build + ln -s "${BUILD_DIR}"/Documentation/asciidoc.conf "${S}"/Documentation/asciidoc.conf || die + fi + git_emake -C contrib/diff-highlight git_emake -C contrib/subtree git-subtree # git-subtree.1 requires the full USE=doc dependency stack use doc && git_emake -C contrib/subtree git-subtree.html git-subtree.1 @@ -274,11 +279,17 @@ src_install() { dobin contrib/credential/osxkeychain/git-credential-osxkeychain fi + if use doc ; then + cp -r "${ED}"/usr/share/doc/git-doc/. "${ED}"/usr/share/doc/${PF}/html || die + rm -rf "${ED}"/usr/share/doc/git-doc/ || die + fi + # Depending on the tarball and manual rebuild of the documentation, the # manpages may exist in either OR both of these directories. find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157] find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157] dodoc README* Documentation/{SubmittingPatches,CodingGuidelines} + use doc && dodir /usr/share/doc/${PF}/html local d for d in / /howto/ /technical/ ; do @@ -290,8 +301,6 @@ src_install() { fi done docinto / - # Upstream does not ship this pre-built :-( - use doc && doinfo Documentation/{git,gitman}.info newbashcomp contrib/completion/git-completion.bash ${PN} bashcomp_alias git gitk diff --git a/dev-vcs/git/git-9999-r2.ebuild b/dev-vcs/git/git-9999-r2.ebuild index 8d8904831f08..6e9f44d049fa 100644 --- a/dev-vcs/git/git-9999-r2.ebuild +++ b/dev-vcs/git/git-9999-r2.ebuild @@ -193,7 +193,7 @@ src_configure() { ) # For non-live, we use a downloaded docs tarball instead. - if [[ ${PV} == *9999 ]] ; then + if [[ ${PV} == *9999 ]] || use doc ; then emesonargs+=( -Ddocs="man$(usev doc ',html')" ) @@ -248,8 +248,13 @@ src_compile() { git_emake -C contrib/mw-to-git fi - git_emake -C contrib/diff-highlight + if use doc ; then + # Workaround fragments that still use the Makefile and can't + # find the bits from Meson's out-of-source build + ln -s "${BUILD_DIR}"/Documentation/asciidoc.conf "${S}"/Documentation/asciidoc.conf || die + fi + git_emake -C contrib/diff-highlight git_emake -C contrib/subtree git-subtree # git-subtree.1 requires the full USE=doc dependency stack use doc && git_emake -C contrib/subtree git-subtree.html git-subtree.1 @@ -274,11 +279,17 @@ src_install() { dobin contrib/credential/osxkeychain/git-credential-osxkeychain fi + if use doc ; then + cp -r "${ED}"/usr/share/doc/git-doc/. "${ED}"/usr/share/doc/${PF}/html || die + rm -rf "${ED}"/usr/share/doc/git-doc/ || die + fi + # Depending on the tarball and manual rebuild of the documentation, the # manpages may exist in either OR both of these directories. find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157] find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157] dodoc README* Documentation/{SubmittingPatches,CodingGuidelines} + use doc && dodir /usr/share/doc/${PF}/html local d for d in / /howto/ /technical/ ; do @@ -290,8 +301,6 @@ src_install() { fi done docinto / - # Upstream does not ship this pre-built :-( - use doc && doinfo Documentation/{git,gitman}.info newbashcomp contrib/completion/git-completion.bash ${PN} bashcomp_alias git gitk diff --git a/dev-vcs/git/git-9999-r3.ebuild b/dev-vcs/git/git-9999-r3.ebuild index 8d8904831f08..6e9f44d049fa 100644 --- a/dev-vcs/git/git-9999-r3.ebuild +++ b/dev-vcs/git/git-9999-r3.ebuild @@ -193,7 +193,7 @@ src_configure() { ) # For non-live, we use a downloaded docs tarball instead. - if [[ ${PV} == *9999 ]] ; then + if [[ ${PV} == *9999 ]] || use doc ; then emesonargs+=( -Ddocs="man$(usev doc ',html')" ) @@ -248,8 +248,13 @@ src_compile() { git_emake -C contrib/mw-to-git fi - git_emake -C contrib/diff-highlight + if use doc ; then + # Workaround fragments that still use the Makefile and can't + # find the bits from Meson's out-of-source build + ln -s "${BUILD_DIR}"/Documentation/asciidoc.conf "${S}"/Documentation/asciidoc.conf || die + fi + git_emake -C contrib/diff-highlight git_emake -C contrib/subtree git-subtree # git-subtree.1 requires the full USE=doc dependency stack use doc && git_emake -C contrib/subtree git-subtree.html git-subtree.1 @@ -274,11 +279,17 @@ src_install() { dobin contrib/credential/osxkeychain/git-credential-osxkeychain fi + if use doc ; then + cp -r "${ED}"/usr/share/doc/git-doc/. "${ED}"/usr/share/doc/${PF}/html || die + rm -rf "${ED}"/usr/share/doc/git-doc/ || die + fi + # Depending on the tarball and manual rebuild of the documentation, the # manpages may exist in either OR both of these directories. find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157] find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157] dodoc README* Documentation/{SubmittingPatches,CodingGuidelines} + use doc && dodir /usr/share/doc/${PF}/html local d for d in / /howto/ /technical/ ; do @@ -290,8 +301,6 @@ src_install() { fi done docinto / - # Upstream does not ship this pre-built :-( - use doc && doinfo Documentation/{git,gitman}.info newbashcomp contrib/completion/git-completion.bash ${PN} bashcomp_alias git gitk