[46127] trunk/dports/net/wget

ryandesign at macports.org ryandesign at macports.org
Thu Jan 29 16:27:25 PST 2009


Revision: 46127
          http://trac.macports.org/changeset/46127
Author:   ryandesign at macports.org
Date:     2009-01-29 16:27:24 -0800 (Thu, 29 Jan 2009)
Log Message:
-----------
wget:

 * Install the wgetrc config file as a sample so we don't clobber a user's real config file; also, tell the user about this file (#18271)
 * Change /usr/local to ${prefix} in documentation files (#18269)
 * Just call the main ChangeLog "ChangeLog.txt" so it stands out.

Modified Paths:
--------------
    trunk/dports/net/wget/Portfile

Added Paths:
-----------
    trunk/dports/net/wget/files/
    trunk/dports/net/wget/files/patch-prefix.diff

Modified: trunk/dports/net/wget/Portfile
===================================================================
--- trunk/dports/net/wget/Portfile	2009-01-30 00:07:54 UTC (rev 46126)
+++ trunk/dports/net/wget/Portfile	2009-01-30 00:27:24 UTC (rev 46127)
@@ -4,6 +4,7 @@
 
 name                    wget
 version                 1.11.4
+revision                1
 categories              net www
 maintainers             ryandesign
 homepage                http://www.gnu.org/software/wget/
@@ -42,14 +43,39 @@
     configure.args-delete   --with-libssl-prefix=${prefix}
 }
 
+patchfiles \
+    patch-prefix.diff
+
+post-patch {
+    reinplace "s|@PREFIX@|${prefix}|g" \
+        ${worksrcpath}/README \
+        ${worksrcpath}/NEWS \
+        ${worksrcpath}/doc/sample.wgetrc \
+        ${worksrcpath}/doc/wget.1 \
+        ${worksrcpath}/doc/wget.info \
+        ${worksrcpath}/doc/wget.pod \
+        ${worksrcpath}/doc/wget.texi
+}
+
 post-destroot {
+    # Install documentation.
     set docdir ${destroot}${prefix}/share/doc/${name}-${version}
     xinstall -d ${docdir}
     foreach docfile {AUTHORS COPYING NEWS README} {
         xinstall -W ${worksrcpath} -m 0644 ${docfile} ${docdir}/${docfile}.txt
     }
-    xinstall -W ${worksrcpath} -m 0644 ChangeLog ${docdir}/ChangeLog-main.txt
+    xinstall -W ${worksrcpath} -m 0644 ChangeLog ${docdir}/ChangeLog.txt
     foreach changelog {doc src} {
         xinstall -W ${worksrcpath} -m 0644 ${changelog}/ChangeLog ${docdir}/ChangeLog-${changelog}.txt
     }
+    
+    # Rename sample wgetrc file so we don't clobber a user's real config file on upgrade.
+    move ${destroot}${prefix}/etc/wgetrc ${destroot}${prefix}/etc/wgetrc.sample
 }
+
+post-activate {
+    if {![file exists ${prefix}/etc/wgetrc]} {
+        ui_msg "To customize wget, you can copy wgetrc.sample to wgetrc"
+        ui_msg "in ${prefix}/etc and then make changes."
+    }
+}

Added: trunk/dports/net/wget/files/patch-prefix.diff
===================================================================
--- trunk/dports/net/wget/files/patch-prefix.diff	                        (rev 0)
+++ trunk/dports/net/wget/files/patch-prefix.diff	2009-01-30 00:27:24 UTC (rev 46127)
@@ -0,0 +1,165 @@
+--- ChangeLog	2008-06-29 20:51:14.000000000 -0500
++++ ChangeLog	2009-01-29 17:40:44.000000000 -0600
+@@ -797,7 +797,7 @@
+ 
+ 	* aclocal.m4 (WGET_WITH_NLS): First check for gettext in libintl,
+ 	then use the libc version.  That way systems that get libintl.h
+-	from /usr/local/include will get the matching gettext.
++	from @PREFIX@/include will get the matching gettext.
+ 
+ 2003-10-10  Hrvoje Niksic  <hniksic at xemacs.org>
+ 
+--- NEWS	2008-06-29 20:39:00.000000000 -0500
++++ NEWS	2009-01-29 17:40:44.000000000 -0600
+@@ -508,7 +508,7 @@
+ 
+ ** Compiles on pre-ANSI compilers.
+ 
+-** Global wgetrc now goes to /usr/local/etc (i.e. $sysconfdir).
++** Global wgetrc now goes to @PREFIX@/etc (i.e. $sysconfdir).
+ 
+ ** Lots of bugfixes.
+ 
+@@ -571,9 +571,8 @@
+ ** Fixed a long-standing bug, so that Wget now works over SLIP
+ connections.
+ 
+-** You can have a system-wide wgetrc (/usr/local/lib/wgetrc by
+-default). Settings in $HOME/.wgetrc override the global ones, of
+-course :-)
++** You can have a system-wide wgetrc (@PREFIX@/lib/wgetrc). Settings
++in $HOME/.wgetrc override the global ones, of course :-)
+ 
+ ** You can set up quota in .wgetrc to prevent sucking too much
+ data. Try `quota = 5M' in .wgetrc (or quota = 100K if you want your
+--- README	2008-04-26 23:48:19.000000000 -0500
++++ README	2009-01-29 17:40:44.000000000 -0600
+@@ -33,8 +33,7 @@
+ 
+ Most of the features are configurable, either through command-line
+ options, or via initialization file .wgetrc.  Wget allows you to
+-install a global startup file (/usr/local/etc/wgetrc by default) for
+-site settings.
++install a global startup file (@PREFIX@/etc/wgetrc) for site settings.
+ 
+ Wget works under almost all Unix variants in use today and, unlike
+ many of its historical predecessors, is written entirely in C, thus
+--- doc/sample.wgetrc	2008-04-26 23:48:19.000000000 -0500
++++ doc/sample.wgetrc	2009-01-29 17:40:44.000000000 -0600
+@@ -7,7 +7,7 @@
+ ## not contain a comprehensive list of commands -- look at the manual
+ ## to find out what you can put into this file.
+ ## 
+-## Wget initialization file can reside in /usr/local/etc/wgetrc
++## Wget initialization file can reside in @PREFIX@/etc/wgetrc
+ ## (global, for all users) or $HOME/.wgetrc (for a single user).
+ ##
+ ## To use the settings in this file, you will have to uncomment them,
+@@ -16,7 +16,7 @@
+ 
+ 
+ ##
+-## Global settings (useful for setting up in /usr/local/etc/wgetrc).
++## Global settings (useful for setting up in @PREFIX@/etc/wgetrc).
+ ## Think well before you change them, since they may reduce wget's
+ ## functionality, and make it behave contrary to the documentation:
+ ##
+--- doc/wget.1	2008-06-29 20:41:51.000000000 -0500
++++ doc/wget.1	2009-01-29 17:41:25.000000000 -0600
+@@ -1729,9 +1729,9 @@
+ \&\fIbelow\fR a certain hierarchy will be downloaded.
+ .SH "FILES"
+ .IX Header "FILES"
+-.IP "\fB/usr/local/etc/wgetrc\fR" 4
+-.IX Item "/usr/local/etc/wgetrc"
+-Default location of the \fIglobal\fR startup file.
++.IP "\fB at PREFIX@/etc/wgetrc\fR" 4
++.IX Item "@PREFIX@/etc/wgetrc"
++Location of the \fIglobal\fR startup file.
+ .IP "\fB.wgetrc\fR" 4
+ .IX Item ".wgetrc"
+ User startup file.
+--- doc/wget.info	2008-06-29 21:10:19.000000000 -0500
++++ doc/wget.info	2009-01-29 17:40:44.000000000 -0600
+@@ -113,8 +113,7 @@
+    * Most of the features are fully configurable, either through
+      command line options, or via the initialization file `.wgetrc'
+      (*note Startup File::).  Wget allows you to define "global"
+-     startup files (`/usr/local/etc/wgetrc' by default) for site
+-     settings.
++     startup files (`@PREFIX@/etc/wgetrc') for site settings.
+ 
+    * Finally, GNU Wget is free software.  This means that everyone may
+      use it, redistribute it and/or modify it under the terms of the
+@@ -2211,9 +2210,7 @@
+ ===================
+ 
+ When initializing, Wget will look for a "global" startup file,
+-`/usr/local/etc/wgetrc' by default (or some prefix other than
+-`/usr/local', if Wget was not installed there) and read commands from
+-there, if it exists.
++`@PREFIX@/etc/wgetrc', and read commands from there, if it exists.
+ 
+    Then it will look for the user's file.  If the environmental variable
+ `WGETRC' is set, Wget will try to load that file.  Failing that, no
+@@ -2223,8 +2220,7 @@
+ 
+    The fact that user's settings are loaded after the system-wide ones
+ means that in case of collision user's wgetrc _overrides_ the
+-system-wide wgetrc (in `/usr/local/etc/wgetrc' by default).  Fascist
+-admins, away!
++system-wide wgetrc (in `@PREFIX@/etc/wgetrc').  Fascist admins, away!
+ 
+ 
+ File: wget.info,  Node: Wgetrc Syntax,  Next: Wgetrc Commands,  Prev: Wgetrc Location,  Up: Startup File
+--- doc/wget.pod	2008-06-29 20:41:51.000000000 -0500
++++ doc/wget.pod	2009-01-29 17:40:44.000000000 -0600
+@@ -1855,9 +1855,9 @@
+ =over 4
+ 
+ 
+-=item B</usr/local/etc/wgetrc>
++=item B<@PREFIX@/etc/wgetrc>
+ 
+-Default location of the I<global> startup file.
++Location of the I<global> startup file.
+ 
+ 
+ =item B<.wgetrc>
+--- doc/wget.texi	2008-06-29 21:10:16.000000000 -0500
++++ doc/wget.texi	2009-01-29 17:40:44.000000000 -0600
+@@ -191,12 +191,12 @@
+ Most of the features are fully configurable, either through command line
+ options, or via the initialization file @file{.wgetrc} (@pxref{Startup
+ File}).  Wget allows you to define @dfn{global} startup files
+-(@file{/usr/local/etc/wgetrc} by default) for site settings.
++(@file{@PREFIX@/etc/wgetrc}) for site settings.
+ 
+ @ignore
+ @c man begin FILES
+ @table @samp
+- at item /usr/local/etc/wgetrc
++ at item @PREFIX@/etc/wgetrc
+ Default location of the @dfn{global} startup file.
+ 
+ @item .wgetrc
+@@ -2516,9 +2516,7 @@
+ @cindex location of wgetrc
+ 
+ When initializing, Wget will look for a @dfn{global} startup file,
+- at file{/usr/local/etc/wgetrc} by default (or some prefix other than
+- at file{/usr/local}, if Wget was not installed there) and read commands
+-from there, if it exists.
++ at file{@PREFIX@/etc/wgetrc} and read commands from there, if it exists.
+ 
+ Then it will look for the user's file.  If the environmental variable
+ @code{WGETRC} is set, Wget will try to load that file.  Failing that, no
+@@ -2528,7 +2526,7 @@
+ 
+ The fact that user's settings are loaded after the system-wide ones
+ means that in case of collision user's wgetrc @emph{overrides} the
+-system-wide wgetrc (in @file{/usr/local/etc/wgetrc} by default).
++system-wide wgetrc (in @file{@PREFIX@/etc/wgetrc}).
+ Fascist admins, away!
+ 
+ @node Wgetrc Syntax
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090129/4338c117/attachment.html>


More information about the macports-changes mailing list