Commit a6df0ebf authored by Viktor Horvath's avatar Viktor Horvath

Perl: compile Perl 5.14.2 for Mioga, for AMD64 systems;

Apache-Perl: compile mod_apreq2 and the Perl module Apache2::Request;
Mioga: include simple modules like Date::Perl.

This needs a recent version of the CPAN recipe to work!
(starting with commit 018da2d)
parent de470c25
[buildout] [buildout]
parts = apache-perl parts = apache-perl perl-Apache2-Request
extends = extends =
../apache/buildout.cfg ../apache/buildout.cfg
...@@ -15,7 +15,16 @@ configure-command = ...@@ -15,7 +15,16 @@ configure-command =
${perl:location}/bin/perl Makefile.PL ${perl:location}/bin/perl Makefile.PL
configure-options = configure-options =
MP_AP_PREFIX=${apache-2.2:location} MP_AP_PREFIX=${apache-2.2:location}
LIBS="-L${libuuid:location}/lib -Wl,-rpath=${libuuid:location}"
# for mod_apreq2 and Apache2::Request
[perl-Apache2-Request]
recipe = slapos.recipe.build:cpan
modules =
I/IS/ISAAC/libapreq2-2.13.tar.gz
perl = perl
cpan-configuration =
makepl_arg = --with-apache2-apxs=${apache-2.2:location}/bin/apxs
environment = environment =
# CPPFLAGS=-I${libuuid:location}/include APR_LDFLAGS = -L${libuuid:location}/lib -Wl,-R${libuuid:location}/lib -L${libexpat:location}/lib -Wl,-R${libexpat:location}/lib -L${apache-2.2:location}/lib -Wl,-R${apache-2.2:location}/lib
MP_CCOPTS=-L${libuuid:location}/lib LDFLAGS=-L${libuuid:location}/lib -Wl,-rpath=${libuuid:location}/lib -L${libexpat:location}/lib -Wl,-rpath=${libexpat:location}/lib -L${apache-2.2:location}/lib -Wl,-rpath=${apache-2.2:location}/lib
...@@ -16,15 +16,18 @@ filename = ${:_buildout_section_name_} ...@@ -16,15 +16,18 @@ filename = ${:_buildout_section_name_}
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
depends = depends =
${gdbm:version} ${gdbm:version}
version = 5.16.0 version = 5.14.2
url = http://www.cpan.org/src/5.0/perl-${:version}.tar.bz2 url = http://www.cpan.org/src/5.0/perl-${:version}.tar.bz2
md5sum = 15a2f95fb27231e10998240f13acf961 md5sum = 04a4c5d3c1f9f19d77daff8e8cd19a26
siteprefix = ${buildout:parts-directory}/site_${:_buildout_section_name_} siteprefix = ${buildout:parts-directory}/site_${:_buildout_section_name_}
patch-options = -p1 patch-options = -p1
patches = patches =
${perl-keep-linker-flags-in-ldflags.patch:location}/${perl-keep-linker-flags-in-ldflags.patch:filename} ${perl-keep-linker-flags-in-ldflags.patch:location}/${perl-keep-linker-flags-in-ldflags.patch:filename}
# Viktor has adapted the following commands for AMD64 compilation
# TODO: find out how we can write a generic code that suits all architectures
configure-command = configure-command =
sh Configure -des \ sh Configure -des \
-A ccflags=-fPIC \
-Dprefix=${buildout:parts-directory}/${:_buildout_section_name_} \ -Dprefix=${buildout:parts-directory}/${:_buildout_section_name_} \
-Dsiteprefix=${:siteprefix} \ -Dsiteprefix=${:siteprefix} \
-Dcflags=-I${gdbm:location}/include \ -Dcflags=-I${gdbm:location}/include \
...@@ -33,3 +36,4 @@ configure-command = ...@@ -33,3 +36,4 @@ configure-command =
-Dnoextensions=ODBM_File -Dnoextensions=ODBM_File
environment = environment =
PATH=${patch:location}/bin:%(PATH)s PATH=${patch:location}/bin:%(PATH)s
CFLAGS='-m64 -mtune=nocona'
...@@ -7,6 +7,7 @@ LoadModule headers_module modules/mod_headers.so ...@@ -7,6 +7,7 @@ LoadModule headers_module modules/mod_headers.so
LoadModule dir_module modules/mod_dir.so LoadModule dir_module modules/mod_dir.so
LoadModule mime_module modules/mod_mime.so LoadModule mime_module modules/mod_mime.so
LoadModule perl_module modules/mod_perl.so LoadModule perl_module modules/mod_perl.so
LoadModule apreq_module modules/mod_apreq2.so
# Basic server configuration # Basic server configuration
PidFile "%(pid_file)s" PidFile "%(pid_file)s"
...@@ -33,7 +34,7 @@ CustomLog "%(access_log)s" common ...@@ -33,7 +34,7 @@ CustomLog "%(access_log)s" common
use Apache2::RequestIO (); use Apache2::RequestIO ();
use Apache2::RequestRec (); use Apache2::RequestRec ();
# use Apache2::Request; use Apache2::Request;
use Date::Calc (); use Date::Calc ();
sub test_handler { sub test_handler {
...@@ -48,11 +49,11 @@ CustomLog "%(access_log)s" common ...@@ -48,11 +49,11 @@ CustomLog "%(access_log)s" common
$r->print("Testing Date::Calc: English ordinal for current year is " $r->print("Testing Date::Calc: English ordinal for current year is "
. Date::Calc::English_Ordinal($year) . "\n"); . Date::Calc::English_Ordinal($year) . "\n");
} }
# { {
# my $apreq = new Apache2::Request($r); my $apreq = new Apache2::Request($r);
# my $hello = $apreq->param('hello'); my $hello = $apreq->param('hello');
# $r->print("Testing Apache2::Request: The parameter 'hello' is '$hello'\n"); $r->print("Testing Apache2::Request: The parameter 'hello' is '$hello'\n");
# } }
return Apache2::Const::OK; return Apache2::Const::OK;
} }
</Perl> </Perl>
......
[buildout] [buildout]
parts =
switch-softwaretype
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
parts = instance [switch-softwaretype]
recipe = slapos.cookbook:softwaretype
[instance] default = ${template-apacheperl:output}
recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location}
template = ${application-template:location}/${application-template:filename}
configuration = ${application-configuration:location}
httpd_binary = ${apache:location}/bin/httpd [slap-connection]
mysql_binary = ${mariadb:location}/bin/mysql # part to migrate to new - separated words
mysql_install_binary = ${mariadb:location}/bin/mysql_install_db computer-id = $${slap_connection:computer_id}
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade partition-id = $${slap_connection:partition_id}
mysqld_binary = ${mariadb:location}/libexec/mysqld server-url = $${slap_connection:server_url}
software-release-url = $${slap_connection:software_release_url}
key-file = $${slap_connection:key_file}
cert-file = $${slap_connection:cert_file}
\ No newline at end of file
[buildout] [buildout]
extends = develop =
../../component/postgresql/buildout.cfg /srv/slapgrid/slappart9/srv/runner/project/slapos
/opt/slapdev_build
# ../../component/postgresql/buildout.cfg
extends =
../../component/apache-perl/buildout.cfg ../../component/apache-perl/buildout.cfg
../../component/lxml-python/buildout.cfg
../../stack/slapos.cfg ../../stack/slapos.cfg
# parts = eggs postgresql apache-perl template perl-Apache2-Request
parts = eggs cpan-simple-modules apache-perl template perl-Apache2-Request
[eggs]
recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
slapos.cookbook
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
# md5sum =
output = ${buildout:directory}/template.cfg
mode = 0644
[template-apacheperl]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-apacheperl.cfg
# md5sum =
output = ${buildout:directory}/template-apacheperl.cfg
mode = 0644
[cpan-simple-modules]
recipe = slapos.recipe.build:cpan
modules =
S/ST/STBEY/Date-Calc-6.3.tar.gz
perl = perl
[networkcache] [networkcache]
# Cedric de Saint Martin signature certificate # Cedric de Saint Martin signature certificate
signature-certificate-list = signature-certificate-list =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment