When I configure with --with-tetex
--prefix=$HOME/usr/pkg/xdvi, the make install process
requires root access anyway:
/bin/sh ./../mkinstalldirs /usr/share/texmf/xdvi/pixmaps
mkdir /usr/share/texmf/xdvi/pixmaps
mkdir: cannot create directory
`/usr/share/texmf/xdvi/pixmaps': Toegang geweigerd
Logged In: YES
user_id=161998
further comment: the files installed there (toolbar pixmaps)
don't have to be in the texmf tree. Why not simply put them
in %{datadir} ?
Logged In: YES
user_id=177175
> When I configure with --with-tetex
FWIW, only the non-k version has --with-tetex
> --prefix=$HOME/usr/pkg/xdvi, the make install process
> requires root access anyway:
> /bin/sh ./../mkinstalldirs /usr/share/texmf/xdvi/pixmaps
> mkdir /usr/share/texmf/xdvi/pixmaps
This is because xdvi needs to write some files (XDvi,
xdvi.cfg, and the
pixmaps dir) into $TEXMF. If you want a complete private
installation, you'll also need to specify
--datadir=$HOME/pkg/texmf (and ignore the warnings about the
non-existing texmf path, unless you have a complete texmf
path inside $HOME/pkg). This is the same behaviour as
current teTeX (where the Makefile is actually taken from).
Logged In: YES
user_id=161998
> FWIW, only the non-k version has --with-tetex
yes, this not clear from your homepage. Without looking
well, I checked out xdvi (non k), which is also hosted at sf.
Maybe you should put in a big fat warning that xdvi and
xdvik are both maintained at sf.net
>-datadir=$HOME/pkg/texmf (and ignore the warnings about the
>non-existing texmf path, unless you have a complete texmf
>path inside $HOME/pkg).
This is nonstandard ; datadir should be ${prefix}/share
unless specified differently. That the teTeX people mess up
too is a bad argument IMO.
(Yes, I am whining a little, don't misunderstand me - It's
great to see that xdvi is being worked on--thanks for the
prompt reply! )
Logged In: YES
user_id=177175
> yes, this not clear from your homepage. Without looking
> well, I checked out xdvi (non k), which is also hosted at sf.
>
> Maybe you should put in a big fat warning that xdvi and
> xdvik are both maintained at sf.net
OK; where did you get the checkout instructions from? I've
now added a paragraph to README.CVS which is mirrored at
http://xdvi.sourceforge.net/cvs-upgrade.html
but that might not be the most obvious place. Unfortunately
the instructions on
http://sourceforge.net/cvs/?group_id=23164
cannot be changed by project admins.
> This is nonstandard ; datadir should be ${prefix}/share unless
> specified differently.
you're right, my answer was premature. Actually, it ought to
work like that. I just tried the following in a fresh CVS trunk:
$ ./configure --prefix=$HOME/pkg
and got the correct location:
[...]
checking where the main texmf tree is located...
/home/ulrich/pkg/texmf
[...]
$ make install
[...]
mkdir /home/ulrich/pkg/man
mkdir /home/ulrich/pkg/man/man1
/bin/sh ./../mkinstalldirs /home/ulrich/pkg/texmf/xdvi/pixmaps
mkdir /home/ulrich/pkg/texmf/xdvi
mkdir /home/ulrich/pkg/texmf/xdvi/pixmaps
/usr/bin/install -c -m 644 ./.1 /home/ulrich/pkg/man/man1/.1
/usr/bin/install -c -m 644 ./texmf/XDvi
/home/ulrich/pkg/texmf/xdvi/XDvi
/usr/bin/install -c -m 644 ./pixmaps/toolbar.xpm
./pixmaps/toolbar2.xpm /home/ulrich/pkg/texmf/xdvi/pixmaps
/usr/bin/install -c -m 644 ./texmf/xdvi.cfg
/home/ulrich/pkg/texmf/xdvi/
Any chances that there were cached values of $texmf left
over from a previous run?
> further comment: the files installed there (toolbar pixmaps)
> don't have to be in the texmf tree. Why not simply put them
> in %{datadir} ?
I admit the current search is a hack: first it tries
XtResolvePathname() on resource.toolbar_pixmap_file, and if
that fails, it tries kpse_find_file() on the same. The
reason for the latter was that I couldn't get
XUSERFILESEARCHPATH to work with XFree 4.x, and I think
XFILESEARCHPATH is considered bad practice, so I wanted to
offer kpathsearch as an alternative. But for kpathsearch to
work I think we need to put it into $TEXMF.
Suggestions on how to improve this are welcome ;-)
Logged In: YES
user_id=161998
>OK; where did you get the checkout instructions from?
nowhere - Like all users I don't read documentation - I
assumed it would go wrong if I got the wrong module name.
>you're right, my answer was premature. Actually, it ought to
>work like that. I just tried the following in a fresh CVS
trunk:
??
./configure --with-x-toolkit=xaw3d --prefix=$HOME/usr/pkg/
[..]
/bin/sh ./../mkinstalldirs /usr/share/texmf/xdvi/pixmaps
somewhere in the configure it says,
checking where the main texmf tree is located...
/usr/share/texmf
here is the sh -x output.
+ echo -n 'checking where the main texmf tree is located... '
checking where the main texmf tree is located... + echo
'configure:1603: checking where the main texmf tree is located'
+ texmfmain=
+ test 'x${prefix}/share' '!=' 'x${prefix}/share'
+ test x/home/hanwen/usr/pkg/xdvi/ = xNONE
+ eval 'p="/home/hanwen/usr/pkg/xdvi/"'
++ p=/home/hanwen/usr/pkg/xdvi/
+ test -d /home/hanwen/usr/pkg/xdvi//share/texmf
+ test -d /home/hanwen/usr/pkg/xdvi//lib/texmf
+ test -d /home/hanwen/usr/pkg/xdvi//texmf
++ echo ''
++ sed 's,//*,/,g'
+ texmfmain=
+ test -n ''
++ kpsewhich '--expand-path=$TEXMFMAIN'
++ sed 's,//*,/,g'
+ texmfmain=/usr/share/texmf
+ test -d /usr/share/texmf
+ echo /usr/share/texmf
/usr/share/texmf
>Suggestions on how to improve this are welcome ;-)
1. Simple solution:
define DATADIR via config.h
FILE * f = fopen (DATADIR "/xdvi/toolbar.xpm", "r")
..
2. Compile in the .xpms like you do with the .xbms - no need
for any configuration stuff.
3. Xresources should be in /usr/X11/lib/app-defaults anyway,
isn't it?
Logged In: YES
user_id=177175
> nowhere - Like all users I don't read documentation - I
> assumed it would go wrong if I got the wrong module name.
Ok, I guess the problem can't be fixed then ;-)
> + test -d /home/hanwen/usr/pkg/xdvi//share/texmf
> + test -d /home/hanwen/usr/pkg/xdvi//lib/texmf
> + test -d /home/hanwen/usr/pkg/xdvi//texmf
> ++ echo ''
> ++ sed 's,//*,/,g'
> + texmfmain=
> + test -n ''
> ++ kpsewhich '--expand-path=$TEXMFMAIN'
> ++ sed 's,//*,/,g'
> + texmfmain=/usr/share/texmf
> + test -d /usr/share/texmf
> + echo /usr/share/texmf
> /usr/share/texmf
Ah, OK, this is acutally a bug in the configure script.
Xdvik uses kpsewhich to detect $TEXMFMAIN if it hadn't been
set correctly (so that it's possible to omit --prefix or
--datadir); but `correctly' means that one of share/texmf,
lib/texmf or texmf exist in $prefix, otherwise the result of
kpsewhich will be used. I guess we don't want that if either
--prefix or --datadir have been specified; I've now
implemented this in texk/kpathsea/withenable.ac and updated
the configure files in the CVS. Does it now work correctly
for you?
> 1. Simple solution:
> define DATADIR via config.h
> 2. Compile in the .xpms like you do with the .xbms - no need
> for any configuration stuff.
Well, since the toolbar bindings are customizable, the
pixmaps should also be customizable, and at runtime ;-)
> 3. Xresources should be in /usr/X11/lib/app-defaults anyway,
> isn't it?
The toolbars are not a resource proper since they don't
follow the X resource naming scheme, so they won't be found
if you just put them into app-defaults. And what about
private installations?
Logged In: YES
user_id=177175
--prefix issue fixed in 22.77.2.