commit: b1fbda7edf5813611c10d61a1e8e872af67fc8e0
Author: Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Thu Jan 25 17:13:03 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jan 30 05:09:49 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1fbda7e
dev-vcs/git-filter-repo: install the upstream manpage
Regression in commit 4757774468319fcc805c4d3b3b8ee5acaf03bcac.
Sadly upstream doesn't have a decent Makefile. They do have a Makefile,
and it has an install target, but it's incompatible with making it an
importable module. To cap it off, it installs to nonexistent html
directories that don't use the git configure settings, then runs
`which`.
Previously, we had a hand-rolled src_install that ran dobin/doman. This
was updated to hack the ever-living heck out of distutils-r1, to make
use of upstream's other terrible build system -- a setup.py that relies
on setuptools-scm but doesn't export information, create dist tarballs,
use git_archival.txt, or even ***have setup.py in the project root***.
Certainly, setup.py doesn't actually install manpages.
So, we install half the package with distutils-r1 and restore the other
half by using doman.
Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../git-filter-repo-2.38.0-r2.ebuild | 54 ++++++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/dev-vcs/git-filter-repo/git-filter-repo-2.38.0-r2.ebuild
b/dev-vcs/git-filter-repo/git-filter-repo-2.38.0-r2.ebuild
new file mode 100644
index 000000000000..7e7515e9e497
--- /dev/null
+++ b/dev-vcs/git-filter-repo/git-filter-repo-2.38.0-r2.ebuild
@@ -0,0 +1,54 @@
+# Copyright 2021-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+inherit distutils-r1
+
+DESCRIPTION="Quickly rewrite git repository history (filter-branch
replacement)"
+HOMEPAGE="https://github.com/newren/git-filter-repo/"
+SRC_URI="https://github.com/newren/git-filter-repo/releases/download/v${PV}/${P}.tar.xz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ >=dev-vcs/git-$(ver_cut 1-2)
+"
+
+S="${S}/release"
+
+python_prepare_all() {
+ cat > PKG-INFO <<-EOF || die
+ Metadata-Version: 2.1
+ Name: git-filter-repo
+ Version: ${PV}
+ EOF
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ cd .. || die
+ bash t/run_tests || die
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ # Just like git itself there is a manpage in troff + html formats.
+ # Unlike git itself, we cannot install the html one, because the
+ # `git --html-path` has the ${PV} of git in it. So just install
+ # the troff copy.
+ doman "${WORKDIR}"/${P}/Documentation/man1/git-filter-repo.1
+
+ # Points to dead symlink
+ rm "${ED}"/usr/share/doc/${PF}/README.md || die
+ rmdir "${ED}"/usr/share/doc/${PF} || die
+
+ dodoc "${WORKDIR}"/${P}/README.md
+}