[49276] trunk/dports/lang/pure

ryandesign at macports.org ryandesign at macports.org
Mon Apr 6 06:20:09 PDT 2009


Revision: 49276
          http://trac.macports.org/changeset/49276
Author:   ryandesign at macports.org
Date:     2009-04-06 06:20:08 -0700 (Mon, 06 Apr 2009)
Log Message:
-----------
pure: open help into the selected Mac OS X web browser, or the w3m command line web browser for other OSes.

Modified Paths:
--------------
    trunk/dports/lang/pure/Portfile

Added Paths:
-----------
    trunk/dports/lang/pure/files/patch-openbrowser.diff

Modified: trunk/dports/lang/pure/Portfile
===================================================================
--- trunk/dports/lang/pure/Portfile	2009-04-06 12:52:43 UTC (rev 49275)
+++ trunk/dports/lang/pure/Portfile	2009-04-06 13:20:08 UTC (rev 49276)
@@ -4,6 +4,7 @@
 
 name                    pure
 version                 0.20
+revision                1
 set branch              [join [lrange [split ${version} .] 0 1] .]
 categories              lang
 platforms               darwin
@@ -39,12 +40,21 @@
     port:libtool \
     port:readline
 
+depends_run \
+    path:bin/w3m:w3m
+
 patchfiles \
     patch-Makefile.in.diff
 
 configure.args \
     --enable-gsl
 
+platform macosx {
+    depends_run-delete  path:bin/w3m:w3m
+    depends_run-append  path:bin/openbrowser:openbrowser
+    patchfiles-append   patch-openbrowser.diff
+}
+
 pre-extract {
     set llvm_minimum_version 2.4
     set llvm_installed_version [exec llvm-config --version]

Added: trunk/dports/lang/pure/files/patch-openbrowser.diff
===================================================================
--- trunk/dports/lang/pure/files/patch-openbrowser.diff	                        (rev 0)
+++ trunk/dports/lang/pure/files/patch-openbrowser.diff	2009-04-06 13:20:08 UTC (rev 49276)
@@ -0,0 +1,91 @@
+--- README	2009-03-14 08:58:13.000000000 -0500
++++ README	2009-04-03 02:48:56.000000000 -0500
+@@ -82,9 +82,10 @@
+ how to use the interpreter and a description of the Pure language. You can
+ invoke the manpage with 'man pure' after installation, and the online manual
+ by using the 'help' command inside the interpreter. The former needs the 'man'
+-program, the latter a html browser, w3m by default. See the INSTALL file or
+-the manpage for details. Or just point your browser at the following URL to
+-read the manual on the web: http://pure-lang.googlecode.com/svn/docs/pure.html
++program, the latter a html browser, your Mac OS X web browser by default. See
++the INSTALL file or the manpage for details. Or just point your browser at the
++following URL to read the manual on the web:
++http://pure-lang.googlecode.com/svn/docs/pure.html
+ 
+ Some example programs can be found in the examples subdir in the sources; in
+ particular, have a look at the hello.pure program which will quickly give you
+--- lexer.cc	2009-03-14 15:43:25.000000000 -0500
++++ lexer.cc	2009-04-03 02:49:50.000000000 -0500
+@@ -4800,7 +4800,7 @@
+       docname.erase(docname.length()-1);
+     // invoke the browser
+     const char *browser = getenv("PURE_HELP");
+-    if (!browser) browser = "w3m"; // default
++    if (!browser) browser = "openbrowser"; // default
+     string helpcmd = string(browser) + " " + docname;
+     system(helpcmd.c_str());
+   } else if (strcmp(cmd, "ls") == 0)  {
+--- pure.1	2009-03-01 15:09:12.000000000 -0600
++++ pure.1	2009-04-03 02:55:30.000000000 -0500
+@@ -62,9 +62,9 @@
+ .PP
+ The full version of this manual can be read inside the interpreter, by typing
+ .B help
+-on the interpreter's command line. This requires
+-.BR w3m (1)
+-to work. (You can also set the name of another html browser to use with the
++on the interpreter's command line.
++This opens the documentation into your Mac OS X web browser.
++(You can also set the name of another html browser to use with the
+ .B PURE_HELP
+ environment variable.)
+ .SH FILES
+@@ -91,7 +91,7 @@
+ .TP
+ .B PURE_HELP
+ Browser to use to read online documentation in the interpreter. By default,
+-.BR w3m (1)
++.BR openbrowser (1)
+ is used.
+ .TP
+ .B PURE_INCLUDE
+--- pure.html	2009-03-18 08:46:57.000000000 -0500
++++ pure.html	2009-04-03 02:56:35.000000000 -0500
+@@ -485,7 +485,7 @@
+ time.</dd>
+ <dt>PURE_HELP</dt>
+ <dd>Command used to browse the Pure manual. This must be a browser capable of
+-displaying html files. Default is w3m(1).</dd>
++displaying html files. Default is your Mac OS X web browser.</dd>
+ <dt>PURE_INCLUDE</dt>
+ <dd>Additional directories (in colon-separated format) to be searched for
+ included scripts.</dd>
+@@ -2521,7 +2521,7 @@
+ <h2><a class="toc-backref" href="#id30" id="online-help" name="online-help">12.1&nbsp;&nbsp;&nbsp;Online Help</a></h2>
+ <p>Online help is available in the interpreter with the interactive <tt class="docutils literal"><span class="pre">help</span></tt>
+ command, see <a class="reference" href="#interactive-commands">Interactive Commands</a> below. You need to have a html browser
+-installed for that. By default, the <tt class="docutils literal"><span class="pre">help</span></tt> command uses w3m(1), but you can
++installed for that. By default, the <tt class="docutils literal"><span class="pre">help</span></tt> command uses openbrowser(1), but you can
+ change this by setting the PURE_HELP environment variable accordingly.</p>
+ <p>When invoked without arguments, the <tt class="docutils literal"><span class="pre">help</span></tt> command displays this manual:</p>
+ <pre class="literal-block">
+--- pure.txt	2009-03-18 08:46:25.000000000 -0500
++++ pure.txt	2009-04-03 02:56:55.000000000 -0500
+@@ -128,7 +128,7 @@
+ 
+ PURE_HELP
+     Command used to browse the Pure manual. This must be a browser capable of
+-    displaying html files. Default is w3m(1).
++    displaying html files. Default is your Mac OS X web browser.
+ 
+ PURE_INCLUDE
+     Additional directories (in colon-separated format) to be searched for
+@@ -2290,7 +2290,7 @@
+ 
+ Online help is available in the interpreter with the interactive ``help``
+ command, see `Interactive Commands`_ below. You need to have a html browser
+-installed for that. By default, the ``help`` command uses w3m(1), but you can
++installed for that. By default, the ``help`` command uses openbrowser(1), but you can
+ change this by setting the PURE_HELP environment variable accordingly.
+ 
+ When invoked without arguments, the ``help`` command displays this manual::
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090406/bfe8e946/attachment.html>


More information about the macports-changes mailing list