--- old/usr/src/tools/scripts/webrev.sh	Tue Aug  6 08:16:01 2019
+++ new/usr/src/tools/scripts/webrev.sh	Tue Aug  6 08:16:01 2019
@@ -26,7 +26,7 @@
 # Copyright 2012 Marcel Telka <marcel@telka.sk>
 # Copyright 2014 Bart Coddens <bart.coddens@gmail.com>
 # Copyright 2017 Nexenta Systems, Inc.
-# Copyright 2016 Joyent, Inc.
+# Copyright 2019 Joyent, Inc.
 # Copyright 2016 RackTop Systems.
 #
 
@@ -1280,67 +1280,6 @@
 
 
 #
-# fix_postscript
-#
-# Merge codereview output files to a single conforming postscript file, by:
-#	- removing all extraneous headers/trailers
-#	- making the page numbers right
-#	- removing pages devoid of contents which confuse some
-#	  postscript readers.
-#
-# From Casper.
-#
-function fix_postscript
-{
-	infile=$1
-
-	cat > /tmp/$$.crmerge.pl << \EOF
-
-	print scalar(<>);		# %!PS-Adobe---
-	print "%%Orientation: Landscape\n";
-
-	$pno = 0;
-	$doprint = 1;
-
-	$page = "";
-
-	while (<>) {
-		next if (/^%%Pages:\s*\d+/);
-
-		if (/^%%Page:/) {
-			if ($pno == 0 || $page =~ /\)S/) {
-				# Header or single page containing text
-				print "%%Page: ? $pno\n" if ($pno > 0);
-				print $page;
-				$pno++;
-			} else {
-				# Empty page, skip it.
-			}
-			$page = "";
-			$doprint = 1;
-			next;
-		}
-
-		# Skip from %%Trailer of one document to Endprolog
-		# %%Page of the next
-		$doprint = 0 if (/^%%Trailer/);
-		$page .= $_ if ($doprint);
-	}
-
-	if ($page =~ /\)S/) {
-		print "%%Page: ? $pno\n";
-		print $page;
-	} else {
-		$pno--;
-	}
-	print "%%Trailer\n%%Pages: $pno\n";
-EOF
-
-	$PERL /tmp/$$.crmerge.pl < $infile
-}
-
-
-#
 # input_cmd | insert_anchors | output_cmd
 #
 # Flag blocks of difference with sequentially numbered invisible
@@ -2357,8 +2296,6 @@
 [[ -z $WX ]] && WX=`look_for_prog wx`
 [[ -z $GIT ]] && GIT=`look_for_prog git`
 [[ -z $WHICH_SCM ]] && WHICH_SCM=`look_for_prog which_scm`
-[[ -z $CODEREVIEW ]] && CODEREVIEW=`look_for_prog codereview`
-[[ -z $PS2PDF ]] && PS2PDF=`look_for_prog ps2pdf`
 [[ -z $PERL ]] && PERL=`look_for_prog perl`
 [[ -z $RSYNC ]] && RSYNC=`look_for_prog rsync`
 [[ -z $SCCS ]] && SCCS=`look_for_prog sccs`
@@ -2389,13 +2326,6 @@
 	exit 1
 fi
 
-#
-# These aren't fatal, but we want to note them to the user.
-# We don't warn on the absence of 'wx' until later when we've
-# determined that we actually need to try to invoke it.
-#
-[[ ! -x $CODEREVIEW ]] && print -u2 "WARNING: codereview(1) not found."
-[[ ! -x $PS2PDF ]] && print -u2 "WARNING: ps2pdf(1) not found."
 [[ ! -x $WDIFF ]] && print -u2 "WARNING: wdiff not found."
 
 # Declare global total counters.
@@ -3063,8 +2993,6 @@
 [[ ! $FLIST -ef $WDIR/file.list ]] && cp $FLIST $WDIR/file.list
 
 rm -f $WDIR/$WNAME.patch
-rm -f $WDIR/$WNAME.ps
-rm -f $WDIR/$WNAME.pdf
 
 touch $WDIR/$WNAME.patch
 
@@ -3304,31 +3232,6 @@
 		rm -f $WDIR/$DIR/$F.man.cdiff $WDIR/$DIR/$F.man.udiff
 	fi
 
-	#
-	# Now we generate the postscript for this file.  We generate diffs
-	# only in the event that there is delta, or the file is new (it seems
-	# tree-killing to print out the contents of deleted files).
-	#
-	if [[ -f $nfile ]]; then
-		ocr=$ofile
-		[[ ! -f $ofile ]] && ocr=/dev/null
-
-		if [[ -z $mv_but_nodiff ]]; then
-			textcomm=`getcomments text $P $PP`
-			if [[ -x $CODEREVIEW ]]; then
-				$CODEREVIEW -y "$textcomm" \
-				    -e $ocr $nfile \
-				    > /tmp/$$.psfile 2>/dev/null &&
-				    cat /tmp/$$.psfile >> $WDIR/$WNAME.ps
-				if [[ $? -eq 0 ]]; then
-					print " ps\c"
-				else
-					print " ps[fail]\c"
-				fi
-			fi
-		fi
-	fi
-
 	if [[ -f $ofile ]]; then
 		source_to_html Old $PP < $ofile > $WDIR/$DIR/$F-.html
 		print " old\c"
@@ -3347,16 +3250,6 @@
 frame_nav_js > $WDIR/ancnav.js
 frame_navigation > $WDIR/ancnav.html
 
-if [[ ! -f $WDIR/$WNAME.ps ]]; then
-	print " Generating PDF: Skipped: no output available"
-elif [[ -x $CODEREVIEW && -x $PS2PDF ]]; then
-	print " Generating PDF: \c"
-	fix_postscript $WDIR/$WNAME.ps | $PS2PDF - > $WDIR/$WNAME.pdf
-	print "Done."
-else
-	print " Generating PDF: Skipped: missing 'ps2pdf' or 'codereview'"
-fi
-
 # If we're in OpenSolaris mode and there's a closed dir under $WDIR,
 # delete it - prevent accidental publishing of closed source
 
@@ -3437,11 +3330,6 @@
 	print "<tr><th>Patch of changes:</th><td>"
 	print "<a href=\"$wpatch_url\">$WNAME.patch</a></td></tr>"
 fi
-if [[ -f $WDIR/$WNAME.pdf ]]; then
-	wpdf_url="$(print $WNAME.pdf | url_encode)"
-	print "<tr><th>Printable review:</th><td>"
-	print "<a href=\"$wpdf_url\">$WNAME.pdf</a></td></tr>"
-fi
 
 if [[ -n "$iflag" ]]; then
 	print "<tr><th>Author comments:</th><td><div>"
