[49280] trunk/dports/lang/pure-devel

ryandesign at macports.org ryandesign at macports.org
Mon Apr 6 06:36:43 PDT 2009


Revision: 49280
          http://trac.macports.org/changeset/49280
Author:   ryandesign at macports.org
Date:     2009-04-06 06:36:42 -0700 (Mon, 06 Apr 2009)
Log Message:
-----------
pure-devel: 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-devel/Portfile

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

Modified: trunk/dports/lang/pure-devel/Portfile
===================================================================
--- trunk/dports/lang/pure-devel/Portfile	2009-04-06 13:30:02 UTC (rev 49279)
+++ trunk/dports/lang/pure-devel/Portfile	2009-04-06 13:36:42 UTC (rev 49280)
@@ -4,6 +4,7 @@
 
 name                    pure-devel
 version                 0.20.0.r1269
+revision                1
 set branch              [join [lrange [split ${version} .] 0 1] .]
 categories              lang
 platforms               darwin
@@ -44,12 +45,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]

Copied: trunk/dports/lang/pure-devel/files/patch-openbrowser.diff (from rev 49276, trunk/dports/lang/pure/files/patch-openbrowser.diff)
===================================================================
--- trunk/dports/lang/pure-devel/files/patch-openbrowser.diff	                        (rev 0)
+++ trunk/dports/lang/pure-devel/files/patch-openbrowser.diff	2009-04-06 13:36:42 UTC (rev 49280)
@@ -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.ll	2009-03-14 15:43:08.000000000 -0500
++++ lexer.ll	2009-04-03 02:49:45.000000000 -0500
+@@ -903,7 +903,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/aced8955/attachment-0001.html>


More information about the macports-changes mailing list