diff --git a/textproc/htmlc/Makefile b/textproc/htmlc/Makefile
index 1fb60712a09e..8f9e848a13f9 100644
--- a/textproc/htmlc/Makefile
+++ b/textproc/htmlc/Makefile
@@ -1,48 +1,47 @@
# Created by: Timothy Beyer
PORTNAME= htmlc
PORTVERSION= 2.21.0
CATEGORIES= textproc
MASTER_SITES= http://htmlc.inria.fr/ \
http://caml.inria.fr/distrib/bazar-ocaml/htmlc/
MAINTAINER= beyert@cs.ucr.edu
COMMENT= Text file generator
BUILD_DEPENDS= ocamlc:lang/ocaml
USES= gmake tar:tgz
+HAS_CONFIGURE= yes
+CONFIGURE_ARGS= --prefix ${LOCALBASE}
PLIST_FILES= bin/htmlc bin/htmlc.byt share/htmlc/env
PORTDOCS= LICENSE INSTALL README JoeCaml.gif rocq.gif copyright-eng.htm \
copyright-fra.htm eng.htm fra.htm index.htm
-HAS_CONFIGURE= yes
-CONFIGURE_ARGS= --prefix ${LOCALBASE}
-
OPTIONS_DEFINE= DOCS
post-patch:
${RM} ${WRKSRC}/doc/Makefile
${TOUCH} ${WRKSRC}/doc/Makefile
${ECHO} "all:" > ${WRKSRC}/doc/Makefile
${REINPLACE_CMD} 's|-warn-error A||g' ${WRKSRC}/config/Makefile
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/compiler/htmlc ${STAGEDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/compiler/htmlc.byt ${STAGEDIR}${PREFIX}/bin
@${MKDIR} ${STAGEDIR}${DATADIR}
${INSTALL_DATA} ${WRKSRC}/config/env ${STAGEDIR}${DATADIR}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/LICENSE ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/INSTALL ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/README ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/JoeCaml.gif ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/rocq.gif ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/copyright-eng.htm ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/copyright-fra.htm ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/eng.htm ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/fra.htm ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/index.htm ${STAGEDIR}${DOCSDIR}
.include
diff --git a/textproc/htmlc/files/patch-immutable-strings b/textproc/htmlc/files/patch-immutable-strings
new file mode 100644
index 000000000000..70f2ba5392b6
--- /dev/null
+++ b/textproc/htmlc/files/patch-immutable-strings
@@ -0,0 +1,66 @@
+--- compiler/execute.ml.orig 2009-02-19 20:28:11 UTC
++++ compiler/execute.ml
+@@ -18,11 +18,11 @@
+
+ let htmlc_command htmlc_add_string src_name ob command_name =
+ let ic = Unix.open_process_in command_name in
+- let ib = String.create Configuration.line_buffer_length in
++ let ib = Bytes.create Configuration.line_buffer_length in
+ let status =
+ let rec loop () =
+ let n = input ic ib 0 Configuration.line_buffer_length in
+- if n > 0 then (htmlc_add_string ob (String.sub ib 0 n); loop ())
++ if n > 0 then (htmlc_add_string ob (Bytes.sub_string ib 0 n); loop ())
+ else raise End_of_file in
+ try loop () with
+ | End_of_file ->
+--- compiler/htmlc.ml.orig 2009-08-13 14:27:53 UTC
++++ compiler/htmlc.ml
+@@ -236,11 +236,11 @@ let decimal_to_hexa i =
+ ;;
+
+ let hexa_char c =
+- let s = String.make 3 '%'
++ let s = Bytes.make 3 '%'
+ and i = int_of_char c in
+ s.[1] <- decimal_to_hexa (i / 16);
+ s.[2] <- decimal_to_hexa (i mod 16);
+- s
++ Bytes.to_string s
+ ;;
+
+ let url_encode ob s =
+--- compiler/lib_strings.ml.orig 2008-11-05 10:42:35 UTC
++++ compiler/lib_strings.ml
+@@ -95,25 +95,25 @@ let center_gen c s len_in =
+ let len_s = String.length s in
+ if len_in < len_s then not_enough_room "center" len_s len_in else
+ let idx = (len_in - len_s) / 2 in
+- let b = String.make len_in c in
++ let b = Bytes.make len_in c in
+ String.blit s 0 b idx len_s;
+- b;;
++ Bytes.to_string b;;
+ let center s len_in = center_gen ' ' s len_in;;
+
+ let flush_left_gen c s len_in =
+ let len_s = String.length s in
+ if len_in < len_s then not_enough_room "flush_left" len_s len_in else
+ let idx = 0 in
+- let b = String.make len_in c in
++ let b = Bytes.make len_in c in
+ String.blit s 0 b idx len_s;
+- b;;
++ Bytes.to_string b;;
+ let flush_left s len_in = flush_left_gen ' ' s len_in;;
+
+ let flush_right_gen c s len_in =
+ let len_s = String.length s in
+ if len_in < len_s then not_enough_room "flush_right" len_s len_in else
+ let idx = len_in - len_s in
+- let b = String.make len_in c in
++ let b = Bytes.make len_in c in
+ String.blit s 0 b idx len_s;
+- b;;
++ Bytes.to_string b;;
+ let flush_right s len_in = flush_right_gen ' ' s len_in;;