4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
23 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
24 # Copyright 2018 Harry Liebel <hliebel@gmail.com>
25 # Copyright 2023 Niklas Poslovski
28 BUILD_STYLE
= justmake
29 include ..
/..
/..
/make-rules
/shared-macros.mk
31 COMPONENT_NAME
= nethack
32 COMPONENT_VERSION
= 3.6.7
33 COMPONENT_PROJECT_URL
= https
://www.nethack.org
34 COMPONENT_SRC
= NetHack-
$(COMPONENT_VERSION
)
35 COMPONENT_ARCHIVE
= $(COMPONENT_NAME
)-367-src.tgz
36 COMPONENT_ARCHIVE_HASH
= \
37 sha256
:98cf67df6debf9668a61745aa84c09bcab362e5d33f5b944ec5155d44d2aacb2
38 COMPONENT_ARCHIVE_URL
= $(COMPONENT_PROJECT_URL
)/download
/$(COMPONENT_VERSION
)/$(COMPONENT_ARCHIVE
)
39 COMPONENT_FMRI
= games
/nethack
40 COMPONENT_LICENSE
= Nethack
41 COMPONENT_LICENSE_FILE
= $(COMPONENT_NAME
).license
42 COMPONENT_SUMMARY
= A single-player dungeon exploration game
43 COMPONENT_DESCRIPTION
= Nethack is a turn-based single-player dungeon exploration game related to Hack and Rogue. The primary interface is a pseudo-graphical display rendered in text in a terminal
, and controlled by the keyboard.
44 COMPONENT_CLASSIFICATION
="Applications/Games"
46 TEST_TARGET
= $(NO_TESTS
)
47 include $(WS_MAKE_RULES
)/common.mk
51 # Need to use Makefiles in the sys/unix directory and copy them into various
54 COMPONENT_PREP_ACTION
= (cd
$(SOURCE_DIR
)/sys
/unix
; sh setup.sh
)
56 COMPONENT_INSTALL_ARGS
+= CHOWN
=true
57 COMPONENT_INSTALL_ARGS
+= CHGRP
=true
58 COMPONENT_INSTALL_ARGS
+= ROOT
=$(PROTO_DIR
)
60 COMPONENT_BUILD_ENV
+= CC
=$(CC
)
61 COMPONENT_BUILD_ENV
+= CFLAGS
="$(CFLAGS)"
62 COMPONENT_BUILD_ENV
+= LFLAGS
="$(CFLAGS)"
63 COMPONENT_INSTALL_ENV
+= CC
=$(CC
)
64 COMPONENT_INSTALL_ENV
+= CFLAGS
="$(CFLAGS)"
65 COMPONENT_INSTALL_ENV
+= LFLAGS
="$(CFLAGS)"
67 PKG_PROTO_DIRS
+= $(COMPONENT_SRC
)/doc
68 PKG_PROTO_DIRS
+= $(COMPONENT_SRC
)/sys
/unix
70 COMPONENT_POST_INSTALL_ACTION
= \
71 sed
-e
's/^!\(NetHack.tomb\)/\1/' -e
's/^!\(NetHack.pet\)/\1/' \
72 -e
's/^!\(NetHack.tile_file\)/\1/' \
73 $(COMPONENT_SRC
)/win
/X11
/NetHack.ad \
74 > $(PROTO_DIR
)/usr
/lib
/nethack
/NetHack.ad
76 # Manually added dependencies
77 REQUIRED_PACKAGES
+= developer
/parser
/bison-38
78 REQUIRED_PACKAGES
+= developer
/lexer
/flex
80 # Auto-generated dependencies
81 REQUIRED_PACKAGES
+= library
/ncurses
82 REQUIRED_PACKAGES
+= shell/ksh93
83 REQUIRED_PACKAGES
+= system
/library
84 REQUIRED_PACKAGES
+= x11
/library
/libx11
85 REQUIRED_PACKAGES
+= x11
/library
/toolkit
/libxaw7
86 REQUIRED_PACKAGES
+= x11
/library
/toolkit
/libxt