commit:     538ebda96d47ee65043d1d9195f0fec1c4175712
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 12 23:27:00 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Oct 12 23:32:02 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=538ebda9

dev-vcs/git-filter-repo: misc tweaks

- Depend on same git version as $(ver_cut 1-2) (we could arguably do 1-3, but..)
- Use python_prepare_all
- Tidy up PKG-INFO a tiny bit wrt indentation
- Fix README.md installation

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../git-filter-repo-2.38.0-r1.ebuild               | 35 ++++++++++++++--------
 1 file changed, 23 insertions(+), 12 deletions(-)

diff --git a/dev-vcs/git-filter-repo/git-filter-repo-2.38.0-r1.ebuild 
b/dev-vcs/git-filter-repo/git-filter-repo-2.38.0-r1.ebuild
index 26a92dc53d0a..321bde43f057 100644
--- a/dev-vcs/git-filter-repo/git-filter-repo-2.38.0-r1.ebuild
+++ b/dev-vcs/git-filter-repo/git-filter-repo-2.38.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2021 Gentoo Authors
+# Copyright 2021-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -8,29 +8,40 @@ 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";
+SRC_URI="https://github.com/newren/git-filter-repo/releases/download/v${PV}/${P}.tar.xz";
 
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-REQUIRED_USE=${PYTHON_REQUIRED_USE}
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 
 RDEPEND="
        ${PYTHON_DEPS}
-       >=dev-vcs/git-2.24.0"
+       >=dev-vcs/git-$(ver_cut 1-2)
+"
 
 S="${S}/release"
 
-src_prepare() {
-       eapply_user
-       cat > PKG-INFO <<EOF
-Metadata-Version: 2.1
-Name: git-filter-repo
-Version: ${PV}
-EOF
+python_prepare_all() {
+       cat > PKG-INFO <<-EOF || die
+       Metadata-Version: 2.1
+       Name: git-filter-repo
+       Version: ${PV}
+       EOF
+
+       distutils-r1_python_prepare_all
 }
 
 src_test() {
        bash t/run_tests || die
 }
+
+python_install_all() {
+       distutils-r1_python_install_all
+
+       # 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
+}

Reply via email to