Skip to content

Commit

Permalink
Updated to newer version of libisasl
Browse files Browse the repository at this point in the history
and fixed some more bugs in the ac scripts
  • Loading branch information
mnunberg committed Feb 19, 2012
1 parent 9c6277d commit e067c89
Show file tree
Hide file tree
Showing 7 changed files with 99 additions and 86 deletions.
2 changes: 1 addition & 1 deletion MANIFEST
Expand Up @@ -64,4 +64,4 @@ src/memcached-headers.tar.gz
src/libcouchbase-1.0.1.tar.gz
src/libvbucket-1.8.0.2.tar.gz
src/libevent-2.0.17-stable.tar.gz
src/libisasl-1.0.0_2_gc3f3496.tar.gz
src/libisasl-1.0.0_3_g35e33e3.tar.gz
25 changes: 11 additions & 14 deletions Makefile.PL
Expand Up @@ -61,14 +61,14 @@ $MM_Options{CONFIGURE} = sub {
my @C_Modules = qw(
callbacks convert ctor async_base async_callbacks async_events);
my @XS_Modules = qw(Client Client_multi);

foreach (@XS_Modules, @C_Modules) {
my $obj = $_ . $Config{obj_ext};
push @{ $MM_Options{OBJECT} }, File::Spec->catfile('xs', $obj);
}

$MM_Options{OBJECT} = join(' ', @{$MM_Options{OBJECT}});

foreach my $xs (@XS_Modules) {
$xs = File::Spec->catfile('xs', $xs);
my $c = "$xs.c";
Expand Down Expand Up @@ -105,11 +105,11 @@ WriteMakefile(
AUTHOR => q{M. Nunberg <mnunberg@haskalah.org>},
VERSION_FROM => 'lib/Couchbase/Client.pm',
ABSTRACT_FROM => 'lib/Couchbase/Client.pm',

($ExtUtils::MakeMaker::VERSION >= 6.3002
? ('LICENSE'=> 'perl')
: ()),
: ()),

CONFIGURE_REQUIRES => {
'Dir::Self' => 0,
},
Expand All @@ -119,21 +119,18 @@ WriteMakefile(
'ExtUtils::H2PM' => 0.08,
'Class::XSAccessor' => 1.11,
'Test::More' => 0,

#We need libevent for whatever we're doing
'Alien::Libevent' => 0.001004,


#These modules are needed for tests, but not strictly required for
#functionality

'Log::Fu' => 0.25,
'Test::Class' => 0.36,

#these are needed for asynchronous tests and modules
'POE::Sugar::Attributes' => 0.02,
'POE' => 1.312,
},

dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
clean => { FILES => 'Couchbase-Client-* COMPILER_FLAGS' },
%MM_Options,
Expand Down Expand Up @@ -169,4 +166,4 @@ sub libscan {
} else {
return $path;
}
}
}
2 changes: 1 addition & 1 deletion PLCB_Config.pm
Expand Up @@ -18,7 +18,7 @@ my $params = {
LIBVBUCKET_RELEASE => '1.8.0.2',
LIBCOUCHBASE_RELEASE => '1.0.1',

LIBISASL_RELEASE => '1.0.0_2_gc3f3496',
LIBISASL_RELEASE => '1.0.0_3_g35e33e3',
LIBEVENT_RELEASE => '2.0.17-stable',
};

Expand Down
28 changes: 16 additions & 12 deletions build_libraries.pl
Expand Up @@ -49,6 +49,7 @@ sub runcmd {
print STDERR "Command $cmd failed\n";
printf STDERR ("CPPFLAGS=%s\nLDFLAGS=%s\n", $ENV{CPPFLAGS}, $ENV{LDFLAGS});
printf STDERR ("LD_RUN_PATH=%s\n", $ENV{LD_RUN_PATH});
printf STDERR ("LIBS=%s\n", $ENV{LIBS});
die "";
}
}
Expand Down Expand Up @@ -166,7 +167,7 @@ sub lib_is_built {
--disable-debug-mode
), @COMMON_OPTIONS
);

chdir tarball_2_dir($LIBEVENT_TARBALL);
runcmd("./configure", @libevent_options) unless -e 'Makefile';
log_info("Configured libevent");
Expand All @@ -185,13 +186,13 @@ sub lib_is_built {
runcmd("./configure", @COMMON_OPTIONS);
log_info("Configured libvbucket");
}

runcmd("$MAKEPROG");
log_info("build libvbucket");
runcmd("$MAKEPROG install");
log_info("installed libvbucket");
runcmd("$MAKEPROG check") if $RUN_TESTS;
log_info("tested libvbucket");
log_info("tested libvbucket");
}


Expand All @@ -203,22 +204,22 @@ sub lib_is_built {
{
chdir $TOPLEVEL;
chdir tarball_2_dir($LIBCOUCHBASE_TARBALL);

my @libcouchbase_options = (
@COMMON_OPTIONS,
"--disable-tools",
"--enable-embed-libevent-plugin",
);

if($^O =~ /solaris/) {
print STDERR "Disabling tools (won't compile on solaris)\n";
push @libcouchbase_options, '--disable-tools';
}

my $have_java = eval { runcmd("java", "-version"); 1; };
my $mockpath = File::Spec->catfile(
__DIR__, 't', 'tmp', 'CouchbaseMock.jar');

if(!-e $mockpath) {
die("Can't find mock in $mockpath");
}
Expand All @@ -227,7 +228,7 @@ sub lib_is_built {
} else {
push @libcouchbase_options, '--disable-couchbasemock';
}

#First, we need to mangle the 'configure' script:
{
my @conflines;
Expand All @@ -237,17 +238,20 @@ sub lib_is_built {
if($line =~ s/LIBS=(-l\S+)/LIBS="\$LIBS $1"/msg) {
print STDERR ">> REPLACING: $line";
}
if($line =~ s/sasl_server_init\(NULL,/sasl_client_init\(/) {
print STDERR ">> REPLACING: $line";
}
}
seek($confh, 0, 0);
print $confh @conflines;
truncate($confh, tell($confh));

close($confh);
}
runcmd("./configure", @libcouchbase_options) unless -e 'Makefile';

runcmd("./configure", @libcouchbase_options) unless -e 'Makefile';
runcmd("$MAKEPROG install");
runcmd("$MAKEPROG check -s") if $RUN_TESTS;
}

exit(0);
exit(0);
2 changes: 1 addition & 1 deletion lib/Couchbase/Client.pm
Expand Up @@ -2,7 +2,7 @@ package Couchbase::Client;

BEGIN {
require XSLoader;
our $VERSION = '0.13_0';
our $VERSION = '0.14_0';
XSLoader::load(__PACKAGE__, $VERSION);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Couchbase/Client/Async.pm
@@ -1,7 +1,7 @@
package Couchbase::Client::Async;
use strict;
use warnings;
our $VERSION = '0.13_0';
our $VERSION = '0.14_0';
require XSLoader;
XSLoader::load('Couchbase::Client', $VERSION);
use Couchbase::Client;
Expand Down

0 comments on commit e067c89

Please sign in to comment.