pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/drscheme Add DragonFly support based on patch by ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/83fe94ea4e03
branches:  trunk
changeset: 517783:83fe94ea4e03
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Tue Aug 22 20:17:23 2006 +0000

description:
Add DragonFly support based on patch by Jeffrey Hsu.
Fix build with X11BASE!=/usr/X11R6.

diffstat:

 lang/drscheme/Makefile         |    7 ++-
 lang/drscheme/distinfo         |    8 ++-
 lang/drscheme/patches/patch-aa |   42 ++++++++++++++
 lang/drscheme/patches/patch-ab |   36 ++++++++++++
 lang/drscheme/patches/patch-ac |   71 ++++++++++++++++++++++++
 lang/drscheme/patches/patch-ad |   20 ++++++
 lang/drscheme/patches/patch-ae |  121 +++++++++++++++++++++++++++++++++++++++++
 lang/drscheme/patches/patch-af |   42 ++++++++++++++
 8 files changed, 345 insertions(+), 2 deletions(-)

diffs (truncated from 399 to 300 lines):

diff -r 8417a9efbe91 -r 83fe94ea4e03 lang/drscheme/Makefile
--- a/lang/drscheme/Makefile    Tue Aug 22 19:37:40 2006 +0000
+++ b/lang/drscheme/Makefile    Tue Aug 22 20:17:23 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.37 2006/07/22 04:46:16 rillig Exp $
+# $NetBSD: Makefile,v 1.38 2006/08/22 20:17:23 joerg Exp $
 #
 
 DISTNAME=              plt-${DRSCHEME_VERSION}-src-unix
@@ -29,6 +29,11 @@
 
 USE_LANGUAGES=         c c++
 
+SUBST_CLASSES+=                x11root
+SUBST_STAGE.x11root=   post-patch
+SUBST_FILES.x11root=   ${WRKDIR}/plt/collects/sgl/makefile.ss
+SUBST_SED.x11root=     -e 's,/usr/X11R6,${X11BASE},'
+
 DRSCHEME_VERSION=      209
 
 # XXX: we pass this as the prefix to the configure script (see below) so
diff -r 8417a9efbe91 -r 83fe94ea4e03 lang/drscheme/distinfo
--- a/lang/drscheme/distinfo    Tue Aug 22 19:37:40 2006 +0000
+++ b/lang/drscheme/distinfo    Tue Aug 22 20:17:23 2006 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.12 2005/02/24 09:03:06 agc Exp $
+$NetBSD: distinfo,v 1.13 2006/08/22 20:17:23 joerg Exp $
 
 SHA1 (drscheme/209/mred-doc.plt) = 8acbb38af09f7d0cbf60db0f28ea3b1cfdbecbcc
 RMD160 (drscheme/209/mred-doc.plt) = 89b0d4b5d1093b6e9f5d6d7afad0fc7fbb99dc3c
@@ -15,6 +15,12 @@
 SHA1 (drscheme/209/plt-209-src-unix.tgz) = 080b3a84ccc2600033ef082e726a5b3b07820a0f
 RMD160 (drscheme/209/plt-209-src-unix.tgz) = 1041d9a7e66d4565adf9a4e139d77885d0edd556
 Size (drscheme/209/plt-209-src-unix.tgz) = 10731358 bytes
+SHA1 (patch-aa) = bc92cf718d684f008e5ab0b182c589fc7f6971a9
+SHA1 (patch-ab) = f0c67e4b890569fcef614bc0d4c403c68df6c58d
+SHA1 (patch-ac) = 2bbd5efb27022c07ef22f0508516c60a197e912b
+SHA1 (patch-ad) = 205ecb6a6d996ebb703588de9f14baf32fdea927
+SHA1 (patch-ae) = 7323ae61c6685d2ed04cbca7dc98b80d37b982a2
+SHA1 (patch-af) = 50e731f41359997e4ef59a517c4fffc4a12ffc13
 SHA1 (patch-ag) = 4670f21302de022e299be0aeaa9d6c22abadd1ee
 SHA1 (patch-ah) = 4c6fa4ca44ae951b67ea4ebc1f8df841ccabdf10
 SHA1 (patch-ai) = cdab7bed524279a287845f03c642c7aafead7dc6
diff -r 8417a9efbe91 -r 83fe94ea4e03 lang/drscheme/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/drscheme/patches/patch-aa    Tue Aug 22 20:17:23 2006 +0000
@@ -0,0 +1,42 @@
+$NetBSD: patch-aa,v 1.5 2006/08/22 20:17:23 joerg Exp $
+
+--- ../include/sconfig.h.orig  2004-12-19 08:38:25.000000000 +0000
++++ ../include/sconfig.h
+@@ -288,6 +288,37 @@
+ 
+ #endif
+ 
++  /************** x86/DragonFly with gcc ****************/
++
++# if defined(__DragonFly__) && defined(i386)
++
++# define SCHEME_PLATFORM_LIBRARY_SUBPATH "dragonfly"
++
++# include "uconfig.h"
++# undef HAS_STANDARD_IOB
++
++# define HAS_BSD_IOB
++
++# define STACK_GROWS_DOWN
++
++# define USE_UNDERSCORE_SETJMP
++
++# define USE_IEEE_FP_PREDS
++# define FREEBSD_CONTROL_387
++# define POW_HANDLES_INF_CORRECTLY
++
++# define USE_DYNAMIC_FDSET_SIZE
++
++# define SIGSET_IS_SIGNAL
++
++# define USE_TM_GMTOFF_FIELD
++
++# define REGISTER_POOR_MACHINE
++
++# define FLAGS_ALREADY_SET
++
++#endif
++
+   /************** x86/FreeBSD with gcc ****************/
+ 
+ # if defined(__FreeBSD__) && defined(i386)
diff -r 8417a9efbe91 -r 83fe94ea4e03 lang/drscheme/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/drscheme/patches/patch-ab    Tue Aug 22 20:17:23 2006 +0000
@@ -0,0 +1,36 @@
+$NetBSD: patch-ab,v 1.5 2006/08/22 20:17:23 joerg Exp $
+
+--- mzscheme/gc/dyn_load.c.orig        2004-12-19 08:38:25.000000000 +0000
++++ mzscheme/gc/dyn_load.c
+@@ -57,6 +57,7 @@
+     !defined(HPUX) && !(defined(LINUX) && defined(__ELF__)) && \
+     !defined(RS6000) && !defined(SCO_ELF) && !defined(DGUX) && \
+     !(defined(FREEBSD) && defined(__ELF__)) && \
++    !(defined(DRAGONFLY) && defined(__ELF__)) && \
+     !(defined(NETBSD) && defined(__ELF__)) && !defined(HURD) && \
+     !defined(DARWIN)
+  --> We only know how to find data segments of dynamic libraries for the
+@@ -81,8 +82,9 @@
+ #endif
+ 
+ #if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
+-    (defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
+-    (defined(NETBSD) && defined(__ELF__)) || defined(HURD)
++    ((defined(FREEBSD) || defined(DRAGONFLY)) && defined(__ELF__)) || \
++    (defined(NETBSD) && defined(__ELF__)) || \
++    defined(DGUX) || defined(HURD)
+ #   include <stddef.h>
+ #   include <elf.h>
+ #   include <link.h>
+@@ -273,8 +275,9 @@ void GC_register_dynamic_libraries()
+ # endif /* SUNOS */
+ 
+ #if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
+-    (defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
+-    (defined(NETBSD) && defined(__ELF__)) || defined(HURD)
++    ((defined(FREEBSD) || defined(DRAGONFLY)) && defined(__ELF__)) || \
++    (defined(NETBSD) && defined(__ELF__)) || \
++    defined(DGUX) || defined(HURD)
+ 
+ 
+ #ifdef USE_PROC_FOR_LIBRARIES
diff -r 8417a9efbe91 -r 83fe94ea4e03 lang/drscheme/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/drscheme/patches/patch-ac    Tue Aug 22 20:17:23 2006 +0000
@@ -0,0 +1,71 @@
+$NetBSD: patch-ac,v 1.5 2006/08/22 20:17:23 joerg Exp $
+
+--- mzscheme/gc/include/private/gcconfig.h.orig        2004-12-19 08:38:25.000000000 +0000
++++ mzscheme/gc/include/private/gcconfig.h
+@@ -54,6 +54,11 @@
+ #    define OPENBSD
+ # endif
+ 
++/* And one for DragonFlyBSD: */
++# if defined(__DragonFly__)
++#    define DRAGONFLY
++# endif
++
+ /* And one for FreeBSD: */
+ # if defined(__FreeBSD__)
+ #    define FREEBSD
+@@ -303,7 +308,7 @@
+ #   define OPENBSD
+ #   define mach_type_known
+ # endif
+-# if defined(FREEBSD) && (defined(i386) || defined(__i386__))
++# if (defined(FREEBSD) || defined(DRAGONFLY)) && (defined(i386) || defined(__i386__))
+ #   define I386
+ #   define mach_type_known
+ # endif
+@@ -443,7 +448,8 @@
+                   /*             MACOS and AMIGA variants)            */
+                   /*             I386       ==> Intel 386             */
+                   /*              (SEQUENT, OS2, SCO, LINUX, NETBSD,  */
+-                  /*               FREEBSD, THREE86BSD, MSWIN32,      */
++                  /*               DRAGONFLY, FREEBSD, THREE86BSD,    */
++                  /*               MSWIN32,                           */
+                   /*               BSDI,SUNOS5, NEXT, other variants) */
+                     /*             NS32K      ==> Encore Multimax     */
+                     /*             MIPS       ==> R2000 or R3000      */
+@@ -1188,6 +1194,21 @@
+ #   ifdef OPENBSD
+ #     define OS_TYPE "OPENBSD"
+ #   endif
++#   ifdef DRAGONFLY
++#     define OS_TYPE "DRAGONFLY"
++#     ifndef GC_FREEBSD_THREADS
++#         define MPROTECT_VDB
++#     endif
++#     define SIG_SUSPEND SIGUSR1
++#     define SIG_THR_RESTART SIGUSR2
++#     define FREEBSD_STACKBOTTOM
++#     ifdef __ELF__
++#         define DYNAMIC_LOADING
++#     endif
++      extern char etext[];
++      extern char * GC_FreeBSDGetDataStart();
++#     define DATASTART GC_FreeBSDGetDataStart(0x1000, &etext)
++#   endif
+ #   ifdef FREEBSD
+ #     define OS_TYPE "FREEBSD"
+ #     ifndef GC_FREEBSD_THREADS
+@@ -1940,8 +1961,13 @@
+ #   define SUNOS5SIGS
+ # endif
+ 
++# if defined(DRAGONFLY)
++#   define SUNOS5SIGS
++# endif
++
+ # if defined(SVR4) || defined(LINUX) || defined(IRIX5) || defined(HPUX) \
+           || defined(OPENBSD) || defined(NETBSD) || defined(FREEBSD) \
++          || defined(DRAGONFLY) \
+           || defined(DGUX) || defined(BSD) || defined(SUNOS4) \
+           || defined(_AIX) || defined(DARWIN) || defined(OSF1)
+ #   define UNIX_LIKE   /* Basic Unix-like system calls work.  */
diff -r 8417a9efbe91 -r 83fe94ea4e03 lang/drscheme/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/drscheme/patches/patch-ad    Tue Aug 22 20:17:23 2006 +0000
@@ -0,0 +1,20 @@
+$NetBSD: patch-ad,v 1.5 2006/08/22 20:17:23 joerg Exp $
+
+--- mzscheme/gc/mach_dep.c.orig        2004-12-19 08:38:26.000000000 +0000
++++ mzscheme/gc/mach_dep.c
+@@ -216,6 +216,7 @@ void GC_push_regs()
+       && !defined(SCO) && !defined(SCO_ELF) \
+       && !(defined(LINUX) && defined(__ELF__)) \
+       && !(defined(FREEBSD) && defined(__ELF__)) \
++      && !(defined(DRAGONFLY) && defined(__ELF__)) \
+       && !(defined(NETBSD) && defined(__ELF__)) \
+       && !(defined(OPENBSD) && defined(__ELF__)) \
+       && !(defined(BEOS) && defined(__ELF__)) \
+@@ -235,6 +236,7 @@ void GC_push_regs()
+ 
+ #     if ( defined(I386) && defined(LINUX) && defined(__ELF__) ) \
+       || ( defined(I386) && defined(FREEBSD) && defined(__ELF__) ) \
++      || ( defined(I386) && defined(DRAGONFLY) && defined(__ELF__) ) \
+       || ( defined(I386) && defined(NETBSD) && defined(__ELF__) ) \
+       || ( defined(I386) && defined(OPENBSD) && defined(__ELF__) ) \
+       || ( defined(I386) && defined(HURD) && defined(__ELF__) ) \
diff -r 8417a9efbe91 -r 83fe94ea4e03 lang/drscheme/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/drscheme/patches/patch-ae    Tue Aug 22 20:17:23 2006 +0000
@@ -0,0 +1,121 @@
+$NetBSD: patch-ae,v 1.5 2006/08/22 20:17:23 joerg Exp $
+
+--- mzscheme/gc/os_dep.c.orig  2004-12-19 08:38:26.000000000 +0000
++++ mzscheme/gc/os_dep.c
+@@ -80,7 +80,7 @@
+ #   define NEED_FIND_LIMIT
+ # endif
+ 
+-#if defined(FREEBSD) && defined(I386)
++#if (defined(FREEBSD) || defined(DRAGONFLY)) && defined(I386)
+ #  include <machine/trap.h>
+ #  if !defined(PCR)
+ #    define NEED_FIND_LIMIT
+@@ -129,7 +129,7 @@
+ 
+ #ifdef UNIX_LIKE
+ # include <fcntl.h>
+-# if defined(SUNOS5SIGS) && !defined(FREEBSD)
++# if defined(SUNOS5SIGS) && !(defined(FREEBSD) || defined(DRAGONFLY))
+ #  include <sys/siginfo.h>
+ # endif
+   /* Define SETJMP and friends to be the version that restores        */
+@@ -1385,7 +1385,7 @@ int * etext_addr;
+ }
+ # endif
+ 
+-# if defined(FREEBSD) && defined(I386) && !defined(PCR)
++# if (defined(FREEBSD) || defined(DRAGONFLY)) && defined(I386) && !defined(PCR)
+ /* Its unclear whether this should be identical to the above, or      */
+ /* whether it should apply to non-X86 architectures.                  */
+ /* For now we don't assume that there is always an empty page after   */
+@@ -2253,7 +2253,7 @@ GC_bool is_ptrfree;
+ # endif /* !DARWIN */
+ # endif /* MSWIN32 || MSWINCE || DARWIN */
+ 
+-#if defined(SUNOS4) || (defined(FREEBSD) && !defined(SUNOS5SIGS))
++#if defined(SUNOS4) || ((defined(FREEBSD) || defined(DRAGONFLY)) && !defined(SUNOS5SIGS))
+     typedef void (* SIG_PF)();
+ #endif /* SUNOS4 || (FREEBSD && !SUNOS5SIGS) */
+ 
+@@ -2282,7 +2282,7 @@ GC_bool is_ptrfree;
+ #endif /* IRIX5 || OSF1 || HURD */
+ 
+ #if defined(SUNOS5SIGS)
+-# if defined(HPUX) || defined(FREEBSD)
++# if defined(HPUX) || (defined(FREEBSD) || defined(DRAGONFLY))
+ #   define SIGINFO_T siginfo_t
+ # else
+ #   define SIGINFO_T struct siginfo
+@@ -2387,7 +2387,7 @@ SIG_PF GC_old_segv_handler;      /* Also old 
+ 
+ /*ARGSUSED*/
+ #if !defined(DARWIN)
+-# if defined (SUNOS4) || (defined(FREEBSD) && !defined(SUNOS5SIGS))
++# if defined (SUNOS4) || ((defined(FREEBSD) || defined(DRAGONFLY)) && !defined(SUNOS5SIGS))
+     void GC_write_fault_handler(sig, code, scp, addr)
+     int sig, code;
+     struct sigcontext *scp;
+@@ -2398,7 +2398,7 @@ SIG_PF GC_old_segv_handler;      /* Also old 
+                           || (FC_CODE(code) == FC_OBJERR \
+                              && FC_ERRNO(code) == FC_PROT))
+ #   endif
+-#   ifdef FREEBSD
++#   if (defined(FREEBSD) || defined(DRAGONFLY))
+ #     define SIG_OK (sig == SIGBUS)
+ #     define CODE_OK (code == BUS_PAGE_FAULT)
+ #   endif
+@@ -2459,7 +2459,7 @@ SIG_PF GC_old_segv_handler;      /* Also old 



Home | Main Index | Thread Index | Old Index