pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/games/quake Add DragonFly support.
details: https://anonhg.NetBSD.org/pkgsrc/rev/a3a53bb1e953
branches: trunk
changeset: 512613:a3a53bb1e953
user: joerg <joerg%pkgsrc.org@localhost>
date: Fri May 12 12:40:10 2006 +0000
description:
Add DragonFly support.
diffstat:
games/quake/distinfo | 18 ++++----
games/quake/patches/patch-aa | 99 ++++++++++++++++++++++++-------------------
games/quake/patches/patch-ab | 10 ++--
games/quake/patches/patch-ac | 18 ++++----
games/quake/patches/patch-ad | 41 +++++++++++-------
games/quake/patches/patch-af | 10 ++--
games/quake/patches/patch-ag | 99 +++++++++++++++++++++++++------------------
games/quake/patches/patch-aj | 41 +++++++++++-------
games/quake/patches/patch-ap | 8 +-
9 files changed, 194 insertions(+), 150 deletions(-)
diffs (truncated from 984 to 300 lines):
diff -r aab66dcd7549 -r a3a53bb1e953 games/quake/distinfo
--- a/games/quake/distinfo Fri May 12 12:39:32 2006 +0000
+++ b/games/quake/distinfo Fri May 12 12:40:10 2006 +0000
@@ -1,21 +1,21 @@
-$NetBSD: distinfo,v 1.7 2005/02/23 23:12:01 agc Exp $
+$NetBSD: distinfo,v 1.8 2006/05/12 12:40:10 joerg Exp $
SHA1 (q1source.zip) = 1f607e549c6aa3921797e51b7d2038e95116c989
RMD160 (q1source.zip) = 57a750e8644116d0d07a273ea6ad0b6d3071c89f
Size (q1source.zip) = 3211531 bytes
-SHA1 (patch-aa) = 99fd7868c2968bb0214282c35a865119cc33721c
-SHA1 (patch-ab) = b459f48703568180445a35e74290bacf87fea170
-SHA1 (patch-ac) = 595e319415fe22e8115170415a6bd69c9da9d1be
-SHA1 (patch-ad) = 84349e4164ee0b2bc4cffd420e9520ce2619495d
+SHA1 (patch-aa) = 23f2d2382a0b8e93a2403f8cec271fdb6577eb05
+SHA1 (patch-ab) = ea94d3a9ced047574e23b6f2904b178aac6e1a4d
+SHA1 (patch-ac) = b10042114b1ad06e3abc9147c49e6adceae9d671
+SHA1 (patch-ad) = 28bf099b84e49c720ab5f6ff7b00f7543919dbcc
SHA1 (patch-ae) = 6c3863309d22a5295c48635a7841338b041d2817
-SHA1 (patch-af) = ff7a770648efdbf4bf9f91b4502ad5ca93840bbc
-SHA1 (patch-ag) = 56e3b11afe9d2cccf3136b3cd78419d00c8f7487
+SHA1 (patch-af) = cf6f5aa9dd997023c608120bb0514eb7f422809c
+SHA1 (patch-ag) = 002ad95816768ce517b13733f5ccdd56634b7d3c
SHA1 (patch-ah) = 23501badb57bf8d11bf75105c1dffb7adf19a64d
SHA1 (patch-ai) = 345747c3dd7ad8442a65c4589e0b89ec9d0f7038
-SHA1 (patch-aj) = 50446164a7ad9085a2e191047f60483885d043c3
+SHA1 (patch-aj) = 55bc1ee38782c21d039df323ef2f79b14358dbc3
SHA1 (patch-ak) = b7b22a7b01a86522f3dfd510bf31a44c468279b9
SHA1 (patch-al) = ca76927f36ad4f5f14ec64600bb4d40f0a758b71
SHA1 (patch-am) = c64a9a46681ad48c4ea2fcca07d33b071f49f6d5
SHA1 (patch-an) = 03e71dd225ab6ff371b33e51acee46b84a9e0d82
SHA1 (patch-ao) = 43d50ff9845731bff3171be474129f184a427551
-SHA1 (patch-ap) = 099e308b830738e1754ae634d29dd770f5b4f607
+SHA1 (patch-ap) = b4089b0ac1924136e7d50b71a0c5af5be8ce6f75
diff -r aab66dcd7549 -r a3a53bb1e953 games/quake/patches/patch-aa
--- a/games/quake/patches/patch-aa Fri May 12 12:39:32 2006 +0000
+++ b/games/quake/patches/patch-aa Fri May 12 12:40:10 2006 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-aa,v 1.4 2002/01/02 10:01:35 hubertf Exp $
+$NetBSD: patch-aa,v 1.5 2006/05/12 12:40:10 joerg Exp $
---- qw/client/cd_linux.c.orig Tue Dec 21 18:58:58 1999
+--- qw/client/cd_linux.c.orig 1999-12-21 18:58:58.000000000 +0000
+++ qw/client/cd_linux.c
-@@ -31,7 +31,19 @@
+@@ -31,7 +31,23 @@ Foundation, Inc., 59 Temple Place - Suit
#include <time.h>
#include <errno.h>
@@ -10,7 +10,11 @@
#include <linux/cdrom.h>
+#endif
+
-+#ifdef __NetBSD__
++#if defined(__DragonFly__)
++#include <sys/cdio.h>
++#endif
++
++#if defined(__NetBSD__)
+#include <sys/cdio.h>
+
+/* resume seems to have some trouble right now. xcdplayer also can not resume
@@ -22,7 +26,7 @@
#include "quakedef.h"
-@@ -46,165 +58,289 @@
+@@ -46,165 +62,296 @@ static byte remap[100];
static byte playTrack;
static byte maxTrack;
@@ -36,6 +40,10 @@
static char cd_dev[64] = "/dev/cdrom";
+#endif
+
++#ifdef __DragonFly__
++static char cd_dev[64] = "/dev/cd0d";
++#endif
++
+#ifdef __NetBSD__
+static char cd_dev[64] = "/dev/rcd0d";
+#endif
@@ -44,7 +52,7 @@
{
- if (cdfile == -1 || !enabled)
- return; // no cd init'd
-+#ifdef __NetBSD__
++#if defined(__DragonFly__) || defined(__NetBSD__)
+ int arg=0;
+#endif
@@ -56,8 +64,11 @@
+#ifdef __linux__
+ if ( ioctl(cdfile, CDROMEJECT) == -1 )
+ Con_DPrintf("ioctl cdromeject failed\n");
-+#endif
-+#ifdef __NetBSD__
++#elif defined(__DragonFly__)
++ ioctl(cdfile, CDIOCALLOW);
++ if ( ioctl(cdfile, CDIOCEJECT) == -1 )
++ Con_DPrintf("ioctl cdromeject failed\n");
++#elif defined(__NetBSD__)
+ if(ioctl(cdfile, DIOCLOCK, &arg) == -1)
+ Con_DPrintf("ioctl cdromunlock failed\n");
+ arg = 1;
@@ -80,7 +91,7 @@
+ if ( ioctl(cdfile, CDROMCLOSETRAY) == -1 )
+ Con_DPrintf("ioctl cdromclosetray failed\n");
+#endif
-+#ifdef __NetBSD__
++#if defined(__DragonFly__) || defined(__NetBSD__)
+ if(ioctl(cdfile, CDIOCCLOSE, NULL) == -1) {
+ Con_DPrintf("ioctl cdromclosetray failed\n");
+ }
@@ -93,7 +104,7 @@
+#ifdef __linux__
+struct cdrom_tochdr tochdr;
+#endif
-+#ifdef __NetBSD__
++#if defined(__DragonFly__) || defined(__NetBSD__)
+struct ioc_toc_header tochdr;
+#endif
@@ -118,16 +129,14 @@
- Con_DPrintf("CDAudio: no music tracks\n");
- return -1;
- }
-+#ifdef __NetBSD__
++#if defined(__DragonFly__) || defined(__NetBSD__)
+if ( ioctl(cdfile, CDIOREADTOCHEADER, &tochdr) == -1 )
+{
+ Con_DPrintf("ioctl cdromreadtochdr failed\n");
+ return -1;
+}
+#endif
-
-- cdValid = true;
-- maxTrack = tochdr.cdth_trk1;
++
+#ifdef __linux__
+if (tochdr.cdth_trk0 < 1)
+ {
@@ -135,19 +144,21 @@
+ return -1;
+ }
+#endif
-+#ifdef __NetBSD__
++#if defined(__DragonFly__) || defined(__NetBSD__)
+if (tochdr.starting_track < 1)
+ {
+ Con_DPrintf("CDAudio: no music tracks\n");
+ return -1;
+ }
+#endif
-+
+
+- cdValid = true;
+- maxTrack = tochdr.cdth_trk1;
+cdValid = true;
+#ifdef __linux__
+maxTrack = tochdr.cdth_trk1;
+#endif
-+#ifdef __NetBSD__
++#if defined(__DragonFly__) || defined(__NetBSD__)
+maxTrack = tochdr.ending_track;
+#endif
@@ -167,7 +178,7 @@
- if (cdfile == -1 || !enabled)
- return;
-+#ifdef __NetBSD__
++#if defined(__DragonFly__) || defined(__NetBSD__)
+ struct ioc_read_toc_entry entry;
+ struct ioc_play_track ti;
+ int arg=1;
@@ -238,43 +249,43 @@
- CDAudio_Stop();
- }
+#endif
-+
+
+- ti.cdti_trk0 = track;
+- ti.cdti_trk1 = track;
+- ti.cdti_ind0 = 1;
+- ti.cdti_ind1 = 99;
+ if (playing)
+ {
+ if (playTrack == track)
+ return;
+ CDAudio_Stop();
+ }
-+
+
+- if ( ioctl(cdfile, CDROMPLAYTRKIND, &ti) == -1 )
+#ifdef __linux__
+ ti.cdti_trk0 = track;
+ ti.cdti_trk1 = track;
+ ti.cdti_ind0 = 1;
+ ti.cdti_ind1 = 99;
+ if ( ioctl(cdfile, CDROMPLAYTRKIND, &ti) == -1 )
-+ {
+ {
+- Con_DPrintf("ioctl cdromplaytrkind failed\n");
+- return;
+ Con_DPrintf("ioctl cdromplaytrkind failed\n");
+ return;
+ }
-
-- ti.cdti_trk0 = track;
-- ti.cdti_trk1 = track;
-- ti.cdti_ind0 = 1;
-- ti.cdti_ind1 = 99;
++
+ if ( ioctl(cdfile, CDROMRESUME) == -1 )
+ Con_DPrintf("ioctl cdromresume failed\n");
+#endif
-
-- if ( ioctl(cdfile, CDROMPLAYTRKIND, &ti) == -1 )
-+#ifdef __NetBSD__
++
++#if defined(__DragonFly__) || defined(__NetBSD__)
+ ti.start_track = track;
+ ti.end_track = track;
+ ti.start_index = 1;
+ ti.end_index = 99;
+ if ( ioctl(cdfile, CDIOCPLAYTRACKS, &ti) == -1 )
- {
-- Con_DPrintf("ioctl cdromplaytrkind failed\n");
-- return;
++ {
+ Con_DPrintf("ioctl cdromplaytrkind failed\n");
+ return;
}
@@ -317,7 +328,7 @@
+ if ( ioctl(cdfile, CDROMSTOP) == -1 )
+ Con_DPrintf("ioctl cdromstop failed (%d)\n", errno);
+#endif
-+#ifdef __NetBSD__
++#if defined(__DragonFly__) || defined(__NetBSD__)
+ if ( ioctl(cdfile, CDIOCSTOP) == -1 )
+ Con_DPrintf("ioctl cdromstop failed (%d)\n", errno);
+#endif
@@ -345,16 +356,16 @@
- Con_DPrintf("ioctl cdrompause failed\n");
+ if (!playing)
+ return;
-+
+
+- wasPlaying = playing;
+- playing = false;
+#ifndef PAUSE_BY_STOPPING
+#ifdef __linux__
+ if ( ioctl(cdfile, CDROMPAUSE) == -1 )
+ Con_DPrintf("ioctl cdrompause failed\n");
+#endif
-
-- wasPlaying = playing;
-- playing = false;
-+#ifdef __NetBSD__
++
++#if defined(__DragonFly__) || defined(__NetBSD__)
+ if ( ioctl(cdfile, CDIOCPAUSE) == -1 )
+ Con_DPrintf("ioctl cdrompause failed\n");
+#endif
@@ -397,7 +408,7 @@
+ Con_DPrintf("ioctl cdromresume failed\n");
+#endif
+
-+#ifdef __NetBSD__
++#if defined(__DragonFly__) || defined(__NetBSD__)
+ if ( ioctl(cdfile, CDIOCRESUME) == -1 )
+ Con_DPrintf("ioctl cdromresume failed\n");
+#endif
@@ -409,7 +420,7 @@
}
static void CD_f (void)
-@@ -327,43 +463,72 @@
+@@ -327,43 +474,72 @@ static void CD_f (void)
void CDAudio_Update(void)
{
@@ -418,7 +429,7 @@
+#ifdef __linux__
+ struct cdrom_subchnl subchnl;
+#endif
-+#ifdef __NetBSD__
++#if defined(__DragonFly__) || defined(__NetBSD__)
+ struct ioc_read_subchannel subchnl;
+ struct cd_sub_channel_info data;
+#endif
@@ -490,7 +501,7 @@
+ CDAudio_Play(playTrack, true);
+ }
+#endif
-+#ifdef __NetBSD__
++#if defined(__DragonFly__) || defined(__NetBSD__)
+ subchnl.address_format = CD_MSF_FORMAT;
+ subchnl.data_format = CD_CURRENT_POSITION;
Home |
Main Index |
Thread Index |
Old Index