diff options
author | joerg <joerg@pkgsrc.org> | 2006-08-22 20:17:23 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2006-08-22 20:17:23 +0000 |
commit | 498e7d191bc79334130e5bc5fab2b4be5fd6b2c2 (patch) | |
tree | 6825dcdf6fd731c50de0735ba39e885ed3d7cbb8 /lang/drscheme | |
parent | 018236bca5e253569df49d6ff7bff0361c911d53 (diff) | |
download | pkgsrc-498e7d191bc79334130e5bc5fab2b4be5fd6b2c2.tar.gz |
Add DragonFly support based on patch by Jeffrey Hsu.
Fix build with X11BASE!=/usr/X11R6.
Diffstat (limited to 'lang/drscheme')
-rw-r--r-- | lang/drscheme/Makefile | 7 | ||||
-rw-r--r-- | lang/drscheme/distinfo | 8 | ||||
-rw-r--r-- | lang/drscheme/patches/patch-aa | 42 | ||||
-rw-r--r-- | lang/drscheme/patches/patch-ab | 36 | ||||
-rw-r--r-- | lang/drscheme/patches/patch-ac | 71 | ||||
-rw-r--r-- | lang/drscheme/patches/patch-ad | 20 | ||||
-rw-r--r-- | lang/drscheme/patches/patch-ae | 121 | ||||
-rw-r--r-- | lang/drscheme/patches/patch-af | 42 |
8 files changed, 345 insertions, 2 deletions
diff --git a/lang/drscheme/Makefile b/lang/drscheme/Makefile index ad807c236c4..8fffdadb1df 100644 --- a/lang/drscheme/Makefile +++ b/lang/drscheme/Makefile @@ -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 @@ GNU_CONFIGURE= yes 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 --git a/lang/drscheme/distinfo b/lang/drscheme/distinfo index f225155fc8e..a3334f67f5d 100644 --- a/lang/drscheme/distinfo +++ b/lang/drscheme/distinfo @@ -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 @@ Size (drscheme/209/tex2page-doc.plt) = 95448 bytes 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 --git a/lang/drscheme/patches/patch-aa b/lang/drscheme/patches/patch-aa new file mode 100644 index 00000000000..7facc3ef4d4 --- /dev/null +++ b/lang/drscheme/patches/patch-aa @@ -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 --git a/lang/drscheme/patches/patch-ab b/lang/drscheme/patches/patch-ab new file mode 100644 index 00000000000..7abe523047f --- /dev/null +++ b/lang/drscheme/patches/patch-ab @@ -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 --git a/lang/drscheme/patches/patch-ac b/lang/drscheme/patches/patch-ac new file mode 100644 index 00000000000..b28da94cd58 --- /dev/null +++ b/lang/drscheme/patches/patch-ac @@ -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 --git a/lang/drscheme/patches/patch-ad b/lang/drscheme/patches/patch-ad new file mode 100644 index 00000000000..f2de71ed4e9 --- /dev/null +++ b/lang/drscheme/patches/patch-ad @@ -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 --git a/lang/drscheme/patches/patch-ae b/lang/drscheme/patches/patch-ae new file mode 100644 index 00000000000..2224d3b6155 --- /dev/null +++ b/lang/drscheme/patches/patch-ae @@ -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 + || (scp -> si_code == SEGV_UNKNOWN) \ + || (scp -> si_code == BUS_OBJERR) + # else +-# ifdef FREEBSD ++# if (defined(FREEBSD) || defined(DRAGONFLY)) + # define SIG_OK (sig == SIGBUS) + # define CODE_OK (scp -> si_code == BUS_PAGE_FAULT) + # else +@@ -2590,7 +2590,7 @@ SIG_PF GC_old_segv_handler; /* Also old + # endif + } else { + # if defined (SUNOS4) \ +- || (defined(FREEBSD) && !defined(SUNOS5SIGS)) ++ || ((defined(FREEBSD) || defined(DRAGONFLY)) && !defined(SUNOS5SIGS)) + (*old_handler) (sig, code, scp, addr); + return; + # endif +@@ -2725,7 +2725,7 @@ void GC_dirty_init() + GC_err_printf0("Page size not multiple of HBLKSIZE\n"); + ABORT("Page size not multiple of HBLKSIZE"); + } +-# if defined(SUNOS4) || (defined(FREEBSD) && !defined(SUNOS5SIGS)) ++# if defined(SUNOS4) || ((defined(FREEBSD) || defined(DRAGONFLY)) && !defined(SUNOS5SIGS)) + GC_old_bus_handler = signal(SIGBUS, GC_write_fault_handler); + if (GC_old_bus_handler == SIG_IGN) { + GC_err_printf0("Previously ignored bus error!?"); +@@ -2749,7 +2749,7 @@ void GC_dirty_init() + # endif + } + # endif +-# if (defined(SUNOS5SIGS) && !defined(FREEBSD)) || defined(IRIX5) \ ++# if (defined(SUNOS5SIGS) && !(defined(FREEBSD)|| defined(DRAGONFLY))) || defined(IRIX5) \ + || defined(LINUX) || defined(OSF1) || defined(HURD) + /* SUNOS5SIGS includes HPUX */ + # if defined(GC_IRIX_THREADS) +@@ -2783,7 +2783,7 @@ void GC_dirty_init() + } + # endif /* (SUNOS5SIGS && !FREEBSD) || IRIX5 || LINUX || OSF1 || HURD */ + # if defined(HPUX) || defined(LINUX) || defined(HURD) \ +- || (defined(FREEBSD) && defined(SUNOS5SIGS)) ++ || ((defined(FREEBSD) || defined(DRAGONFLY)) && defined(SUNOS5SIGS)) + sigaction(SIGBUS, &act, &oldact); + GC_old_bus_handler = oldact.sa_handler; + if (GC_old_bus_handler == SIG_IGN) { +@@ -2795,7 +2795,7 @@ void GC_dirty_init() + GC_err_printf0("Replaced other SIGBUS handler\n"); + # endif + } +-# endif /* HPUX || LINUX || HURD || (FREEBSD && SUNOS5SIGS) */ ++# endif /* HPUX || LINUX || HURD || ((FREEBSD || DRAGONFLY) && SUNOS5SIGS) */ + # if defined(MSWIN32) + GC_old_segv_handler = SetUnhandledExceptionFilter(GC_write_fault_handler); + if (GC_old_segv_handler != NULL) { diff --git a/lang/drscheme/patches/patch-af b/lang/drscheme/patches/patch-af new file mode 100644 index 00000000000..962d4585bba --- /dev/null +++ b/lang/drscheme/patches/patch-af @@ -0,0 +1,42 @@ +$NetBSD: patch-af,v 1.5 2006/08/22 20:17:23 joerg Exp $ + +--- mzscheme/sconfig.h.orig 2004-12-19 08:38:26.000000000 +0000 ++++ mzscheme/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) |