pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/games/nethack-lib nethack-lib: Honour CFLAGS, simplify...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5aa1a162f913
branches:  trunk
changeset: 372702:5aa1a162f913
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Thu Dec 14 16:13:31 2017 +0000

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

diffstat:

 games/nethack-lib/Makefile.common                     |  20 ++++++++----------
 games/nethack-lib/distinfo                            |   6 ++--
 games/nethack-lib/patches/patch-sys_unix_Makefile.src |  10 ++++++--
 games/nethack-lib/patches/patch-sys_unix_Makefile.utl |  12 ++++++++--
 4 files changed, 28 insertions(+), 20 deletions(-)

diffs (114 lines):

diff -r 1fd4e3b6498b -r 5aa1a162f913 games/nethack-lib/Makefile.common
--- a/games/nethack-lib/Makefile.common Thu Dec 14 14:13:00 2017 +0000
+++ b/games/nethack-lib/Makefile.common Thu Dec 14 16:13:31 2017 +0000
@@ -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 @@
 
 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 @@
 
 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 @@
 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
diff -r 1fd4e3b6498b -r 5aa1a162f913 games/nethack-lib/distinfo
--- a/games/nethack-lib/distinfo        Thu Dec 14 14:13:00 2017 +0000
+++ b/games/nethack-lib/distinfo        Thu Dec 14 16:13:31 2017 +0000
@@ -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-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
diff -r 1fd4e3b6498b -r 5aa1a162f913 games/nethack-lib/patches/patch-sys_unix_Makefile.src
--- a/games/nethack-lib/patches/patch-sys_unix_Makefile.src     Thu Dec 14 14:13:00 2017 +0000
+++ b/games/nethack-lib/patches/patch-sys_unix_Makefile.src     Thu Dec 14 16:13:31 2017 +0000
@@ -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 @@
  
  # 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"
diff -r 1fd4e3b6498b -r 5aa1a162f913 games/nethack-lib/patches/patch-sys_unix_Makefile.utl
--- a/games/nethack-lib/patches/patch-sys_unix_Makefile.utl     Thu Dec 14 14:13:00 2017 +0000
+++ b/games/nethack-lib/patches/patch-sys_unix_Makefile.utl     Thu Dec 14 16:13:31 2017 +0000
@@ -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 =
   



Home | Main Index | Thread Index | Old Index