nethack-lib: Honour CFLAGS, simplify and fix patching.

This commit is contained in:
jperkin 2017-12-14 16:13:31 +00:00
parent 55aa57c1f5
commit e0caa70120
4 changed files with 28 additions and 20 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile.common,v 1.32 2017/09/26 10:27:01 wiz Exp $
# $NetBSD: Makefile.common,v 1.33 2017/12/14 16:13:31 jperkin Exp $
#
# used by games/nethack/Makefile
# used by games/nethack-lib/Makefile
@ -33,7 +33,7 @@ USE_TOOLS+= gzip yacc lex awk
SUBST_CLASSES+= ttylib
SUBST_MESSAGE.ttylib= Configuring to use correct termcap library
SUBST_STAGE.ttylib= post-patch
SUBST_STAGE.ttylib= pre-configure
SUBST_FILES.ttylib= sys/unix/Makefile.src
SUBST_SED.ttylib= -e 's!^WINTTYLIB = -ltermlib!WINTTYLIB = -L${BUILDLINK_PREFIX.termcap}/lib ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.termcap}/lib -l${BUILDLINK_LIBNAME.termcap}!'
@ -43,10 +43,16 @@ NETHACK_OS.*= BSD
SUBST_CLASSES+= os
SUBST_MESSAGE.os= Configuring for ${NETHACK_OS}
SUBST_STAGE.os= post-patch
SUBST_STAGE.os= pre-configure
SUBST_FILES.os= include/unixconf.h
SUBST_SED.os= -e 's,__NETHACK_OS__,${NETHACK_OS},'
SUBST_CLASSES+= configh
SUBST_STAGE.configh= pre-configure
SUBST_FILES.configh= include/config.h
SUBST_VARS.configh= PREFIX
SUBST_SED.configh= -e "s|@GZIP_PROGRAM@|${GZIP_CMD:[1]}|g"
USE_GAMESGROUP= yes
NETHACK_USER= ${GAMES_USER}
NETHACK_GROUP= ${GAMES_GROUP}
@ -61,12 +67,4 @@ MAKE_ENV+= VARDIR=${VARDIR:Q}
pre-configure:
@${CHMOD} 755 ${WRKSRC}/sys/unix/setup.sh
post-patch:
@${MV} ${WRKSRC}/include/config.h ${WRKSRC}/config.h-pre
@${SED} -e 's|@PREFIX@|${PREFIX}|g' \
-e 's|@GZIP_PROGRAM@|'`${ECHO} ${GZIP_CMD} \
| ${AWK} '{ print $$1 }'`'|g' \
< ${WRKSRC}/config.h-pre > ${WRKSRC}/include/config.h
@${RM} -f ${WRKSRC}/config.h-pre
.endif # !NO_BUILD

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.19 2015/11/03 20:56:59 agc Exp $
$NetBSD: distinfo,v 1.20 2017/12/14 16:13:31 jperkin Exp $
SHA1 (nethack-343-src.tgz) = c26537093c38152bc0fbcec20468d975b35f59fd
RMD160 (nethack-343-src.tgz) = 42f600d24715a0b7e631b357c135761410b3ca95
@ -12,6 +12,6 @@ SHA1 (patch-ae) = 8530c1e033f2522e05b699db36d84f77ecf886be
SHA1 (patch-af) = a567c4c664f135ad24f3f0069ddc29bf5b950b21
SHA1 (patch-ag) = 5bf322fb92a3cd9df9559e56265f0477d9e92487
SHA1 (patch-ai) = 73c5b2ea1227531089474705f2f18bc411366365
SHA1 (patch-sys_unix_Makefile.src) = 003f16fba997ac61efc92adecc13b883135a86bc
SHA1 (patch-sys_unix_Makefile.utl) = 409e1f8b58c7e2709d224f42c19fdfd162d9cea7
SHA1 (patch-sys_unix_Makefile.src) = d2d961ab9aec3d9f88d5b5340530f95181b0a92b
SHA1 (patch-sys_unix_Makefile.utl) = 3bcec6ffab218370f132b4a850f7b35316487ec6
SHA1 (patch-util_makedefs.c) = 63faf92a7f511fcf73317789a3008350cdd404d9

View file

@ -1,4 +1,4 @@
$NetBSD: patch-sys_unix_Makefile.src,v 1.1 2011/06/01 11:20:29 wiz Exp $
$NetBSD: patch-sys_unix_Makefile.src,v 1.2 2017/12/14 16:13:31 jperkin Exp $
Make configurable.
@ -16,8 +16,12 @@ Make configurable.
# Pick the SYSSRC and SYSOBJ lines corresponding to your desired operating
# system.
@@ -154,12 +158,24 @@ GNOMEINC=-I/usr/lib/glib/include -I/usr/
CFLAGS = -O -I../include
@@ -151,15 +155,27 @@ GNOMEINC=-I/usr/lib/glib/include -I/usr/
# flags for debugging:
# CFLAGS = -g -I../include
-CFLAGS = -O -I../include
+CFLAGS += -I../include
LFLAGS =
+.if "${GTYPE}" == "-x11" || "${GTYPE}" == "-qt"

View file

@ -1,10 +1,16 @@
$NetBSD: patch-sys_unix_Makefile.utl,v 1.1 2011/06/01 11:20:29 wiz Exp $
$NetBSD: patch-sys_unix_Makefile.utl,v 1.2 2017/12/14 16:13:31 jperkin Exp $
Make configurable.
--- sys/unix/Makefile.utl.orig 2011-05-27 15:13:59.000000000 +0000
--- sys/unix/Makefile.utl.orig 2003-12-07 23:39:13.000000000 +0000
+++ sys/unix/Makefile.utl
@@ -94,6 +94,14 @@ LFLAGS =
@@ -89,11 +89,19 @@
# flags for debugging:
# CFLAGS = -g -I../include
-CFLAGS = -O -I../include
+CFLAGS += -I../include
LFLAGS =
LIBS =