Wiki content at AxKitOSX Changed by someone at IP 194.27.149.30 :

@@ -2,3 +2,369 @@
 
 For now see L<http://www.kings-of-chaos.de/~bboksa/axkit_macosx.html>
 
+=head2 Introduction
+
+This document might contain errors, please feel free to fix them.
+
+The following tutorial will show you how to build apache and AxKit on Mac OS 
X. It was tested with Mac OS X 10.2 (Jaguar) and comes with no warranty. Use it 
at your own risk.
+
+Everything you will see here is not new and no big secret, it is just a 
compilation of all the stuff, that was quite hard for me to find out. It is not 
polished, not the best thing to do it and it shows that I am not an expert for 
all that compilation stuff. But hey, it works (and least it worked for me). You 
have to have some basic knowledge about installing software and Perl-Modules 
using the CPAN module.
+
+The tutorial is split up into five parts:
+
+=over 4
+
+=item 1. Before we start
+
+=item 1. Building apache with mod_perl and mod_ssl
+
+=item 1. Building AxKit
+
+=item 1. Configuring apache for AxKit
+
+=item 1. Test your AxKit-Installation (external link) 
+
+=back
+
+=head2 Before we start
+
+=head3 Changing the default compiler
+
+The default compiler coming with Mac OS X 10.2 (gcc 3.1) is kind of buggy with 
the new system, this is why we change it back to gcc 2.95 with the following 
command (thanks do Spider from #de.mac, IRCnet).
+
+  sudo gcc_select 2
+
+=head3 Handling downloads
+
+When downloading files I assume you put them into C</usr/local/src> and 
untar/ungzip them (which can be done from the shell with the following command).
+
+  tar xvfz *filename*
+
+=head2 Building apache with mod_perl and mod_ssl
+
+In this section we will build apache with mod_perl and mod_ssl statically 
compiled in.
+
+=head3 Downloads
+
+Before we can start you have to download the following software:
+
+=over 4
+
+=item * L<gdbm|http://www.gnu.org/software/gdbm/>
+
+=item * L<mod_perl|http://perl.apache.org/>
+
+=item * L<openssl|http://www.openssl.org/>
+
+=item * L<mod_ssl|http://www.modssl.org/>
+
+=item * L<apache|http://httpd.apache.org/>
+
+=back
+
+=head3 Installation
+
+=head4 gdbm
+
+  cd /usr/local/src/gdbm-*version*
+  sudo cp /usr/share/libtool/config* 
+  sudo ./configure
+  sudo make
+  sudo make install
+  sudo ln -s /usr/local/lib/libgdbm.a /usr/local/lib/libdbm.a
+
+=head4 mod_perl
+
+=head5 Predependencies
+
+  sudo mv /usr/bin/head /tmp
+  
+  sudo perl -MCPAN -e 'shell'
+  cpan> install HTML::Parser
+  cpan> install LWP
+  
+  sudo mv /usr/bin/get /usr/local/bin/lwp-get
+  sudo mv /usr/bin/head /usr/local/bin/lwp-head 
+  sudo mv /usr/bin/post /usr/local/bin/lwp-post 
+  
+  sudo mv /tmp/head /usr/bin
+
+=head5 Installation
+
+  cd /usr/local/src/mod_perl-*version*
+  sudo perl Makefile.PL EVERYTHING=1 USE_APACI=1 PREP_HTTPD=1 DO_HTTPD=1
+  sudo make
+  sudo make install
+
+=head4 openssl
+
+  cd openssl-*version*
+  sudo ./config
+  sudo make
+  sudo make test
+
+=head4 mod_ssl
+
+  cd /usr/local/src/mod_ssl-*version*
+  sudo ./configure \
+    --with-apache=/usr/local/src/apache_*version* \
+    --with-ssl=/usr/local/src/openssl-*version*
+
+=head4 apache
+
+  cd /usr/local/src/apache_*version*
+  setenv SSL_BASE /usr/local/src/openssl-*version*
+  sudo ./configure \
+    --enable-module=most \
+    --enable-shared=max \
+    --activate-module=src/modules/perl/libperl.a \
+    --enable-module=perl \
+    --enable-module=ssl \
+    --disable-shared=perl \
+    --disable-shared=ssl \
+    --disable-rule=EXPAT
+  sudo make
+  sudo make certificate TYPE=test
+  sudo make install
+
+=head2 Building AxKit
+
+This part shows you how to build AxKit and install the Perl-Predependencies 
for it.
+
+=head3 Downloads
+
+Before we can start you have to download the following software:
+
+=over 4
+
+=item * L<libiconv|http://www.gnu.org/software/libiconv/>
+
+=item * L<expat|http://expat.sourceforge.net/>
+
+=item * L<libghttp|http://ftp.gnome.org/pub/GNOME/stable/sources/libghttp/>
+
+=item * L<libxml2|http://www.xmlsoft.org/>
+
+=item * L<libxslt|http://xmlsoft.org/XSLT/>
+
+=item * L<sablotron|http://www.gingerall.com/charlie/ga/xml/p_sab.xml>
+
+=back
+
+=head3 Installation
+
+=head4 libiconv
+
+  cd /usr/local/src/libiconv-*version*
+  sudo ./configure
+  sudo make
+  sudo make check
+  sudo make install
+
+=head4 expat
+
+  cd /usr/local/src/expat-*version*
+  sudo ./configure
+  sudo make
+  sudo make install
+
+=head4 libghttp
+
+  cd /usr/local/src/libghttp-*version*
+  sudo ./configure
+  sudo make
+  sudo make install
+
+=head4 libxml2
+
+=head5 Simple Patch for libxml2-2.4.24:
+
+The idea behind the patch is to add "-flat_namespace". It comes from Nyk 
Cowham.
+
+  *** configure.orig      Sun Sep 15 00:53:23 2002
+  --- configure   Sun Sep 15 00:56:51 2002
+  ***************
+  *** 3784,3790 ****
+        # FIXME: Relying on posixy $() will cause problems for
+        #        cross-compilation, but unfortunately the echo tests do not
+        #        yet detect zsh echo's removal of \ escapes.
+  !     archive_cmds='$CC $(test .$module = .yes && echo -bundle || echo \
+  -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linkopts \
+  -install_name $rpath/$soname $(test -n "$verstring" -a x$verstring != x0.0 
&& \
+  echo $verstring)'
+        # We need to add '_' to the symbols in $export_symbols first
+        #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
+        hardcode_direct=yes
+  --- 3784,3790 ----
+        # FIXME: Relying on posixy $() will cause problems for
+        #        cross-compilation, but unfortunately the echo tests do not
+        #        yet detect zsh echo's removal of \ escapes.
+  !     archive_cmds='$CC $(test .$module = .yes && echo -bundle || echo \
+  -dynamiclib) $allow_undefined_flag -flat_namespace -o $lib $libobjs \
+  $deplibs$linkopts -install_name $rpath/$soname $(test -n "$verstring" -a \
+  x$verstring != x0.0 && echo $verstring)'
+        # We need to add '_' to the symbols in $export_symbols first
+        #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
+        hardcode_direct=yes
+
+=head5 Installation
+
+  cd /usr/local/src/libxml2-*version*
+  setenv LDFLAGS "-flat_namespace -undefined suppress"
+  sudo ./configure --with-zlib=/usr --prefix=/usr/local
+  sudo make
+  sudo make check
+  sudo make install
+
+=head4 libxslt
+
+=head5 Simple Patch for libxslt-1.0.20:
+
+The idea behind the patch is to add "-flat_namespace". It comes from Nyk 
Cowham.
+
+  *** configure.orig      Sun Sep 15 01:25:47 2002
+  --- configure   Sun Sep 15 01:26:28 2002
+  ***************
+  *** 3584,3590 ****
+        # FIXME: Relying on posixy $() will cause problems for
+        #        cross-compilation, but unfortunately the echo tests do not
+        #        yet detect zsh echo's removal of \ escapes.
+  !     archive_cmds='$CC $(test .$module = .yes && echo -bundle || echo \
+  -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linkopts \
+  -install_name $rpath/$soname $(test -n "$verstring" -a x$verstring != x0.0 
&& \
+  echo $verstring)'
+        # We need to add '_' to the symbols in $export_symbols first
+        #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
+        hardcode_direct=yes
+  --- 3584,3590 ----
+        # FIXME: Relying on posixy $() will cause problems for
+        #        cross-compilation, but unfortunately the echo tests do not
+        #        yet detect zsh echo's removal of \ escapes.
+  !     archive_cmds='$CC $(test .$module = .yes && echo -bundle || echo \
+  -dynamiclib) $allow_undefined_flag -flat_namespace -o $lib $libobjs \
+  $deplibs$linkopts -install_name $rpath/$soname $(test -n "$verstring" -a \
+  x$verstring != x0.0 && echo $verstring)'
+        # We need to add '_' to the symbols in $export_symbols first
+        #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
+        hardcode_direct=yes
+
+=head5 Installation
+
+  cd /usr/local/src/libxml2-*version*
+  setenv LDFLAGS "-flat_namespace -undefined suppress"
+  sudo ./configure --with-zlib=/usr --prefix=/usr/local
+  sudo make
+  sudo make check
+  sudo make install
+
+=head4 sablotron
+
+=head5 Simple Patch for Sablot-0.96:
+
+The idea behind the patch is to add "-flat_namespace". It comes from Nyk 
Cowham.
+
+  *** configure.orig      Sun Sep 15 11:32:21 2002
+  --- configure   Sun Sep 15 11:32:58 2002
+  ***************
+  *** 3326,3332 ****
+        # FIXME: Relying on posixy $() will cause problems for
+        #        cross-compilation, but unfortunately the echo tests do not
+        #        yet detect zsh echo's removal of \ escapes.
+  !     archive_cmds='$CC $(test .$module = .yes && echo -bundle || echo \
+  -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linkopts \
+  -install_name $rpath/$soname $(test -n "$verstring" -a x$verstring != x0.0 
&& \
+  echo $verstring)'
+        # We need to add '_' to the symbols in $export_symbols first
+        #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
+        hardcode_direct=yes
+  --- 3326,3332 ----
+        # FIXME: Relying on posixy $() will cause problems for
+        #        cross-compilation, but unfortunately the echo tests do not
+        #        yet detect zsh echo's removal of \ escapes.
+  !     archive_cmds='$CC $(test .$module = .yes && echo -bundle || echo \
+  -dynamiclib) $allow_undefined_flag -flat_namespace -o $lib $libobjs \
+  $deplibs$linkopts -install_name $rpath/$soname $(test -n "$verstring" -a \
+  x$verstring != x0.0 && echo $verstring)'
+        # We need to add '_' to the symbols in $export_symbols first
+        #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
+        hardcode_direct=yes      
+
+=head5 Patch for 0.96
+
+Execute the follwing commands if you use Sablot 0.96:
+
+  cd /usr/local/src/Sablot-*version*
+  sudo curl -O 
http://download-2.gingerall.cz/download/sablot/Sablot-0.96.1.patch
+  sudo patch -p2 < Sablot-0.96.1.patch
+
+=head5 Installation
+
+  cd /usr/local/src/Sablot-*version*
+  setenv LDFLAGS "-flat_namespace -undefined suppress"
+  sudo ./configure --with-zlib=/usr --prefix=/usr/local
+  sudo make
+  sudo make check
+  sudo make install
+
+=head4 Perl-Modules
+
+The following commands need to be executed to install the predependecies for 
AxKit. Any errors occuring (for libs not found) can be ignored, they will be 
corrected later
+
+  sudo perl -MCPAN -e shell
+  
+  cpan> install Error
+  cpan> install Apache::Request
+  cpan> install XML::Parser
+  cpan> install XML::XPath
+  cpan> install HTTP::GHTTP
+  cpan> install XML::Sablotron
+  cpan> install XML::LibXML
+  cpan> install XML::LibXSLT
+  cpan> install Apache::Filter
+
+Install the Perl-Module with an explicit link to the libraries/includes.
+
+  cd ~/.cpan/build/XML-Parser-*version*
+  sudo perl Makefile.PL \
+    EXPATLIBPATH=/usr/local/lib \
+    EXPATINCPATH=/usr/local/inc
+  sudo make
+  sudo make test
+  sudo make install
+
+Install the Perl-Module with an explicit link to the libraries/includes.
+
+  cd ~/.cpan/build/XML-Sablotron-0.90/
+  sudo perl Makefile.PL \
+    EXPATLIBPATH=/usr/local/lib \
+    EXPATINCPATH=/usr/local/inc \
+    SABLOTLIBPATH=/usr/local/lib \
+    SABLOTINCPATH=/usr/local/inc
+  sudo make
+  sudo make test
+  sudo make install
+
+The final step. Install AxKit.
+
+  sudo perl -MCPAN -e shell
+  
+  cpan> install AxKit
+
+=head2 Configuring apache for AxKit
+
+Configuring apache for AxKit is very easy, it is just a matter of adding some 
lines to your httpd.conf (F</etc/httpd/httpd.conf>). This would affect the 
whole server.
+
+If you just want to modify your user configuration you have to modify 
F</etc/httpd/users/*username*.conf>. Put the directives between C<<< <Directory 
"/Users/*username*/Sites/"> and </Directory> >>>.
+
+=head3 Configuration directives four your httpd.conf
+
+  PerlModule AxKit
+  AddHandler axkit .xml
+  AddHandler axkit .xsp
+  AddHandler axkit .dkb
+  
+  AxAddStyleMap application/x-xpathscript Apache::AxKit::Language::XPathScript
+  AxAddStyleMap text/xsl Apache::AxKit::Language::Sablot
+  
+  AxDebugLevel 10
+  PerlSetVar AxXPSInterpolate 1

Reply via email to