From c10edbe21899aba35c0dd47dd293a8496a30b612 Mon Sep 17 00:00:00 2001 From: "James E. Housley" Date: Sat, 17 Feb 2001 23:01:11 +0000 Subject: 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 PR: 23305 Submitted by: Alexander N. Kabaev Submitted by: Patrick M Doane --- lang/ocaml/Makefile | 10 ++++++---- lang/ocaml/files/patch-aa | 13 +++++++++++++ lang/ocaml/files/patch-ab | 10 ++++++++++ lang/ocaml/pkg-plist | 9 ++++++++- 4 files changed, 37 insertions(+), 5 deletions(-) create mode 100644 lang/ocaml/files/patch-aa create mode 100644 lang/ocaml/files/patch-ab (limited to 'lang') diff --git a/lang/ocaml/Makefile b/lang/ocaml/Makefile index b6386ee587b9..2a59f84759a2 100644 --- a/lang/ocaml/Makefile +++ b/lang/ocaml/Makefile @@ -7,17 +7,18 @@ 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/ -DISTFILES= ${PKGNAME}.tar.gz ${DOCFILES} +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${DOCFILES} EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} ${DISTNAME}-refman.html${EXTRACT_SUFX} MAINTAINER= patrick@watson.org .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 @@ MAN1= ocaml.1 ocamlc.1 ocamlcp.1 ocamldep.1 ocamllex.1 \ 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) diff --git a/lang/ocaml/files/patch-aa b/lang/ocaml/files/patch-aa new file mode 100644 index 000000000000..a1b5761dcba1 --- /dev/null +++ b/lang/ocaml/files/patch-aa @@ -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" diff --git a/lang/ocaml/files/patch-ab b/lang/ocaml/files/patch-ab new file mode 100644 index 000000000000..0da08d4bf523 --- /dev/null +++ b/lang/ocaml/files/patch-ab @@ -0,0 +1,10 @@ +--- otherlibs/systhreads/Makefile.orig Sat Feb 17 10:02:56 2001 ++++ otherlibs/systhreads/Makefile Sat Feb 17 10:06:16 2001 +@@ -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 diff --git a/lang/ocaml/pkg-plist b/lang/ocaml/pkg-plist index c94d7fcbd52a..68ac4eaa3f79 100644 --- a/lang/ocaml/pkg-plist +++ b/lang/ocaml/pkg-plist @@ -167,11 +167,18 @@ lib/ocaml/bigarray.cma 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 -- cgit v1.2.3