[darcs-users] darcs patch: Resolve issue1312: update and reduce build notes.
Eric Kow
kowey at darcs.net
Tue May 5 12:14:50 UTC 2009
On Tue, May 05, 2009 at 16:17:14 +1000, Trent W.Buck wrote:
> Tue May 5 15:42:25 EST 2009 Trent W. Buck <trentbuck at gmail.com>
> * Resolve issue1312: update and reduce build notes.
> Recommend using pre-built binaries, or cabal-install.
> Explain how to use cabal without cabal-install.
> Update the list of build dependencies.
> Keep the dependency list (against my better judgement), but be very
> clear that this list is only a copy, and will grow stale over time.
>
> Explain autotools, but mention that it is deprecated.
> Remove lengthy discussion of Windows madness, on the basis that
> Windows users will generally use pre-built binaries or cabal-install.
Applied, thanks!
> Remove out-of-place, stale-ish "darcs send" discussion. It can be
> reinserted elsewhere if it's really necessary (a HACKING file in the
> source tree would be easier to discover).
There was one, but I think I suggested that it be merged back into
README. The 2009 me thinks that a separate HACKING file may be useful.
Resolve issue1312: update and reduce build notes.
-------------------------------------------------
> Trent W. Buck <trentbuck at gmail.com>**20090505054225
> Ignore-this: 1097926092b457e090ad4870aedb4cc9
> Recommend using pre-built binaries, or cabal-install.
> Explain how to use cabal without cabal-install.
> Update the list of build dependencies.
> Keep the dependency list (against my better judgement), but be very
> clear that this list is only a copy, and will grow stale over time.
>
> Explain autotools, but mention that it is deprecated.
> Remove lengthy discussion of Windows madness, on the basis that
> Windows users will generally use pre-built binaries or cabal-install.
>
> Remove out-of-place, stale-ish "darcs send" discussion. It can be
> reinserted elsewhere if it's really necessary (a HACKING file in the
> source tree would be easier to discover).
> ] hunk ./src/building_darcs.tex 2
> \chapter{Building darcs}
> +\section{The Easy Way}
> +If your distribution provides a pre-built binary package of a recent
> +Darcs release, you are strongly encouraged to use that rather than
> +building Darcs yourself.
>
> hunk ./src/building_darcs.tex 7
> -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.
> -
> -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.
> -
> -\section{Prerequisites}
> -To build darcs you will need to have {\tt ghc}, the Glorious Glasgow
> -Haskell Compiler. You should have at the very minimum version 6.6.
> -
> -It is a good idea (but not required) to have software installed that provide darcs
> -network access. The {\tt libcurl} package
> -newer than than 7.18.0 is recommended because it provides pipelining support speed
> -up HTTP access. Darcs will automatically look for one of
> -libcurl, {\tt curl} or {\tt wget}. You also might want to have scp
> -available if you want to grab your repos over ssh\ldots
> -
> -To use the \verb!diff! command of darcs, a \verb!diff! program supporting
> -options \verb!-r! (recursive diff) and \verb!-N! (show new files as
> -differences against an empty file) is required. The \verb!configure!
> -script will look for \verb!gdiff!, \verb!gnudiff! and \verb!diff! in this
> -order. You can force the use of another program by setting the \verb!DIFF!
> -environment variable before running \verb!configure!.
> -
> -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.
> -
> -
> -\section{Building on Mac~OS~X}
> -To build on Mac~OS~X, you will need the Apple Developer Tools and the ghc
> -6.6 package installed.
> -
> -\section{Building on Microsoft Windows}
> -To build on Microsoft Windows, you will need:
> -
> -\begin{itemize}
> -\item \htmladdnormallinkfoot{MinGW}{http://www.mingw.org/} which provides the GCC
> - toolchain for win32.
> -\item \htmladdnormallinkfoot{MSYS}{http://www.mingw.org/msys.shtml} which provides
> - a unix build environment for win32. Be sure to download the separate
> - msysDTK, autoconf and automake.
> -\item \htmladdnormallinkfoot{zlib-1.2.1+}{http://www.gzip.org/zlib/} library
> - and headers.
> -\item \htmladdnormallinkfoot{curl-7.12.2+}{http://curl.haxx.se/} library
> - and headers.
> -\item If building with an SSL enabled curl you will need the OpenSSL
> - libraries, unofficial builds are available at\\
> - \htmladdnormallink{http://www.slproweb.com/products/Win32OpenSSL.html}{http://www.slproweb.com/products/Win32OpenSSL.html}.
> -\end{itemize}
> -
> -Copy the zlib and curl libraries and headers to both GHC and MinGW. GHC
> -stores C headers in \verb!<ghc-dir>/gcc-lib/include! and libraries in
> -\verb!<ghc-dir>/gcc-lib!. MinGW stores headers in
> -\verb!<mingw-dir>/include! and libraries in \verb!<mingw-dir>/lib!.
> -
> -Set PATH to include the \verb!<msys-dir>/bin!, \verb!<mingw-dir>/bin!,
> -\verb!<curl-dir>!, and a directory containing a pre-built darcs.exe if you
> -want the build's patch context stored for `\verb!darcs --exact-version!'.
> -
> +If you have (or can install) the \texttt{cabal-install} package, this
> +is the next best option, as this will resolve build dependencies
> +automatically. To download, compile and install Darcs and its
> +dependencies via cabal-install, simply run
> \begin{verbatim}
> hunk ./src/building_darcs.tex 12
> -C:\darcs> cd <darcs-source-dir>
> -C:\darcs> sh
> -
> -$ export GHC=/c/<ghc-dir>/bin/ghc.exe
> -$ autoconf
> -$ ./configure --target=mingw
> -$ make
> +cabal update
> +cabal install darcs
> \end{verbatim}
>
> hunk ./src/building_darcs.tex 16
> -\section{Building from tarball}
> -If you get darcs from a tarball, the procedure (after unpacking the tarball
> -itself) is as follows:
> +\section{The Hard Way}
> +If you cannot install \texttt{cabal-install}, you need to run
> \begin{verbatim}
> hunk ./src/building_darcs.tex 19
> -$ ./configure
> -$ make
> -# Optional, but recommended
> -$ make test
> -$ make install
> +ghc --make Setup
> +./Setup configure
> +./Setup build
> +./Setup install
> \end{verbatim}
>
> hunk ./src/building_darcs.tex 25
> -There are options to configure that you may want to check out with
> -\begin{verbatim}
> -$ ./configure --help
> -\end{verbatim}
> -
> -If your header files are installed in a non-standard location, you may need
> -to define the \verb!CFLAGS! and \verb!CPPFLAGS! environment variables to
> -include the path to the headers. e.g. on NetBSD, you may need to run
> -\begin{verbatim}
> -$ CFLAGS=-I/usr/pkg/include CPPFLAGS=-I/usr/pkg/include ./configure
> -\end{verbatim}
> -
> -\section{Building darcs from the repository}
> -To build the latest darcs from its repository, you will first need a
> -working copy of Darcs 2. You can get darcs using:
> -\begin{verbatim}
> -$ darcs get -v http://darcs.net/
> -\end{verbatim}
> -and once you have the darcs repository you can bring it up to date with a
> -\begin{verbatim}
> -$ darcs pull
> -\end{verbatim}
> -
> -The repository doesn't hold automatically generated files, which include
> -the configure script and the HTML documentation, so you need to run
> -\verb!autoconf! first.
> -
> -You'll need \verb!autoconf! 2.50 or higher. Some systems have more than one
> -version of \verb!autoconf! installed. For example, \verb!autoconf! may point to
> -version 2.13, while \verb!autoconf259! runs version 2.59.
> -
> -Also note that \verb!make! is really "GNU make". On some systems, such as
> -the *BSDs, you may need to type \verb!gmake! instead of make for this to work.
> -
> -If you want to create readable documentation you'll need to have latex installed.
> -\begin{verbatim}
> -$ autoconf
> -$ ./configure
> -$ make
> -$ make install
> -\end{verbatim}
> +This will require the following build dependencies:
> +\begin{itemize}
> +\item GHC 6.6 or higher (6.8 or higher recommended); and
> +\item Cabal 1.6 or higher.
> +\end{itemize}
>
> hunk ./src/building_darcs.tex 31
> -If you want to tweak the configure options, you'll need to run {\tt
> - ./configure} yourself after the make, and then run make again.
> +Additional build dependencies are declared in the \texttt{darcs.cabal}
> +file, and \texttt{./Setup configure} will tell you if any required
> +build dependencies aren't found. The build dependencies at time of
> +writing (Darcs 2.2) are as follows:
> +\begin{itemize}
> +\item the C library zlib;
> +\item the Haskell packages
> + \begin{itemize}
> + \item array 1.1 or 1.2;
> + \item containers 1.1 or 1.2;
> + \item directory 1.0;
> + \item filepath 1.1;
> + \item html 1.0;
> + \item mtl 1.1;
> + \item old-time 1.0;
> + \item parsec 2.1;
> + \item process 1.0;
> + \item random 1.0; and
> + \item regex-compat between 0.71 and 0.92, inclusive.
> + \end{itemize}
> +\end{itemize}
>
> hunk ./src/building_darcs.tex 53
> -\section{Submitting patches to darcs}
> -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 \verb!building_darcs.tex!) based
> -on your experience building darcs\ldots
> +Missing \emph{optional} build dependencies are only listed if
> +\texttt{./Setup configure} is passed the \texttt{--verbose} argument.
> +At time of writing they are:
> +\begin{itemize}
> +\item the C library libcurl (7.19.1 or higher recommended);
> +\item the Haskell packages
> + \begin{itemize}
> + \item bytestring 0.9;
> + \item bytestring-mmap 0.2 or higher;
> + \item http 3000;
> + \item network 2.2;
> + \item terminfo 0.3.
> + \item utf8-string 0.3; and
> + \item zlib 0.5.
> + \end{itemize}
> +\end{itemize}
>
> hunk ./src/building_darcs.tex 70
> -To do so, just record your changes (which you made in the darcs repository)
> -\begin{verbatim}
> -$ darcs record --no-test
> -\end{verbatim}
> -making sure to give the patch a nice descriptive name. The
> -\verb!--no-test! 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
> -\begin{verbatim}
> -$ darcs send
> -\end{verbatim}
> -If you are using darcs 2.0.0 or earlier, please use
> +\section{The Old Way}
> +Darcs can still be built with GNU autotools; this approach is
> +deprecated and will be removed after the 2.3 release. Run
> \begin{verbatim}
> hunk ./src/building_darcs.tex 74
> -$ darcs send -u
> +autoconf
> +./configure
> +make
> +make install
> \end{verbatim}
> hunk ./src/building_darcs.tex 79
> -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.
>
> hunk ./src/building_darcs.tex 80
> +The build dependencies are identical to the previous approach, except
> +that instead of the \texttt{Cabal} package, you will need
> +\begin{itemize}
> +\item GNU Make; and
> +\item GNU autoconf 2.50 or higher.
> +\end{itemize}
>
--
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20090505/b7d7bc30/attachment.pgp>
More information about the darcs-users
mailing list