Subject: Re: pkg/29423 - package games/moria fails build
To: None <simonb@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org>
From: A L Meyers <me@privacy.net>
List: pkgsrc-bugs
Date: 02/19/2005 08:41:02
The following reply was made to PR pkg/29423; it has been noted by GNATS.

From: A L Meyers <me@privacy.net>
To: Simon Burge <simonb@wasabisystems.com>
Cc: gnats-bugs@netbsd.org
Subject: Re: pkg/29423 - package games/moria fails build
Date: Sat, 19 Feb 2005 09:40:23 +0100

 Simon Burge wrote:
 
 >Can you try the attached patch?  I don't have access to a Linux system
 >right now, but someone else helped test these on Fedora Core 3.
 >
 >Cheers,
 >Simon.
 >--
 >Simon Burge                                   <simonb@wasabisystems.com>
 >NetBSD Development, Support and Service:   http://www.wasabisystems.com/
 >  
 >
 >------------------------------------------------------------------------
 >
 >Index: distinfo
 >===================================================================
 >RCS file: /cvsroot/pkgsrc/games/moria/distinfo,v
 >retrieving revision 1.6
 >diff -d -p -u -r1.6 distinfo
 >--- distinfo	26 Apr 2004 10:55:27 -0000	1.6
 >+++ distinfo	19 Feb 2005 00:06:32 -0000
 >@@ -3,9 +3,9 @@ $NetBSD: distinfo,v 1.6 2004/04/26 10:55
 > SHA1 (um5.5.2.tar.Z) = 69c7a7bf4e2c5be123ee7a82f5ad12ad5d0f5b08
 > Size (um5.5.2.tar.Z) = 910536 bytes
 > SHA1 (patch-aa) = 90dd341c52e322ce7a9cacc706e9f0db49c9253b
 >-SHA1 (patch-ab) = b06d9f1b8445865823fc01e2345be48b4f6eb999
 >+SHA1 (patch-ab) = c96da8d1719dcddd0a9466856b42c131dfabbcd2
 > SHA1 (patch-ac) = ea9e23de0a147f317a579a4a04502cb165b4c4bd
 >-SHA1 (patch-ad) = cba23f2ab9e6bfe8d665475fa30342486997f57c
 >+SHA1 (patch-ad) = def58a169c2306f62e94d13f7d1b22307d32749b
 > SHA1 (patch-ae) = 5cf8ad7c6e5d87856a31a5456ba9ed2422075988
 > SHA1 (patch-af) = f8a9f32dffa2123512e36c774ca75e0b28a053cc
 > SHA1 (patch-ag) = af425b9a48c17f170fc780909b7287264a053cc4
 >Index: patches/patch-ab
 >===================================================================
 >RCS file: /cvsroot/pkgsrc/games/moria/patches/patch-ab,v
 >retrieving revision 1.1.1.1
 >diff -d -p -u -r1.1.1.1 patch-ab
 >--- patches/patch-ab	23 Jan 1999 17:00:15 -0000	1.1.1.1
 >+++ patches/patch-ab	19 Feb 2005 00:06:32 -0000
 >@@ -1,7 +1,8 @@
 >-$NetBSD: patch-ab,v 1.1.1.1 1999/01/23 17:00:15 simonb Exp $
 >---- unix/unix.c.orig	Fri Jul 22 08:37:08 1994
 >-+++ unix/unix.c	Wed Dec  2 23:17:35 1998
 >-@@ -43,6 +43,11 @@
 >+$NetBSD$
 >+
 >+--- unix/unix.c.orig	1994-07-22 08:37:08.000000000 +1000
 >++++ unix/unix.c
 >+@@ -43,6 +43,11 @@ typedef struct { int stuff; } fpvmach;
 >  #include <sys/param.h>
 >  #endif
 >  
 >@@ -13,7 +14,17 @@ $NetBSD: patch-ab,v 1.1.1.1 1999/01/23 1
 >  #ifdef __linux__
 >  #include <sys/time.h>
 >  #include <sys/types.h>
 >-@@ -276,7 +281,9 @@
 >+@@ -261,7 +266,9 @@ char *p;
 >+ #endif
 >+ 
 >+ #ifdef USG
 >++#ifndef __linux__
 >+ unsigned short getuid();
 >++#endif
 >+ #else
 >+ #ifndef SECURE
 >+ #ifdef BSD4_3
 >+@@ -276,7 +283,9 @@ int getuid();
 >  void user_name(buf)
 >  char *buf;
 >  {
 >@@ -23,7 +34,7 @@ $NetBSD: patch-ab,v 1.1.1.1 1999/01/23 1
 >    struct passwd *pwline;
 >    register char *p;
 >  
 >-@@ -314,7 +321,10 @@
 >+@@ -314,7 +323,10 @@ char *file, *exp;
 >  	  user[i] = '\0';
 >  	  if (i == 0)
 >  	    {
 >Index: patches/patch-ad
 >===================================================================
 >RCS file: /cvsroot/pkgsrc/games/moria/patches/patch-ad,v
 >retrieving revision 1.2
 >diff -d -p -u -r1.2 patch-ad
 >--- patches/patch-ad	30 Aug 1999 02:35:10 -0000	1.2
 >+++ patches/patch-ad	19 Feb 2005 00:06:32 -0000
 >@@ -1,7 +1,8 @@
 >-$NetBSD: patch-ad,v 1.2 1999/08/30 02:35:10 simonb Exp $
 >---- source/io.c.orig	Fri Jul 22 11:47:26 1994
 >-+++ source/io.c	Sun Aug 29 09:08:13 1999
 >-@@ -90,6 +90,10 @@
 >+$NetBSD$
 >+
 >+--- source/io.c.orig	1994-07-22 11:47:26.000000000 +1000
 >++++ source/io.c
 >+@@ -90,6 +90,10 @@ typedef struct { int stuff; } fpvmach;
 >  #include <sys/types.h>
 >  #endif
 >  
 >@@ -12,7 +13,16 @@ $NetBSD: patch-ad,v 1.2 1999/08/30 02:35
 >  #ifdef USG
 >  #ifndef ATARI_ST
 >  #include <string.h>
 >-@@ -245,7 +249,7 @@
 >+@@ -105,7 +109,7 @@ typedef struct { int stuff; } fpvmach;
 >+ #endif
 >+ #endif
 >+ #endif /* 0 */
 >+-#ifdef HPUX
 >++#if defined(HPUX) || defined(__linux__)
 >+ /* Needs termio.h because curses.h doesn't include it */
 >+ #include <termio.h>
 >+ #endif
 >+@@ -245,7 +249,7 @@ int suspend()
 >    struct ltchars lcbuf;
 >    struct tchars cbuf;
 >    int lbuf;
 >@@ -21,7 +31,7 @@ $NetBSD: patch-ad,v 1.2 1999/08/30 02:35
 >  
 >    py.misc.male |= 2;
 >    (void) ioctl(0, TIOCGETP, (char *)&tbuf);
 >-@@ -331,7 +335,7 @@
 >+@@ -331,7 +335,7 @@ void init_curses()
 >  #if defined(atarist) && defined(__GNUC__)
 >    (void) signal (SIGTSTP, (__Sigfunc)suspend);
 >  #else
 >@@ -30,7 +40,7 @@ $NetBSD: patch-ad,v 1.2 1999/08/30 02:35
 >    (void) signal (SIGTSTP, (sig_t)suspend);
 >  #else
 >    (void) signal (SIGTSTP, suspend);
 >-@@ -527,6 +531,7 @@
 >+@@ -527,6 +531,7 @@ void restore_term()
 >  }
 >  #else
 >  {
 >@@ -38,7 +48,7 @@ $NetBSD: patch-ad,v 1.2 1999/08/30 02:35
 >  #ifdef AMIGA
 >    closetimer ();
 >  #endif
 >-@@ -542,7 +547,8 @@
 >+@@ -542,7 +547,8 @@ void restore_term()
 >    pause_line(15);
 >  #endif
 >    /* this moves curses to bottom right corner */
 >@@ -48,7 +58,7 @@ $NetBSD: patch-ad,v 1.2 1999/08/30 02:35
 >    endwin();  /* exit curses */
 >    (void) fflush (stdout);
 >  #ifdef MSDOS
 >-@@ -757,7 +763,7 @@
 >+@@ -757,7 +763,7 @@ void shell_out()
 >        msg_print("Fork failed. Try again.");
 >        return;
 >      }
 >  
 >
 Hello Simon,
 
 Thanks for the response.  After "bmake clean" was able to patch the 
 files without problems.
 
 But regret having to report they did not lead to a successful build. 
 
 Greetings, Lux
 
 Here is the output:
 
 cc -o moria -O2 main.o misc1.o misc2.o misc3.o misc4.o store1.o files.o 
 io.o  create.o desc.o generate.o sets.o dungeon.o creature.o death.o  
 eat.o help.o magic.o potions.o prayer.o save.o staffs.o wands.o  
 scrolls.o spells.o wizard.o store2.o signals.o moria1.o moria2.o  
 moria3.o moria4.o monsters.o treasure.o variable.o rnd.o recall.o  
 unix.o player.o tables.o -lcurses -ltermcap
 /usr/bin/ld: cannot find -ltermcap
 collect2: ld returned 1 exit status
 *** Error code 1
 
 Stop.
 bmake: stopped in /usr/pkgsrc/games/moria/work/umoria
 *** Error code 1
 
 Stop.
 bmake: stopped in /usr/pkgsrc/games/moria
 ===>
 ===> There was an error during the ``build'' phase.
 ===> Please investigate the following for more information:
 ===>      * log of the build
 ===>      * /usr/pkgsrc/games/moria/work/.work.log
 ===>
 *** Error code 1
 
 Stop.
 bmake: stopped in /usr/pkgsrc/games/moria