Commit 568230aa authored by Ed Reel's avatar Ed Reel

Change php7.rb and openssl.rb to get PHP working with openssl

  - This fix assures both library and header versions of openssl remain the same
  - Also recommend removing the openssl_devel package to make things less complicated
parent 918e5ed5
require 'package' require 'package'
class Openssl < Package class Openssl < Package
version '1.0.1e' version '1.0.2j'
binary_url ({
i686: 'https://dl.dropboxusercontent.com/s/w6y84tusor5xz5f/openssl-1.0.1e-chromeos-i686.tar.gz?token_hash=AAGQ2xjngbnzme2CKee7Mz5WvkylBtFy1rwUzWDVNuOQ_Q&dl=1', source_url 'ftp://ftp.openssl.org/source/openssl-1.0.2j.tar.gz' # software source tarball url
x86_64: 'https://dl.dropboxusercontent.com/s/384awniosicvm12/openssl-1.0.1e-chromeos-x86_64.tar.gz?token_hash=AAH4sdqkNnhIFU-uPdrpqddsi8UU0vWe_gwkplUBM_40MQ&dl=1' source_sha1 'bdfbdb416942f666865fa48fe13c2d0e588df54f' # source tarball sha1 sum
})
binary_sha1 ({ def self.build # self.build contains commands needed to build the software from source
i686: 'cadea32ec770c4b44d565b7e5fdf96a469a05757', system './config'
x86_64: '3cf4defb11fc2fccce77736d0f4559e56d9d7e05' system 'make' # ordered chronologically
}) end
def self.install # self.install contains commands needed to install the software on the target system
system 'make DESTDIR=/usr/local/ssl install'
system 'cd /usr/local/ssl && \
wget http://curl.haxx.se/ca/cacert.pem && \
mv cacert.pem cert.pem'
end
end end
require 'package'
#Installs JUST the headers to match the chromeos supplied libraries so that you can build things
# that link with openssl. Needs to be kept version-synced with chromeos releases
# Could detect current version and grab one of many different packages, compare to saved
# hashes and support multiple versions if needed
#grumble - package names in crew must conform to ruby variable name restrictions. For instance '-' is disallowed
class Openssl_devel < Package
version '1.0.2f'
# chromeos wget can't do proper ssl negotiation with this server
# source_url 'https://www.openssl.org/source/old/1.0.2/openssl-1.0.2g.tar.gz'
# so use their ftp server.
source_url 'ftp://ftp.openssl.org/source/old/1.0.2/openssl-1.0.2f.tar.gz'
source_sha1 '2047c592a6e5a42bd37970bdb4a931428110a927'
depends_on 'perl'
def self.build
# only need to run config to get the headers set up right
system './config'
end
def self.install
out = "#{CREW_DEST_DIR}/usr/local/include/openssl"
system "mkdir -p #{out}"
`ls ./include/openssl`.split(' ').each do |header|
system "cp", "./include/openssl/#{header}", out
end
#system "cp", "./include/openssl/*", "#{out}"
end
end
...@@ -3,23 +3,23 @@ require 'package' ...@@ -3,23 +3,23 @@ require 'package'
class Php7 < Package class Php7 < Package
version '7.1.0' version '7.1.0'
source_url 'http://php.net/distributions/php-7.1.0.tar.xz' # software source tarball url source_url 'http://php.net/distributions/php-7.1.0.tar.xz' # software source tarball url
source_sha1 'c74c920256b9c6873bae696fbb0ec14a02dc8495' # source tarball sha1 sum source_sha1 'c74c920256b9c6873bae696fbb0ec14a02dc8495' # source tarball sha1 sum
depends_on 'libxml2' depends_on 'libxml2'
depends_on 'openssl' depends_on 'openssl'
def self.build # self.build contains commands needed to build the software from source def self.build # self.build contains commands needed to build the software from source
system "./configure \ system './configure \
--with-curl \ --with-curl \
--with-gd \ --with-gd \
--enable-mbstring \ --enable-mbstring \
--with-openssl \ --with-openssl=/usr/local/ssl \
--with-pcre-regex \ --with-pcre-regex \
--with-zlib" --with-zlib'
system "make" # ordered chronologically system 'make' # ordered chronologically
end end
def self.install # self.install contains commands needed to install the software on the target system def self.install # self.install contains commands needed to install the software on the target system
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install" # remember to include DESTDIR set to CREW_DEST_DIR - needed to keep track of changes made to system system "make", "DESTDIR=#{CREW_DEST_DIR}", "install" # remember to include DESTDIR set to CREW_DEST_DIR - needed to keep track of changes made to system
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment