Commit bc2aaf09 authored by Damian Montero's avatar Damian Montero Committed by GitHub

Merge pull request #1025 from jam7/update/openssl

Change openssl to pass `make test` on armv7l
parents 56effcbb bab0882c
...@@ -3,28 +3,36 @@ require 'package' ...@@ -3,28 +3,36 @@ require 'package'
class Openssl < Package class Openssl < Package
description 'OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols.' description 'OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols.'
homepage 'https://www.openssl.org/' homepage 'https://www.openssl.org/'
version '1.0.2l' version '1.0.2l-1'
source_url 'https://github.com/openssl/openssl/archive/OpenSSL_1_0_2l.tar.gz' source_url 'https://github.com/openssl/openssl/archive/OpenSSL_1_0_2l.tar.gz'
source_sha256 'a3d3a7c03c90ba370405b2d12791598addfcafb1a77ef483c02a317a56c08485' source_sha256 'a3d3a7c03c90ba370405b2d12791598addfcafb1a77ef483c02a317a56c08485'
binary_url ({
aarch64: 'https://github.com/jam7/chromebrew/releases/download/binaries/openssl-1.0.2l-chromeos-armv7l.tar.xz',
armv7l: 'https://github.com/jam7/chromebrew/releases/download/binaries/openssl-1.0.2l-chromeos-armv7l.tar.xz',
})
binary_sha256 ({
aarch64: '4af16174aa6a9f565a5895fedea89daf0c8fb66b8f26b0c8416f5456aa440ea5',
armv7l: '4af16174aa6a9f565a5895fedea89daf0c8fb66b8f26b0c8416f5456aa440ea5',
})
depends_on 'perl' => :build depends_on 'perl' => :build
depends_on 'bc' => :build # required for `make test`
depends_on 'diffutils' => :build # required for `make test`
depends_on 'zlibpkg' => :build depends_on 'zlibpkg' => :build
def self.build def self.build
options="shared zlib-dynamic" options="shared zlib-dynamic"
if `uname -m`.strip == 'aarch64'
options = options + " no-asm" # Change default optimization level for armv7l from -O3 to -O2 because
end # gcc-4.9.4 -O3 for armv7l cause `evp_test` problem like below.
#
# Testing cipher CAMELLIA-256-OFB(decrypt)
# Key
# 0000 60 3d eb 10 15 ca 71 be 2b 73 ae f0 85 7Decrypt failed
# d 77 81
# 0010 1f 35 2c 07 3b 61 08 d7 2d 98 10 a3 09 14 df f4
#
system "sed -e '/linux-armv4/s/-O3/-O2/' -i Configure"
# Specify armv7 for aarch64 since Chrome OS aarch64 uses armv7 binaries as its userland.
case `uname -m`.strip
when "aarch64"
system "./Configure --prefix=/usr/local --openssldir=/etc/ssl #{options} linux-armv4 -march=armv7-a"
else
system "./config --prefix=/usr/local --openssldir=/etc/ssl #{options}" system "./config --prefix=/usr/local --openssldir=/etc/ssl #{options}"
end
system "make" system "make"
end end
...@@ -35,7 +43,7 @@ class Openssl < Package ...@@ -35,7 +43,7 @@ class Openssl < Package
# move man to /usr/local/man # move man to /usr/local/man
system "mv", "#{CREW_DEST_DIR}/etc/ssl/man", "#{CREW_DEST_DIR}/usr/local/man" system "mv", "#{CREW_DEST_DIR}/etc/ssl/man", "#{CREW_DEST_DIR}/usr/local/man"
# remove all files pretended to install /etc/ssl (use system's /etc/ssl as is) # remove all files under /etc/ssl (use system's /etc/ssl as is)
system "rm", "-rf", "#{CREW_DEST_DIR}/etc" system "rm", "-rf", "#{CREW_DEST_DIR}/etc"
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