aboutsummaryrefslogtreecommitdiffstats
path: root/devel/ml-doc
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2009-11-28 08:59:21 +0800
committermiwi <miwi@FreeBSD.org>2009-11-28 08:59:21 +0800
commit43b642bf45d045c9754f4d29a9d533a63c135d5f (patch)
tree8f2812b770399a57c527df13dca4dabbf8ee437f /devel/ml-doc
parent736989e0298820a96b919f8d5844634770e47ab8 (diff)
downloadfreebsd-ports-gnome-43b642bf45d045c9754f4d29a9d533a63c135d5f.tar.gz
freebsd-ports-gnome-43b642bf45d045c9754f4d29a9d533a63c135d5f.tar.zst
freebsd-ports-gnome-43b642bf45d045c9754f4d29a9d533a63c135d5f.zip
- Fix build after lang/sml-nj-devel update
Submitted by: Johannes 5 Joemann <joemann@beefree.free.de>
Diffstat (limited to 'devel/ml-doc')
-rw-r--r--devel/ml-doc/Makefile5
-rw-r--r--devel/ml-doc/files/fix-cml-doc.sh.in38
-rw-r--r--devel/ml-doc/files/ml-doc.1.in41
-rw-r--r--devel/ml-doc/files/patch-tools-lib-code_style-sml_token_scanner.sml36
4 files changed, 101 insertions, 19 deletions
diff --git a/devel/ml-doc/Makefile b/devel/ml-doc/Makefile
index b238e1bf70f6..48fd3898eea2 100644
--- a/devel/ml-doc/Makefile
+++ b/devel/ml-doc/Makefile
@@ -7,6 +7,7 @@
PORTNAME= ml-doc
PORTVERSION= 2.0
+PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= http://people.cs.uchicago.edu/~jhr/tools/downloads/ \
http://www.cse.unsw.edu.au/~tbourke/distfiles/
@@ -16,7 +17,7 @@ EXTRACT_SUFX= .tgz
MAINTAINER= timbob@bigpond.com
COMMENT= Language and tools for documenting Standard ML libraries
-BUILD_DEPENDS= smlnj-devel>=110.65:${PORTSDIR}/lang/sml-nj-devel \
+BUILD_DEPENDS= smlnj-devel>=110.71:${PORTSDIR}/lang/sml-nj-devel \
nsgmls:${PORTSDIR}/textproc/jade
RUN_DEPENDS= nsgmls:${PORTSDIR}/textproc/jade
@@ -25,7 +26,7 @@ CONFIGURE_ENV+= SMLNJ_DEVEL=yes
ALL_TARGET= build
MAKE_ENV+= DATADIR=${DATADIR} SMLNJ_DEVEL=yes
-SUB_FILES= ml-doc.1 mkdoc.1
+SUB_FILES= ml-doc.1 mkdoc.1 fix-cml-doc.sh
MAN1= ml-doc.1 mkdoc.1
MLINKS= ml-doc.1 extract-sig.1 ml-doc.1 extract-info.1 \
ml-doc.1 merge-info.1 ml-doc.1 html-gen.1 \
diff --git a/devel/ml-doc/files/fix-cml-doc.sh.in b/devel/ml-doc/files/fix-cml-doc.sh.in
new file mode 100644
index 000000000000..0ee742c533a5
--- /dev/null
+++ b/devel/ml-doc/files/fix-cml-doc.sh.in
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+# simple script to fix the sml-nj cml documentation
+# source so that it can be used as a test for ml-doc.
+
+DOCSRCDIR='%%PREFIX%%/smlnj/cml/doc'
+
+if [ ! -d "$DOCSRCDIR" ]
+then
+ echo "CML doc sources not found in directory $DOCSRCDIR"
+ echo "Install lang/sml-nj-devel with option WITH_EVERYTHING"
+ exit 1
+fi
+
+cp -r "$DOCSRCDIR" ./cml-doc
+cd cml-doc/
+
+sed -i .orig -e 's#/Users/jhr/Work/sml-basis/Basis/##' Config.cfg
+
+mkdir Info
+mkdir HTML
+
+mv ML-Doc/lib/* ML-Doc/
+rmdir ML-Doc/lib
+
+sed -i .orig -e 's#/Users/jhr/Work/Tools#%%PREFIX%%/share#' CATALOG
+
+sed -i .orig \
+ -e 's/STRID="CML"/STRID="RunCML"/' \
+ -e 's/SIGID="CML"/SIGID="RunCML"/' \
+ -e 's/FILE=CML-SIG/FILE=RUNCML-SIG/' \
+ ML-Doc/run-cml.mldoc
+
+echo '<!ENTITY RUNCML SDATA "RUNCML">' >> Entities.sgml
+echo '<!ENTITY RUNCML-SIG SDATA "run-cml-sig.sml">' >> Entities.sgml
+
+find ML-Doc -name '*.mldoc' -print | mk-mldoc-makefile
+make
diff --git a/devel/ml-doc/files/ml-doc.1.in b/devel/ml-doc/files/ml-doc.1.in
index 6740c658e75e..fb293bab3302 100644
--- a/devel/ml-doc/files/ml-doc.1.in
+++ b/devel/ml-doc/files/ml-doc.1.in
@@ -117,12 +117,12 @@
.Op Fl root Ar file
.Ar mldoc-files
.Sh DESCRIPTION
-.ML-Doc
+ML-Doc
is a system for producing reference manuals for SML libraries. It can
produce high quality documentation with extensive indexing, like the
published SML Basis Library reference manual, and also HTML for online use.
.Pp
-.ML-Doc
+ML-Doc
is different to systems like javadoc that extract documentation from source
files.
Rather, the documentation
@@ -132,14 +132,14 @@ the primary artifact\(emin fact
can be used to create source files from documentation. The
.Xr mkdoc 1
utility, however, can produce first drafts from source files.
-.ML-Doc
+ML-Doc
is most useful for documenting stable library interfaces.
.Pp
-.ML-Doc
+ML-Doc
files, marked by the extension
.Pa .mldoc ,
are SGML documents conforming to the
-.ML-Doc
+ML-Doc
document type definition.
.Pp
This manual has four major sections besides the present one:
@@ -431,7 +431,7 @@ extension.
.\"
.Ss Directory structure
An
-.ML-Doc
+ML-Doc
.Em project
comprises a set of files and directories that, at a minimum, will include:
.Bl -tag -width ".Pa index.template"
@@ -440,7 +440,7 @@ comprises a set of files and directories that, at a minimum, will include:
Typically links to
.Pa Entities.sgml
in the same directory and the installed
-.ML-Doc
+ML-Doc
.Pa CATALOG
file.
See
@@ -608,7 +608,7 @@ URL of the table of contents
.\"
.Ss Entities
Entities are used within
-.ML-Doc
+ML-Doc
to include mathematical and other
specialised symbols, to abbreviate titles and other text, to reference
files, and to name certain output files.
@@ -643,7 +643,7 @@ files:
.D1 This feature requires the &SMLNJ; libraries.
.Pp
Documentation will sometimes need to reference the
-.ML-Doc
+ML-Doc
descriptions of other libraries; such as those of the SML Basis, SML/NJ, or
Concurrent ML.
The reference tags described under
@@ -691,7 +691,7 @@ This example refers to a master info file installed with SML/NJ and directs
hyperlinks to the online documentation.
.Pp
Entities are also used within
-.ML-Doc
+ML-Doc
to specify values for the
.Li FILE
attribute, which specifies an input file for the
@@ -713,7 +713,7 @@ would be extracted to a file named
.\"
.Ss General Use
A simplified sequence of steps for creating
-.ML-Doc
+ML-Doc
documentation:
.Bl -enum
.\" **
@@ -807,7 +807,7 @@ This section essentially elaborates on the
.Pa ml-doc.dtd
file.
An
-.ML-Doc
+ML-Doc
file begins with the declaration:
.Dl <!DOCTYPE ML-DOC SYSTEM>
and contains header elements followed by one or more, potentially nested,
@@ -928,7 +928,7 @@ A corresponding
file, for HTML output, and/or
.Pa *.tex
file, for LaTeX output, is generated for each
-.ML-Doc
+ML-Doc
source file.
A complete document is constructed by including, with
.Li INCLFILE
@@ -1859,7 +1859,7 @@ Displays, 19\(em25
.\" ----------------------------------------
.Sh SGML vs HTML/XML
Although the basics of editing
-.ML-Doc
+ML-Doc
will be familiar to most authors of HTML and XML, SGML has some peculiarities
that are designed to make editing
.Sq by hand
@@ -1899,7 +1899,7 @@ These details are well described in Chapter 9 of
.\" ----------------------------------------
.Sh FILES
System-wide
-.ML-Doc
+ML-Doc
files and directories are stored at:
.Dl %%PREFIX%%/share/ml-doc
Notably:
@@ -1908,7 +1908,7 @@ Notably:
Master catalog file.
.It Pa lib/ml-doc.dtd
DTD of
-.ML-Doc
+ML-Doc
language.
.It Pa lib/entities.sgml
Entity definitions
@@ -1923,7 +1923,14 @@ After creating the directory structure
.Pq see Sx Directory Structure ,
and writing up the ML-Doc files
.Pq see Sx WRITING DOCUMENTATION ,
-create a
+first edit the
+.Pa CATALOG
+file:
+.Bd -literal -offset indent -compact
+ENTITY %document-entities "Entities.sgml"
+CATALOG "%%PREFIX%%/share/ml-doc/lib/catalog"
+.Ed
+Then, create a
.Pa Makefile :
.Dl find ML-Doc -name '*.mldoc' -print | mk-mldoc-makefile
.Pp
diff --git a/devel/ml-doc/files/patch-tools-lib-code_style-sml_token_scanner.sml b/devel/ml-doc/files/patch-tools-lib-code_style-sml_token_scanner.sml
new file mode 100644
index 000000000000..563426651394
--- /dev/null
+++ b/devel/ml-doc/files/patch-tools-lib-code_style-sml_token_scanner.sml
@@ -0,0 +1,36 @@
+--- tools/lib/code-style/sml-token-scanner.sml.orig 2006-11-27 23:41:58.000000000 +0100
++++ tools/lib/code-style/sml-token-scanner.sml 2009-09-24 00:05:48.000000000 +0200
+@@ -37,20 +37,20 @@
+
+ val comElem : E.element option = SOME E.IT
+
+- fun startCom (M.Match(SOME{pos as {comLevel, data}, len}, _)) =
++ fun startCom (M.Match({pos as {comLevel, data}, len}, _)) =
+ (comElem, prefix(len, pos), {comLevel=comLevel+1, data=SS.triml len data})
+
+- fun endCom (M.Match(SOME{pos as {comLevel, data}, len}, _)) =
++ fun endCom (M.Match({pos as {comLevel, data}, len}, _)) =
+ (comElem, prefix(len, pos), {comLevel=comLevel-1, data=SS.triml len data})
+
+- fun ident (M.Match(SOME{pos, len}, _)) = let
++ fun ident (M.Match({pos, len}, _)) = let
+ val txt = prefix(len, pos)
+ val kind = if SMLKeywords.isKW txt then SOME E.KW else NONE
+ in
+ (kind, txt, trim(len, pos))
+ end
+
+- fun mkToken (kind : E.element option) (M.Match(SOME{pos, len}, _)) =
++ fun mkToken (kind : E.element option) (M.Match({pos, len}, _)) =
+ (kind, prefix(len, pos), trim(len, pos))
+
+ val tyvar = mkToken NONE
+@@ -60,7 +60,7 @@
+ val entity = mkToken NONE
+
+ (* string gets called after we have seen either #" or " *)
+- fun string (M.Match(SOME{pos, len}, _)) = let
++ fun string (M.Match({pos, len}, _)) = let
+ fun getS (ss, n) = (case SS.getc ss
+ of NONE => raise Fail "unclosed string"
+ | SOME(#"\\", ss') => getS'(ss', n+1)