Bug 268195 - games/stockfish: Update to 15.1
Summary: games/stockfish: Update to 15.1
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: Mikael Urankar
URL: https://www.freshports.org/games/stoc...
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-06 12:55 UTC by Gautam Mani
Modified: 2023-01-20 11:57 UTC (History)
3 users (show)

See Also:


Attachments
sf_15.1 patch (1.53 KB, patch)
2022-12-06 12:55 UTC, Gautam Mani
grahamperrin: maintainer-approval+
Details | Diff
sf_15.1v2.patch (1.37 KB, patch)
2022-12-07 09:36 UTC, Gautam Mani
no flags Details | Diff
Updated patch with curl dependency for building. (1.72 KB, patch)
2023-01-16 11:31 UTC, Gautam Mani
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gautam Mani 2022-12-06 12:55:05 UTC
Created attachment 238570 [details]
sf_15.1 patch

Attached is the patch to update stockfish to 15.1 

Summary of all changes:
* Updated stockfish to 15.1
* nnue file is downloaded automatically during build and not needed at runtime
* Makefile website updated
Comment 1 Graham Perrin freebsd_committer freebsd_triage 2022-12-06 16:57:14 UTC
Comment on attachment 238570 [details]
sf_15.1 patch

The reprter is the maintainer; assume approval.

<https://www.freshports.org/games/stockfish/>
Comment 2 Guangyuan Yang freebsd_committer freebsd_triage 2022-12-07 03:55:43 UTC
(In reply to Gautam Mani from comment #0)

Build failed for me. Please beware that you cannot download stuff during build time.

=======================<phase: build          >============================
===>  Building for stockfish-15.1
gmake[1]: Entering directory '/wrkdirs/usr/ports/games/stockfish/work/Stockfish-sf_15.1/src'
Default net: nn-ad9b42354671.nnue
Automatic download failed: neither curl nor wget is installed. Install one of these tools or download the net manually
gmake[1]: *** [Makefile:854: net] Error 1
gmake[1]: Leaving directory '/wrkdirs/usr/ports/games/stockfish/work/Stockfish-sf_15.1/src'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/games/stockfish
Comment 3 Gautam Mani 2022-12-07 09:36:06 UTC
Created attachment 238595 [details]
sf_15.1v2.patch

reverted the earlier change to not download the nnue file during the build.
Comment 4 Gautam Mani 2022-12-07 09:37:14 UTC
Please try the new patch sf_15.1v2.patch

Summary of all changes:
* Updated stockfish to 15.1
* Makefile website updated
Comment 5 Mikael Urankar freebsd_committer freebsd_triage 2023-01-15 13:35:58 UTC
(In reply to Gautam Mani from comment #4)
The error is the same:
Automatic download failed: neither curl nor wget is installed. Install one of these tools or download the net manually
Comment 6 Gautam Mani 2023-01-16 11:31:00 UTC
Created attachment 239500 [details]
Updated patch with curl dependency for building.

Please try the new patch sf_15.1v3.patch

Summary of all changes:
* Updated stockfish to 15.1
* Makefile website updated
Comment 7 Mikael Urankar freebsd_committer freebsd_triage 2023-01-17 16:22:11 UTC
(In reply to Gautam Mani from comment #6)
Your patch won't work as the network is disabled in the build phase.
Comment 8 Gautam Mani 2023-01-18 02:18:54 UTC
The needed files are downloaded before the actual build itself, and the build seems to check for existance of curl or wget and hence the earlier failures. I have tested this and the download does not happen during the build itself if the files exist. Please check - this should be OK. I have tested on 13.1-amd64.
Comment 9 Mikael Urankar freebsd_committer freebsd_triage 2023-01-18 15:17:41 UTC
(In reply to Gautam Mani from comment #8)
Ok, I overlooked that.

Do you mind if I put BINARY_ALIAS=  wget=true instead of a BUILD_DEPENDS?
Comment 10 Gautam Mani 2023-01-18 16:30:34 UTC
I wasn't aware of such an option :). 
Yes, that would be much better than an unwanted build dependency.
Comment 11 commit-hook freebsd_committer freebsd_triage 2023-01-20 11:50:48 UTC
A commit in branch main references this bug:

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

commit db12ce06a92fb3c62bd3b4581701fd22bc8ea8ef
Author:     Gautam Mani <execve@gmail.com>
AuthorDate: 2023-01-20 11:48:05 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2023-01-20 11:50:25 +0000

    games/stockfish:  Update to 15.1

    Changes:
      - Updated stockfish to 15.1
      - nnue file is downloaded automatically during build and not needed at runtime
      - Makefile website updated

    PR:             268195

 games/stockfish/Makefile |  6 ++++--
 games/stockfish/distinfo | 10 +++++-----
 2 files changed, 9 insertions(+), 7 deletions(-)
Comment 12 Mikael Urankar freebsd_committer freebsd_triage 2023-01-20 11:57:36 UTC
Thanks!