Created attachment 244213 [details] Patch for vnstat Use more framework logic instead of relying on do-install section Compile tested on FreeBSD 13.2-RELEASE (amd64) (make, make check-plist) Poudriere testport OK 12.4-RELEASE (amd64) Poudriere testport OK 13.2-RELEASE (amd64)
Thanks for the patch to clean up the Makefile. The only reason I could guess for adding "USES=localbase" and "CONFIGURE_ARGS=--disable-extra-paths" is to support "LOCALBASE != /usr/local" case. Should this be USES=localbase:ldflags instead? from configure: 4778 CFLAGS="$CFLAGS -I/usr/local/include" LDFLAGS="$LDFLAGS -L/usr/local/lib"
You need USES= localbase otherwise it wont pick up dependencies, --disables-extra-paths disables vnstats "own" logic. Being Autotools you can in most cases use either LIBS or LDFLAGS, I've only tested using LIBS though but LDFLAGS should probably also work looking at the code you quoted.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=0d2be8be7756ac12b3994caad320f1e11e7a231b commit 0d2be8be7756ac12b3994caad320f1e11e7a231b Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2023-09-04 09:06:21 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2023-09-04 09:06:21 +0000 net/vnstat: Clean up Makefile - Use INSTALL_TARGET=install-exec to install the binary executables - Use GNU_CONFIGURE_MANPREFIX and INSTALL_TARGET=install-man to install the manpages - Use USES=localbase and CONFIGURE_ARGS=--disable-extra-paths to support non-default LOCALBASE - Add CONFIGURE_ARGS=--disable-image-output when GUI option is disabled - Bump PORTREVISION for package change PR: 273231 net/vnstat/Makefile | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-)
Committed. Thanks!