Bug 205255 - [NEW PORT] games/nethack36 (Based on games/nethack34)
Summary: [NEW PORT] games/nethack36 (Based on games/nethack34)
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: freebsd-ports-bugs (Nobody)
URL:
Keywords: feature, needs-patch, needs-qa, patch
Depends on:
Blocks:
 
Reported: 2015-12-11 22:48 UTC by groot
Modified: 2016-01-24 04:15 UTC (History)
2 users (show)

See Also:
koobs: maintainer-feedback+


Attachments
Ports dir (8.19 KB, application/gzip)
2015-12-11 23:20 UTC, groot
no flags Details
Diff of ports tree (8.75 KB, application/gzip)
2015-12-12 22:59 UTC, groot
no flags Details
Un-gzipped diff by groot (31.19 KB, patch)
2015-12-13 13:54 UTC, Kubilay Kocak
no flags Details | Diff
Diff of ports tree (31.72 KB, patch)
2015-12-13 14:00 UTC, groot
no flags Details | Diff
Adds nethack36 (29.86 KB, patch)
2015-12-21 21:16 UTC, groot
no flags Details | Diff
Update nethack34 (2.32 KB, patch)
2015-12-21 21:17 UTC, groot
no flags Details | Diff
Metadata update (1.00 KB, patch)
2015-12-21 21:18 UTC, groot
no flags Details | Diff
Adds nethack36 (30.19 KB, patch)
2015-12-21 22:26 UTC, groot
no flags Details | Diff
Adds nethack36 (32.33 KB, patch)
2015-12-21 23:02 UTC, groot
no flags Details | Diff
Adds ports for nethack36 and nethack36-nox11 (34.19 KB, patch)
2016-01-20 14:26 UTC, groot
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description groot 2015-12-11 22:48:19 UTC
Nethack 3.6 was released December 9th, 2015. The sources have changed somewhat in an effort to make building the game more modern. The patches from 3.4 don't apply anymore directly, they all need to be updated (but in spirit, they do apply).

I'll add an updated ports-dir shortly.
Comment 1 groot 2015-12-11 23:20:57 UTC
Created attachment 164139 [details]
Ports dir

This builds and packages, but doesn't run; there seems to be a permissions problem.
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-12 04:12:37 UTC
@Groot,

Can you provide your change as an svn diff please, produced as follows:

* svn cp games/nethack34 games/nethack36
* make necessary changes to games/nethack36/*
* Add SUBDIR+=nethack36 (at the right place) in games/Makefile
* svn diff games/

Please also confirm that the new port passes QA (portlint, poudriere)
Comment 3 groot 2015-12-12 22:59:19 UTC
Created attachment 164164 [details]
Diff of ports tree

Diff of ports tree as requested.
 - passes checklist in ch. 3.4 of the porter's handbook
 - passes portlint
Comment 4 groot 2015-12-12 23:00:56 UTC
TODO-list:
 - poudriere (I have 10-R on amd64 and beaglebone ARM, I'll assume that's enough)
 - add nethack36-nox11
 - actually test the X11 bits, since I've only run this as tty so far
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-13 13:54:07 UTC
Created attachment 164178 [details]
Un-gzipped diff by groot
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-13 13:58:49 UTC
@Groot, Great work :) 

Feel free to add yourself as the MAINTAINER if you would like to by updating attachment 164178 [details]

CC games/nethack34 MAINTAINER as they probably know the most about this port to review/commit, and may be interested in looking after this.
Comment 7 groot 2015-12-13 14:00:16 UTC
Created attachment 164179 [details]
Diff of ports tree

Adds ports nethack36 and nethack36-nox11 . This has been poudriere-tested on 10-R with amd64 and armv6 (beaglebone). Patch added un-gzipped this time. X11 code works, although you need to use environment variable NETHACKOPTIONS=windowtype:x11 to start it that way. Haven't looked at the SYSCF file yet.
Comment 8 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-13 14:02:03 UTC
(In reply to groot from comment #7)

Perhaps a pkg-message is worthwhile providing users with instructions to launch?
Comment 9 Greg Lewis freebsd_committer freebsd_triage 2015-12-13 21:03:09 UTC
Thanks for creating this!  Two comments so far:

1) This port conflicts with the nethack34 ones.  As in you can't install both.  It needs to tweak the portname for the nethack34 ports to fix this the same way the nethack32 and nethack33 ports do.  We might also need an UPDATING entry for that.

2) Minor nit.  Why the inconsistent patch naming for patch-win_Qt_qt__win.cpp?
Comment 10 groot 2015-12-13 21:54:45 UTC
(In reply to Greg Lewis from comment #9)

1) That's the HACKEXT block present in the 3.2 and 3.3 Makefiles? Good point, and easily done. Since saves and bones are not compatible from 3.4 to 3.6, this makes an UPDATING entry pretty important, or some extinctionist illiterates are going to be annoyed.

2) The minor nit is because portlint, I think, said that the patches were formed wrong and to re-generate them with make makepatch. So I did, and the name changed. Come to think of it, that whole patch can be dropped, because there's no regular way to get the Qt windowing code to compile in and the Qt code in Nethack seems to be Qt3-based anyway which is no longer in ports.

I'll get around to another round of updates to this port later in the week, and until then, Tyr needs me.
Comment 11 groot 2015-12-21 21:16:05 UTC
Created attachment 164468 [details]
Adds nethack36

This adds nethack36. It removes the patch for Qt, since the Qt code isn't going to be used anyway (it seems to be Qt3-based).
Comment 12 groot 2015-12-21 21:17:11 UTC
Created attachment 164469 [details]
Update nethack34

This updates nethack34 so that it uses the HACKDIR / versioned subdirectories. This follows the setup from nethack32.
Comment 13 groot 2015-12-21 21:18:01 UTC
Created attachment 164470 [details]
Metadata update

Adds UPDATING, adds nethack36 to games Makefile.
Comment 14 groot 2015-12-21 22:26:31 UTC
Created attachment 164473 [details]
Adds nethack36

Add nethack36 to games category. Installs a sysconf (configuration) file for NetHack. The default windowsystem remains tty, mostly because NetHack (upstream) isn't smart enough to determine when X11 isn't available and fall back to tty. That means you still need to set your own OPTIONS (in sysconf) or NETHACKOPTIONS (environment) to get whichever windowsystem you want -- but that's no different from earlier versions.
Comment 15 groot 2015-12-21 23:02:14 UTC
Created attachment 164475 [details]
Adds nethack36

(last time, really) Add nethack36. Installs a sysconf file. Fixes makedefs.c to generate a temporary filename grep.tmp.$$ instead of using grep.tmp, so that it can parallel build without race conditions. (This is the bit I'd appreciate someone looking at, since snprintf() is not something I use everyday).
Comment 16 groot 2015-12-21 23:02:54 UTC
This port was brought to you by:

Adridg the Troglodyte    St:17 Dx:10 Co:20 In:10 Wi:12 Ch:6  Lawful
Dlvl:2  $:144 HP:18(18) Pw:1(1) AC:4  Exp:1
Comment 17 commit-hook freebsd_committer freebsd_triage 2015-12-27 23:05:55 UTC
A commit references this bug:

Author: glewis
Date: Sun Dec 27 23:05:20 UTC 2015
New revision: 404605
URL: https://svnweb.freebsd.org/changeset/ports/404605

Log:
  . Modify the nethack34 port to install itself in a versionsed fashion to
    make way for a port of NetHack 3.6.0.
  . Add a note to updating on how to preserve save and bones files.

  PR:		205255
  Submitted by:	groot@kde.org (partially)

Changes:
  head/UPDATING
  head/games/nethack34/Makefile
  head/games/nethack34/files/patch-dgn_comp.6
  head/games/nethack34/files/patch-dlb.6
  head/games/nethack34/files/patch-lev_comp.6
  head/games/nethack34/files/patch-nethack.6
  head/games/nethack34/files/patch-recover.6
  head/games/nethack34/files/patch-sys-unix-Makefile.doc
  head/games/nethack34/files/patch-sys-unix-Makefile.src
  head/games/nethack34/pkg-plist
Comment 18 Greg Lewis freebsd_committer freebsd_triage 2015-12-27 23:07:15 UTC
I've updated nethack34.  I added some more changes to sync it more closely to how nethack33 handles this.  I also changed the UPDATING entry and committed that.
Comment 19 Greg Lewis freebsd_committer freebsd_triage 2015-12-27 23:14:54 UTC
I should probably have applied the latest nethack36 patch before doing the update to nethack34 since I'll now have to hand apply some of those patches I bet...

Anyway, a couple of last comments on nethack36.

- Do we want to plan for the future and install nethack36 versioned from the start and avoid having to rejig it if/when there is a nethack37?
- The patch to makedefs.c should really use either mkstemp (preferably) or mktemp.  The former avoids races between creating the temporary file name and opening it and is thus more secure, but requires bigger code changes.
Comment 20 groot 2015-12-28 11:07:26 UTC
 - Given the new openness of the upstream development process, probably some things can be upstreamed. In particular using mkstemp(3) should be upstreamed (I'll look into that).
 - I think versioning nethack36 from the start would be a good idea. It has a downside, though, which is that you don't get any continuity of the record file (I'm going to assume that bones and saves don't and will not transfer anyway). Whether that really matters .. doubt it.
 - comment:15 has a patch that just adds nethack36 without touching any other dirs, that should apply cleanly. (ha, famous last words).
Comment 21 groot 2016-01-20 14:26:55 UTC
Created attachment 165869 [details]
Adds ports for nethack36 and nethack36-nox11

This patch obsoletes the previous ones, and updates the nethack36 port to carry on after nethack34 was updated in r404605.

 - Fix source-fetch (similar to PR 206429)
 - Keep nethack36 versioned, so there's no straight-up nethack anymore
Comment 22 commit-hook freebsd_committer freebsd_triage 2016-01-24 04:04:49 UTC
A commit references this bug:

Author: glewis
Date: Sun Jan 24 04:04:33 UTC 2016
New revision: 407077
URL: https://svnweb.freebsd.org/changeset/ports/407077

Log:
  . Add a port of NetHack 3.6.0

  PR:		205255
  Submitted by:	groot@kde.org

Changes:
  head/games/Makefile
  head/games/nethack36/
  head/games/nethack36/Makefile
  head/games/nethack36/distinfo
  head/games/nethack36/files/
  head/games/nethack36/files/patch-dgn_comp.6
  head/games/nethack36/files/patch-dlb.6
  head/games/nethack36/files/patch-include-config.h
  head/games/nethack36/files/patch-include-system.h
  head/games/nethack36/files/patch-include-unixconf.h
  head/games/nethack36/files/patch-lev_comp.6
  head/games/nethack36/files/patch-nethack.6
  head/games/nethack36/files/patch-qt_win.cpp
  head/games/nethack36/files/patch-recover.6
  head/games/nethack36/files/patch-src-files.c
  head/games/nethack36/files/patch-sys-unix-Makefile.doc
  head/games/nethack36/files/patch-sys-unix-Makefile.src
  head/games/nethack36/files/patch-sys-unix-Makefile.top
  head/games/nethack36/files/patch-sys-unix-Makefile.utl
  head/games/nethack36/files/patch-util-makedefs.c
  head/games/nethack36/files/patch-win-tty-termcap.c
  head/games/nethack36/files/pkg-deinstall.in
  head/games/nethack36/pkg-descr
  head/games/nethack36/pkg-plist
  head/games/nethack36-nox11/
  head/games/nethack36-nox11/Makefile
Comment 23 Greg Lewis freebsd_committer freebsd_triage 2016-01-24 04:15:52 UTC
Thanks!  I've committed the port.