Bug 245867

Summary: java/sigar: Add Java 11 Support, Add TEST targets, Remove GCC dependency
Product: Ports & Packages Reporter: Angelo Polo <language.devel>
Component: Individual Port(s)Assignee: Alexey Dokuchaev <danfe>
Status: Closed FIXED    
Severity: Affects Some People CC: danfe
Priority: --- Flags: koobs: merge-quarterly?
Version: Latest   
Hardware: Any   
OS: Any   
See Also: https://github.com/amishHammer/sigar/pull/1
Attachments:
Description Flags
Port update patch
none
Updated svn diff
none
Skip go-binding commits none

Description Angelo Polo 2020-04-24 09:00:33 UTC
Created attachment 213741 [details]
Port update patch

Source updated for Java 11 compatibility.
Testing fixed and test make target added.
Latest source project updates merged.
Comment 1 Angelo Polo 2020-06-06 14:02:21 UTC
Created attachment 215291 [details]
Updated svn diff

Updated patch eliminates GCC dependency.
Comment 2 Alexey Dokuchaev freebsd_committer freebsd_triage 2021-07-15 08:12:21 UTC
I currently do not have bandwidth to download nearly ~20MB distfile to see for myself, but the size change is quite dramatic, esp. given that port version remains the same:

> -SIZE (amishHammer-sigar-1.7.3-b5af695_GH0.tar.gz) = 1091675
> +SIZE (polo-language-sigar-1.7.3-c5b7559_GH0.tar.gz) = 19771688
Change in GH_ACCOUNT should also be explained (both are forks of the original upstream GitHub repo).
Comment 3 Angelo Polo 2021-07-15 17:55:46 UTC
Created attachment 226489 [details]
Skip go-binding commits

(In reply to Alexey Dokuchaev from comment #2)

The extra size came from go bindings added to the hyperic repo - I merged amishHammer's work onto the head. I've rebased to just before these go binding commits and the size is back to normal:
-SIZE (amishHammer-sigar-1.7.3-b5af695_GH0.tar.gz) = 1091675
+SIZE (polo-language-sigar-1.7.3-6719d4d_GH0.tar.gz) = 1091061

Here is a patch pointing to the slimmed down revision.

I don't care what GitHub account it points to, I just wanted to fix java/sigar. I've created a pull request to amishHammer's repo:
https://github.com/amishHammer/sigar/pull/1

If you/they would like to keep this port pointing to amishHammer's account, they can merge the pull request and then update the Makefile/distinfo accordingly.
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2021-07-16 01:28:09 UTC
Ports can carry local patches while usptream handles issues/PR's/merges.

Two methods:

1) `make makepatch` after patching WRKSRC files  from file file.orig pairs, or upstream PR as a patch (https://patch-diff.githubusercontent.com/raw/amishHammer/sigar/pull/1.patch)

2) Reference specific commits to add as PATCHFILES. An example from benchmarks/glmark2:

  PATCH_SITES=    https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
  PATCHFILES+=    bd2c4ca8360a.patch:-p1 # https://github.com/glmark2/glmark2/issues/147
  PATCHFILES+=    042bbea08fae.patch:-p1 # https://github.com/glmark2/glmark2/issues/155

We like to keep MASTER_SITES (GitHub in this case) canonical/official where possible

Thank you for the report and patch

^Triage: MFH if these changes are are non-functional:

MFH: 202Q3 (build fix, ports compliance, dependency fix)
Comment 5 Alexey Dokuchaev freebsd_committer freebsd_triage 2021-07-16 08:36:18 UTC
(In reply to Angelo Polo from comment #3)
> I've rebased to just before these go binding commits and the size is back
> to normal
Thanks!

> If you/they would like to keep this port pointing to amishHammer's account,
> they can merge the pull request and then update the Makefile/distinfo
> accordingly.
It's okay, as long as you're with contact with them and forks don't deviate too much, we can use whichever suits better for the moment.  I'll commit it tonight.

Would you like to take maintainership of the port?
Comment 6 Angelo Polo 2021-07-16 17:00:01 UTC
(In reply to Alexey Dokuchaev from comment #5)

I don't think I should take maintainership, it's not a project that I'm particularly knowledgeable about or keen on.
Comment 7 commit-hook freebsd_committer freebsd_triage 2021-07-16 19:51:20 UTC
A commit in branch main references this bug:

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

commit a780ad6436af3a43256fe2eeda167dd1b43b5309
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2021-07-16 19:44:32 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2021-07-16 19:44:37 +0000

    java/sigar: the port had been updated and improved (+)

    - Switch (temporarily?) to somewhat more developed GitHub fork
    - Add Java 11 support, `do-test' target, and remove GCC dependency
    - Optimize away PLATFORM_VER variable and just set the LIBNAME (without
      the suffix to make it more obvious that it's a shared object when we
      install things, and in the PLIST_FILES)
    - Utilize BUILD_WRKSRC and introduce INVOKE_ANT variable to reduce the
      tautology in targets' recipes
    - When symlinking to ${CC} as local compiler, do not assume it lives as
      ${LOCALBASE}/bin/${CC} and call `which ${CC}` explicitly
    - Garbage-collect commented out `post-patch' target while we're here

    PR:             245867
    Submitted by:   Angelo Polo

 java/sigar/Makefile | 40 +++++++++++++++++++---------------------
 java/sigar/distinfo |  5 +++--
 2 files changed, 22 insertions(+), 23 deletions(-)