Created attachment 255169 [details] 0001-premake5-update-to-beta3.patch Hi, this is an update to beta3. ===== env: DEVELOPER_MODE=yes STRICT_DEPENDS=yes USER=root UID=0 GID=0 ===> Deinstalling for premake5 ===> Deinstalling premake5-5.0.0.b3 Updating database digests format: ..... done Checking integrity... done (0 conflicting) Deinstallation has been requested for the following 1 packages (of 0 packages in the universe): Installed packages to be REMOVED: premake5: 5.0.0.b3 Number of packages to be removed: 1 The operation will free 2 MiB. [141amd64-default] [1/1] Deinstalling premake5-5.0.0.b3... [141amd64-default] [1/1] Deleting files for premake5-5.0.0.b3: .... done =========================================================================== =>> Checking for extra files and directories [00:00:25] Installing from package [141amd64-default] Installing premake5-5.0.0.b3... [141amd64-default] Extracting premake5-5.0.0.b3: .... done [00:00:25] Cleaning up ===> Cleaning for premake5-5.0.0.b3 [00:00:25] Deinstalling package Updating database digests format: . done Checking integrity... done (0 conflicting) Deinstallation has been requested for the following 1 packages (of 0 packages in the universe): Installed packages to be REMOVED: premake5: 5.0.0.b3 Number of packages to be removed: 1 The operation will free 2 MiB. [141amd64-default] [1/1] Deinstalling premake5-5.0.0.b3... [141amd64-default] [1/1] Deleting files for premake5-5.0.0.b3: .... done
Remember to set the "maintainer-approved" flag on your patches so they get looked at quicker. sysctl "hw.ncpu" is correct to get the number of processors; why did you patch this one out?
(In reply to Robert Clausecker from comment #1) new patch is for this issue: https://github.com/premake/premake-core/issues/2328
Thank you, that makes sense.
A test build fails in the patch phase. Whitespace issues perhaps? ===> Patching for premake5-5.0.0.b3 ===> Converting DOS text files to UNIX text files ===> Applying FreeBSD patches for premake5-5.0.0.b3 from /usr/home/ports/main.ports/devel/premake5/files 1 out of 1 hunks failed--saving rejects to src/host/os_getnumcpus.c.rej ===> FAILED Applying FreeBSD patch-src_host_os__getnumcpus.c ===> FAILED to apply cleanly FreeBSD patch(es) patch-src_host_os__getnumcpus.c
(In reply to Robert Clausecker from comment #4) I don't know. This case is strange. I tested this patch in poudriere and without issue.
Was there perhaps any Windows machine involved in uploading the patch that could have munged line endings? Or did you copy and paste the patch in a way that could have destroyed whitespace and tabs? This happens from time to time. Returning to open until a working patch is supplied.
Created attachment 255204 [details] 0001-premake5-update-to-beta3.patch
This is not the release tarball of 5.0.0-beta3 but rather some inbetween version. While it is permitted by policy to ship inbetween versions, these must be reflected in PORTVERSION as indicated in Porter's Handbook. Also, this violates upstreams explicit instructions not to use github-generated tarballs. Instead, I recommend you switch back to the upstream tarball and apply the bug fix as a patch like this (untested): PATCH_SITES= https://github.com/premake/premake-core/commit/ PATCHFILES= ffcb7790f013bdceacc14ba5fda1c5cd107aac08.diff:-p1 This applies commit ffcb7790f013bdceacc14ba5fda1c5cd107aac08 as a patch to the distribution. Give it a try, perhaps it works!
(In reply to Robert Clausecker from comment #8) Thank you for your tip but it doesn't work ffcb7790f013bdceacc14ba5fda1c5cd107aac08.diff 898 B 11 MBps 00s ===> Fetching all distfiles required by premake5-5.0.0.b3 for building ===> Extracting for premake5-5.0.0.b3 => SHA256 Checksum OK for premake-5.0.0-beta3-src.zip. => SHA256 Checksum OK for ffcb7790f013bdceacc14ba5fda1c5cd107aac08.diff. ===> Patching for premake5-5.0.0.b3 ===> Converting DOS text files to UNIX text files ===> Applying distribution patches for premake5-5.0.0.b3 1 out of 1 hunks failed--saving rejects to src/host/os_getnumcpus.c.rej ===> FAILED Applying distribution patch ffcb7790f013bdceacc14ba5fda1c5cd107aac08.diff with -p1
Very unfortunate. I'll have a look at it and adapt your patch so it works.
This is a line ending issue. The files in the project all have CRLF line endings, but something stipped off the CR from the line endings in the patch. I'll fix this by applying dos2unix to more files. Please check for such things. You're clearly passing your patches through something that eats line endings. Make sure this does not happen.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=42f8aa523e750a8b5917f87fb014bd43b8579022 commit 42f8aa523e750a8b5917f87fb014bd43b8579022 Author: Charlie Root <root@hades.lan> AuthorDate: 2024-11-14 13:15:01 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2024-11-18 00:57:53 +0000 devel/premake5: update to 5.0.0-beta3 - add patch for upstream isue #2328 Changelog: https://github.com/premake/premake-core/releases/tag/v5.0.0-beta3 PR: 282757 See also: https://github.com/premake/premake-core/issues/2328 devel/premake5/Makefile | 4 +-- devel/premake5/distinfo | 6 ++-- .../files/patch-src_host_os__getnumcpus.c (new) | 33 ++++++++++++++++++++++ devel/premake5/files/patch-tests___tests.lua | 4 +-- 4 files changed, 40 insertions(+), 7 deletions(-)
Thank you for your contribution.