Marcel Telka
2024-04-03 72d66ff28ec33bc2c05b355c6218d98d13b79450
commit | author | age
e9b7a8 1 #
H 2 # CDDL HEADER START
3 #
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.
7 #
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.
12 #
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]
18 #
19 # CDDL HEADER END
20 #
21
22 #
23 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
24 # Copyright 2018 Harry Liebel <hliebel@gmail.com>
116ddc 25 # Copyright 2023 Niklas Poslovski
e9b7a8 26 #
H 27
116ddc 28 BUILD_STYLE = justmake
e9b7a8 29 include ../../../make-rules/shared-macros.mk
H 30
31 COMPONENT_NAME=        nethack
116ddc 32 COMPONENT_VERSION=    3.6.7
e9b7a8 33 COMPONENT_PROJECT_URL=    https://www.nethack.org
116ddc 34 COMPONENT_SRC=        NetHack-$(COMPONENT_VERSION)
NP 35 COMPONENT_ARCHIVE=    $(COMPONENT_NAME)-367-src.tgz
e9b7a8 36 COMPONENT_ARCHIVE_HASH=    \
116ddc 37     sha256:98cf67df6debf9668a61745aa84c09bcab362e5d33f5b944ec5155d44d2aacb2
e9b7a8 38 COMPONENT_ARCHIVE_URL=    $(COMPONENT_PROJECT_URL)/download/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
H 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"
45
116ddc 46 TEST_TARGET = $(NO_TESTS)
NP 47 include $(WS_MAKE_RULES)/common.mk
e9b7a8 48
H 49 PATH=$(PATH.gnu)
50
51 # Need to use Makefiles in the sys/unix directory and copy them into various
52 # other directories.
53 #
54 COMPONENT_PREP_ACTION= (cd $(SOURCE_DIR)/sys/unix ; sh setup.sh)
55
56 COMPONENT_INSTALL_ARGS += CHOWN=true
57 COMPONENT_INSTALL_ARGS += CHGRP=true
58 COMPONENT_INSTALL_ARGS += ROOT=$(PROTO_DIR)
59
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)"
66
67 PKG_PROTO_DIRS += $(COMPONENT_SRC)/doc
68 PKG_PROTO_DIRS += $(COMPONENT_SRC)/sys/unix
69
116ddc 70 COMPONENT_POST_INSTALL_ACTION = \
e9b7a8 71     sed -e 's/^!\(NetHack.tomb\)/\1/' -e 's/^!\(NetHack.pet\)/\1/' \
H 72         -e 's/^!\(NetHack.tile_file\)/\1/' \
73         $(COMPONENT_SRC)/win/X11/NetHack.ad \
74         > $(PROTO_DIR)/usr/lib/nethack/NetHack.ad
75
116ddc 76 # Manually added dependencies
NP 77 REQUIRED_PACKAGES += developer/parser/bison-38
78 REQUIRED_PACKAGES += developer/lexer/flex
e9b7a8 79
116ddc 80 # Auto-generated dependencies
e9b7a8 81 REQUIRED_PACKAGES += library/ncurses
116ddc 82 REQUIRED_PACKAGES += shell/ksh93
e9b7a8 83 REQUIRED_PACKAGES += system/library
H 84 REQUIRED_PACKAGES += x11/library/libx11
85 REQUIRED_PACKAGES += x11/library/toolkit/libxaw7
86 REQUIRED_PACKAGES += x11/library/toolkit/libxt