diff options
author | hans <hans@pkgsrc.org> | 2012-03-02 15:44:54 +0000 |
---|---|---|
committer | hans <hans@pkgsrc.org> | 2012-03-02 15:44:54 +0000 |
commit | a6047605feb03a749810d325885757c2ee86fa08 (patch) | |
tree | 6651096a00bcee7d5ff3af2ac88afd165dc29cc8 | |
parent | fca2e56d182b02c4a60e8f588b1652ab37011501 (diff) | |
download | pkgsrc-a6047605feb03a749810d325885757c2ee86fa08.tar.gz |
Fix build on SunOS.
-rw-r--r-- | games/foobillard/distinfo | 4 | ||||
-rw-r--r-- | games/foobillard/patches/patch-aa | 19 |
2 files changed, 16 insertions, 7 deletions
diff --git a/games/foobillard/distinfo b/games/foobillard/distinfo index 5aa36ad47d8..1a76730b452 100644 --- a/games/foobillard/distinfo +++ b/games/foobillard/distinfo @@ -1,6 +1,6 @@ -$NetBSD: distinfo,v 1.5 2006/03/28 19:37:43 joerg Exp $ +$NetBSD: distinfo,v 1.6 2012/03/02 15:44:54 hans Exp $ SHA1 (foobillard-3.0a.tar.gz) = 1caa51a201b55883640b5c5b1e9fde20fc71a095 RMD160 (foobillard-3.0a.tar.gz) = 9d5a2d271ca270563592c5f6cf23533447c51483 Size (foobillard-3.0a.tar.gz) = 1138477 bytes -SHA1 (patch-aa) = 966973b8a1f7768f1a93c70eb73b6398b0b0e397 +SHA1 (patch-aa) = 1a2cda246cc6adee230766d932916acebe4e2086 diff --git a/games/foobillard/patches/patch-aa b/games/foobillard/patches/patch-aa index 883d03de4f7..f4cb8f2d21b 100644 --- a/games/foobillard/patches/patch-aa +++ b/games/foobillard/patches/patch-aa @@ -1,21 +1,30 @@ -$NetBSD: patch-aa,v 1.3 2006/03/28 19:37:43 joerg Exp $ +$NetBSD: patch-aa,v 1.4 2012/03/02 15:44:54 hans Exp $ --- src/billard3d.c.orig 2004-04-24 01:20:49.000000000 +0000 +++ src/billard3d.c -@@ -24,7 +24,12 @@ +@@ -24,7 +24,21 @@ #include <string.h> #include <math.h> #include <unistd.h> +#include <sys/param.h> +#if (defined(__FreeBSD__) && __FreeBSD_version >= 500000) || defined(__DragonFly__) || defined(__NetBSD__) +#include <sys/endian.h> ++#elif defined(__sun) ++#include <sys/byteorder.h> ++#define LITTLE_ENDIAN 1234 ++#define BIG_ENDIAN 4321 ++#ifdef _BIG_ENDIAN ++#define BYTE_ORDER BIG_ENDIAN ++#else ++#define BYTE_ORDER LITTLE_ENDIAN ++#endif +#else #include <endian.h> +#endif #ifndef USE_SDL #include <GL/glut.h> -@@ -5000,7 +5005,7 @@ int main( int argc, char *argv[] ) +@@ -5000,7 +5014,7 @@ int main( int argc, char *argv[] ) /* config file */ load_config( &confv, &confc, argv, argc ); @@ -24,12 +33,12 @@ $NetBSD: patch-aa,v 1.3 2006/03/28 19:37:43 joerg Exp $ DPRINTF("processing option %d=%s\n",act_option,optarg); process_option(act_option); } -@@ -5098,7 +5103,7 @@ int main( int argc, char *argv[] ) +@@ -5098,7 +5112,7 @@ int main( int argc, char *argv[] ) fread( &ball_ball_snd.data[SOUND_NULLOFFS*2], 1, ball_ball_snd.len-SOUND_NULLOFFS*2*2 , f ); fclose(f); -#if __BYTE_ORDER == __BIG_ENDIAN -+#if _BYTE_ORDER == _BIG_ENDIAN ++#if _BYTE_ORDER == BIG_ENDIAN { char *snd=ball_ball_snd.data; for(i=0;i<ball_ball_snd.len;i+=2) |