diff --git a/recipe/php5_meal.rb b/recipe/php5_meal.rb index a0104499..1644f7d0 100644 --- a/recipe/php5_meal.rb +++ b/recipe/php5_meal.rb @@ -187,6 +187,7 @@ def cook twigpecl_recipe.cook xcachepecl_recipe.cook xhprofpecl_recipe.cook + oracle_recipe.cook unless not oracle_recipe.oracle_sdk? memcachedpecl_recipe.cook end @@ -208,6 +209,7 @@ def archive_filename def setup_tar php_recipe.setup_tar + oracle_recipe.setup_tar unless not oracle_recipe.oracle_sdk? end private @@ -225,6 +227,7 @@ def files_hashs twigpecl_recipe.send(:files_hashs) + xcachepecl_recipe.send(:files_hashs) + xhprofpecl_recipe.send(:files_hashs) + + oracle_recipe.send(:files_hashs) + libmemcached_recipe.send(:files_hashs) + memcachedpecl_recipe.send(:files_hashs) + @pecl_recipes.collect { |r| r.send(:files_hashs) }.flatten @@ -308,4 +311,9 @@ def xhprofpecl_recipe @xhprofpecl_recipe ||= XhprofPeclRecipe.new('xhprof', '0bbf2a2ac3', md5: '1df4aebf1cb24e7cf369b3af357106fc', php_path: php_recipe.path) end + + def oracle_recipe + @oracle_recipe ||= OraclePeclRecipe.new('oci8', '2.0.11', md5: 'b953aec8600b1990fc1956bd5f580b0b', + php_path: php_recipe.path) + end end diff --git a/recipe/php7_meal.rb b/recipe/php7_meal.rb index 1d2ab27a..e52c3ee0 100644 --- a/recipe/php7_meal.rb +++ b/recipe/php7_meal.rb @@ -21,7 +21,6 @@ def configure_options '--with-cdb', '--with-gdbm', '--with-mcrypt=shared', - '--with-mysql=shared', '--with-mysqli=shared', '--enable-pdo=shared', '--with-pdo-sqlite=shared,/usr', @@ -164,6 +163,7 @@ def cook standard_pecl('yaf', '3.0.3', '74504e8f0ed7c346804c5a5043a5682b') amqppecl_recipe.cook luapecl_recipe.cook + oracle_recipe.cook unless not oracle_recipe.oracle_sdk? end def url @@ -184,6 +184,7 @@ def archive_filename def setup_tar php_recipe.setup_tar + oracle_recipe.setup_tar unless not oracle_recipe.oracle_sdk? end private @@ -193,6 +194,7 @@ def files_hashs lua_recipe.send(:files_hashs) + luapecl_recipe.send(:files_hashs) + amqppecl_recipe.send(:files_hashs) + + oracle_recipe.send(:files_hashs) + @pecl_recipes.collect { |r| r.send(:files_hashs) }.flatten end @@ -218,4 +220,9 @@ def luapecl_recipe php_path: php_recipe.path, lua_path: lua_recipe.path) end + + def oracle_recipe + @oracle_recipe ||= OraclePeclRecipe.new('oci8', '2.1.1', md5: '01bb3429ce3206dcc3d3198e65dadfbc', + php_path: php_recipe.path) + end end diff --git a/recipe/php_common.rb b/recipe/php_common.rb index af7b770d..e5b8e7b6 100644 --- a/recipe/php_common.rb +++ b/recipe/php_common.rb @@ -110,6 +110,32 @@ def configure_options end end +class OraclePeclRecipe < PeclRecipe + def configure_options + [ + "--with-oci8=shared,instantclient,/oracle" + ] + end + + def oracle_sdk? + File.directory?('/oracle') + end + + def setup_tar + puts "Copying oracle libs from /oracle/ to #{@php_path}/lib" + system <<-eof + cp -a /oracle/libclntshcore.so.12.1 #{@php_path}/lib + cp -a /oracle/libclntsh.so #{@php_path}/lib + cp -a /oracle/libclntsh.so.12.1 #{@php_path}/lib + cp -a /oracle/libipc1.so #{@php_path}/lib + cp -a /oracle/libmql1.so #{@php_path}/lib + cp -a /oracle/libnnz12.so #{@php_path}/lib + cp -a /oracle/libociicus.so #{@php_path}/lib + cp -a /oracle/libons.so #{@php_path}/lib + eof + end +end + class LuaPeclRecipe < PeclRecipe def configure_options [