Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > c92510584fd710384970429bf5ec0aaa > files > 66

darcs-2.2.0-1mdv2009.1.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

<!--Converted with LaTeX2HTML 2008 (1.71)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Building darcs</TITLE>
<META NAME="description" CONTENT="Building darcs">
<META NAME="keywords" CONTENT="darcs">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">

<META NAME="Generator" CONTENT="LaTeX2HTML v2008">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="darcs.css">

<LINK REL="next" HREF="node4.html">
<LINK REL="previous" HREF="node2.html">
<LINK REL="up" HREF="darcs.html">
<LINK REL="next" HREF="node4.html">
</HEAD>

<BODY >
<!--Navigation Panel-->
<A NAME="tex2html336"
  HREF="node4.html">
<IMG WIDTH="22" HEIGHT="22" title="Next"  ALIGN="BOTTOM" BORDER="0" ALT="next"
 SRC="./next.png"></A> 
<A NAME="tex2html332"
  HREF="darcs.html">
<IMG WIDTH="22" HEIGHT="22" title="Up"  ALIGN="BOTTOM" BORDER="0" ALT="up"
 SRC="./up.png"></A> 
<A NAME="tex2html326"
  HREF="node2.html">
<IMG WIDTH="22" HEIGHT="22" title="Previous"  ALIGN="BOTTOM" BORDER="0" ALT="previous"
 SRC="./prev.png"></A> 
<A NAME="tex2html334"
  HREF="node1.html">
<IMG WIDTH="22" HEIGHT="22" title="Contents"  ALIGN="BOTTOM" BORDER="0" ALT="contents"
 SRC="./contents.png"></A>  
<BR>
<B> Next:</B> <A NAME="tex2html337"
  HREF="node4.html">Getting started</A>
<B> Up:</B> <A NAME="tex2html333"
  HREF="darcs.html">Darcs 2.2.0 (release) Darcs</A>
<B> Previous:</B> <A NAME="tex2html327"
  HREF="node2.html">Introduction</A>
 &nbsp; <B>  <A NAME="tex2html335"
  HREF="node1.html">Contents</A></B> 
<BR>
<BR>
<!--End of Navigation Panel-->
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>

<UL>
<LI><A NAME="tex2html338"
  HREF="node3.html#SECTION00310000000000000000">Prerequisites</A>
<LI><A NAME="tex2html339"
  HREF="node3.html#SECTION00320000000000000000">Building on Mac&nbsp;OS&nbsp;X</A>
<LI><A NAME="tex2html340"
  HREF="node3.html#SECTION00330000000000000000">Building on Microsoft Windows</A>
<LI><A NAME="tex2html341"
  HREF="node3.html#SECTION00340000000000000000">Building from tarball</A>
<LI><A NAME="tex2html342"
  HREF="node3.html#SECTION00350000000000000000">Building darcs from the repository</A>
<LI><A NAME="tex2html343"
  HREF="node3.html#SECTION00360000000000000000">Submitting patches to darcs</A>
</UL>
<!--End of Table of Child-Links-->
<HR>

<H1><A NAME="SECTION00300000000000000000">
Building darcs</A>
</H1>

<P>
This chapter should walk you through the steps necessary to build darcs for
yourself.  There are in general two ways to build darcs.  One is for
building released versions from tarballs, and the other is to build the
latest and greatest darcs, from the darcs repo itself.

<P>
Please let me know if you have any problems building darcs, or don't have
problems described in this chapter and think there's something obsolete
here, so I can keep this page up-to-date.

<P>

<H1><A NAME="SECTION00310000000000000000">
Prerequisites</A>
</H1>
To build darcs you will need to have <TT>ghc</TT>, the Glorious Glasgow
Haskell Compiler. You should have at the very minimum version 6.4.

<P>
It is a good idea (but not required) to have software installed that provide darcs
network access. The <TT>libwww-dev</TT>, <TT>libwww-ssl-dev</TT> or <TT>libcurl</TT> packages
newer than than 7.18.0 are recommended because they provide pipelining support speed
up HTTP access. They have to be explicitly chosen with <TT>-with-libwww</TT> or
<TT>-with-curl-pipelining</TT>. Otherwise, darcs will automatically look for one of
libcurl, <TT>curl</TT> or <TT>wget</TT>.  You also might want to have scp
available if you want to grab your repos over ssh...

<P>
To use the <code>diff</code> command of darcs, a <code>diff</code> program supporting
options <code>-r</code> (recursive diff) and <code>-N</code> (show new files as
differences against an empty file) is required. The <code>configure</code>
script will look for <code>gdiff</code>, <code>gnudiff</code> and <code>diff</code> in this
order. You can force the use of another program by setting the <code>DIFF</code>
environment variable before running <code>configure</code>.

<P>
To rebuild the documentation (which should not be necessary since it is
included in html form with the tarballs), you will need to have latex
installed, as well as latex2html if you want to build it in html form.

<P>

<H1><A NAME="SECTION00320000000000000000">
Building on Mac&nbsp;OS&nbsp;X</A>
</H1>
To build on Mac&nbsp;OS&nbsp;X, you will need the Apple Developer Tools and the ghc
6.4 package installed.

<P>

<H1><A NAME="SECTION00330000000000000000">
Building on Microsoft Windows</A>
</H1>
To build on Microsoft Windows, you will need:

<P>

<UL>
<LI><A NAME="tex2html3"
  HREF="http://www.mingw.org/">MinGW</A>
which provides the GCC
  toolchain for win32.
</LI>
<LI><A NAME="tex2html4"
  HREF="http://www.mingw.org/msys.shtml">MSYS</A>
which provides
  a unix build environment for win32.  Be sure to download the separate
  msysDTK, autoconf and automake.
</LI>
<LI><A NAME="tex2html5"
  HREF="http://www.gzip.org/zlib/">zlib-1.2.1+</A>
library
  and headers.
</LI>
<LI><A NAME="tex2html6"
  HREF="http://curl.haxx.se/">curl-7.12.2+</A>
library
  and headers.
</LI>
<LI>If building with an SSL enabled curl you will need the OpenSSL
  libraries, unofficial builds are available at
<BR>  <A NAME="tex2html7"
  HREF="http://www.slproweb.com/products/Win32OpenSSL.html">http://www.slproweb.com/products/Win32OpenSSL.html</A>.
</LI>
</UL>

<P>
Copy the zlib and curl libraries and headers to both GHC and MinGW.  GHC
stores C headers in <code>&lt;ghc-dir&gt;/gcc-lib/include</code> and libraries in
<code>&lt;ghc-dir&gt;/gcc-lib</code>.  MinGW stores headers in
<code>&lt;mingw-dir&gt;/include</code> and libraries in <code>&lt;mingw-dir&gt;/lib</code>.

<P>
Set PATH to include the <code>&lt;msys-dir&gt;/bin</code>, <code>&lt;mingw-dir&gt;/bin</code>,
<code>&lt;curl-dir&gt;</code>, and a directory containing a pre-built darcs.exe if you
want the build's patch context stored for `<code>darcs --exact-version</code>'.

<P>
<PRE>
C:\darcs&gt; cd &lt;darcs-source-dir&gt;
C:\darcs&gt; sh

$ export GHC=/c/&lt;ghc-dir&gt;/bin/ghc.exe
$ autoconf
$ ./configure --target=mingw
$ make
</PRE>

<P>

<H1><A NAME="SECTION00340000000000000000">
Building from tarball</A>
</H1>
If you get darcs from a tarball, the procedure (after unpacking the tarball
itself) is as follows:
<PRE>
% ./configure
% make
# Optional, but recommended
% make test
% make install
</PRE>

<P>
There are options to configure that you may want to check out with
<PRE>
% ./configure --help
</PRE>

<P>
If your header files are installed in a non-standard location, you may need
to define the <code>CFLAGS</code> and <code>CPPFLAGS</code> environment variables to
include the path to the headers.  e.g. on NetBSD, you may need to run
<PRE>
% CFLAGS=-I/usr/pkg/include CPPFLAGS=-I/usr/pkg/include ./configure
</PRE>

<P>

<H1><A NAME="SECTION00350000000000000000">
Building darcs from the repository</A>
</H1>
To build the latest darcs from its repository, you will first need a
working copy of Darcs 2. You can get darcs using:
<PRE>
% darcs get -v http://darcs.net/
</PRE>
and once you have the darcs repository you can bring it up to date with a
<PRE>
% darcs pull
</PRE>

<P>
The repository doesn't hold automatically generated files, which include
the configure script and the HTML documentation, so you need to run
<code>autoconf</code> first.

<P>
You'll need <code>autoconf</code> 2.50 or higher. Some systems have more than one
version of <code>autoconf</code> installed. For example, <code>autoconf</code> may point to
version 2.13, while <code>autoconf259</code>  runs version 2.59.

<P>
Also note that <code>make</code> is really "GNU make". On some systems, such as
the *BSDs, you may need to type <code>gmake</code> instead of make for this to work.

<P>
If you want to create readable documentation you'll need to have latex installed.
<PRE>
% autoconf
% ./configure
% make
% make install
</PRE>

<P>
If you want to tweak the configure options, you'll need to run <TT>  ./configure</TT> yourself after the make, and then run make again.

<P>

<H1><A NAME="SECTION00360000000000000000">
Submitting patches to darcs</A>
</H1>
I know, this doesn't really belong in this chapter, but if you're using the
repository version of darcs it's really easy to submit patches to me using
darcs. In fact, even if you don't know any Haskell, you could submit fixes
or additions to this document (by editing <code>building_darcs.tex</code>) based
on your experience building darcs...

<P>
To do so, just record your changes (which you made in the darcs repository)
<PRE>
% darcs record --no-test
</PRE>
making sure to give the patch a nice descriptive name.  The
<code>--no-test</code> options keeps darcs from trying to run the unit tests,
which can be rather time-consuming.  Then you can send the patch to the
darcs-devel mailing list by email by
<PRE>
% darcs send
</PRE>
If you are using darcs 2.0.0 or earlier, please use
<PRE>
% darcs send -u
</PRE>
instead.
The darcs repository stores the email address to which patches should be
sent by default.  The email address you see is actually my own, but when
darcs notices that you haven't signed the patch with my GPG key, it will
forward the message to darcs-devel.

<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html336"
  HREF="node4.html">
<IMG WIDTH="22" HEIGHT="22" title="Next"  ALIGN="BOTTOM" BORDER="0" ALT="next"
 SRC="./next.png"></A> 
<A NAME="tex2html332"
  HREF="darcs.html">
<IMG WIDTH="22" HEIGHT="22" title="Up"  ALIGN="BOTTOM" BORDER="0" ALT="up"
 SRC="./up.png"></A> 
<A NAME="tex2html326"
  HREF="node2.html">
<IMG WIDTH="22" HEIGHT="22" title="Previous"  ALIGN="BOTTOM" BORDER="0" ALT="previous"
 SRC="./prev.png"></A> 
<A NAME="tex2html334"
  HREF="node1.html">
<IMG WIDTH="22" HEIGHT="22" title="Contents"  ALIGN="BOTTOM" BORDER="0" ALT="contents"
 SRC="./contents.png"></A>  
<BR>
<B> Next:</B> <A NAME="tex2html337"
  HREF="node4.html">Getting started</A>
<B> Up:</B> <A NAME="tex2html333"
  HREF="darcs.html">Darcs 2.2.0 (release) Darcs</A>
<B> Previous:</B> <A NAME="tex2html327"
  HREF="node2.html">Introduction</A>
 &nbsp; <B>  <A NAME="tex2html335"
  HREF="node1.html">Contents</A></B> 
<!--End of Navigation Panel-->
<ADDRESS>

2009-01-22
</ADDRESS>
</BODY>
</HTML>