Alien-Google-GRPC

 view release on metacpan or  search on metacpan

alienfile  view on Meta::CPAN

        make clean
USE_A_SHELL
    ' ],
  ];

  gather [
    # Trust the force.
    # Automagic will rewrite your path.
    [ 'echo "1.4.1"', \'%{.runtime.version}' ],
    [ 'echo "-L%{.install.prefix}/lib -lgrpc -lgrpc++ -lprotobuf -lpthread"', \'%{.runtime.libs}'    ],
    [ 'echo "-I%{.install.prefix}/include -pthread"', \'%{.runtime.cflags}'    ],
  ];

};

sys {
  gather [
    [ 'pkg-config --modversion  grpc++', \'%{.runtime.version}' ],
    [ 'pkg-config --cflags grpc grpc++  protobuf', \'%{.runtime.cflags}'  ],
    [ 'pkg-config --libs   grpc grpc++  protobuf', \'%{.runtime.libs}'    ],
  ];
};


lib/Alien/Google/GRPC.pm  view on Meta::CPAN

In your Build.PL:

 use Module::Build;
 use Alien::Google::GRPC;
 my $builder = Module::Build->new(
   ...
   configure_requires => {
     'Alien::Google::GRPC' => '0',
     ...
   },
   extra_compiler_flags => Alien::Google::GRPC->cflags,
   extra_linker_flags   => Alien::Google::GRPC->libs,
   ...
 );
 
 $build->create_build_script;

In your Makefile.PL:

 use ExtUtils::MakeMaker;
 use Config;
 use Alien::Google::GRPC;
 
 WriteMakefile(
   ...
   CONFIGURE_REQUIRES => {
     'Alien::Google::GRPC' => '0',
   },
   CCFLAGS => Alien::Google::GRPC->cflags . " $Config{ccflags}",
   LIBS    => [ Alien::Google::GRPC->libs ],
   ...
 );

In your script or module:

 use Alien::Google::GRPC;
 use Env qw( @PATH );
 
 unshift @PATH, Alien::Google::GRPC->bin_dir;



( run in 0.318 second using v1.01-cache-2.11-cpan-94b05bcf43c )