This README explains how to update your local xdvik sources to
the current stable version, using the Subversion (SVN) repository on
SourceForge.  In the following examples, `$' represents the shell prompt,
and lines ending with `\' should be typed as one line at the shell prompt.

Note that both the original xdvi and xdvik are available for checkout
on SourceForge.  This file only describes how to access xdvik.  To access
the original xdvi, click on "Xdvi (non-k)" in the header on the xdvik
main page.  That version of xdvi is available using git instead of SVN.

Please send corrections/suggestions (for either version of xdvi) to:
https://sourceforge.net/p/xdvi/bugs/

In order to use these examples, you need to have Subversion installed.
Details on that will depend on where you got your operating system.


You can either download a subset of the TeX Live tree (this contains
the source for the freetype2 and kpathsea libraries as well as the source
for xdvi), or just the xdvik subdirectory.

(a) To download the fuller subset of the TeX Live tree, you can type the
    following command.

      $ svn checkout https://svn.code.sf.net/p/xdvi/code/trunk/xdvik

    This will create a subdirectory called "xdvik" that will contain
    the freetype2 and kpathsea libraries, as well as xdvi.

    If you want to check out these files to a directory of a different name,
    you can give that name as a second argument to the svn command:

      $ svn checkout https://svn.code.sf.net/p/xdvi/code/trunk/xdvik otherdir

    To compile the sources, do the following (this assumes that the directory
    name is xdvik):

      $ cd xdvik
      $ ./configure
      $ make

    At some later date, if you want to incorporate any changes to xdvi:

    - Change to the top-level xdvik directory
      $ cd xdvik

    - Update the sources:
      $ svn update

    - Reconfigure and recompile xdvik:
      $ make distclean
      $ ./configure
      $ make

    You can also build in some directory outside of the source directories:

      $ mkdir ~/build
      $ cd ~/build
      $ ../xdvik/configure
      $ make


(b) To download just the subdirectory of xdvik proper, you can run the
    following command:

      $ svn checkout https://svn.code.sf.net/p/xdvi/code/trunk/xdvik/texk/xdvik

    You would want to incorporate this into an existing source tree for
    TeX Live in order to compile it.

    Of course, as in (a) you can name the directory something else:

      $ svn checkout \
	https://svn.code.sf.net/p/xdvi/code/trunk/xdvik/texk/xdvik otherdir

    The xdvik code needs the kpathsea and freetype2 libraries.  These are
    available if you build within either the TeX Live source tree or the
    fuller xdvik download (as in part (a), above).  However, if your system
    has the kpathsea and freetype2 libraries installed, then you can build
    just the xdvik sources and use your system libraries:

    - within the (smaller) xdvik directory:

      $ ./configure --with-system-kpathsea --with-system-freetype2
      $ make

    - from some other directory:

      $ mkdir ~/build
      $ cd ~/build
      $ ../xdvik/configure --with-system-kpathsea --with-system-freetype2
      $ make

For either of the above two choices, you can get the code for a specific
release of xdvik by using a tag of the form "xdvik_MAJOR_MINOR".
So, to get the full xdvik tree (including freetype2 and kpathsea) for
version 22.87 (for example), you would do:

      $ svn co https://svn.code.sf.net/p/xdvi/code/tags/xdvik_22_87/xdvik

To get just the xdvik code itself (as in (b)), you would type instead:

      $ svn co \
	https://svn.code.sf.net/p/xdvi/code/tags/xdvik_22_87/xdvik/texk/xdvik

(Note that "co" is a synonym for "checkout".)

A list of versions available in this manner is available on the web at:

    https://sourceforge.net/p/xdvi/code/HEAD/tree/tags/


You can also browse the xdvik source code on the web, at:

    https://sourceforge.net/p/xdvi/code/HEAD/tree/trunk/xdvik/


That's all! If you want to make yourself more familiar with
Subversion, there's a lot of information on the web.  Good starting
points are:

- Documentation pages on SourceForge:

    svn
	https://sourceforge.net/p/forge/documentation/svn/

    SVN Overview
	https://sourceforge.net/p/forge/documentation/SVN%20Overview/

- the Subversion Book:

    http://svnbook.red-bean.com/

- Subversion built-in help:

    $ svn help
    $ svn help checkout
    $ svn help update
    etc.

Have fun!
