summaryrefslogtreecommitdiff
path: root/lang/ocaml
diff options
context:
space:
mode:
authorhubertf <hubertf@pkgsrc.org>2003-05-22 23:58:21 +0000
committerhubertf <hubertf@pkgsrc.org>2003-05-22 23:58:21 +0000
commit6bff168050f12550ad5a0ed4956dada353e32e86 (patch)
treeb85d4ebe9134c42a44f46d38cce78104f3db0b32 /lang/ocaml
parent4e23f0c7e5d590f6ace55e73d24438df908dd552 (diff)
downloadpkgsrc-6bff168050f12550ad5a0ed4956dada353e32e86.tar.gz
Add support for native threads, per PR 20526.
Test-compiled on 1.6.1 and -current.
Diffstat (limited to 'lang/ocaml')
-rw-r--r--lang/ocaml/Makefile17
-rw-r--r--lang/ocaml/PLIST8
-rw-r--r--lang/ocaml/PLIST.common_end2
-rw-r--r--lang/ocaml/PLIST.threads8
4 files changed, 28 insertions, 7 deletions
diff --git a/lang/ocaml/Makefile b/lang/ocaml/Makefile
index 99a7ed95160..52a44df24e3 100644
--- a/lang/ocaml/Makefile
+++ b/lang/ocaml/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.15 2003/05/14 23:11:32 seb Exp $
+# $NetBSD: Makefile,v 1.16 2003/05/22 23:58:21 hubertf Exp $
#
DISTNAME= ocaml-3.06
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= lang
MASTER_SITES= ftp://ftp.inria.fr/INRIA/cristal/ocaml/${DISTNAME}/
@@ -38,4 +38,17 @@ post-build:
PLIST_SRC= ${PKGDIR}/PLIST.opt ${PKGDIR}/PLIST
.endif
+PTHREAD_OPTS+= native
+.include "../../mk/pthread.buildlink2.mk"
+
+.if defined(PTHREAD_TYPE) && (${PTHREAD_TYPE} != "none")
+CONFIGURE_ARGS+= -with-pthread
+PLIST_SRC+= ${PKGDIR}/PLIST.threads
+PLIST_SUBST+= NATIVE_THREADS="@comment "
+.else
+PLIST_SUBST+= NATIVE_THREADS=
+.endif
+
+PLIST_SRC+= ${PKGDIR}/PLIST.common_end
+
.include "../../mk/bsd.pkg.mk"
diff --git a/lang/ocaml/PLIST b/lang/ocaml/PLIST
index c089d3c1afb..21bf8c56397 100644
--- a/lang/ocaml/PLIST
+++ b/lang/ocaml/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.4 2002/08/22 02:56:51 jschauma Exp $
+@comment $NetBSD: PLIST,v 1.5 2003/05/22 23:58:21 hubertf Exp $
bin/camlp4
bin/camlp4o
bin/camlp4r
@@ -548,11 +548,11 @@ lib/ocaml/threadUnix.mli
lib/ocaml/threads/condition.cmi
lib/ocaml/threads/event.cmi
lib/ocaml/threads/mutex.cmi
-lib/ocaml/threads/stdlib.cma
+${NATIVE_THREADS}lib/ocaml/threads/stdlib.cma
lib/ocaml/threads/thread.cmi
lib/ocaml/threads/threadUnix.cmi
lib/ocaml/threads/threads.cma
-lib/ocaml/threads/unix.cma
+${NATIVE_THREADS}lib/ocaml/threads/unix.cma
lib/ocaml/topdirs.cmi
lib/ocaml/toplevellib.cma
lib/ocaml/toploop.cmi
@@ -666,11 +666,9 @@ man/mano/Weak.Make.o
man/mano/Weak.S.o
man/mano/Weak.o
@dirrm man/mano
-@dirrm lib/ocaml/threads
@exec ${MKDIR} %D/lib/ocaml/stublibs
@dirrm lib/ocaml/stublibs
@dirrm lib/ocaml/ocamldoc
@dirrm lib/ocaml/labltk
@dirrm lib/ocaml/camlp4
@dirrm lib/ocaml/caml
-@dirrm lib/ocaml
diff --git a/lang/ocaml/PLIST.common_end b/lang/ocaml/PLIST.common_end
new file mode 100644
index 00000000000..e5b7c379d1e
--- /dev/null
+++ b/lang/ocaml/PLIST.common_end
@@ -0,0 +1,2 @@
+@dirrm lib/ocaml/threads
+@dirrm lib/ocaml
diff --git a/lang/ocaml/PLIST.threads b/lang/ocaml/PLIST.threads
new file mode 100644
index 00000000000..5884c54c1df
--- /dev/null
+++ b/lang/ocaml/PLIST.threads
@@ -0,0 +1,8 @@
+lib/ocaml/libthreadsnat.a
+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