pkgsrc-Changes archive

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

CVS commit: pkgsrc/games/nethack-lib



Module Name:    pkgsrc
Committed By:   rhialto
Date:           Sun Aug 27 15:59:19 UTC 2023

Modified Files:
        pkgsrc/games/nethack-lib: Makefile.common distinfo
        pkgsrc/games/nethack-lib/patches: patch-include_config.h
            patch-sys_unix_Makefile.src patch-sys_unix_Makefile.utl
            patch-sys_unix_nethack.sh

Log Message:
games/nethack-lib: enhance patches to make wip/nethack-curses possible.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 pkgsrc/games/nethack-lib/Makefile.common
cvs rdiff -u -r1.30 -r1.31 pkgsrc/games/nethack-lib/distinfo
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/games/nethack-lib/patches/patch-include_config.h \
    pkgsrc/games/nethack-lib/patches/patch-sys_unix_nethack.sh
cvs rdiff -u -r1.3 -r1.4 \
    pkgsrc/games/nethack-lib/patches/patch-sys_unix_Makefile.src \
    pkgsrc/games/nethack-lib/patches/patch-sys_unix_Makefile.utl

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/games/nethack-lib/Makefile.common
diff -u pkgsrc/games/nethack-lib/Makefile.common:1.45 pkgsrc/games/nethack-lib/Makefile.common:1.46
--- pkgsrc/games/nethack-lib/Makefile.common:1.45       Sat Aug 26 15:02:25 2023
+++ pkgsrc/games/nethack-lib/Makefile.common    Sun Aug 27 15:59:19 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.45 2023/08/26 15:02:25 rhialto Exp $
+# $NetBSD: Makefile.common,v 1.46 2023/08/27 15:59:19 rhialto Exp $
 #
 # used by games/nethack/Makefile
 # used by games/nethack-lib/Makefile
@@ -21,6 +21,7 @@ NETHACK_DIR=          nethackdir${NETHACK_SAVEVE
 NETHACK_SAVEVER=       3.6.0
 
 DISTNAME=              nethack-${NETHACK_DISTVER}-src
+PKGREVISION=           1
 CATEGORIES=            games
 MASTER_SITES=          https://www.nethack.org/download/${NETHACK_BASEVER}/
 EXTRACT_SUFX=          .tgz

Index: pkgsrc/games/nethack-lib/distinfo
diff -u pkgsrc/games/nethack-lib/distinfo:1.30 pkgsrc/games/nethack-lib/distinfo:1.31
--- pkgsrc/games/nethack-lib/distinfo:1.30      Sat Aug 26 15:02:25 2023
+++ pkgsrc/games/nethack-lib/distinfo   Sun Aug 27 15:59:19 2023
@@ -1,16 +1,16 @@
-$NetBSD: distinfo,v 1.30 2023/08/26 15:02:25 rhialto Exp $
+$NetBSD: distinfo,v 1.31 2023/08/27 15:59:19 rhialto Exp $
 
 BLAKE2s (nethack-367-src.tgz) = 56c447099ddfdbd1c2dcb0d85b859031057c76fa6a885d9a0fcaae87d47cd371
 SHA512 (nethack-367-src.tgz) = 7890d17e087f4344d30e9a908fa1f24d7c72bc714c4a6415ed59800902cc0aa6b3ce94c5d73857b0222349b96b1fdc8bf3f93b3ac1153477ad1419af7b0d3fb5
 Size (nethack-367-src.tgz) = 5577415 bytes
 SHA1 (patch-ai) = 73c5b2ea1227531089474705f2f18bc411366365
-SHA1 (patch-include_config.h) = d3e054a8b30d628513dcb445b10ce586685c7ea6
+SHA1 (patch-include_config.h) = c48f9a5a758ddffb4825d7959e8ecaf30ea12b91
 SHA1 (patch-include_system.h) = b1b53f513c3f6983e0e56eace74c71875b5df3f2
 SHA1 (patch-include_unixconf.h) = 6846c72526f3bda7fe3eccbce641e5feee14d901
 SHA1 (patch-src_mail.c) = 5b2a67e0b4d0fc9c715573d1bad6bcafa67b469e
 SHA1 (patch-sys_unix_Makefile.doc) = 6219620c50dc7eac6601f87d4a295cb10f02e141
-SHA1 (patch-sys_unix_Makefile.src) = 35eabd1ca5577988e48daf10835dfa335f7e67ac
+SHA1 (patch-sys_unix_Makefile.src) = 639f33146101e91d5fabed47f9e9703b957e48d1
 SHA1 (patch-sys_unix_Makefile.top) = 0736aafda67dec45657f9f15338ce2f89add9747
-SHA1 (patch-sys_unix_Makefile.utl) = 142f267fdd9a94c212657b7242dea6a3716c738e
-SHA1 (patch-sys_unix_nethack.sh) = eec4b6619584d7e07ac5d9a086af9bc8f7e6285f
+SHA1 (patch-sys_unix_Makefile.utl) = 55da562baa7240d811eb7597e77a8beaf58d7d81
+SHA1 (patch-sys_unix_nethack.sh) = 0a0178e3bdc3e78f004bd0112938f3c9e49faf40
 SHA1 (patch-util_recover.c) = 60e5ec35313a97cf788ff1ed4a4772bbcf24bc48

Index: pkgsrc/games/nethack-lib/patches/patch-include_config.h
diff -u pkgsrc/games/nethack-lib/patches/patch-include_config.h:1.1 pkgsrc/games/nethack-lib/patches/patch-include_config.h:1.2
--- pkgsrc/games/nethack-lib/patches/patch-include_config.h:1.1 Thu Oct 24 11:51:23 2019
+++ pkgsrc/games/nethack-lib/patches/patch-include_config.h     Sun Aug 27 15:59:19 2023
@@ -1,15 +1,18 @@
-$NetBSD: patch-include_config.h,v 1.1 2019/10/24 11:51:23 pho Exp $
+$NetBSD: patch-include_config.h,v 1.2 2023/08/27 15:59:19 rhialto Exp $
 
-Make configurable.
+Make window system configurable.
 
---- include/config.h.orig      2019-05-08 07:00:15.000000000 +0000
+--- include/config.h.orig      2023-02-15 21:52:57.000000000 +0000
 +++ include/config.h
-@@ -42,6 +42,16 @@
+@@ -42,6 +42,19 @@
   * Define all of those you want supported in your binary.
   * Some combinations make no sense.  See the installation document.
   */
 +#if   defined(GTYPE_TTY)
 +#  define DEFAULT_WINDOW_SYS "tty"
++#elif   defined(GTYPE_CURSES)
++#  define CURSES_GRAPHICS
++#  define DEFAULT_WINDOW_SYS "curses"
 +#elif defined(GTYPE_X11)
 +#  define X11_GRAPHICS
 +#  define DEFAULT_WINDOW_SYS "X11"
@@ -21,7 +24,7 @@ Make configurable.
  #if !defined(NOTTYGRAPHICS)
  #define TTY_GRAPHICS /* good old tty based graphics */
  #endif
-@@ -134,7 +144,7 @@
+@@ -134,7 +147,7 @@
   * would allow:
   *  xpmtoppm <x11tiles.xpm | pnmscale 1.25 | ppmquant 90 >x11tiles_big.xpm
   */
@@ -30,7 +33,7 @@ Make configurable.
  #ifdef USE_XPM
  #define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.xpm) */
  #endif
-@@ -263,11 +273,8 @@
+@@ -263,11 +276,8 @@
  
  #if defined(UNIX) && !defined(ZLIB_COMP) && !defined(COMPRESS)
  /* path and file name extension for compression program */
@@ -44,7 +47,7 @@ Make configurable.
  #endif
  
  #ifndef COMPRESS
-@@ -352,7 +359,7 @@
+@@ -352,7 +362,7 @@
   * otherwise it will be the current directory.
   */
  #ifndef HACKDIR
@@ -53,7 +56,7 @@ Make configurable.
  #endif
  
  /*
-@@ -442,7 +449,7 @@ typedef unsigned char uchar;
+@@ -442,7 +452,7 @@ typedef unsigned char uchar;
   * functions that have been macroized.
   */
  
Index: pkgsrc/games/nethack-lib/patches/patch-sys_unix_nethack.sh
diff -u pkgsrc/games/nethack-lib/patches/patch-sys_unix_nethack.sh:1.1 pkgsrc/games/nethack-lib/patches/patch-sys_unix_nethack.sh:1.2
--- pkgsrc/games/nethack-lib/patches/patch-sys_unix_nethack.sh:1.1      Thu Oct 24 11:51:23 2019
+++ pkgsrc/games/nethack-lib/patches/patch-sys_unix_nethack.sh  Sun Aug 27 15:59:19 2023
@@ -1,4 +1,4 @@
-$NetBSD: patch-sys_unix_nethack.sh,v 1.1 2019/10/24 11:51:23 pho Exp $
+$NetBSD: patch-sys_unix_nethack.sh,v 1.2 2023/08/27 15:59:19 rhialto Exp $
 
 Modify the wrapper script so users can choose the UI type on the
 command line.
@@ -16,7 +16,7 @@ command line.
  export HACKDIR
 -HACK=$HACKDIR/nethack
 +
-+UILIST="tty x11 qt" 
++UILIST="tty curses x11 qt" 
 +findbin ()
 +{
 +      for x in $UILIST; do

Index: pkgsrc/games/nethack-lib/patches/patch-sys_unix_Makefile.src
diff -u pkgsrc/games/nethack-lib/patches/patch-sys_unix_Makefile.src:1.3 pkgsrc/games/nethack-lib/patches/patch-sys_unix_Makefile.src:1.4
--- pkgsrc/games/nethack-lib/patches/patch-sys_unix_Makefile.src:1.3    Thu Oct 24 11:51:23 2019
+++ pkgsrc/games/nethack-lib/patches/patch-sys_unix_Makefile.src        Sun Aug 27 15:59:19 2023
@@ -1,8 +1,8 @@
-$NetBSD: patch-sys_unix_Makefile.src,v 1.3 2019/10/24 11:51:23 pho Exp $
+$NetBSD: patch-sys_unix_Makefile.src,v 1.4 2023/08/27 15:59:19 rhialto Exp $
 
-Make configurable.
+Make window system configurable.
 
---- sys/unix/Makefile.src.orig 2019-05-08 07:00:16.000000000 +0000
+--- sys/unix/Makefile.src.orig 2023-02-15 21:52:57.000000000 +0000
 +++ sys/unix/Makefile.src
 @@ -41,7 +41,11 @@ SHELL=/bin/sh
  # SHELL=E:/GEMINI2/MUPFEL.TTP
@@ -17,7 +17,7 @@ Make configurable.
  
  # Pick the SYSSRC and SYSOBJ lines corresponding to your desired operating
  # system.
-@@ -170,9 +174,22 @@ GNOMEINC=-I/usr/lib/glib/include -I/usr/
+@@ -170,9 +174,24 @@ GNOMEINC=-I/usr/lib/glib/include -I/usr/
  # flags for debugging:
  # CFLAGS = -g -I../include
  
@@ -32,6 +32,8 @@ Make configurable.
 +
 +.if "${GTYPE}" == "-tty"
 +CFLAGS += -DGTYPE_TTY
++.elif "${GTYPE}" == "-curses"
++CFLAGS += -DGTYPE_CURSES
 +.elif "${GTYPE}" == "-x11"
 +CFLAGS += -DGTYPE_X11
 +.elif "${GTYPE}" == "-qt"
@@ -41,7 +43,7 @@ Make configurable.
  # The Qt and Be window systems are written in C++, while the rest of
  # NetHack is standard C.  If using Qt, uncomment the LINK line here to get
  # the C++ libraries linked in.
-@@ -267,13 +284,22 @@ WINBEOBJ =
+@@ -267,13 +286,25 @@ WINBEOBJ =
  #WINBEOBJ = winbe.o NHWindow.o NHMenuWindow.o NHMapWindow.o tile.o
  #
  #
@@ -56,6 +58,9 @@ Make configurable.
 -#
 +
 +.if "${GTYPE}" == "-tty"
++.elif "${GTYPE}" == "-curses"
++WINSRC += $(WINCURSESSRC)
++WINOBJ += $(WINCURSESOBJ)
 +.elif "${GTYPE}" == "-x11"
 +WINSRC += $(WINX11SRC)
 +WINOBJ += $(WINX11OBJ)
@@ -67,7 +72,7 @@ Make configurable.
  # on some systems the termcap library is in -ltermcap or -lcurses
  # on 386 Xenix, the -ltermlib tputs() seems not to work; use -lcurses instead
  # Sysatt uses shared library in lieu of this option
-@@ -292,14 +318,14 @@ WINBEOBJ =
+@@ -292,14 +323,14 @@ WINBEOBJ =
  #
  # libraries for X11
  # If USE_XPM is defined in config.h, you will also need -lXpm here.
@@ -84,7 +89,16 @@ Make configurable.
  #
  # libraries for Qt 4
  WINQT4LIB = `pkg-config QtGui --libs`
-@@ -327,11 +353,18 @@ WINCURSESLIB = -lncurses
+@@ -320,18 +351,27 @@ WINGEMLIB = -le_gem -lgem
+ WINBELIB = -lbe
+ #
+ # libraries for curses port
+-# link with ncurses
+-WINCURSESLIB = -lncurses
++# link with (n)curses
++WINCURSESLIB = -lcurses # or -L${PREFIX}/lib -Wl,-R,${PREFIX}/lib -lncurses
+ # link with pdcurses for SDL, installed in a separate directory
+ #WINCURSESLIB = -L/usr/local/lib/pdcurses -lpdcurses -lSDL
  # same as above, for XCurses
  #WINCURSESLIB = -L/usr/local/lib/pdcurses -lXCurses -lXawM -lXmu -lXext -lXt -lX11
  #
@@ -96,6 +110,8 @@ Make configurable.
 -#
 +
 +.if "${GTYPE}" == "-tty"
++.elif "${GTYPE}" == "-curses"
++WINLIB += $(WINCURSESLIB)
 +.elif "${GTYPE}" == "-x11"
 +WINLIB += $(WINX11LIB)
 +.elif "${GTYPE}" == "-qt"
Index: pkgsrc/games/nethack-lib/patches/patch-sys_unix_Makefile.utl
diff -u pkgsrc/games/nethack-lib/patches/patch-sys_unix_Makefile.utl:1.3 pkgsrc/games/nethack-lib/patches/patch-sys_unix_Makefile.utl:1.4
--- pkgsrc/games/nethack-lib/patches/patch-sys_unix_Makefile.utl:1.3    Thu Oct 24 11:51:23 2019
+++ pkgsrc/games/nethack-lib/patches/patch-sys_unix_Makefile.utl        Sun Aug 27 15:59:19 2023
@@ -1,8 +1,8 @@
-$NetBSD: patch-sys_unix_Makefile.utl,v 1.3 2019/10/24 11:51:23 pho Exp $
+$NetBSD: patch-sys_unix_Makefile.utl,v 1.4 2023/08/27 15:59:19 rhialto Exp $
 
-Make configurable.
+Make window system configurable.
 
---- sys/unix/Makefile.utl.orig 2019-05-08 07:00:16.000000000 +0000
+--- sys/unix/Makefile.utl.orig 2023-02-15 21:52:57.000000000 +0000
 +++ sys/unix/Makefile.utl
 @@ -94,7 +94,7 @@ NHSROOT=..
  # flags for debugging:
@@ -13,12 +13,14 @@ Make configurable.
  #LFLAGS =
  
  # we specify C preprocessor flags via CFLAGS; files built with default rules
-@@ -104,6 +104,14 @@ CPPFLAGS =
+@@ -104,6 +104,16 @@ CPPFLAGS =
  
  LIBS =
  
 +.if "${GTYPE}" == "-tty"
 +CFLAGS += -DGTYPE_TTY
++.elif "${GTYPE}" == "-curses"
++CFLAGS += -DGTYPE_CURSES
 +.elif "${GTYPE}" == "-x11"
 +CFLAGS += -DGTYPE_X11
 +.elif "${GTYPE}" == "-qt"



Home | Main Index | Thread Index | Old Index