Created attachment 207740 [details] Patch to fix runtime segfaults in amd64 platform I have managed to fix the runtime segfault caused when trying to run hnb in amd6 systems. This causes hnb to run normally in amd64 systems and the ONLY_FOR_ARCHS= i386 Can be taken out. The root cause of the segfaults were they were using direct 32bit pointer dereferencing which has been fixed to correctly type cast now. I tested this out in FreeBSD 12.0-RELEASE-p10 (i386 and amd64) and noticed that it works as expected. A minor issue is in displaying unicode characters and it seems to fail at that and I do not know how to fix this at the moment. I have attached a patch which fixes the above runtime segfault issue. Thank you.
This is too large to be held in the ports tree, and it is useful outside of FreeBSD. Could you place it somewhere on GitHub as a proper hnb fork with proper commit history (which you try to express here as patch headers) and a version release? Also cd ${WRKSRC}/src && ${GMAKE} is incorrect, as it doesn't ignores all environment which should be set for make.
Let me look at the sourceforge source and see if I can copy over the repository with history correctly in git. I shall also look into the do-build section and try to make it work as before.
Created attachment 207806 [details] Patch to fix runtime segfaults in amd64 platform I found a github[1] repository that had pretty much faithfully converted the Sourceforge repository. However it looks inactive at the moment. I forked[2] the repository and applied the fixes as well as some other minor tweaks and tagged a v1.9.18 release. The attached patch now pulls from this repository[2] and does a build. It also addresses the do-build section and now does build correctly. I am happy to keep the forked repository until someone wants to take proper ownership of the project. Let me know your thoughts on the patch and the fix. References 1. https://github.com/Backgammon-/hnb 2. https://github.com/fraggerfox/hnb
Great! Just two more nits: - The canonical way is to use DISTVERSIONPREFIX=v instead of GH_TAGNAME (see net/rdesktop as example) - You could probably also merge changes done in post-patch into your repository
Created attachment 207834 [details] Patch to fix runtime segfaults in amd64 platform (In reply to Dmitry Marakasov from comment #4) > - The canonical way is to use DISTVERSIONPREFIX=v instead of GH_TAGNAME (see net/rdesktop as example) Done. > - You could probably also merge changes done in post-patch into your repository Done. I have updated the patch to reflect the changes.
(In reply to Santhosh Raju from comment #5) Ping! Do these changes look good for a commit?
A commit references this bug: Author: amdmi3 Date: Thu Oct 31 18:50:40 UTC 2019 New revision: 516188 URL: https://svnweb.freebsd.org/changeset/ports/516188 Log: - Fix on amd64 PR: 240770 Submitted by: fox@FreeBSD.org Changes: head/editors/hnb/Makefile head/editors/hnb/distinfo
Sorry for delay, committed (also moved hnbrc installation under PORTEXAMPLES).