diff --git a/SOURCES/texlive-xdvi-ghostcripts.patch b/SOURCES/texlive-xdvi-ghostcripts.patch
new file mode 100644
index 0000000..7b5be58
--- /dev/null
+++ b/SOURCES/texlive-xdvi-ghostcripts.patch
@@ -0,0 +1,12 @@
+--- texlive-20180414-source/texk/xdvik/psgs.c       2016-11-25 19:24:41.000000000 +0100
++++ texlive-20200327-source/texk/xdvik/psgs.c       2020-03-01 20:07:53.000000000 +0100
+@@ -561,7 +561,8 @@
+ 	">> setuserparams .locksafe "
+ 	"} stopped pop\n";
+     static const char str1[] =
+-	"/xdvi$run {$error /newerror false put {currentfile cvx execute} stopped pop} "
++        "/xdvi$run "
++        "{$error /newerror false put currentfile cvx stopped {handleerror} if} "
+ 	"def "
+ 	"/xdvi$ack (\347\310\376) def "
+ 	"/xdvi$dslen countdictstack def "
diff --git a/SPECS/texlive.spec b/SPECS/texlive.spec
index 15cc3ad..aad80be 100644
--- a/SPECS/texlive.spec
+++ b/SPECS/texlive.spec
@@ -15,7 +15,7 @@
 
 Name: texlive
 Version: %{source_date}
-Release: 23%{?dist}
+Release: 25%{?dist}
 Epoch: %{tl_epoch}
 Summary: TeX formatting system
 Group: Applications/Publishing
@@ -875,6 +875,8 @@ Patch13: texlive-20180414-covscan.patch
 Patch14: texlive-20180414-tlmgr-ignore-warning.patch
 # fix for poppler-20.11.0
 Patch15: texlive-20180414-poppler-20.11.0-luatex.patch
+# make xdvi work with Ghostscript 9.27
+Patch16: texlive-xdvi-ghostcripts.patch
 
 %description
 The TeX Live software distribution offers a complete TeX system for a
@@ -23790,6 +23792,7 @@ xz -dc %{SOURCE0} | tar x
 %patch13 -p1
 pushd source
 %patch15 -p1
+%patch16 -p1
 popd
 # Setup copies of the licenses
 for l in `unxz -c %{SOURCE2} | tar t`; do
@@ -23939,6 +23942,12 @@ EOF
 chmod 0755 context
 popd
 
+# Fix pkgconfig files
+for file in $(find %{buildroot}%{_libdir}/pkgconfig/ -type f -name '*.pc')
+do sed -i 's|%{_builddir}/%{name}-%{source_date}/source/inst|/usr|g' $file
+   sed -i 's|/usr/lib|%{_libdir}|g' $file
+done
+
 xz -dc %{SOURCE100} | tar x -C %{buildroot}%{_texdir}/texmf-dist
 xz -dc %{SOURCE101} | tar x -C %{buildroot}%{_texdir}/texmf-dist
 xz -dc %{SOURCE103} | tar x -C %{buildroot}%{_texdir}/texmf-dist
@@ -27190,6 +27199,12 @@ fi
 %doc %{_texdir}/texmf-dist/doc/context/
 
 %changelog
+* Thu Dec 02 2021 Than Ngo <than@redhat.com> - 7:20180414-25
+- Resolves: #2025493 - eps file does not show up when using xdvi
+
+* Thu Jul 22 2021 Than Ngo <than@redhat.com> - 7:20180414-24
+- Resolves: #1984929, Fix paths in pkgconfig files
+
 * Fri Apr 30 2021 Than Ngo <than@redhat.com> - 7:20180414-23
 - Related: #1902187, rebuild regarding to broken binutils