---- ./texk/kpathsea/texmf.cnf 2017-05-03 18:13:42.000000000 +0000
-+++ ../texmf.cnf 2017-11-08 22:44:36.123962327 +0000
-@@ -54,7 +54,7 @@
- % Redistributors will probably want $SELFAUTODIR/share, i.e., /usr/share.
- % Kpathsea sets SELFAUTOLOC (the directory with the binary),
- % SELFAUTODIR (its parent), and SELFAUTOPARENT (its grandparent).
+--- ../texmf.cnf.orig 2018-04-30 17:07:05.796733785 +0000
++++ ./texk/kpathsea/texmf.cnf 2018-04-30 17:36:18.883441637 +0000
+@@ -58,7 +58,7 @@
+ % SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+ % SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+ % Sorry for the off-by-one-generation names.
-TEXMFROOT = $SELFAUTOPARENT
+TEXMFROOT = $SELFAUTODIR/share/texlive
% The main tree of distributed packages and programs:
TEXMFDIST = $TEXMFROOT/texmf-dist
-@@ -64,7 +64,7 @@
+@@ -68,7 +68,7 @@
TEXMFMAIN = $TEXMFDIST
% Local additions to the distribution trees.
% TEXMFSYSVAR, where *-sys store cached runtime data.
TEXMFSYSVAR = $TEXMFROOT/texmf-var
-@@ -516,6 +516,9 @@
+@@ -524,6 +524,9 @@
$SELFAUTODIR/share/texmf-local/web2c,\
$SELFAUTODIR/share/texmf-dist/web2c,\
$SELFAUTODIR/share/texmf/web2c,\