games/uhexen: fix build with -fno-common, on big endian platforms
- turns a duplicate definition into a declaration - replace nonexisting byte swap functions with gcc/clang intrinsics - define LICENSE
This commit is contained in:
parent
05735bf74c
commit
1092ffe190
3 changed files with 40 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
|||
PORTNAME= uhexen
|
||||
PORTVERSION= 0.601
|
||||
PORTREVISION= 11
|
||||
PORTREVISION= 12
|
||||
CATEGORIES= games
|
||||
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/U-hexen%20version%20${PORTVERSION}
|
||||
|
||||
|
@ -8,10 +8,10 @@ MAINTAINER= ports@FreeBSD.org
|
|||
COMMENT= Yet another port of Hexen, popular game from Raven Software
|
||||
WWW= http://uhexen.sourceforge.net/
|
||||
|
||||
BROKEN_FreeBSD_13= ld: error: duplicate symbol: mouse_scale_factor
|
||||
BROKEN_FreeBSD_14= ld: error: duplicate symbol: mouse_scale_factor
|
||||
BROKEN_powerpc= fails to compile
|
||||
BROKEN_powerpc64= fails to compile: m_misc.o: undefined reference to 'ShortSwap'
|
||||
LICENSE= ACTIVISION
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
LICENSE_NAME= Activision Software License Agreement
|
||||
LICENSE_PERMS= no-dist-mirror no-dist-sell no-pkg-mirror no-pkg-sell auto-accept
|
||||
|
||||
USES= gmake sdl
|
||||
USE_SDL= mixer sdl
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
--- include/h2def.h 2003/02/10 14:43:33 1.1
|
||||
+++ include/h2def.h 2003/02/10 14:46:37
|
||||
--- include/h2def.h.orig 2001-12-02 08:51:54 UTC
|
||||
+++ include/h2def.h
|
||||
@@ -26,7 +26,11 @@
|
||||
|
||||
/* XXX ifdefs */
|
||||
|
@ -12,3 +12,16 @@
|
|||
|
||||
// Uncomment, to enable all timebomb stuff
|
||||
//#define TIMEBOMB
|
||||
@@ -894,10 +898,8 @@ fixed_t FixedDiv2 (fixed_t a, fixed_t b);
|
||||
#endif
|
||||
|
||||
#ifdef __BIG_ENDIAN__
|
||||
-short ShortSwap(short);
|
||||
-long LongSwap(long);
|
||||
-#define SHORT(x) ShortSwap(x)
|
||||
-#define LONG(x) LongSwap(x)
|
||||
+#define SHORT(x) __builtin_bswap16(x)
|
||||
+#define LONG(x) __builtin_bswap32(x)
|
||||
#else
|
||||
#define SHORT(x) (x)
|
||||
#define LONG(x) (x)
|
||||
|
|
20
games/uhexen/files/patch-src_i__fbsdvideo.c
Normal file
20
games/uhexen/files/patch-src_i__fbsdvideo.c
Normal file
|
@ -0,0 +1,20 @@
|
|||
--- src/i_fbsdvideo.c.orig 2023-04-15 12:37:20 UTC
|
||||
+++ src/i_fbsdvideo.c
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <sys/fbio.h>
|
||||
#include <sys/kbio.h>
|
||||
#include <sys/consio.h>
|
||||
-#include <sys/termios.h>
|
||||
+#include <termios.h>
|
||||
#include <sys/mman.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
@@ -26,7 +26,7 @@
|
||||
#define RestorePalette() SavRstPalette(FBIO_SETPALETTE)
|
||||
|
||||
extern int usemouse;
|
||||
-int mouse_scale_factor;
|
||||
+extern int mouse_scale_factor;
|
||||
|
||||
static event_t event;
|
||||
|
Loading…
Reference in a new issue