Commit: 45c8097c71a7d016c9833270440ed5ea954372d6 Author: Anatol Belski <[email protected]> Wed, 25 Sep 2013 20:50:42 +0200 Parents: 555377b52a273304e9a60c77cc6cd712bc5c11d4 Branches: master
Link: http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=45c8097c71a7d016c9833270440ed5ea954372d6 Log: basic implementation of library configs for builds - concrete implementation for avoiding header conflicts Changed paths: M client/data/config/pecl/exts.ini A client/data/config/pecl/libs.ini M client/include/PeclExt.php Diff: diff --git a/client/data/config/pecl/exts.ini b/client/data/config/pecl/exts.ini index 5f6d5f9..8161ac1 100644 --- a/client/data/config/pecl/exts.ini +++ b/client/data/config/pecl/exts.ini @@ -387,3 +387,11 @@ libs[]=GraphicsMagick exts[]= opts[]= +[xcommerce] +real_name=xcom +type=with +libs[]=pthreads +libs[]=avro +exts[]= +opts[]= + diff --git a/client/data/config/pecl/libs.ini b/client/data/config/pecl/libs.ini new file mode 100644 index 0000000..35d829d --- /dev/null +++ b/client/data/config/pecl/libs.ini @@ -0,0 +1,79 @@ +; This file is supposed to describe some specialities of the dependency libs. +; The available options are: +; +; expand_include= Whether subdirs in the includes of this lib have to be added to the path. +; Usually no header clashing happens, so if not set, default is true. Set +; explicitly to zero if you don't want it. + +[GraphicsMagick] +expand_include=1 + +[ImageMagick] +expand_include=1 + +[avro] +expand_include=0 + +[fribidi] +expand_include=1 + +[json-c] +expand_include=1 + +[libIP2Location] +expand_include=1 + +[libcapn] +expand_include=1 + +[libcouchbase] +expand_include=1 + +[libevent] +expand_include=1 + +[libfann] +expand_include=1 + +[libgeoip] +expand_include=1 + +[libharu] +expand_include=1 + +[libjudy] +expand_include=1 + +[librabbitmq] +expand_include=1 + +[librsync] +expand_include=1 + +[libshp] +expand_include=1 + +[libsphinxclient] +expand_include=1 + +[libxdiff] +expand_include=1 + +[libxl] +expand_include=1 + +[libyaml] +expand_include=1 + +[libzmq] +expand_include=1 + +[pdflib] +expand_include=1 + +[perl] +expand_include=1 + +[pthreads] +expand_include=1 + diff --git a/client/include/PeclExt.php b/client/include/PeclExt.php index b6c7b79..dcb501a 100644 --- a/client/include/PeclExt.php +++ b/client/include/PeclExt.php @@ -280,6 +280,8 @@ class PeclExt continue; } + $lib_conf = $this->getLibraryConfig($lib); + $lib_path = $deps_path . DIRECTORY_SEPARATOR . $lib; $some_lib_path = $lib_path . DIRECTORY_SEPARATOR . 'lib'; @@ -294,9 +296,12 @@ class PeclExt } $extra_inc[] = $some_lib_inc_path; - $dirs = glob("$some_lib_inc_path/*", GLOB_ONLYDIR); - foreach ($dirs as $dir) { - $extra_inc[] = $dir; + /* If expand_include not set, consider true. */ + if (!isset($lib_conf['expand_include']) || $lib_conf['expand_include']) { + $dirs = glob("$some_lib_inc_path/*", GLOB_ONLYDIR); + foreach ($dirs as $dir) { + $extra_inc[] = $dir; + } } } @@ -400,6 +405,20 @@ if (!function_exists('rmtools\combinations')) { return $config; } + public function getLibraryConfig($name) + { + $ret = array(); + + $known_path = __DIR__ . '/../data/config/pecl/libs.ini'; + $lib_conf = parse_ini_file($known_path, true, INI_SCANNER_RAW); + + if (isset($lib_conf[$name]) && is_array($lib_conf[$name])) { + $ret = $lib_conf[$name]; + } + + return $ret; + } + public function getConfigureLine() { /* XXX check if it's enable or with, -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
