aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
Diffstat (limited to 'lang')
-rw-r--r--lang/ocaml/Makefile21
-rw-r--r--lang/ocaml/pkg-plist18
2 files changed, 25 insertions, 14 deletions
diff --git a/lang/ocaml/Makefile b/lang/ocaml/Makefile
index faeaf2de255..0e7b2f15cfa 100644
--- a/lang/ocaml/Makefile
+++ b/lang/ocaml/Makefile
@@ -19,6 +19,13 @@ EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} \
MAINTAINER= patrick@watson.org
COMMENT= An ML language based on a complete class-based objective system
+.if defined(WITHOUT_X11)
+PLIST_SUB+= X11="@comment " TK="@comment "
+WITHOUT_TK= yes
+TKSFX= -nox11
+.else
+PLIST_SUB+= X11=""
+USE_XLIB= yes
.if defined(WITHOUT_TK)
PLIST_SUB+= TK="@comment "
TKSFX= -notk
@@ -28,8 +35,8 @@ BUILD_DEPENDS+= ${LOCALBASE}/include/tcl8.3:${PORTSDIR}/lang/tcl83
BUILD_DEPENDS+= ${LOCALBASE}/include/tk8.3:${PORTSDIR}/x11-toolkits/tk83
LIB_DEPENDS= tk83.1:${PORTSDIR}/x11-toolkits/tk83
.endif
+.endif
-USE_XLIB= yes
HAS_CONFIGURE= yes
ALL_TARGET= world.opt
@@ -67,14 +74,18 @@ MLINKS= ocamlc.1 ocamlc.opt.1 ocamlopt.1 ocamlopt.opt.1 \
camlp4.1 ocpp.1
CONFIGURE_ARGS= -prefix ${PREFIX} \
- -x11include ${X11BASE}/include \
- -x11lib ${X11BASE}/lib \
-with-pthread
+.if defined(WITHOUT_X11)
+CONFIGURE_ARGS+= -tk-no-x11 -no-tk
+.else
+CONFIGURE_ARGS+= -x11include ${X11BASE}/include \
+ -x11lib ${X11BASE}/lib
.if defined(WITHOUT_TK)
-CONFIGURE_ARGS+=-no-tk
+CONFIGURE_ARGS+= -no-tk
.else
-CONFIGURE_ARGS+=-tkdefs "-I${PREFIX}/include/tcl8.3 -I${PREFIX}/include/tk8.3"
+CONFIGURE_ARGS+= -tkdefs "-I${LOCALBASE}/include/tcl8.3 -I${LOCALBASE}/include/tk8.3"
+.endif
.endif
.if !defined(NOPORTDOCS)
diff --git a/lang/ocaml/pkg-plist b/lang/ocaml/pkg-plist
index b9be3c724dd..8b34727c93a 100644
--- a/lang/ocaml/pkg-plist
+++ b/lang/ocaml/pkg-plist
@@ -30,7 +30,7 @@ lib/ocaml/stublibs/dllstr.so
lib/ocaml/stublibs/dllnums.so
lib/ocaml/stublibs/dllbigarray.so
lib/ocaml/stublibs/dllthreads.so
-lib/ocaml/stublibs/dllgraphics.so
+%%X11%%lib/ocaml/stublibs/dllgraphics.so
lib/ocaml/stublibs/dllmldbm.so
%%TK%%lib/ocaml/stublibs/dlllabltk.so
%%TK%%lib/ocaml/stublibs/dlltkanim.so
@@ -239,12 +239,12 @@ lib/ocaml/event.mli
lib/ocaml/condition.mli
lib/ocaml/mutex.mli
lib/ocaml/thread.mli
-lib/ocaml/libgraphics.a
-lib/ocaml/graphicsX11.mli
-lib/ocaml/graphics.mli
-lib/ocaml/graphicsX11.cmi
-lib/ocaml/graphics.cmi
-lib/ocaml/graphics.cma
+%%X11%%lib/ocaml/libgraphics.a
+%%X11%%lib/ocaml/graphicsX11.mli
+%%X11%%lib/ocaml/graphics.mli
+%%X11%%lib/ocaml/graphicsX11.cmi
+%%X11%%lib/ocaml/graphics.cmi
+%%X11%%lib/ocaml/graphics.cma
lib/ocaml/libmldbm.a
lib/ocaml/dbm.mli
lib/ocaml/dbm.cmi
@@ -730,8 +730,8 @@ lib/ocaml/bigarray.cmxa
lib/ocaml/bigarray.cmx
lib/ocaml/bigarray.a
lib/ocaml/libthreadsnat.a
-lib/ocaml/graphics.a
-lib/ocaml/graphics.cmxa
+%%X11%%lib/ocaml/graphics.a
+%%X11%%lib/ocaml/graphics.cmxa
lib/ocaml/dbm.a
lib/ocaml/dbm.cmxa
lib/ocaml/dbm.cmx