+ }
+
+ /**
+ * Phpize + trinity
+ */
+ private function build() {
+ try {
+ // phpize
+ $this->info("Runnin phpize ... ");
+ $cmd = new ExecCmd($this->php("ize"), $this->args->verbose);
+ $cmd->run();
+ $this->info("OK\n");
+
+ // configure
+ $this->info("Running configure ... ");
+ $args = ["--with-php-config=". $this->php("-config")];
+ if ($this->args->configure) {
+ $args = array_merge($args, $this->args->configure);
+ }
+ $cmd = new ExecCmd("./configure", $this->args->verbose);
+ $cmd->run($args);
+ $this->info("OK\n");
+
+ // make
+ $this->info("Running make ... ");
+ $cmd = new ExecCmd("make", $this->args->verbose);
+ if ($this->args->verbose) {
+ $cmd->run(["-j3"]);
+ } else {
+ $cmd->run(["-j3", "-s"]);
+ }
+ $this->info("OK\n");
+
+ // install
+ $this->info("Running make install ... ");
+ $cmd->setSu($this->args->sudo);
+ if ($this->args->verbose) {
+ $cmd->run(["install"]);
+ } else {
+ $cmd->run(["install", "-s"]);
+ }
+ $this->info("OK\n");
+
+ } catch (\Exception $e) {
+ $this->error("%s\n", $e->getMessage());
+ $this->error("%s\n", $cmd->getOutput());
+ }