Bug 273231 - net/vnstat: Update to 2.11
Summary: net/vnstat: Update to 2.11
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Po-Chuan Hsieh
URL: https://github.com/vergoh/vnstat/rele...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-19 17:44 UTC by Daniel Engberg
Modified: 2023-09-04 09:21 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (sunpoet)


Attachments
Patch for vnstat (2.36 KB, patch)
2023-08-19 17:44 UTC, Daniel Engberg
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!