summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authormarino <marino>2012-09-15 13:33:59 +0000
committermarino <marino>2012-09-15 13:33:59 +0000
commit20baeea737861edaed1247a2508c7ff6cf0076cb (patch)
treea8838358e9fa6493dbf50f121b2c53c7105a5da3 /lang
parentf5c37aceebbb751ca7f7ae67a6f67e35321c6826 (diff)
downloadpkgsrc-20baeea737861edaed1247a2508c7ff6cf0076cb.tar.gz
lang/racket: Add DragonFly support
LDFLAGS.DragonFly+= -rdynamic Add four patches to support DragonFly: * Teach configuration about DragonFly * Add DragonFly to BSD signal handler code * Fix mbsrtowcs conftest segfault of configure script * Fix cast on string.c Patches contributed by: Chris Turner Jelle Hermsen Patches will be submitted upstream. Revbump due to possible change due to result of mbstrowcs test.
Diffstat (limited to 'lang')
-rw-r--r--lang/racket/Makefile6
-rw-r--r--lang/racket/distinfo6
-rw-r--r--lang/racket/patches/patch-src_configure17
-rw-r--r--lang/racket/patches/patch-src_racket_gc2_sighand.c19
-rw-r--r--lang/racket/patches/patch-src_racket_sconfig.h65
-rw-r--r--lang/racket/patches/patch-src_racket_src_string.c21
6 files changed, 131 insertions, 3 deletions
diff --git a/lang/racket/Makefile b/lang/racket/Makefile
index e21d5acb17f..0e22763c731 100644
--- a/lang/racket/Makefile
+++ b/lang/racket/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.15 2012/09/15 10:05:20 obache Exp $
+# $NetBSD: Makefile,v 1.16 2012/09/15 13:33:59 marino Exp $
PKGNAME= racket-5.3
DISTNAME= $(PKGNAME_NOREV)-src-unix
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= lang
MASTER_SITES_PLT= http://download.racket-lang.org/installers/$(PKGVERSION_NOREV)/ \
http://www.eecs.northwestern.edu/racket/$(PKGVERSION_NOREV)/ \
@@ -32,6 +32,8 @@ USE_TOOLS= pkg-config
MAKE_JOBS_SAFE= no
UNLIMIT_RESOURCES= datasize
+LDFLAGS.DragonFly+= -rdynamic
+
REPLACE_SH= collects/tests/framework/framework-test
CHECK_INTERPRETER_SKIP= collects/meta/build/sitemap/setup.py \
diff --git a/lang/racket/distinfo b/lang/racket/distinfo
index df9aeb494a9..0434e891a8e 100644
--- a/lang/racket/distinfo
+++ b/lang/racket/distinfo
@@ -1,6 +1,10 @@
-$NetBSD: distinfo,v 1.7 2012/08/08 06:55:32 asau Exp $
+$NetBSD: distinfo,v 1.8 2012/09/15 13:33:59 marino Exp $
SHA1 (racket-5.3-src-unix.tgz) = 16883898c0cc418ba44732e3f62a54cf043a1de8
RMD160 (racket-5.3-src-unix.tgz) = 99ee4a5d483c17b453dc699d445f57056349fb35
Size (racket-5.3-src-unix.tgz) = 18111154 bytes
SHA1 (patch-collects_racket_draw_unsafe_png.rkt) = 7ec0c190e97ab653a01aec6cc4ea909ec7ce0ee2
+SHA1 (patch-src_configure) = 3dd4483595e8281cd64fbf6cc1fc4d30b61c4302
+SHA1 (patch-src_racket_gc2_sighand.c) = e2b673a2355470cc7cf4080f297a547746a9f031
+SHA1 (patch-src_racket_sconfig.h) = 74259ad8c177005e3ba82f793d5ae49b86724b90
+SHA1 (patch-src_racket_src_string.c) = 115e02cfc7f26accb1e7d08cbc4326c15944defb
diff --git a/lang/racket/patches/patch-src_configure b/lang/racket/patches/patch-src_configure
new file mode 100644
index 00000000000..62e5f9cc19e
--- /dev/null
+++ b/lang/racket/patches/patch-src_configure
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_configure,v 1.1 2012/09/15 13:33:59 marino Exp $
+
+Fixes mbsrtowcs conftest on DragonFly (it segfaulted during the test)
+
+--- src/configure.orig 2012-08-06 22:51:46.000000000 +0000
++++ src/configure
+@@ -5111,8 +5111,10 @@ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <wchar.h>
++ #include <strings.h>
+ int main() {
+ mbstate_t state;
++ bzero(&state, sizeof(mbstate_t));
+ char *src = "X";
+ mbsrtowcs(0, &src, 0, &state);
+ return 0;
diff --git a/lang/racket/patches/patch-src_racket_gc2_sighand.c b/lang/racket/patches/patch-src_racket_gc2_sighand.c
new file mode 100644
index 00000000000..31aab85ee06
--- /dev/null
+++ b/lang/racket/patches/patch-src_racket_gc2_sighand.c
@@ -0,0 +1,19 @@
+$NetBSD: patch-src_racket_gc2_sighand.c,v 1.1 2012/09/15 13:33:59 marino Exp $
+
+Add DragonFly support.
+
+--- src/racket/gc2/sighand.c.orig 2012-08-06 22:51:46.000000000 +0000
++++ src/racket/gc2/sighand.c
+@@ -125,7 +125,11 @@ void fault_handler(int sn, struct siginf
+
+ /* ========== FreeBSD/NetBSD/OpenBSD signal handler ========== */
+ /* As of 2007/06/29, this is a guess for NetBSD! */
+-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
++#if defined(__FreeBSD__) \
++ || defined(__FreeBSD_kernel__) \
++ || defined(__NetBSD__) \
++ || defined(__OpenBSD__) \
++ || defined(__DragonFly__)
+ # include <signal.h>
+ # include <sys/param.h>
+ void fault_handler(int sn, siginfo_t *si, void *ctx)
diff --git a/lang/racket/patches/patch-src_racket_sconfig.h b/lang/racket/patches/patch-src_racket_sconfig.h
new file mode 100644
index 00000000000..adda4943d0d
--- /dev/null
+++ b/lang/racket/patches/patch-src_racket_sconfig.h
@@ -0,0 +1,65 @@
+$NetBSD: patch-src_racket_sconfig.h,v 1.3 2012/09/15 13:33:59 marino Exp $
+
+Add DragonFly support.
+
+--- src/racket/sconfig.h.orig 2012-08-06 22:51:46.000000000 +0000
++++ src/racket/sconfig.h
+@@ -989,6 +989,58 @@
+
+ #endif /* end not OSKit */
+
++
++#if defined(__DragonFly__)
++
++# if defined(__i386__)
++# define SCHEME_PLATFORM_LIBRARY_SUBPATH "i386-dragonfly"
++# define REGISTER_POOR_MACHINE
++# define MZ_USE_JIT_I386
++# ifndef MZ_JIT_X86_SSE
++# define ASM_DBLPREC_CONTROL_87
++# endif
++# elif defined(__amd64__)
++# define SCHEME_PLATFORM_LIBRARY_SUBPATH "amd64-dragonfly"
++# define REGISTER_POOR_MACHINE
++# define MZ_USE_JIT_X86_64
++# ifdef MZ_NO_JIT_SSE
++# define ASM_DBLPREC_CONTROL_87
++# endif
++# else
++# error Unported platform.
++# endif
++
++/* pthreads always enabled via configure', and
++ initial pthread's stack size doesn't use rlimit: */
++# define ASSUME_FIXED_STACK_SIZE
++# define FIXED_STACK_SIZE 1048576
++
++# include "uconfig.h"
++# undef HAS_STANDARD_IOB
++
++# define HAS_BSD_IOB
++
++# define USE_UNDERSCORE_SETJMP
++
++# define USE_IEEE_FP_PREDS
++# ifndef ASM_DBLPREC_CONTROL_87
++# define POW_HANDLES_INF_CORRECTLY
++# endif
++
++# define USE_DYNAMIC_FDSET_SIZE
++
++# define SIGSET_IS_SIGNAL
++
++# define USE_TM_GMTOFF_FIELD
++# define USE_TM_ZONE_FIELD
++
++# define MZ_JIT_USE_MPROTECT
++
++# define FLAGS_ALREADY_SET
++
++#endif /* end DragonFly */
++
++
+ /************** (END KNOWN ARCHITECTURE/SYSTEMS) ****************/
+
+
diff --git a/lang/racket/patches/patch-src_racket_src_string.c b/lang/racket/patches/patch-src_racket_src_string.c
new file mode 100644
index 00000000000..11fe2d67edd
--- /dev/null
+++ b/lang/racket/patches/patch-src_racket_src_string.c
@@ -0,0 +1,21 @@
+$NetBSD: patch-src_racket_src_string.c,v 1.1 2012/09/15 13:33:59 marino Exp $
+
+Part of DragonFly fix from Chris Turner and Jelle Hermsen.
+toupper/tolower return int, patch recasts to char
+
+--- src/racket/src/string.c.orig 2012-08-06 22:51:47.000000000 +0000
++++ src/racket/src/string.c
+@@ -2909,10 +2909,9 @@ static char *locale_recase(int to_up,
+
+ /* Re-case chars in "out" */
+ for (i = 0; i < iilen; i++) {
+- if (to_up)
+- out[od + i] = toupper(out[od + i]);
+- else
+- out[od + i] = tolower(out[od + i]);
++ char t;
++ t = (to_up) ? toupper(out[od+i]) : tolower(out[od+i]);
++ out[od+i] = t;
+ }
+
+ return out;