Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Make compatible with newer libcouchbase versions (with less deps)

- Fixed bundled building (user can force this even if libcouchbase is
  installed)

- Removed libisasl build process (libisasl is now shipped with
  libcouchbase)

- Removed memcached headers extraction (this too is shipped with
  libcouchbase)
  • Loading branch information...
commit 836832cc1593e5df139e24e9cb0c81ca2f05ea86 1 parent 3e117b7
M. Nunberg mnunberg authored
1  MANIFEST.in
@@ -61,7 +61,6 @@ t/tmp/CouchbaseMock.jar
61 61 src/Makefile.PL
62 62 src/libcouchbase.pm
63 63
64   -src/memcached-headers.tar.gz
65 64 src/libcouchbase-__LIBCOUCHBASE_RELEASE__.tar.gz
66 65 src/libvbucket-__LIBVBUCKET_RELEASE__.tar.gz
67 66 src/libevent-__LIBEVENT_RELEASE__.tar.gz
3  Makefile.PL
@@ -18,9 +18,10 @@ $ENV{LD_RUN_PATH} ||= "";
18 18
19 19 #$Verbose = 99;
20 20
  21 +our $Bundled = 0;
21 22 GetOptions(
22 23 'dynamic' => \my $UseDynamic,
23   - 'bundled' => \my $UseBundled,
  24 + 'bundled' => \$Bundled,
24 25 'incpath=s' => \our $U_IncPath,
25 26 'libpath=s' => \our $U_LibPath
26 27 ) or die <<EOD;
5 PLCB_Config.pm
@@ -15,10 +15,9 @@ my $params = {
15 15 'perl-Couchbase-Client/CouchbaseMock-0.5-SNAPSHOT.jar',
16 16
17 17 #version numbers for libcouchbase and libvbucket
18   - LIBVBUCKET_RELEASE => '1.8.0.2',
19   - LIBCOUCHBASE_RELEASE => '1.0.0_75_g5622928',
  18 + LIBVBUCKET_RELEASE => '1.8.0.4',
  19 + LIBCOUCHBASE_RELEASE => '1.0.4',
20 20
21   - #LIBISASL_RELEASE => '1.0.0_3_g35e33e3',
22 21 LIBEVENT_RELEASE => '2.0.17-stable',
23 22 };
24 23
8 build_libraries.pl
@@ -76,7 +76,6 @@ sub tarball_2_dir {
76 76 my $LIBVBUCKET_TARBALL = lib_2_tarball('libvbucket');
77 77 my $LIBCOUCHBASE_TARBALL = lib_2_tarball('libcouchbase');
78 78 my $LIBEVENT_TARBALL = lib_2_tarball('libevent');
79   -my $MEMCACHED_H_TARBALL = "memcached-headers.tar.gz";
80 79
81 80 ################################################################################
82 81 ################################################################################
@@ -94,13 +93,6 @@ sub tarball_2_dir {
94 93 mkpath($INCLUDE_PATH);
95 94 mkpath($LIB_PATH);
96 95
97   -runcmd("tar xzf $MEMCACHED_H_TARBALL");
98   -rmtree(File::Spec->catfile($INCLUDE_PATH, 'memcached'));
99   -runcmd("mv include/memcached $INCLUDE_PATH && rm -rf include/memcached");
100   -unless(-e File::Spec->catfile($INCLUDE_PATH, 'memcached', 'protocol_binary.h')) {
101   - die("Can't extract memcached headers");
102   -}
103   -
104 96 $ENV{PKG_CONFIG_PATH} .= ":"
105 97 . File::Spec->catfile($INST_DIR, 'lib', 'pkgconfig');
106 98 #$ENV{CC} = $Config{cc};
21 src/Makefile.PL
@@ -72,14 +72,6 @@ return 1;
72 72
73 73 EOC
74 74
75   -my $LIBSASL_CFUNC = <<EOC;
76   -
77   -#include <stdlib.h>
78   -sasl_server_init(NULL, NULL);
79   -return 0;
80   -
81   -EOC
82   -
83 75 sub check_dependency {
84 76 my ($names,$fn,%extra) = @_;
85 77 $names = ref $names ? $names : [ $names ];
@@ -87,6 +79,10 @@ sub check_dependency {
87 79 print STDERR "\nChecking for @{$names}...\n";
88 80 local %ENV = %ENV;
89 81
  82 + if ($PLCBTopLevel::Bundled) {
  83 + return 0;
  84 + }
  85 +
90 86 foreach my $libname (@$names) {
91 87 my (undef,undef,$ldargs,$runpath,$sofile) =
92 88 ExtUtils::Liblist->ext("$SEARCHPATH_S -l$libname", 0, 1);
@@ -297,7 +293,7 @@ sub MM_Configure {
297 293
298 294 if($ENV{PLCB_BUILD_ALL}) {
299 295 log_err('build_all reuqested');
300   - @to_build = qw(VBUCKET COUCHBASE EVENT ISASL);
  296 + @to_build = qw(VBUCKET COUCHBASE EVENT);
301 297 goto GT_MANGLE;
302 298 }
303 299
@@ -318,13 +314,6 @@ sub MM_Configure {
318 314 'event', $LIBEVENT_CFUNC, header => ['event.h', 'stdio.h'] )) {
319 315 push @to_build, 'EVENT';
320 316 }
321   -
322   -
323   - if(0 && !check_dependency(
324   - ['sasl2', 'sasl'], $LIBSASL_CFUNC,
325   - header => [ 'stdlib.h', 'sasl/sasl.h'] )) {
326   - push @to_build, 'ISASL';
327   - }
328 317
329 318 GT_MANGLE:
330 319 my $errmsg = "\n".

0 comments on commit 836832c

Please sign in to comment.
Something went wrong with that request. Please try again.