[tbb-commits] [tor-browser-build/master] Bug 26249: Update libevent to fix macOS cross-compilation
boklm at torproject.org
boklm at torproject.org
Fri Jun 1 10:15:54 UTC 2018
commit ef90f3c7881467df0500674dae84d44e247d459c
Author: Georg Koppen <gk at torproject.org>
Date: Thu May 31 15:34:56 2018 +0000
Bug 26249: Update libevent to fix macOS cross-compilation
---
keyring/libevent.gpg | Bin 61408 -> 1782 bytes
projects/libevent/autotools-openssl-mac.patch | 26 ++++++++++++++++++++++++++
projects/libevent/build | 3 +++
projects/libevent/config | 4 +++-
projects/tor/build | 2 +-
5 files changed, 33 insertions(+), 2 deletions(-)
diff --git a/keyring/libevent.gpg b/keyring/libevent.gpg
index ca92300..b287e04 100644
Binary files a/keyring/libevent.gpg and b/keyring/libevent.gpg differ
diff --git a/projects/libevent/autotools-openssl-mac.patch b/projects/libevent/autotools-openssl-mac.patch
new file mode 100644
index 0000000..1ee2964
--- /dev/null
+++ b/projects/libevent/autotools-openssl-mac.patch
@@ -0,0 +1,26 @@
+From 506df426dbeb0187bbd3654bd286b4100628fb16 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Carlo=20Marcelo=20Arenas=20Bel=C3=B3n?= <carenas at gmail.com>
+Date: Tue, 29 Aug 2017 00:44:57 -0700
+Subject: [PATCH] autotools: confirm openssl is working before using
+
+latest versions of macOS provide pkg-config and libraries for an ancient
+version of openssl as part of the system, but no headers
+
+diff --git a/m4/libevent_openssl.m4 b/m4/libevent_openssl.m4
+index c2040595..7b458134 100644
+--- a/m4/libevent_openssl.m4
++++ b/m4/libevent_openssl.m4
+@@ -39,6 +39,10 @@ case "$enable_openssl" in
+ done
+ ;;
+ esac
++ CPPFLAGS_SAVE=$CPPFLAGS
++ CPPFLAGS+=$OPENSSL_INCS
++ AC_CHECK_HEADERS([openssl/ssl.h], [], [have_openssl=no])
++ CPPFLAGS=$CPPFLAGS_SAVE
+ AC_SUBST(OPENSSL_INCS)
+ AC_SUBST(OPENSSL_LIBS)
+ case "$have_openssl" in
+--
+2.17.0
+
diff --git a/projects/libevent/build b/projects/libevent/build
index a38422a..00ee78c 100644
--- a/projects/libevent/build
+++ b/projects/libevent/build
@@ -5,6 +5,9 @@ distdir=/var/tmp/dist/[% project %]
mkdir -p /var/tmp/build
tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
cd /var/tmp/build/[% project %]-[% c('version') %]
+[% IF c("var/osx") -%]
+ patch -p1 < $rootdir/autotools-openssl-mac.patch
+[% END -%]
./autogen.sh
./configure --disable-static [% c("var/configure_opt") %] --prefix=$distdir
[% IF c("var/osx") -%]
diff --git a/projects/libevent/config b/projects/libevent/config
index 46cbb7e..386f746 100644
--- a/projects/libevent/config
+++ b/projects/libevent/config
@@ -1,5 +1,5 @@
# vim: filetype=yaml sw=2
-version: 2.0.22
+version: 2.1.8
git_url: https://github.com/libevent/libevent.git
git_hash: 'release-[% c("version") %]-stable'
tag_gpg_id: 1
@@ -20,3 +20,5 @@ input_files:
- project: container-image
- name: '[% c("var/compiler") %]'
project: '[% c("var/compiler") %]'
+ - filename: autotools-openssl-mac.patch
+ enable: '[% c("var/osx") %]'
diff --git a/projects/tor/build b/projects/tor/build
index bf7db83..c6d9895 100644
--- a/projects/tor/build
+++ b/projects/tor/build
@@ -39,7 +39,7 @@ openssldir=/var/tmp/dist/openssl
mkdir -p "$distdir/Debug/Tor"
cp $openssldir/lib/libssl.so.1.0.0 "$distdir/Tor/"
cp $openssldir/lib/libcrypto.so.1.0.0 "$distdir/Tor/"
- cp $libeventdir/lib/libevent-2.0.so.5 "$distdir/Tor/"
+ cp $libeventdir/lib/libevent-2.1.so.6 "$distdir/Tor/"
# We need to copy the libstdc++.so.6 for Tor Browser on older Linux distros.
# Copying it into /Browser, which feels more natural, and amending
# LD_LIBRARY_PATH breaks updates from a Tor Browser with the old
More information about the tbb-commits
mailing list