Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions recipe/php5_meal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
9 changes: 8 additions & 1 deletion recipe/php7_meal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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

Expand All @@ -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
26 changes: 26 additions & 0 deletions recipe/php_common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
[
Expand Down