Building packages from source in general is a pain, but once it's done, you can use it to make a package and provide binaries yourself and save others the trouble of doing so for your project.
I've only done subversion myself rather than mod_perl, but I've taken a look at the build script we use for mod_perl (sadly it's very specific to our environment and wouldn't be of much use to you) and it looks like mod_perl will be the easiest option, as it has fewer dependencies (just perl and apache).
Building mod_perl looks to be as simple as perl Makefile.PL MP_APXS=/path/to/your/apache/bin/apxs; make; make install
.
Subversion, on the other hand requires at least apr and apru, and depending on your requirements, other dependencies (e.g. we build with python bindings for trac). If you decide to compile subversion, you probably want to disable as many of the dependencies as possible (e.g. if you don't need berkely db support, pass --without-berkley-db
to configure). If configure complains about a missing dependency, decide if you need it, and just add --without-featurex
if you don't need it.
You'll need to have apr and apru built first (or binary packages installed), and pass the --with-apr=/some/path
and --with-apr-util=/some/path
options (both are paths to the apr/apu-1-config file, located in the bin directory).
Getting SSL support working might take some work also, as the solaris ssl libraries are in a location that isn't normally detected. Make sure you have -I/usr/sfw/include
in your CFLAGS environment variable and -L/usr/sfw/lib -R/usr/sfw/lib
(or /usr/sfw/lib/amd64 or sparcv9 if you want 64 bit) in your LDFLAGS environment variable. Both variables need to be set before running configure. If you're building 32-bit, you might be able to get away with just doing --with-ssl=/usr/sfw
, but it's not likely that subversion will find the 64 bit libraries correctly if you require a 64 bit version without you setting the CFLAGS/LDFLAGS correctly.
As with building mod_perl, you'll need to let subversion know where apxs is, just pass --with-apxs=/path/to/apache/bin/apxs
to configure.
This last tip is probably obvious, but just in case: make the build instructions into a script (or Makefile) so you can easily repeat them on new machines or with slightly different configure options.