@@ -49,18 +49,10 @@ protected function build(): void
49
49
}
50
50
51
51
$ cmake ->build ();
52
- copy ($ this ->source_dir . '/third_party/re2/re2.pc ' , BUILD_LIB_PATH . '/pkgconfig/re2.pc ' );
53
- $ this ->patchPkgconfPrefix (['grpc++.pc ' , 'grpc.pc ' , 'grpc++_unsecure.pc ' , 'grpc_unsecure.pc ' , 're2.pc ' ]);
54
52
55
- // shell()->cd($this->source_dir)
56
- // ->exec('EXTRA_DEFINES=GRPC_POSIX_FORK_ALLOW_PTHREAD_ATFORK EMBED_OPENSSL=false CXXFLAGS="-L' . BUILD_LIB_PATH . ' -I' . BUILD_INCLUDE_PATH . '" make static -j' . $this->builder->concurrency);
57
- // copy($this->source_dir . '/libs/opt/libgrpc.a', BUILD_LIB_PATH . '/libgrpc.a');
58
- // copy($this->source_dir . '/libs/opt/libboringssl.a', BUILD_LIB_PATH . '/libboringssl.a');
59
- // if (!file_exists(BUILD_LIB_PATH . '/libcares.a')) {
60
- // copy($this->source_dir . '/libs/opt/libcares.a', BUILD_LIB_PATH . '/libcares.a');
61
- // }
62
- // FileSystem::copyDir($this->source_dir . '/include/grpc', BUILD_INCLUDE_PATH . '/grpc');
63
- // FileSystem::copyDir($this->source_dir . '/include/grpc++', BUILD_INCLUDE_PATH . '/grpc++');
64
- // FileSystem::copyDir($this->source_dir . '/include/grpcpp', BUILD_INCLUDE_PATH . '/grpcpp');
53
+ $ re2Content = file_get_contents ($ this ->source_dir . '/third_party/re2/re2.pc ' );
54
+ $ re2Content = 'prefix= ' . BUILD_ROOT_PATH . "\nexec_prefix= \${prefix} \n" . $ re2Content ;
55
+ file_put_contents (BUILD_LIB_PATH . '/pkgconfig/re2.pc ' , $ re2Content );
56
+ $ this ->patchPkgconfPrefix (['grpc++.pc ' , 'grpc.pc ' , 'grpc++_unsecure.pc ' , 'grpc_unsecure.pc ' , 're2.pc ' ]);
65
57
}
66
58
}
0 commit comments