On 2026/11/09 21:04, Nam Nguyen wrote:
> Here is an inline diff updating devel/reposurgeon to 5.12.
> see:
> https://gitlab.com/esr/reposurgeon/-/blob/master/NEWS.adoc
>
> I kept it in the style of dnscrypt-proxy rather than modules.inc. When I
> tried using GO111MODULE=off it complained about not being able to find
> internal/progress so I didn't bother. I tried to keep parity with the
> old plist.
aw, I was thinking of removing this because it's so annoying ;)
> jca tested this on riscv. i386 with two removed patches also builds.
I see that upstream suggests onlynusing it on 64-bit archs..not sure
whether it's wkrth enforcing that though.
> sthen do you want to roll your own tarball so you keep hosting it? Is
> this program useful still?
>
> OK? ports-wise ok jca for a similar earlier version.
> +# XXX use GO111MODULE for now because cannot find internal/progress
> +do-build:
> + cd ${WRKSRC} && env -i \
> + ${MAKE_ENV:S/GO111MODULE=off//:S/TMPDIR/NOTTMPDIR/} \
> + ${MAKE_PROGRAM} ${MAKE_FLAGS} \
> + -f ${MAKE_FILE} ${ALL_TARGET}
> +
> +do-test:
> + cd ${WRKSRC} && env -i \
> + ${MAKE_ENV:S/GO111MODULE=off//:S/TMPDIR/NOTTMPDIR/} \
> + ${MAKE_PROGRAM} ${MAKE_FLAGS} \
> + -f ${MAKE_FILE} ${TEST_TARGET}
I'm not a fan of this but I don't see a better way. (It doesn't build
using http://www.catb.org/esr/reposurgeon/reposurgeon-5.12.tar.gz
either, due to it missing the 'internal' dir, so even building by hand
you need to fetch that from the repo ...)
> +do-install:
> + ${INSTALL_PROGRAM} ${WRKSRC}/repobench ${PREFIX}/bin/
> + ${INSTALL_PROGRAM} ${WRKSRC}/repocutter ${PREFIX}/bin/
> + ${INSTALL_PROGRAM} ${WRKSRC}/repomapper ${PREFIX}/bin/
> + ${INSTALL_PROGRAM} ${WRKSRC}/reposurgeon ${PREFIX}/bin/
> + ${INSTALL_PROGRAM} ${WRKSRC}/repobench ${PREFIX}/bin/
> + ${INSTALL_PROGRAM} ${WRKSRC}/repotool ${PREFIX}/bin/
> + ${INSTALL_MAN} ${WRKSRC}/repobench.1 ${PREFIX}/man/man1/
> + ${INSTALL_MAN} ${WRKSRC}/repocutter.1 ${PREFIX}/man/man1/
> + ${INSTALL_MAN} ${WRKSRC}/repomapper.1 ${PREFIX}/man/man1/
> + ${INSTALL_MAN} ${WRKSRC}/reposurgeon.1 ${PREFIX}/man/man1/
> + ${INSTALL_MAN} ${WRKSRC}/repotool.1 ${PREFIX}/man/man1/
> + ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/reposurgeon/
> + ${INSTALL_DATA} ${WRKSRC}/COPYING ${PREFIX}/share/doc/reposurgeon/
> + ${INSTALL_DATA} ${WRKSRC}/INSTALL.adoc ${PREFIX}/share/doc/reposurgeon/
> + ${INSTALL_DATA} ${WRKSRC}/INSTALL.html ${PREFIX}/share/doc/reposurgeon/
> + ${INSTALL_DATA} ${WRKSRC}/NEWS.adoc ${PREFIX}/share/doc/reposurgeon/
> + ${INSTALL_DATA} ${WRKSRC}/NEWS.html ${PREFIX}/share/doc/reposurgeon/
> + ${INSTALL_DATA} ${WRKSRC}/README.adoc ${PREFIX}/share/doc/reposurgeon/
> + ${INSTALL_DATA} ${WRKSRC}/README.html ${PREFIX}/share/doc/reposurgeon/
> + ${INSTALL_DATA} ${WRKSRC}/oops.svg ${PREFIX}/share/doc/reposurgeon/
> + ${INSTALL_DATA} ${WRKSRC}/repobench.html
> ${PREFIX}/share/doc/reposurgeon/
> + ${INSTALL_DATA} ${WRKSRC}/repocutter.html
> ${PREFIX}/share/doc/reposurgeon/
> + ${INSTALL_DATA} ${WRKSRC}/repomapper.html
> ${PREFIX}/share/doc/reposurgeon/
> + ${INSTALL_DATA} ${WRKSRC}/repository-editing.html
> ${PREFIX}/share/doc/reposurgeon/
> + ${INSTALL_DATA} ${WRKSRC}/reposurgeon-git-aliases
> ${PREFIX}/share/doc/reposurgeon/
> + ${INSTALL_DATA} ${WRKSRC}/reposurgeon.html
> ${PREFIX}/share/doc/reposurgeon/
> + ${INSTALL_DATA} ${WRKSRC}/repotool.html ${PREFIX}/share/doc/reposurgeon/
if this was needed, using one invocation of install for all the
programs listed, one for all mans with *.1, and one for docs with
various wildcards would be nicer (and reduce chance of missing
things with updates). but it's not needed at all.
here's a tweaked one with a couple more comments, no do-install, and
using MODGO_FLAGS (to fix the existing problem of it autoscaling threads
to all cpus rather than limiting to MAKE_JOBS).
if this is ok for you, please commit.
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/reposurgeon/Makefile,v
diff -u -p -r1.21 Makefile
--- Makefile 26 Jan 2026 06:33:09 -0000 1.21
+++ Makefile 10 Nov 2026 04:47:58 -0000
@@ -1,7 +1,6 @@
COMMENT= tool for editing version-control repository history
-DISTNAME= reposurgeon-4.32
-REVISION= 3
+DISTNAME= reposurgeon-5.12
CATEGORIES= devel
@@ -12,26 +11,40 @@ PERMIT_PACKAGE= Yes
WANTLIB += c pthread
-#SITES= http://www.catb.org/esr/reposurgeon/
-# generated from upstream distfile (.tar.xz) with "go mod vendor"
-SITES= https://spacehopper.org/mirrors/
+# generated from upstream distfile (.tar.gz) with "go mod vendor"
+SITES= https://messagemode2.com/source/
USE_GMAKE= Yes
-MODULES= lang/go \
- lang/ruby
-CONFIGURE_STYLE= x
+MODULES= lang/go
+CONFIGURE_STYLE= x # override go.port.mk
+
+# doc build needs ruby interpreter as well as asciidoctor
+MODULES+= lang/ruby
BUILD_DEPENDS= textproc/asciidoctor
MODRUBY_RUNDEP= No
WRKSRC= ${WRKDIST}
WRKBUILD= ${WRKDIST}
MODGO_GOPATH= ${MODGO_WORKSPACE}:${MODGO_PACKAGE_PATH}:${WRKSRC}/vendor
-MAKE_ENV= GOFLAGS=-v
+MAKE_ENV= GOFLAGS="${MODGO_FLAGS}"
-FAKE_FLAGS= mandir=man
+FAKE_FLAGS= MANDIR=$(TRUEPREFIX)/man PREFIX=${TRUEPREFIX}
pre-build:
ln -sf ${RUBY} ${WRKDIR}/bin/ruby
ln -sf . ${WRKSRC}/vendor/src
+
+# XXX use GO111MODULE for now because cannot find internal/progress
+do-build:
+ cd ${WRKSRC} && env -i \
+ ${MAKE_ENV:S/GO111MODULE=off//:S/TMPDIR/NOTTMPDIR/} \
+ ${MAKE_PROGRAM} ${MAKE_FLAGS} \
+ -f ${MAKE_FILE} ${ALL_TARGET}
+
+do-test:
+ cd ${WRKSRC} && env -i \
+ ${MAKE_ENV:S/GO111MODULE=off//:S/TMPDIR/NOTTMPDIR/} \
+ ${MAKE_PROGRAM} ${MAKE_FLAGS} \
+ -f ${MAKE_FILE} ${TEST_TARGET}
.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/reposurgeon/distinfo,v
diff -u -p -r1.4 distinfo
--- distinfo 24 Aug 2022 11:56:17 -0000 1.4
+++ distinfo 10 Nov 2026 04:47:58 -0000
@@ -1,2 +1,2 @@
-SHA256 (reposurgeon-4.32.tar.gz) = NQhcW7d3IoPK2iIKR/Crf2+c/6UP1z7yCyVf+FjleAQ=
-SIZE (reposurgeon-4.32.tar.gz) = 5844893
+SHA256 (reposurgeon-5.12.tar.gz) = 5k/3haifAhMnymu/pMg5jz+aZJkcIGLlknOGcq1Ctdg=
+SIZE (reposurgeon-5.12.tar.gz) = 6956739
Index: patches/patch-vendor_github_com_pkg_term_termios_termios_bsd_go
===================================================================
RCS file: patches/patch-vendor_github_com_pkg_term_termios_termios_bsd_go
diff -N patches/patch-vendor_github_com_pkg_term_termios_termios_bsd_go
--- patches/patch-vendor_github_com_pkg_term_termios_termios_bsd_go 28 Aug
2022 10:26:39 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,26 +0,0 @@
-Index: vendor/github.com/pkg/term/termios/termios_bsd.go
---- vendor/github.com/pkg/term/termios/termios_bsd.go.orig
-+++ vendor/github.com/pkg/term/termios/termios_bsd.go
-@@ -56,22 +56,6 @@ func Tcdrain(fd uintptr) error {
- return unix.IoctlSetInt(int(fd), unix.TIOCDRAIN, 0)
- }
-
--// Tcflush discards data written to the object referred to by fd but not
transmitted, or data received but not read, depending on the value of which.
--func Tcflush(fd, which uintptr) error {
-- var com int
-- switch which {
-- case unix.TCIFLUSH:
-- com = FREAD
-- case unix.TCOFLUSH:
-- com = FWRITE
-- case unix.TCIOFLUSH:
-- com = FREAD | FWRITE
-- default:
-- return unix.EINVAL
-- }
-- return unix.IoctlSetPointerInt(int(fd), unix.TIOCFLUSH, com)
--}
--
- // Cfgetispeed returns the input baud rate stored in the termios structure.
- func Cfgetispeed(attr *unix.Termios) uint32 { return uint32(attr.Ispeed) }
-
Index: patches/patch-vendor_github_com_pkg_term_termios_termios_go
===================================================================
RCS file: patches/patch-vendor_github_com_pkg_term_termios_termios_go
diff -N patches/patch-vendor_github_com_pkg_term_termios_termios_go
--- patches/patch-vendor_github_com_pkg_term_termios_termios_go 28 Aug 2022
10:26:39 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,20 +0,0 @@
-Index: vendor/github.com/pkg/term/termios/termios.go
---- vendor/github.com/pkg/term/termios/termios.go.orig
-+++ vendor/github.com/pkg/term/termios/termios.go
-@@ -16,16 +16,6 @@ func Tiocmset(fd uintptr, status int) error {
- return unix.IoctlSetInt(int(fd), unix.TIOCMSET, status)
- }
-
--// Tiocmbis sets the indicated modem bits.
--func Tiocmbis(fd uintptr, status int) error {
-- return unix.IoctlSetPointerInt(int(fd), unix.TIOCMBIS, status)
--}
--
--// Tiocmbic clears the indicated modem bits.
--func Tiocmbic(fd uintptr, status int) error {
-- return unix.IoctlSetPointerInt(int(fd), unix.TIOCMBIC, status)
--}
--
- // Cfmakecbreak modifies attr for cbreak mode.
- func Cfmakecbreak(attr *unix.Termios) {
- attr.Lflag &^= unix.ECHO | unix.ICANON
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/devel/reposurgeon/pkg/PLIST,v
diff -u -p -r1.3 PLIST
--- pkg/PLIST 24 Aug 2022 11:56:17 -0000 1.3
+++ pkg/PLIST 10 Nov 2026 04:47:58 -0000
@@ -10,6 +10,7 @@ bin/repobench
@man man/man1/repotool.1
share/doc/reposurgeon/
share/doc/reposurgeon/COPYING
+share/doc/reposurgeon/GoNotes.html
share/doc/reposurgeon/INSTALL.adoc
share/doc/reposurgeon/INSTALL.html
share/doc/reposurgeon/NEWS.adoc