Jabber-mod_perl
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
# remove the old file
warn "removing old $targetpkt ...\n" if unlink($targetpkt);
warn "removing old $targetnad ...\n" if unlink($targetnad);
warn "removing old $targetxsi ...\n" if unlink($targetxsi);
# create Jabber_pkt.c from XS file
my $xsubppcmd = $perl.' -I'.$Config{'archlib'}.' -I'.$Config{'privlibexp'}.' '.$xsubpp.' -typemap '.$typemap.' patches/pkt.xs > pkt.xsc && mv pkt.xsc '.$targetpkt;
warn "\n\nExecuting $xsubppcmd\n To create Jabber_pkt.c from pkt.xs.\n";
system("$xsubppcmd");
die "Failed to create Jabber_pkt.c !\n" unless -f $targetpkt;
# create Jabber_NADs.c from XS file
my $xsubppcmd = $perl.' -I'.$Config{'archlib'}.' -I'.$Config{'privlibexp'}.' '.$xsubpp.' -typemap '.$typemap.' patches/NADs.xs > NADs.xsc && mv NADs.xsc '.$targetnad;
warn "\n\nExecuting $xsubppcmd\n To create Jabber_NADs.c from NADs.xs.\n";
system("$xsubppcmd");
die "Failed to create Jabber_NADs.c !\n" unless -f $targetnad;
# create perlxsi.c as per /usr/bin/perl -MExtUtils::Embed -e xsinit -- -std -o
my $perlxsicmd = $perl.' -MExtUtils::Embed -e xsinit -- -std -o STDOUT > perlxsi.c && mv perlxsi.c '.$targetxsi;
warn "\n\nExecuting $perlxsicmd\n To create perlxsi.c.\n";
system("$perlxsicmd");
die "Failed to create perlxsi.c !\n" unless -f $targetxsi;
## do it all again for jadperl
#my $targetpkt = $jabberdir.'/jadperl/Jabber_pkt.c';
#my $targetnad = $jabberdir.'/jadperl/Jabber_NADs.c';
#my $targetxsi = $jabberdir.'/jadperl/perlxsi.c';
#
## remove the old file
#warn "removing old $targetpkt ...\n" if unlink($targetpkt);
#warn "removing old $targetnad ...\n" if unlink($targetnad);
#warn "removing old $targetxsi ...\n" if unlink($targetxsi);
#
## create Jabber_pkt.c from XS file
#my $xsubppcmd = $perl.' -I'.$Config{'archlib'}.' -I'.$Config{'privlibexp'}.' '.$xsubpp.' -typemap '.$typemap.' patches/jadperl_pkt.xs > pkt.xsc && mv pkt.xsc '.$targetpkt;
#warn "\n\nExecuting $xsubppcmd\n To create Jabber_pkt.c from jadperl_pkt.xs.\n";
#system("$xsubppcmd");
#die "Failed to create Jabber_pkt.c !\n" unless -f $targetpkt;
#
## create Jabber_NADs.c from XS file
#my $xsubppcmd = $perl.' -I'.$Config{'archlib'}.' -I'.$Config{'privlibexp'}.' '.$xsubpp.' -typemap '.$typemap.' patches/NADs.xs > NADs.xsc && mv NADs.xsc '.$targetnad;
#warn "\n\nExecuting $xsubppcmd\n To create Jabber_NADs.c from jadperl_NADs.xs.\n";
#system("$xsubppcmd");
#die "Failed to create Jabber_NADs.c !\n" unless -f $targetnad;
#
#
## create perlxsi.c as per /usr/bin/perl -MExtUtils::Embed -e xsinit -- -std -o
#my $perlxsicmd = $perl.' -MExtUtils::Embed -e xsinit -- -std -o STDOUT > perlxsi.c && mv perlxsi.c '.$targetxsi;
#warn "\n\nExecuting $perlxsicmd\n To create perlxsi.c.\n";
#system("$perlxsicmd");
#die "Failed to create perlxsi.c !\n" unless -f $targetxsi;
my $CFLAGS = ccopts();
my $LDFLAGS = ldopts();
chomp($CFLAGS,$LDFLAGS);
my $cmd = "cd $jabberdir; ./bootstrap; libtoolize --force && aclocal $ENV{ACLOCAL_FLAGS} && autoheader && automake --include-deps --add-missing && autoconf; CFLAGS=\'$CFLAGS $ENV{CFLAGS}\' LDFLAGS=\'$LDFLAGS $ENV{LDFLAGS}\' ./configure $conf && make...
#my $cmd = "cd $jabberdir; CFLAGS=\'$CFLAGS $ENV{CFLAGS}\' LDFLAGS=\'$LDFLAGS $ENV{LDFLAGS}\' ./configure $conf && make";
# now for the big kick off
warn "\n\nExecuting $cmd\n To build jabberd.\n";
system("$cmd");
die "jabberd2 build failed!\n" unless -x $jabberdir."/sm/sm";
my ($LIBS, $INCS, $DEFINE);
$LIBS = "-L".$jabberdir."/util -lutil";
$INCS = "-I".$jabberdir."/util";
$ENV{'JABBERDIR'} = $jabberdir;
WriteMakefile(
clean => { 'FILES' => '*~ *.inl core test*.txt *.tar.gz _Inline ' },
dist => { 'TARFLAGS' => 'cvf',
'COMPRESS' => 'gzip -9f',
'SUFFIX' => '.tgz'},
'NAME' => 'Jabber::mod_perl',
'VERSION_FROM' => 'mod_perl.pm',
'DEFINE' => $DEFINE,
'LIBS' => $LIBS,
'INC' => $INCS,
);
( run in 2.001 seconds using v1.01-cache-2.11-cpan-5c0b1e786e0 )