summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2006-07-18 07:59:25 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2006-07-18 07:59:25 +0000
commit0654728b5a141ae95a165ca781d1dfb84a8bd978 (patch)
treeb5ceaf725b44af32d0826e3d2f2e2eaa1f692584 /games-roguelike
parentAdd ~x86-fbsd keyword. (diff)
downloadgentoo-2-0654728b5a141ae95a165ca781d1dfb84a8bd978.tar.gz
gentoo-2-0654728b5a141ae95a165ca781d1dfb84a8bd978.tar.bz2
gentoo-2-0654728b5a141ae95a165ca781d1dfb84a8bd978.zip
Fix building on Gentoo/FreeBSD and add ~x86-fbsd keyword, see bug #140878.
(Portage version: 2.1.1_pre3-r1)
Diffstat (limited to 'games-roguelike')
-rw-r--r--games-roguelike/moria/ChangeLog8
-rw-r--r--games-roguelike/moria/files/5.5.2-fbsd.patch268
-rw-r--r--games-roguelike/moria/files/5.5.2-glibc.patch130
-rw-r--r--games-roguelike/moria/files/digest-moria-5.5.26
-rw-r--r--games-roguelike/moria/moria-5.5.2.ebuild9
5 files changed, 376 insertions, 45 deletions
diff --git a/games-roguelike/moria/ChangeLog b/games-roguelike/moria/ChangeLog
index 9da81f3c91c7..496212da429f 100644
--- a/games-roguelike/moria/ChangeLog
+++ b/games-roguelike/moria/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for games-roguelike/moria
-# Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-roguelike/moria/ChangeLog,v 1.7 2005/08/23 23:02:19 mr_bones_ Exp $
+# Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/moria/ChangeLog,v 1.8 2006/07/18 07:59:25 flameeyes Exp $
+
+ 18 Jul 2006; Diego Pettenò <flameeyes@gentoo.org>
+ +files/5.5.2-fbsd.patch, files/5.5.2-glibc.patch, moria-5.5.2.ebuild:
+ Fix building on Gentoo/FreeBSD and add ~x86-fbsd keyword, see bug #140878.
23 Aug 2005; Michael Sterrett <mr_bones_@gentoo.org>
files/5.5.2-gentoo-paths.patch:
diff --git a/games-roguelike/moria/files/5.5.2-fbsd.patch b/games-roguelike/moria/files/5.5.2-fbsd.patch
new file mode 100644
index 000000000000..4f65b08f567d
--- /dev/null
+++ b/games-roguelike/moria/files/5.5.2-fbsd.patch
@@ -0,0 +1,268 @@
+Index: umoria/source/main.c
+===================================================================
+--- umoria.orig/source/main.c
++++ umoria/source/main.c
+@@ -88,6 +88,7 @@
+ #include <time.h>
+ #endif
+
++#ifndef __FreeBSD__
+ #ifndef VMS
+ #ifndef MAC
+ #ifndef GEMDOS
+@@ -98,6 +99,9 @@ long time();
+ char *getenv();
+ #endif
+ #endif
++#else
++#include <stdlib.h>
++#endif
+
+ #ifndef MAC
+ #ifndef AMIGA
+@@ -360,7 +364,7 @@ char *argv[];
+ else
+ { /* Create character */
+ create_character();
+-#ifdef MAC
++#if defined(MAC) || defined(__FreeBSD__)
+ birth_date = time ((time_t *)0);
+ #else
+ birth_date = time ((long *)0);
+Index: umoria/source/death.c
+===================================================================
+--- umoria.orig/source/death.c
++++ umoria/source/death.c
+@@ -123,6 +123,7 @@ static void kingly(void);
+ #include <stdlib.h>
+ #endif
+
++#ifndef __FreeBSD__
+ #ifndef VMS
+ #ifndef MAC
+ #if !defined(ATARIST_MWC) && !defined(AMIGA)
+@@ -130,18 +131,19 @@ long time();
+ #endif
+ #endif
+ #endif
++#endif
+
+ static void date(day)
+ char *day;
+ {
+ register char *tmp;
+-#ifdef MAC
++#if defined(MAC) || defined(__FreeBSD__)
+ time_t clockvar;
+ #else
+ long clockvar;
+ #endif
+
+-#ifdef MAC
++#if defined(MAC) || defined(__FreeBSD__)
+ clockvar = time((time_t *) 0);
+ #else
+ clockvar = time((long *) 0);
+Index: umoria/source/io.c
+===================================================================
+--- umoria.orig/source/io.c
++++ umoria/source/io.c
+@@ -13,6 +13,11 @@
+
+ #include "config.h"
+
++#ifdef __FreeBSD__
++#include <sys/ioctl_compat.h>
++#include <time.h>
++#endif
++
+ #ifdef HPUX
+ #include <sys/bsdtty.h>
+ #endif
+@@ -245,7 +250,9 @@ int suspend()
+ struct ltchars lcbuf;
+ struct tchars cbuf;
+ int lbuf;
++#ifndef __FreeBSD__
+ long time();
++#endif
+
+ py.misc.male |= 2;
+ (void) ioctl(0, TIOCGETP, (char *)&tbuf);
+@@ -313,7 +320,7 @@ void init_curses()
+ #endif
+
+ /* PC curses returns ERR */
+-#if defined(USG) && !defined(PC_CURSES) && !defined(AMIGA)
++#if (defined(USG) && !defined(PC_CURSES) && !defined(AMIGA)) || defined(__FreeBSD__)
+ if (initscr() == NULL)
+ #else
+ if (initscr() == ERR)
+@@ -331,7 +338,7 @@ void init_curses()
+ #if defined(atarist) && defined(__GNUC__)
+ (void) signal (SIGTSTP, (__Sigfunc)suspend);
+ #else
+-#ifdef __386BSD__
++#if defined(__386BSD__) || defined(__FreeBSD__)
+ (void) signal (SIGTSTP, (sig_t)suspend);
+ #else
+ (void) signal (SIGTSTP, suspend);
+@@ -757,7 +764,7 @@ void shell_out()
+ msg_print("Fork failed. Try again.");
+ return;
+ }
+-#if defined(USG) || defined(__386BSD__)
++#if defined(USG) || defined(__386BSD__) || defined(__FreeBSD__)
+ (void) wait((int *) 0);
+ #else
+ (void) wait((union wait *) 0);
+Index: umoria/source/misc1.c
+===================================================================
+--- umoria.orig/source/misc1.c
++++ umoria/source/misc1.c
+@@ -28,7 +28,7 @@
+ #endif
+ #endif
+
+-#if !defined(ATARIST_MWC) && !defined(MAC) && !defined(VMS) && !defined(AMIGA)
++#if !defined(ATARIST_MWC) && !defined(MAC) && !defined(VMS) && !defined(AMIGA) && !defined(__FreeBSD__)
+ long time();
+ #endif
+ struct tm *localtime();
+@@ -45,7 +45,7 @@ int32u seed;
+ register int32u clock_var;
+
+ if (seed == 0)
+-#ifdef MAC
++#if defined(MAC) || defined(__FreeBSD__)
+ clock_var = time((time_t *)0);
+ #else
+ clock_var = time((long *)0);
+@@ -89,10 +89,14 @@ void reset_seed()
+ int check_time()
+ {
+ #ifdef MORIA_HOU
++#if defined(MAC) || defined(__FreeBSD__)
++ time_t clock_var;
++#else
+ long clock_var;
++#endif
+ register struct tm *tp;
+
+-#ifdef MAC
++#if defined(MAC) || defined(__FreeBSD__)
+ clock_var = time((time_t *)0);
+ #else
+ clock_var = time((long *)0);
+Index: umoria/source/save.c
+===================================================================
+--- umoria.orig/source/save.c
++++ umoria/source/save.c
+@@ -102,7 +102,7 @@ static void rd_monster();
+ #endif
+
+ #if !defined(ATARIST_MWC)
+-#ifdef MAC
++#if defined(MAC) || defined(__FreeBSD__)
+ #include <time.h>
+ #else
+ long time();
+@@ -331,7 +331,7 @@ static int sv_write()
+ }
+
+ /* save the current time in the savefile */
+-#ifdef MAC
++#if defined(MAC) || defined(__FreeBSD__)
+ l = time((time_t *)0);
+ #else
+ l = time((long *)0);
+@@ -1029,7 +1029,7 @@ int *generate;
+ || (version_min == 2 && patch_level >= 2))
+ rd_long ((int32u *)&birth_date);
+ else
+-#ifdef MAC
++#if defined(MAC) || defined(__FreeBSD__)
+ birth_date = time((time_t *)0);
+ #else
+ birth_date = time((long *)0);
+@@ -1253,7 +1253,7 @@ scoreboard; it will not be scored again.
+ /* rotate store inventory, depending on how old the save file */
+ /* is foreach day old (rounded up), call store_maint */
+ /* calculate age in seconds */
+-#ifdef MAC
++#if defined(MAC) || defined(__FreeBSD__)
+ start_time = time((time_t *)0);
+ #else
+ start_time = time((long *)0);
+Index: umoria/source/signals.c
+===================================================================
+--- umoria.orig/source/signals.c
++++ umoria/source/signals.c
+@@ -89,7 +89,7 @@ static int signal_count = 0;
+
+ /*ARGSUSED*/
+ #ifndef USG
+-#ifdef __386BSD__
++#if defined(__386BSD__) || defined(__FreeBSD__)
+ static void signal_handler(sig, code, scp)
+ #else
+ static int signal_handler(sig, code, scp)
+@@ -217,7 +217,7 @@ void signals()
+ #if defined(atarist) && defined(__GNUC__)
+ (void) signal(SIGTSTP, (__Sigfunc)suspend);
+ #else
+-#ifdef __386BSD__
++#if defined(__386BSD__) || defined(__FreeBSD__)
+ (void) signal(SIGTSTP, (sig_t)suspend);
+ #else
+ (void) signal(SIGTSTP, suspend);
+Index: umoria/source/types.h
+===================================================================
+--- umoria.orig/source/types.h
++++ umoria/source/types.h
+@@ -6,11 +6,20 @@
+ not for profit purposes provided that this copyright and statement are
+ included in all such copies. */
+
++#ifdef __FreeBSD__
++#include <sys/types.h>
++typedef u_int32_t int32u;
++typedef int32_t int32;
++typedef u_int16_t int16u;
++typedef int16_t int16;
++typedef u_int8_t int8u;
++#else
+ typedef unsigned long int32u;
+ typedef long int32;
+ typedef unsigned short int16u;
+ typedef short int16;
+ typedef unsigned char int8u;
++#endif
+ /* some machines will not accept 'signed char' as a type, and some accept it
+ but still treat it like an unsigned character, let's just avoid it,
+ any variable which can ever hold a negative value must be 16 or 32 bits */
+Index: umoria/unix/unix.c
+===================================================================
+--- umoria.orig/unix/unix.c
++++ umoria/unix/unix.c
+@@ -14,6 +14,10 @@
+ /* defines TRUE and FALSE */
+ #include <curses.h>
+
++#ifdef __FreeBSD__
++#include <unistd.h>
++#endif
++
+ #include "config.h"
+ #include "constant.h"
+ #include "types.h"
+@@ -276,7 +280,9 @@ int getuid();
+ void user_name(buf)
+ char *buf;
+ {
++#ifndef __FreeBSD__
+ extern char *getlogin();
++#endif
+ struct passwd *pwline;
+ register char *p;
+
diff --git a/games-roguelike/moria/files/5.5.2-glibc.patch b/games-roguelike/moria/files/5.5.2-glibc.patch
index 057e1b5d98b3..5738d8070cfe 100644
--- a/games-roguelike/moria/files/5.5.2-glibc.patch
+++ b/games-roguelike/moria/files/5.5.2-glibc.patch
@@ -136,155 +136,209 @@ diff -Naur common-orig/moria1.c umoria/source/moria1.c
diff -Naur common-orig/signals.c umoria/source/signals.c
--- common-orig/signals.c 2003-12-09 10:06:19.000000000 -0500
+++ umoria/source/signals.c 2003-12-09 10:06:56.000000000 -0500
-@@ -113,7 +113,7 @@
+@@ -113,7 +113,11 @@
if(error_sig >= 0) /* Ignore all second signals. */
{
if(++signal_count > 10) /* Be safe. We will die if persistent enough. */
-- (void) signal(sig, SIG_DFL);
++#ifdef __FreeBSD__
+ (void) signal(sig, SIG_DFL);
++#else
+ (void) sysv_signal(sig, SIG_DFL);
++#endif
return;
}
error_sig = sig;
-@@ -126,7 +126,7 @@
+@@ -126,7 +126,11 @@
)
{
if (death)
-- (void) signal(sig, SIG_IGN); /* Can't quit after death. */
++#ifdef __FreeBSD__
+ (void) signal(sig, SIG_IGN); /* Can't quit after death. */
++#else
+ (void) sysv_signal(sig, SIG_IGN); /* Can't quit after death. */
++#endif
else if (!character_saved && character_generated)
{
if (!get_check("Really commit *Suicide*?"))
-@@ -137,7 +137,7 @@
+@@ -137,7 +137,11 @@
put_qio();
error_sig = -1;
#ifdef USG
-- (void) signal(sig, signal_handler);/* Have to restore handler. */
++#ifdef __FreeBSD__
+ (void) signal(sig, signal_handler);/* Have to restore handler. */
++#else
+ (void) sysv_signal(sig, signal_handler);/* Have to restore handler. */
++#endif
#else
(void) sigsetmask(smask);
#endif
-@@ -179,7 +179,7 @@
+@@ -179,7 +179,11 @@
restore_term();
#if !defined(MSDOS) && !defined(AMIGA) && !defined(ATARIST_TC)
/* always generate a core dump */
-- (void) signal(sig, SIG_DFL);
++#ifdef __FreeBSD__
+ (void) signal(sig, SIG_DFL);
++#else
+ (void) sysv_signal(sig, SIG_DFL);
++#endif
(void) kill(getpid(), sig);
(void) sleep(5);
#endif
-@@ -199,7 +199,7 @@
+@@ -199,7 +199,11 @@
#if defined(atarist) && defined(__GNUC__)
(void) signal(SIGTSTP, (__Sigfunc)SIG_IGN);
#else
-- (void) signal(SIGTSTP, SIG_IGN);
++#ifdef __FreeBSD__
+ (void) signal(SIGTSTP, SIG_IGN);
++#else
+ (void) sysv_signal(SIGTSTP, SIG_IGN);
++#endif
#endif
#ifndef USG
mask = sigsetmask(0);
-@@ -220,7 +220,7 @@
+@@ -220,7 +220,11 @@
#ifdef __386BSD__
(void) signal(SIGTSTP, (sig_t)suspend);
#else
-- (void) signal(SIGTSTP, suspend);
++#ifdef __FreeBSD__
+ (void) signal(SIGTSTP, suspend);
++#else
+ (void) sysv_signal(SIGTSTP, suspend);
++#endif
#endif
#endif
#ifndef USG
-@@ -237,7 +237,7 @@
+@@ -237,7 +237,11 @@
{
#if !defined(ATARIST_MWC) && !defined(ATARIST_TC)
/* No signals for Atari ST compiled with MWC or TC. */
-- (void) signal(SIGINT, signal_handler);
++#ifdef __FreeBSD__
+ (void) signal(SIGINT, signal_handler);
++#else
+ (void) sysv_signal(SIGINT, signal_handler);
++#endif
#if defined(atarist) && defined(__GNUC__)
/* Atari ST compiled with GNUC has most signals, but we need a cast
-@@ -259,8 +259,8 @@
+@@ -259,8 +259,13 @@
#else
/* Everybody except the atari st. */
-- (void) signal(SIGINT, signal_handler);
-- (void) signal(SIGFPE, signal_handler);
++#ifdef __FreeBSD__
+ (void) signal(SIGINT, signal_handler);
+ (void) signal(SIGFPE, signal_handler);
++#else
+ (void) sysv_signal(SIGINT, signal_handler);
+ (void) sysv_signal(SIGFPE, signal_handler);
++#endif
#if defined(MSDOS)
/* many fewer signals under MSDOS */
-@@ -278,30 +278,30 @@
+@@ -278,30 +278,61 @@
/* Everybody except Atari, MSDOS, and Amiga. */
/* Ignore HANGUP, and let the EOF code take care of this case. */
-- (void) signal(SIGHUP, SIG_IGN);
-- (void) signal(SIGQUIT, signal_handler);
-- (void) signal(SIGILL, signal_handler);
-- (void) signal(SIGTRAP, signal_handler);
-- (void) signal(SIGIOT, signal_handler);
++#ifdef __FreeBSD__
+ (void) signal(SIGHUP, SIG_IGN);
+ (void) signal(SIGQUIT, signal_handler);
+ (void) signal(SIGILL, signal_handler);
+ (void) signal(SIGTRAP, signal_handler);
+ (void) signal(SIGIOT, signal_handler);
++#else
+ (void) sysv_signal(SIGHUP, SIG_IGN);
+ (void) sysv_signal(SIGQUIT, signal_handler);
+ (void) sysv_signal(SIGILL, signal_handler);
+ (void) sysv_signal(SIGTRAP, signal_handler);
+ (void) sysv_signal(SIGIOT, signal_handler);
++#endif
#ifdef SIGEMT /* in BSD systems */
(void) signal(SIGEMT, signal_handler);
#endif
#ifdef SIGDANGER /* in SYSV systems */
(void) signal(SIGDANGER, signal_handler);
#endif
-- (void) signal(SIGKILL, signal_handler);
-- (void) signal(SIGBUS, signal_handler);
-- (void) signal(SIGSEGV, signal_handler);
++#ifdef __FreeBSD__
+ (void) signal(SIGKILL, signal_handler);
+ (void) signal(SIGBUS, signal_handler);
+ (void) signal(SIGSEGV, signal_handler);
++#else
+ (void) sysv_signal(SIGKILL, signal_handler);
+ (void) sysv_signal(SIGBUS, signal_handler);
+ (void) sysv_signal(SIGSEGV, signal_handler);
++#endif
#ifdef SIGSYS
-- (void) signal(SIGSYS, signal_handler);
++#ifdef __FreeBSD__
+ (void) signal(SIGSYS, signal_handler);
++#else
+ (void) sysv_signal(SIGSYS, signal_handler);
++#endif
#endif
-- (void) signal(SIGTERM, signal_handler);
-- (void) signal(SIGPIPE, signal_handler);
++#ifdef __FreeBSD__
+ (void) signal(SIGTERM, signal_handler);
+ (void) signal(SIGPIPE, signal_handler);
++#else
+ (void) sysv_signal(SIGTERM, signal_handler);
+ (void) sysv_signal(SIGPIPE, signal_handler);
++#endif
#ifdef SIGXCPU /* BSD */
-- (void) signal(SIGXCPU, signal_handler);
++#ifdef __FreeBSD__
+ (void) signal(SIGXCPU, signal_handler);
++#else
+ (void) sysv_signal(SIGXCPU, signal_handler);
++#endif
#endif
#ifdef SIGPWR /* SYSV */
-- (void) signal(SIGPWR, signal_handler);
++#ifdef __FreeBSD__
+ (void) signal(SIGPWR, signal_handler);
++#else
+ (void) sysv_signal(SIGPWR, signal_handler);
++#endif
#endif
#endif
#endif
-@@ -314,7 +314,7 @@
+@@ -314,7 +314,11 @@
#if !defined(ATARIST_MWC)
(void) signal(SIGINT, SIG_IGN);
#ifdef SIGQUIT
-- (void) signal(SIGQUIT, SIG_IGN);
++#ifdef __FreeBSD__
+ (void) signal(SIGQUIT, SIG_IGN);
++#else
+ (void) sysv_signal(SIGQUIT, SIG_IGN);
++#endif
#endif
#endif
}
-@@ -324,7 +324,7 @@
+@@ -324,7 +324,11 @@
#if !defined(ATARIST_MWC)
(void) signal(SIGINT, SIG_DFL);
#ifdef SIGQUIT
-- (void) signal(SIGQUIT, SIG_DFL);
++#ifdef __FreeBSD__
+ (void) signal(SIGQUIT, SIG_DFL);
++#else
+ (void) sysv_signal(SIGQUIT, SIG_DFL);
++#endif
#endif
#endif
}
-@@ -335,13 +335,13 @@
+@@ -335,13 +335,21 @@
#if defined(atarist) && defined(__GNUC__)
(void) signal(SIGINT, (__Sigfunc)signal_handler);
#else
-- (void) signal(SIGINT, signal_handler);
++#ifdef __FreeBSD__
+ (void) signal(SIGINT, signal_handler);
++#else
+ (void) sysv_signal(SIGINT, signal_handler);
++#endif
#endif
#ifdef SIGQUIT
#if defined(atarist) && defined(__GNUC__)
(void) signal(SIGQUIT, (__Sigfunc)signal_handler);
#else
-- (void) signal(SIGQUIT, signal_handler);
++#ifdef __FreeBSD__
+ (void) signal(SIGQUIT, signal_handler);
++#else
+ (void) sysv_signal(SIGQUIT, signal_handler);
++#endif
#endif
#endif
#endif
diff --git a/games-roguelike/moria/files/digest-moria-5.5.2 b/games-roguelike/moria/files/digest-moria-5.5.2
index 4837ba5a8798..89ff79b55334 100644
--- a/games-roguelike/moria/files/digest-moria-5.5.2
+++ b/games-roguelike/moria/files/digest-moria-5.5.2
@@ -1,2 +1,6 @@
-MD5 04a2852864302c702e82992023d97184 um5.5.2.tar.Z 910536
MD5 03a09b5b2408a066103e19a675d5c52c moria-extras.tar.bz2 57324
+RMD160 1224849eeade7a2b7d1858abc6da816607e1bed1 moria-extras.tar.bz2 57324
+SHA256 60f2a7d7bf8615a090cacafd17cf6fae8f9f0af78700439022e25014384b5076 moria-extras.tar.bz2 57324
+MD5 04a2852864302c702e82992023d97184 um5.5.2.tar.Z 910536
+RMD160 1556c76f151d7ea29da79071a57398f63d0b138b um5.5.2.tar.Z 910536
+SHA256 fffab65703c77058a1aadd8647cc1f44bd4349065af0b334702986f36007b2ed um5.5.2.tar.Z 910536
diff --git a/games-roguelike/moria/moria-5.5.2.ebuild b/games-roguelike/moria/moria-5.5.2.ebuild
index f4ba464e761d..825685874db3 100644
--- a/games-roguelike/moria/moria-5.5.2.ebuild
+++ b/games-roguelike/moria/moria-5.5.2.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2005 Gentoo Foundation
+# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-roguelike/moria/moria-5.5.2.ebuild,v 1.10 2005/05/17 06:02:35 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/moria/moria-5.5.2.ebuild,v 1.11 2006/07/18 07:59:25 flameeyes Exp $
inherit eutils toolchain-funcs games
@@ -14,7 +14,7 @@ SRC_URI="ftp://ftp.greyhelm.com/pub/Games/Moria/source/um${PV}.tar.Z
LICENSE="Moria"
SLOT="0"
-KEYWORDS="amd64 ppc x86"
+KEYWORDS="amd64 ppc x86 ~x86-fbsd"
IUSE=""
DEPEND=">=sys-libs/ncurses-5"
@@ -29,7 +29,8 @@ src_unpack() {
epatch \
"${FILESDIR}"/${PV}-gentoo-paths.patch \
- "${FILESDIR}"/${PV}-glibc.patch
+ "${FILESDIR}"/${PV}-glibc.patch \
+ "${FILESDIR}"/${PV}-fbsd.patch
for f in source/* unix/* ; do
ln -s ${f} $(basename ${f})