Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/5_6_yosemite' into 7_0_yosemite
Browse files Browse the repository at this point in the history
* origin/5_6_yosemite:
  fixes regarding cert support
  add iodbc support
  • Loading branch information
chregu committed May 5, 2017
2 parents f1df1d1 + 02675fc commit fccbdd4
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/Package/curl.pm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ sub configure_flags {
'--enable-ldaps',
'--disable-dependency-tracking',
'--with-ssl=/usr/local/php5',
'--with-ca-bundle=/usr/local/php5/ssl/cert.pem',
'--with-libidn='.$self->config()->prefix(),
'--disable-ares'
);
Expand Down
55 changes: 55 additions & 0 deletions lib/Package/libiodbc.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package Package::libiodbc;

use strict;
use warnings;

use base qw(Package);

our $VERSION = '3.52.12';


sub dependency_names {
return qw();
}



sub base_url {
#return "ftp://fr.rpmfind.net/pub/libxml";
return "https://github.com/openlink/iODBC/releases/download/v$VERSION";
}


sub packagename {
return "libiodbc-" . $VERSION;
}


sub configure_flags {
my $self = shift @_;
my $prefix = $self->config()->prefix();
return $self->SUPER::configure_flags() . "";
}


sub subpath_for_check {
return "lib/libodbc.a";
}


sub php_extension_configure_flags {
my $self = shift @_;
my (%args) = @_;
return "--with-libxml-dir=" . $self->config()->prefix();
}

sub make_flags {
my $self = shift @_;
return "";
}




1;

9 changes: 9 additions & 0 deletions lib/Package/mongodb.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ sub init {
$self->{VERSION} = $VERSION;
}

sub configure_flags {
my $self = shift @_;
return join " ", (
$self->SUPER::configure_flags(@_),
'--with-openssl-dir=' . $self->config()->prefix()
);

}

sub packagesrcdir {
my $self = shift @_;
return $self->config()->srcdir() . "/" . $self->packagename() . "/";
Expand Down
8 changes: 5 additions & 3 deletions lib/Package/php5.pm
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ sub packagesrcdir {
}

sub dependency_names {
return qw( openssl icu libxslt imapcclient gettext curl libpng libjpeg libtiff libgif libfreetype postgresql mcrypt tidy gmp readline);
return qw( openssl icu libxslt imapcclient gettext curl libpng libjpeg libtiff libgif libfreetype postgresql mcrypt tidy gmp readline libiodbc);
#before 10.8
#return qw(iconv icu mssql libxml2 libxslt imapcclient gettext curl libpng libjpeg libtiff libgif libfreetype postgresql mcrypt tidy);
}
Expand Down Expand Up @@ -87,6 +87,7 @@ sub configure_flags {
'--enable-soap',
'--enable-wddx',
'--enable-ftp',
'--with-iodbc',
'--enable-sockets',
'--with-bz2=/usr',
'--enable-zip',
Expand Down Expand Up @@ -190,8 +191,9 @@ sub install {
#}
$self->shell({silent => 0}, "test -d $prefix/php.d || mkdir $prefix/php.d");
$self->shell({silent => 0}, "perl -p -i -e 's# -L\\S+c-client##' $prefix/bin/php-config");
$self->shell({silent => 0}, "curl -o $prefix/ssl/certs/cacert.pem https://curl.haxx.se/ca/cacert.pem");
$self->shell({silent => 0}, "echo 'openssl.cafile=/usr/local/php5/ssl/certs/cacert.pem' >> $prefix/php.d/40-openssl.ini");
$self->shell({silent => 0}, "curl -o $prefix/ssl/cert.pem https://curl.haxx.se/ca/cacert.pem");
$self->shell({silent => 0}, "echo 'openssl.cafile=/usr/local/php5/ssl/cert.pem' >> $prefix/php.d/40-openssl.ini");
$self->shell({silent => 0}, "echo 'curl.cainfo=/usr/local/php5/ssl/cert.pem' >> $prefix/php.d/40-curl.ini");

$self->create_dso_ini_files();

Expand Down

0 comments on commit fccbdd4

Please sign in to comment.