--- bin/portcvsweb.orig	2008-01-08 06:32:27 -0500
+++ bin/portcvsweb	2009-08-24 14:58:27 -0400
@@ -38,7 +38,7 @@
 
 BROWSER = ENV['BROWSER'] || 'w3m:lynx:links:firefox:mozilla:netscape'
 
-OS_DEFAULT = 'FreeBSD'
+OS_DEFAULT = 'MidnightBSD'
 
 MAKEFILE = 'Makefile'
 
@@ -46,7 +46,7 @@
 NEXTLINE = "\n%*s" % [5 + COLUMNSIZE, '']
 
 module PortCvsWeb
-  CVSTAGS = ['FreeBSD', 'NetBSD', 'OpenBSD']
+  CVSTAGS = ['MidnightBSD', 'FreeBSD', 'NetBSD', 'OpenBSD']
   CVSTAG_RE = /\$(#{CVSTAGS.join('|')}):\s+(\S+),v\s*(\d[\d.]*)/
 
   PathInfo = Struct.new(:dir, :file, :path)
@@ -276,6 +276,7 @@
 
   class Uri_CvsWeb < Uri_Base
     URI_BASE = {
+      'MidnightBSD' => 'http://www.midnightbsd.org/cgi-bin/cvsweb.cgi/',
       'FreeBSD' => 'http://www.FreeBSD.org/cgi/cvsweb.cgi/',
       'NetBSD' => 'http://cvsweb.netbsd.org/bsdweb.cgi/',
       'OpenBSD' => 'http://www.openbsd.org/cgi-bin/cvsweb/',
@@ -293,7 +294,7 @@
 	uri_info = UriInfo.new
 	uri_info.os = Uri_Base.guess_os(nil) || OS_DEFAULT
 	uri_info.base = URI_BASE[uri_info.os]
-	uri_info.path = File.join('ports', origin)  # XXX
+	uri_info.path = File.join('mports', origin)  # XXX
 	uri_info.uri = uri_info.base + uri_info.path
 	uri_info
       else
@@ -308,7 +309,7 @@
 	  uri_info = UriInfo.new
 	  uri_info.os = Uri_Base.guess_os(nil) || OS_DEFAULT
 	  uri_info.base = URI_BASE[uri_info.os]
-	  uri_info.path = File.join('ports', origin)  # XXX
+	  uri_info.path = File.join('mports', origin)  # XXX
 	  uri_info.uri = uri_info.base + uri_info.path
 	  ret = uri_info
 	end
@@ -534,8 +535,8 @@
     return uri
   end
 
-  puts "Inquiring the CVSweb site (ports)..." if $verbose
-  uri = PortCvsWeb::Uri_CvsWeb::URI_BASE[OS_DEFAULT] + File.join('ports', file)
+  puts "Inquiring the CVSweb site (mports)..." if $verbose
+  uri = PortCvsWeb::Uri_CvsWeb::URI_BASE[OS_DEFAULT] + File.join('mports', file)
   if uri_exist?(uri)
     return uri
   end
