pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/emulators/BasiliskII Add DragonFly support.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d3697011cd27
branches:  trunk
changeset: 503270:d3697011cd27
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Thu Nov 17 16:56:39 2005 +0000

description:
Add DragonFly support.

diffstat:

 emulators/BasiliskII/distinfo         |    9 +-
 emulators/BasiliskII/patches/patch-ae |   13 ++
 emulators/BasiliskII/patches/patch-af |  157 ++++++++++++++++++++++++++++++++++
 emulators/BasiliskII/patches/patch-ag |   40 ++++++++
 emulators/BasiliskII/patches/patch-ah |   13 ++
 emulators/BasiliskII/patches/patch-ai |   22 ++++
 emulators/BasiliskII/patches/patch-aj |   13 ++
 emulators/BasiliskII/patches/patch-ak |   13 ++
 8 files changed, 279 insertions(+), 1 deletions(-)

diffs (truncated from 319 to 300 lines):

diff -r 48a5a8de630d -r d3697011cd27 emulators/BasiliskII/distinfo
--- a/emulators/BasiliskII/distinfo     Thu Nov 17 16:45:52 2005 +0000
+++ b/emulators/BasiliskII/distinfo     Thu Nov 17 16:56:39 2005 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.10 2005/11/03 21:34:23 rillig Exp $
+$NetBSD: distinfo,v 1.11 2005/11/17 16:56:39 joerg Exp $
 
 SHA1 (BasiliskII_src_22032005.tar.bz2) = e6c6efe9dded3e50b204fc641f42d15447819109
 RMD160 (BasiliskII_src_22032005.tar.bz2) = 6fac78005ed8a8794c192a07d36285a68ad1ccfa
@@ -7,3 +7,10 @@
 SHA1 (patch-ab) = 462964cfa794f6ad97774fef525a9f210bd99d1b
 SHA1 (patch-ac) = ac4d313a8c60a807a5ea563dcca995e092be9c15
 SHA1 (patch-ad) = 6a215532e891848fe449ef5fe4307793c34bb9d6
+SHA1 (patch-ae) = dcac9287614535fa72fe9c8b0e3c516575e40887
+SHA1 (patch-af) = 03ec1ba0a7662e3e7f73e1523cba4ee3dd072924
+SHA1 (patch-ag) = db67f8999719402d5cd6bb0f2e72f7b5d276f885
+SHA1 (patch-ah) = 880b59812c983a03d39267e7ba5e9ff1995020b6
+SHA1 (patch-ai) = 9479f2daefbb2b62adc8fa816a65eb1be3cdb71d
+SHA1 (patch-aj) = 095ac43cfc8817f4f7c7861fb8422aac4c81b011
+SHA1 (patch-ak) = 3763edf1a5a9a3c3b5d404214fd918de131e49a0
diff -r 48a5a8de630d -r d3697011cd27 emulators/BasiliskII/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/BasiliskII/patches/patch-ae     Thu Nov 17 16:56:39 2005 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ae,v 1.1 2005/11/17 16:56:39 joerg Exp $
+
+--- src/Unix/timer_unix.cpp.orig       2005-11-17 14:22:31.000000000 +0000
++++ src/Unix/timer_unix.cpp
+@@ -228,7 +228,7 @@ uint64 GetTicks_usec(void)
+ // Linux select() changes its timeout parameter upon return to contain
+ // the remaining time. Most other unixen leave it unchanged or undefined.
+ #define SELECT_SETS_REMAINING
+-#elif defined(__FreeBSD__) || defined(__sun__) || (defined(__MACH__) && defined(__APPLE__))
++#elif defined(__FreeBSD__) || defined(__sun__) || (defined(__MACH__) && defined(__APPLE__)) || defined(__DragonFly__)
+ #define USE_NANOSLEEP
+ #elif defined(HAVE_PTHREADS) && defined(sgi)
+ // SGI pthreads has a bug when using pthreads+signals+nanosleep,
diff -r 48a5a8de630d -r d3697011cd27 emulators/BasiliskII/patches/patch-af
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/BasiliskII/patches/patch-af     Thu Nov 17 16:56:39 2005 +0000
@@ -0,0 +1,157 @@
+$NetBSD: patch-af,v 1.1 2005/11/17 16:56:39 joerg Exp $
+
+--- src/Unix/sys_unix.cpp.orig 2005-11-17 14:25:16.000000000 +0000
++++ src/Unix/sys_unix.cpp
+@@ -52,7 +52,7 @@ static int _llseek(unsigned int fd, unsi
+ #endif
+ #endif
+ 
+-#if defined(__FreeBSD__) || defined(__NetBSD__)
++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+ #include <sys/cdio.h>
+ #endif
+ 
+@@ -79,7 +79,7 @@ struct file_handle {
+ 
+ #if defined(__linux__)
+       int cdrom_cap;          // CD-ROM capability flags (only valid if is_cdrom is true)
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
+       struct ioc_capability cdrom_cap;
+ #elif defined(__APPLE__) && defined(__MACH__)
+       char    *ioctl_name;    // For CDs on OS X - a device for special ioctls
+@@ -237,7 +237,7 @@ void SysAddCDROMPrefs(void)
+       // Until I can convince the other guys that my Darwin code is useful,
+       // we just do nothing (it is safe to have no cdrom device)
+   #endif
+-#elif defined(__FreeBSD__) || defined(__NetBSD__)
++#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+       PrefsAddString("cdrom", "/dev/cd0c");
+ #endif
+ }
+@@ -257,7 +257,7 @@ void SysAddSerialPrefs(void)
+               PrefsAddString("seriala", "/dev/tts/0");
+               PrefsAddString("serialb", "/dev/tts/1");
+       }
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
+       PrefsAddString("seriala", "/dev/cuaa0");
+       PrefsAddString("serialb", "/dev/cuaa1");
+ #elif defined(__NetBSD__)
+@@ -319,7 +319,7 @@ static bool is_drive_mounted(const char 
+ void *Sys_open(const char *name, bool read_only)
+ {
+       bool is_file = strncmp(name, "/dev/", 5) != 0;
+-#if defined(__FreeBSD__)
++#if defined(__FreeBSD__) || defined(__DragonFly__)
+                       // SCSI                             IDE
+       bool is_cdrom = strncmp(name, "/dev/cd", 7) == 0 || strncmp(name, "/dev/acd", 8) == 0;
+ #else
+@@ -367,7 +367,7 @@ void *Sys_open(const char *name, bool re
+       }
+ 
+       // Open file/device
+-#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+       int fd = open(name, (read_only ? O_RDONLY : O_RDWR) | (is_cdrom ? O_NONBLOCK : 0));
+ #else
+       int fd = open(name, read_only ? O_RDONLY : O_RDWR);
+@@ -414,7 +414,7 @@ void *Sys_open(const char *name, bool re
+ #else
+                                       fh->cdrom_cap = 0;
+ #endif
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
+                                       fh->is_floppy = ((st.st_rdev >> 16) == 2);
+ #ifdef CDIOCCAPABILITY
+                                       if (is_cdrom) {
+@@ -586,7 +586,7 @@ void SysEject(void *arg)
+               close(fh->fd);  // Close and reopen so the driver will see the media change
+               fh->fd = open(fh->name, O_RDONLY | O_NONBLOCK);
+       }
+-#elif defined(__FreeBSD__) || defined(__NetBSD__)
++#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+       if (fh->is_floppy) {
+               fsync(fh->fd);
+       } else if (fh->is_cdrom) {
+@@ -723,7 +723,7 @@ bool SysIsDiskInserted(void *arg)
+ #endif
+               cdrom_tochdr header;
+               return ioctl(fh->fd, CDROMREADTOCHDR, &header) == 0;
+-#elif defined(__FreeBSD__) || defined(__NetBSD__)
++#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+       } else if (fh->is_floppy) {
+               return false;   //!!
+       } else if (fh->is_cdrom) {
+@@ -831,7 +831,7 @@ bool SysCDReadTOC(void *arg, uint8 *toc)
+               extern  bool    DarwinCDReadTOC(char *name, uint8 *toc);
+ 
+               return  DarwinCDReadTOC(fh->name, toc);
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
+               uint8 *p = toc + 2;
+ 
+               // Header
+@@ -942,7 +942,7 @@ bool SysCDGetPosition(void *arg, uint8 *
+               *pos++ = chan.cdsc_reladdr.msf.second;
+               *pos++ = chan.cdsc_reladdr.msf.frame;
+               return true;
+-#elif defined(__FreeBSD__) || defined(__NetBSD__)
++#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+               struct ioc_read_subchannel chan;
+               chan.data_format = CD_MSF_FORMAT;
+               chan.address_format = CD_MSF_FORMAT;
+@@ -994,7 +994,7 @@ bool SysCDPlay(void *arg, uint8 start_m,
+               play.cdmsf_sec1 = end_s;
+               play.cdmsf_frame1 = end_f;
+               return ioctl(fh->fd, CDROMPLAYMSF, &play) == 0;
+-#elif defined(__FreeBSD__) || defined(__NetBSD__)
++#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+               struct ioc_play_msf play;
+               play.start_m = start_m;
+               play.start_s = start_s;
+@@ -1024,7 +1024,7 @@ bool SysCDPause(void *arg)
+       if (fh->is_cdrom) {
+ #if defined(__linux__)
+               return ioctl(fh->fd, CDROMPAUSE) == 0;
+-#elif defined(__FreeBSD__) || defined(__NetBSD__)
++#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+               return ioctl(fh->fd, CDIOCPAUSE) == 0;
+ #else
+               return false;
+@@ -1047,7 +1047,7 @@ bool SysCDResume(void *arg)
+       if (fh->is_cdrom) {
+ #if defined(__linux__)
+               return ioctl(fh->fd, CDROMRESUME) == 0;
+-#elif defined(__FreeBSD__) || defined(__NetBSD__)
++#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+               return ioctl(fh->fd, CDIOCRESUME) == 0;
+ #else
+               return false;
+@@ -1070,7 +1070,7 @@ bool SysCDStop(void *arg, uint8 lead_out
+       if (fh->is_cdrom) {
+ #if defined(__linux__)
+               return ioctl(fh->fd, CDROMSTOP) == 0;
+-#elif defined(__FreeBSD__) || defined(__NetBSD__)
++#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+               return ioctl(fh->fd, CDIOCSTOP) == 0;
+ #else
+               return false;
+@@ -1111,7 +1111,7 @@ void SysCDSetVolume(void *arg, uint8 lef
+               vol.channel0 = vol.channel2 = left;
+               vol.channel1 = vol.channel3 = right;
+               ioctl(fh->fd, CDROMVOLCTRL, &vol);
+-#elif defined(__FreeBSD__) || defined(__NetBSD__)
++#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+               struct ioc_vol vol;
+               vol.vol[0] = vol.vol[2] = left;
+               vol.vol[1] = vol.vol[3] = right;
+@@ -1138,7 +1138,7 @@ void SysCDGetVolume(void *arg, uint8 &le
+               ioctl(fh->fd, CDROMVOLREAD, &vol);
+               left = vol.channel0;
+               right = vol.channel1;
+-#elif defined(__FreeBSD__) || defined(__NetBSD__)
++#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+               struct ioc_vol vol;
+               ioctl(fh->fd, CDIOCGETVOL, &vol);
+               left = vol.vol[0];
diff -r 48a5a8de630d -r d3697011cd27 emulators/BasiliskII/patches/patch-ag
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/BasiliskII/patches/patch-ag     Thu Nov 17 16:56:39 2005 +0000
@@ -0,0 +1,40 @@
+$NetBSD: patch-ag,v 1.1 2005/11/17 16:56:39 joerg Exp $
+
+--- src/Unix/sigsegv.cpp.orig  2005-11-17 14:27:36.000000000 +0000
++++ src/Unix/sigsegv.cpp
+@@ -226,7 +226,7 @@ static void powerpc_decode_instruction(i
+ 
+ #if HAVE_SIGINFO_T
+ // Generic extended signal handler
+-#if defined(__FreeBSD__)
++#if defined(__FreeBSD__) || defined(__DragonFly__)
+ #define SIGSEGV_ALL_SIGNALS                           FAULT_HANDLER(SIGBUS)
+ #else
+ #define SIGSEGV_ALL_SIGNALS                           FAULT_HANDLER(SIGSEGV)
+@@ -257,7 +257,7 @@ static void powerpc_decode_instruction(i
+ #define SIGSEGV_SKIP_INSTRUCTION              sparc_skip_instruction
+ #endif
+ #endif
+-#if defined(__FreeBSD__)
++#if defined(__FreeBSD__) || defined(__DragonFly__)
+ #if (defined(i386) || defined(__i386__))
+ #define SIGSEGV_FAULT_INSTRUCTION             (((struct sigcontext *)scp)->sc_eip)
+ #define SIGSEGV_REGISTER_FILE                 ((unsigned long *)&(((struct sigcontext *)scp)->sc_edi)) /* EDI is the first GPR (even below EIP) in sigcontext */
+@@ -444,7 +444,7 @@ static sigsegv_address_t get_fault_addre
+ #define SIGSEGV_ALL_SIGNALS                           FAULT_HANDLER(SIGSEGV)
+ #endif
+ #endif
+-#if defined(__FreeBSD__)
++#if defined(__FreeBSD__) || defined(__DragonFly__)
+ #if (defined(i386) || defined(__i386__))
+ #define SIGSEGV_ALL_SIGNALS                           FAULT_HANDLER(SIGBUS)
+ #define SIGSEGV_FAULT_HANDLER_ARGLIST int sig, int code, struct sigcontext *scp, char *addr
+@@ -715,7 +715,7 @@ enum {
+ #endif
+ };
+ #endif
+-#if defined(__FreeBSD__)
++#if defined(__FreeBSD__) || defined(__DragonFly__)
+ enum {
+ #if (defined(i386) || defined(__i386__))
+       X86_REG_EIP = 10,
diff -r 48a5a8de630d -r d3697011cd27 emulators/BasiliskII/patches/patch-ah
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/BasiliskII/patches/patch-ah     Thu Nov 17 16:56:39 2005 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ah,v 1.1 2005/11/17 16:56:39 joerg Exp $
+
+--- src/Unix/serial_unix.cpp.orig      2005-11-17 14:28:47.000000000 +0000
++++ src/Unix/serial_unix.cpp
+@@ -201,7 +201,7 @@ int16 XSERDPort::open(uint16 config)
+               if (fstat(fd, &st) == 0)
+                       if (S_ISCHR(st.st_mode))
+                               protocol = ((MAJOR(st.st_rdev) == LP_MAJOR) ? parallel : serial);
+-#elif defined(__FreeBSD__) || defined(__NetBSD__)
++#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+               // Parallel port?
+               struct stat st;
+               if (fstat(fd, &st) == 0)
diff -r 48a5a8de630d -r d3697011cd27 emulators/BasiliskII/patches/patch-ai
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/BasiliskII/patches/patch-ai     Thu Nov 17 16:56:39 2005 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-ai,v 1.1 2005/11/17 16:56:39 joerg Exp $
+
+--- src/Unix/prefs_editor_gtk.cpp.orig 2005-11-17 14:29:15.000000000 +0000
++++ src/Unix/prefs_editor_gtk.cpp
+@@ -1109,7 +1109,7 @@ static GList *add_serial_names(void)
+               while ((de = readdir(d)) != NULL) {
+ #if defined(__linux__)
+                       if (strncmp(de->d_name, "ttyS", 4) == 0 || strncmp(de->d_name, "lp", 2) == 0) {
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
+                       if (strncmp(de->d_name, "cuaa", 4) == 0 || strncmp(de->d_name, "lpt", 3) == 0) {
+ #elif defined(__NetBSD__)
+                       if (strncmp(de->d_name, "tty0", 4) == 0 || strncmp(de->d_name, "lpt", 3) == 0) {
+@@ -1148,7 +1148,7 @@ static GList *add_ether_names(void)
+                       struct ifreq req, *ifr = ifc.ifc_req;
+                       for (int i=0; i<ifc.ifc_len; i+=sizeof(ifreq), ifr++) {
+                               req = *ifr;
+-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(sgi)
++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(sgi) || defined(__DragonFly__)
+                               if (ioctl(s, SIOCGIFADDR, &req) == 0 && (req.ifr_addr.sa_family == ARPHRD_ETHER || req.ifr_addr.sa_family == ARPHRD_ETHER+1)) {
+ #elif defined(__linux__)
+                               if (ioctl(s, SIOCGIFHWADDR, &req) == 0 && req.ifr_hwaddr.sa_family == ARPHRD_ETHER) {
diff -r 48a5a8de630d -r d3697011cd27 emulators/BasiliskII/patches/patch-aj
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/BasiliskII/patches/patch-aj     Thu Nov 17 16:56:39 2005 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-aj,v 1.1 2005/11/17 16:56:39 joerg Exp $
+
+--- src/Unix/ether_unix.cpp.orig       2005-11-17 14:30:02.000000000 +0000
++++ src/Unix/ether_unix.cpp
+@@ -31,7 +31,7 @@
+ #include <stdio.h>
+ #include <map>
+ 
+-#if defined(__FreeBSD__) || defined(sgi)
++#if defined(__FreeBSD__) || defined(sgi) defined(__DragonFly__)
+ #include <net/if.h>



Home | Main Index | Thread Index | Old Index