Skip to content

Commit cc1f899

Browse files
committed
re2.pc didn't have prefix listed
1 parent 848c305 commit cc1f899

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

src/SPC/builder/unix/library/grpc.php

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,10 @@ protected function build(): void
4949
}
5050

5151
$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']);
5452

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']);
6557
}
6658
}

0 commit comments

Comments
 (0)