Bug 273231

Summary: net/vnstat: Update to 2.11
Product: Ports & Packages Reporter: Daniel Engberg <diizzy>
Component: Individual Port(s)Assignee: Po-Chuan Hsieh <sunpoet>
Status: Closed FIXED    
Severity: Affects Only Me Flags: bugzilla: maintainer-feedback? (sunpoet)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
URL: https://github.com/vergoh/vnstat/releases/tag/v2.11
Attachments:
Description Flags
Patch for vnstat none

Description Daniel Engberg freebsd_committer freebsd_triage 2023-08-19 17:44:29 UTC
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)
Comment 1 Po-Chuan Hsieh freebsd_committer freebsd_triage 2023-08-26 21:31:49 UTC
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"
Comment 2 Daniel Engberg freebsd_committer freebsd_triage 2023-08-27 05:01:14 UTC
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.
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-09-04 09:10:56 UTC
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(-)
Comment 4 Po-Chuan Hsieh freebsd_committer freebsd_triage 2023-09-04 09:21:44 UTC
Committed. Thanks!