Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rlerdorf/php7dev
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: envms/php7dev
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 6 commits
  • 6 files changed
  • 1 contributor

Commits on Sep 16, 2018

  1. Copy the full SHA
    5a5a183 View commit details
  2. Add fluentdb.sql to vagrant box initialization

      - rename create-mysql.sh to mysql-init.sh
    cbornhoft committed Sep 16, 2018
    Copy the full SHA
    575f1fc View commit details
  3. Add PHP 7.2 to install list

      - make 7.2 default when requesting version 7
      - removed versions 5.3-5.5 (all legacy)
    cbornhoft committed Sep 16, 2018
    Copy the full SHA
    532dc85 View commit details

Commits on Sep 17, 2018

  1. Add PHP 7.3 to install list

      - removed php < 5.6 from build params
      - reformatted code
    cbornhoft committed Sep 17, 2018
    Copy the full SHA
    d67f1d4 View commit details
  2. Add "7X" option to rebuild all 7.* versions

      - include code reformat
    cbornhoft committed Sep 17, 2018
    Copy the full SHA
    de35587 View commit details
  3. Update box source to envms

      - also increased memory to 2GB, CPUs (threads) to 2
    cbornhoft committed Sep 17, 2018
    Copy the full SHA
    aec3e21 View commit details
Showing with 416 additions and 370 deletions.
  1. +51 −24 makeext
  2. +348 −333 makephp
  3. +3 −3 newphp
  4. +10 −6 php7dev.yaml
  5. +1 −1 scripts/{create-mysql.sh → mysql-init.sh}
  6. +3 −3 scripts/php7dev.rb
75 changes: 51 additions & 24 deletions makeext
Original file line number Diff line number Diff line change
@@ -1,68 +1,95 @@
#!/usr/local/php70/bin/php
<?php
if($argc<2) usage();
if ($argc < 2) {
usage();
}

$zts = $world = false;
$build = [];
$conf = [];

$version = preg_replace('/[\.\-]+/', '', $argv[1]);

function usage() {
function usage()
{
$cmd = basename(__FILE__);
echo "Usage: $cmd 71|70|56|55|54|53|all|world [zts]\n";
echo "To rebuild ext for PHP 7.0 and 7.0-debug: $cmd 70\n";
echo "To rebuild ext for PHP 7.0 and 7.0-debug threadsafe: $cmd 70 zts\n";
echo "To rebuild ext for PHP 5.*: $cmd 5\n";
echo "Usage: $cmd 73|72|71|70|7X|56|all|world [zts]\n";
echo "To rebuild ext for PHP 7.2 and 7.2-debug: $cmd 72\n";
echo "To rebuild ext for PHP 7.2 and 7.2-debug threadsafe: $cmd 72 zts\n";
echo "To rebuild ext for all PHP 7 versions: $cmd 7X\n";
exit;
}

if(!empty($argv[2]) && $argv[2]=='zts') $zts = true;
if (!empty($argv[2]) && $argv[2] == 'zts') {
$zts = true;
}

switch($argv[1]) {
case '71': $build[71]=true; break;
switch ($argv[1]) {
case '73':
$build[73] = true;
break;
case '7':
case '70': $build[7]=true; break;
case '56': $build[56]=true; break;
case '55': $build[55]=true; break;
case '54': $build[54]=true; break;
case '5': $build = [56=>true,55=>true,54=>true]; break;
case 'all': $build = [7=>true, 56=>true,55=>true,54=>true]; break;
case 'world': $build = [71=>true, 7=>true, 56=>true,55=>true,54=>true]; $world=true; break;
case '72':
$build[72] = true;
break;
case '71':
$build[71] = true;
break;
case '70':
$build[7] = true;
break;
case '7X':
$build = [73 => true, 72 => true, 71 => true, 7 => true];
break;
case '5':
case '56':
$build[56] = true;
break;
case 'all':
$build = [73 => true, 72 => true, 71 => true, 7 => true, 56 => true];
break;
case 'world':
$build = [73 => true, 72 => true, 71 => true, 7 => true, 56 => true];
$world = true;
break;
}

function build_it() {
function build_it()
{
$cmds = [
"=configuring...",
"sudo make distclean 2>&1 1>> /dev/null",
"phpize",
"phpize",
"./configure 2>&1 1>> /tmp/build.log",
"=\ncompiling...",
"make -j2 2>&1 1>> /tmp/build.log",
"=\ninstalling...",
"sudo make install 2>&1 1>> /tmp/build.log",
"=\ndone\n"
];
foreach($cmds as $cmd) {
if($cmd[0]=='=') echo substr($cmd,1);
else shell_exec($cmd);
foreach ($cmds as $cmd) {
if ($cmd[0] == '=') {
echo substr($cmd, 1);
} else {
shell_exec($cmd);
}
}
}

$dir = getcwd();
shell_exec("truncate --size 0 /tmp/build.log");
echo "Build log in /tmp/build.log\n";

foreach($build as $v=>$b) {
if(!$zts || $world) {
foreach ($build as $v => $b) {
if (!$zts || $world) {
echo "Building extension for PHP $v\n";
shell_exec("newphp $v");
build_it();
echo "Building PHP $v-debug\n";
shell_exec("newphp $v debug");
build_it();
}
if($zts || $world) {
if ($zts || $world) {
echo "Building PHP $v-zts\n";
build_it();
echo "Building PHP $v-debug-zts\n";
Loading