Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Dec 2000 16:49:36 -0500 (EST)
From:      "Alexander N. Kabaev" <ak03@gte.com>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        patrick@watson.org
Subject:   ports/23305: Allow native threads in OCAML 3.0
Message-ID:  <200012052149.eB5Lnac97611@h132-197-97-45.gte.com>
Resent-Message-ID: <200012052150.eB5Lo1J38495@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         23305
>Category:       ports
>Synopsis:       Use native threads in OCAML, use TK 83
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 05 13:50:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Alexander N. Kabaev
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
GTE Laboratories Inc.
>Environment:

	4.x and -CURRENT

>Description:

	Attached patch allows OCAML to detect and use FreeBSD's native
        pthreads in Thread module. Also fixes the bug in OCAML 
	distribution which nobody apparently noticed before.

 	Use TK 8.3 instead of 8.2 for labltk

>How-To-Repeat:

	N/A

>Fix:

Index: Makefile
===================================================================
RCS file: /usr/ncvs/ports/lang/ocaml/Makefile,v
retrieving revision 1.16
diff -u -r1.16 Makefile
--- Makefile	2000/10/02 14:40:55	1.16
+++ Makefile	2000/12/05 21:34:09
@@ -7,6 +7,7 @@
 
 PORTNAME=	ocaml
 PORTVERSION=	3.00
+PORTREVISION=   1
 CATEGORIES=	lang
 MASTER_SITES=	ftp://ftp.inria.fr/lang/caml-light/ \
 		ftp://ftp.kurims.kyoto-u.ac.jp/pub/lang/caml-light/
@@ -17,7 +18,7 @@
 
 .if defined(WITH_TK)
 PLIST_SUB+=     LABLTK:=""
-LIB_DEPENDS=    tk82.1:${PORTSDIR}/x11-toolkits/tk82
+LIB_DEPENDS=    tk83.1:${PORTSDIR}/x11-toolkits/tk83
 .else
 PLIST_SUB+=     LABLTK:="@comment "
 .endif
@@ -38,10 +39,11 @@
 
 CONFIGURE_ARGS=	-prefix ${PREFIX} \
 		-x11include ${X11BASE}/include \
-		-x11lib ${X11BASE}/lib
+		-x11lib ${X11BASE}/lib \
+		-with-pthread
 
 .if defined(WITH_TK)
-CONFIGURE_ARGS+= -tkdefs "-I${PREFIX}/include/tcl8.2 -I${PREFIX}/include/tk8.2"
+CONFIGURE_ARGS+= -tkdefs "-I${PREFIX}/include/tcl8.3 -I${PREFIX}/include/tk8.3"
 .endif
 
 .if !defined(NOPORTDOCS)
Index: pkg-plist
===================================================================
RCS file: /usr/ncvs/ports/lang/ocaml/pkg-plist,v
retrieving revision 1.9
diff -u -r1.9 pkg-plist
--- pkg-plist	2000/08/13 12:21:21	1.9
+++ pkg-plist	2000/12/05 20:03:27
@@ -167,11 +167,18 @@
 lib/ocaml/libbigarray.a
 lib/ocaml/bigarray.mli
 lib/ocaml/bigarray.cmi
+lib/ocaml/threads/event.cmx
+lib/ocaml/threads/threads.cmxa
+lib/ocaml/threads/threadUnix.cmx
+lib/ocaml/threads/threads.a
+lib/ocaml/threads/condition.cmx
+lib/ocaml/threads/mutex.cmx
+lib/ocaml/threads/thread.cmx
+lib/ocaml/libthreadsnat.a
 lib/ocaml/libthreads.a
 lib/ocaml/threads/event.cmi
 lib/ocaml/threads/threads.cma
 lib/ocaml/threads/threadUnix.cmi
-lib/ocaml/threads/stdlib.cma
 lib/ocaml/threads/condition.cmi
 lib/ocaml/threads/mutex.cmi
 lib/ocaml/threads/thread.cmi
Index: files/patch-aa
===================================================================
RCS file: patch-aa
diff -N patch-aa
--- /dev/null	Tue Dec  5 16:40:00 2000
+++ patch-aa	Tue Dec  5 14:25:08 2000
@@ -0,0 +1,13 @@
+--- configure.orig	Tue Dec  5 14:14:47 2000
++++ configure	Tue Dec  5 14:19:49 2000
+@@ -744,6 +744,10 @@
+   nativecccompopts="$nativecccompopts -D_REENTRANT"
+   case "$host" in
+     *-*-solaris*) pthread_link="-cclib -lpthread -cclib -lposix4";;
++    *-*-freebsd*) pthread_link="-cclib -pthread"
++  		  bytecccompopts="$bytecccompopts -pthread"
++  		  nativecccompopts="$nativecccompopts -pthread"
++		;;
+                *) pthread_link="-cclib -lpthread";;
+   esac
+   echo "Options for linking with POSIX threads: $pthread_link"
Index: files/patch-ab
===================================================================
RCS file: patch-ab
diff -N patch-ab
--- /dev/null	Tue Dec  5 16:40:00 2000
+++ patch-ab	Tue Dec  5 16:06:20 2000
@@ -0,0 +1,11 @@
+--- otherlibs/systhreads/Makefile.orig	Tue Dec  5 16:05:30 2000
++++ otherlibs/systhreads/Makefile	Tue Dec  5 15:59:59 2000
+@@ -50,7 +50,7 @@
+ 
+ threads.cmxa: $(THREAD_OBJS:.cmo=.cmx)
+ 	$(CAMLOPT) -a -o threads.cmxa $(THREAD_OBJS:.cmo=.cmx) \
+-          -cclib -lthreads -cclib -lunix $(PTHREAD_LINK)
++          -cclib -lthreadsnat -cclib -lunix $(PTHREAD_LINK)
+ 
+ $(THREAD_OBJS:.cmo=.cmx): ../../ocamlopt
+ 

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200012052149.eB5Lnac97611>