diff --git a/devel/git-filter-repo/Makefile b/devel/git-filter-repo/Makefile index 18c9504efeec..bb112ce50650 100644 --- a/devel/git-filter-repo/Makefile +++ b/devel/git-filter-repo/Makefile @@ -1,50 +1,51 @@ PORTNAME= git-filter-repo DISTVERSIONPREFIX= v DISTVERSION= 2.32.0 +PORTREVISION= 1 CATEGORIES= devel MAINTAINER= cy@FreeBSD.org COMMENT= git filter-repo is a versatile tool for rewriting history LICENSE= MIT LICENSE_FILE= ${WRKSRC}/COPYING.mit RUN_DEPENDS= git:devel/git USES= python shebangfix SHEBANG_FILES= git-filter-repo USE_GITHUB= yes GH_ACCOUNT= newren NO_BUILD= yes NO_ARCH= yes # # XXX: The man page only exists in the upstream docs branch. Unfortunately # there is no clean way to extract just one file from a different # upstream branch. Therefore we include it in files. To discover # which version of the git-filter-repo.1 file in the docs branch # corresponds with the extracted tag, # # - git clone https://github.com/newren/git-filter-repo.git # - git log, looking for the current tag's hash. # - git switch docs # - git log and look for the matching hash in the commit log. # - git checkout HASH # - copy the file to the files subdirectory of this port # # Until a better approach can be discovered. # post-extract: @${MKDIR} ${WRKSRC}/Documentation/man1; ${CP} ${FILESDIR}/git-filter-repo.1.in ${WRKSRC}/Documentation/man1/git-filter-repo.1 do-install: cd ${WRKSRC}; \ ${MKDIR} ${STAGEDIR}/${PREFIX}/libexec/git-core; \ ${MKDIR} ${STAGEDIR}/${PYTHON_SITELIBDIR}; \ ${MAKE} prefix=${STAGEDIR}/${PREFIX} pythondir=${STAGEDIR}/${PYTHON_SITELIBDIR} install .include diff --git a/devel/git-filter-repo/files/patch-Makefile b/devel/git-filter-repo/files/patch-Makefile index 0cf796627502..6c6de9ccdced 100644 --- a/devel/git-filter-repo/files/patch-Makefile +++ b/devel/git-filter-repo/files/patch-Makefile @@ -1,25 +1,34 @@ --- Makefile.orig 2021-06-07 09:23:45.000000000 -0700 -+++ Makefile 2021-06-13 22:29:05.758893000 -0700 ++++ Makefile 2021-06-14 16:03:09.610176000 -0700 +@@ -2,7 +2,7 @@ + prefix = $(HOME) + bindir = $(prefix)/libexec/git-core + localedir = $(prefix)/share/locale +-mandir = $(prefix)/share/man ++mandir = $(prefix)/man + htmldir = $(prefix)/share/doc/git-doc + pythondir = $(prefix)/lib64/python3.6/site-packages + @@ -23,7 +23,7 @@ # html/git-filter-repo.html. But let's support people installing from a git # clone too; for them, just cheat and snag a copy of the built docs that I # record in a different branch. -snag_docs: Documentation/man1/git-filter-repo.1 Documentation/html/git-filter-repo.html +snag_docs: Documentation/man1/git-filter-repo.1 Documentation/man1/git-filter-repo.1: mkdir -p Documentation/man1 @@ -33,11 +33,10 @@ mkdir -p Documentation/html git show origin/docs:html/git-filter-repo.html >Documentation/html/git-filter-repo.html -install: snag_docs #fixup_locale +install: cp -a git-filter-repo "$(bindir)/" - ln -sf "$(bindir)/git-filter-repo" "$(pythondir)/git_filter_repo.py" + ( cd "$(pythondir)" && ln -sf ../../../libexec/git-core/git-filter-repo git_filter_repo.py ) cp -a Documentation/man1/git-filter-repo.1 "$(mandir)/man1/git-filter-repo.1" - cp -a Documentation/html/git-filter-repo.html "$(htmldir)/git-filter-repo.html" # diff --git a/devel/git-filter-repo/pkg-plist b/devel/git-filter-repo/pkg-plist index a14b71bd1a60..f06a26382a09 100644 --- a/devel/git-filter-repo/pkg-plist +++ b/devel/git-filter-repo/pkg-plist @@ -1,3 +1,3 @@ %%PYTHON_SITELIBDIR%%/git_filter_repo.py libexec/git-core/git-filter-repo -share/man/man1/git-filter-repo.1.gz +man/man1/git-filter-repo.1.gz