Bug 280820 - sysutils/htop: simplify Makefile
Summary: sysutils/htop: simplify Makefile
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Vladimir Druzenko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-14 20:17 UTC by Siva Mahadevan
Modified: 2024-08-23 09:23 UTC (History)
3 users (show)

See Also:
gaod: maintainer-feedback+


Attachments
[PATCH] sysutils/htop: simplify Makefile (1.63 KB, patch)
2024-08-14 20:17 UTC, Siva Mahadevan
no flags Details | Diff
htop-280820 (1.31 KB, patch)
2024-08-14 20:40 UTC, Hung-Yi Chen
no flags Details | Diff
[PATCH] sysutils/htop: simplify Makefile (1.66 KB, patch)
2024-08-15 00:09 UTC, Siva Mahadevan
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Siva Mahadevan 2024-08-14 20:17:09 UTC
Created attachment 252764 [details]
[PATCH] sysutils/htop: simplify Makefile

This change cleans up the Makefile to follow Porter's Handbook guidance. Here is the rationale for each change:

* As per https://docs.freebsd.org/en/books/porters-handbook/book/#makefile-master_sites-github, ports are urged to move to using Github releases instead of git tags. This change replaces USE_GITHUB with MASTER_SITES to statically point to htop release tarballs. This also requires the addition of USES=tar:xz

* Remove USES=autoreconf because the release tarball doesn't need to run it

* Remove USES=compiler:c11 since upstream https://github.com/htop-dev/htop states that a C99 compiler is needed.

* htop does not exist in the official NVD CPE dictionary, so as per https://docs.freebsd.org/en/books/porters-handbook/book/#uses-cpe, we should "not ever make up CPE data." Thus, USES=cpe is removed until an entry is contributed to the CPE dictionary

* USES={libtool,localbase,pkgconfig,python:build,shebangfix} are not necessary for a successful build and run with the GH release tarball.

* GNU_CONFIGURE_MANPREFIX was unnecessary since the PLIST does correctly install the manpage to the right location
Comment 1 Hung-Yi Chen 2024-08-14 20:39:54 UTC
Thank you for your contribution.

Just a small modification by setting USES=desktop-file-utils.
Comment 2 Hung-Yi Chen 2024-08-14 20:40:47 UTC
Created attachment 252766 [details]
htop-280820
Comment 3 Siva Mahadevan 2024-08-14 20:55:27 UTC
(In reply to Hung-Yi Chen from comment #2)

Thanks! Yeah yours looks good.
Comment 4 Vladimir Druzenko freebsd_committer freebsd_triage 2024-08-14 22:55:09 UTC
Maybe:
MASTER_SITES=   https://github.com/${PORTNAME}-dev/${PORTNAME}/releases/download/${DISTVERSION}/
?
Comment 5 Siva Mahadevan 2024-08-15 00:09:53 UTC
Created attachment 252770 [details]
[PATCH] sysutils/htop: simplify Makefile

Updated patch based on feedback
Comment 6 Vladimir Druzenko freebsd_committer freebsd_triage 2024-08-15 00:52:15 UTC
(In reply to Siva Mahadevan from comment #5)
I'll commit if maintainer agree.
Comment 7 Vladimir Druzenko freebsd_committer freebsd_triage 2024-08-20 21:55:55 UTC
ping
Comment 8 commit-hook freebsd_committer freebsd_triage 2024-08-22 12:21:51 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9d7a750da6e7b15b07f31b21e8bbe7b6d4178b24

commit 9d7a750da6e7b15b07f31b21e8bbe7b6d4178b24
Author:     Siva Mahadevan <me@svmhdvn.name>
AuthorDate: 2024-08-22 12:09:45 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-08-22 12:09:45 +0000

    sysutils/htop: simplify Makefile

    This change cleans up the Makefile to follow Porter's Handbook guidance.
    Here is the rationale for each change:
    * As per https://docs.freebsd.org/en/books/porters-handbook/book/#makefile-master_sites-github,
      ports are urged to move to using Github releases instead of git tags.
      This change replaces USE_GITHUB with MASTER_SITES to statically point
      to htop release tarballs. This also requires the addition of USES=tar:xz
    * Remove USES=autoreconf because the release tarball doesn't need to run it
    * Remove USES=compiler:c11 since upstream https://github.com/htop-dev/htop
      states that a C99 compiler is needed.
    * Add USES=desktop-file-utils as the port installs htop.desktop
    * htop does not exist in the official NVD CPE dictionary, so as per
      https://docs.freebsd.org/en/books/porters-handbook/book/#uses-cpe, we
      should "not ever make up CPE data." Thus, USES=cpe is removed until an
      entry is contributed to the CPE dictionary
    * USES={libtool,localbase,pkgconfig,python:build,shebangfix} are not
      necessary for a successful build and run with the GH release tarball.
    * GNU_CONFIGURE_MANPREFIX was unnecessary since default value in
      Mk/bsd.port.mk is same ${PREFIX}/share

    PR:             280820
    Approved by:    Hung-Yi Chen <gaod@hychen.org> (maintainer)

 sysutils/htop/Makefile | 10 +++-------
 sysutils/htop/distinfo |  6 +++---
 2 files changed, 6 insertions(+), 10 deletions(-)
Comment 9 Vladimir Druzenko freebsd_committer freebsd_triage 2024-08-22 12:23:03 UTC
Thanks.
Comment 10 Vladimir Druzenko freebsd_committer freebsd_triage 2024-08-23 09:23:38 UTC
(In reply to Hung-Yi Chen from comment #1)
> Just a small modification by setting USES=desktop-file-utils.
Look like we don't need USES=desktop-file-utils for this port:
> desktop-file-utils is only needed when the .desktop file contains a MimeType entry