Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Jun 2003 23:19:55 +0400 (MSD)
From:      "Lev A. Serbryakov" <lev@serebryakov.spb.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/53289: Add WITHOUT_X11 knob to `lang/ocaml'
Message-ID:  <200306131919.h5DJJtN3010287@ftp.translate.ru>
Resent-Message-ID: <200306131920.h5DJKBsw095189@freefall.freebsd.org>

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

>Number:         53289
>Category:       ports
>Synopsis:       Add WITHOUT_X11 knob to `lang/ocaml'
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 13 12:20:10 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Lev A. Serbryakov <lev@serebryakov.spb.ru>
>Release:        FreeBSD 4.8-STABLE i386
>Organization:
>Environment:
System: FreeBSD ftp.translate.ru 4.8-STABLE FreeBSD 4.8-STABLE #0: Fri Apr 11 00:25:30 MSD 2003 lev@ftp.translate.ru:/usr/obj/usr/src/sys/FTPTR i386
Ports collection: 13 Jun 2003

>Description:
  
  OCAML compiler & framework `lang/ocaml' could be compiled without Tk
from ports. But it requires X11 (XLIB) in any case now. It is not good
in some cases, and `ocaml' could be compiled withou X11 easily.
  This PR adds `WITHOUT_X11' knob to `lang/ocaml' Makefile.
  

>How-To-Repeat:

>Fix:

diff -ruN ocaml.orig/Makefile ocaml/Makefile
--- ocaml.orig/Makefile	Fri Feb 21 15:35:05 2003
+++ ocaml/Makefile	Wed Jun 11 19:20:58 2003
@@ -19,9 +19,20 @@
 MAINTAINER=	patrick@watson.org
 COMMENT=	An ML language based on a complete class-based objective system
 
+.if defined(WITHOUT_X11)
+PLIST_SUB+=	X11="@comment "
+WITHOUT_TK=	yes
+TKSFX=		-nox11
+.else
+PLIST_SUB+=	X11=""
+USE_XLIB=       yes
+.endif
+
 .if defined(WITHOUT_TK)
 PLIST_SUB+=	TK="@comment "
+.if !defined(WITHOUT_X11)
 TKSFX=		-notk
+.endif
 .else
 PLIST_SUB+=	TK=""
 BUILD_DEPENDS+=	${LOCALBASE}/include/tcl8.3:${PORTSDIR}/lang/tcl83
@@ -29,7 +40,6 @@
 LIB_DEPENDS=	tk83.1:${PORTSDIR}/x11-toolkits/tk83
 .endif
 
-USE_XLIB=	yes
 HAS_CONFIGURE=	yes
 ALL_TARGET=	world.opt
 
@@ -67,14 +77,18 @@
 		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"
+.endif
 .endif
 
 .if !defined(NOPORTDOCS)
diff -ruN ocaml.orig/pkg-plist ocaml/pkg-plist
--- ocaml.orig/pkg-plist	Wed Aug 21 06:14:30 2002
+++ ocaml/pkg-plist	Wed Jun 11 19:20:37 2003
@@ -30,7 +30,7 @@
 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/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.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
>Release-Note:
>Audit-Trail:
>Unformatted:



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