From 0fe5b36d7574d4aa5eb0597375c46262324e822c Mon Sep 17 00:00:00 2001 From: Marti Martz Date: Sat, 14 May 2016 04:45:28 -0600 Subject: [PATCH] Mac: Repair current OpenSSL undefined reference from homebrew to dynamic (#1971) * Repair current OpenSSL static reference from homebrew * These are the default locations, as of today, for Mac OS X 10.11.4 *(El Capitan)* **NOTES** * This could really use some environment variables for homebrew root and which SSL version is in use. Not familiar enough yet with recent Qt to do this at this time. * Symbolic links could also be used but again determining the current homebrew SSL installed is something to be desired e.g. similar to `$ openssl version` e.g. perhaps a `cut` of `$ brew info openssl`? Refs: * http://brew.sh/ *(homepage)* * https://github.com/Homebrew/brew *(repo)* Historical refs: * #1888 * #1850 * Mac: Scrape `brew` output for openssl working install directory as per @nowrep * Addresses a long standing bug on Mac compiling with this project * Also correct the BUILDING markdown file for OS X... was awaiting response from the owner to do this to see which direction to move. **NOTES** * Quotes **are required** when using `$$system` here otherwise `cut` fails with no switch argument found Applies to #1971 * Fix BUILDING to BUILDING.md * Do this so it actually parses markdown Indirectly related to #1971 * Fix `brew` to Homebrew * Even though the project is named `brew` and owner is `Homebrew` their pages refers to it as `Homebrew` Applies to #1971 * Yet another change * There are more symlinks... so the results from `brew --prefix openssl` yields a symlinked path and adding `/include` and `/lib` to them resolve alternately to the `Cellar`. Feel **much** better about using this one since it's an exact API as I mentioned earlier in the PR Applies to #1971 * Add a single newline for @cranes-bill * Only one newline is needed and has nothing to do with trailing spaces... at least according to the GH editor * Restores the flow :) Applies to #1971 * More flow of README.md * GH preview said it didn't need this but I guess it does... we'll try newlines everywhere ;) Applies to #1971 * Use non-standard markdown for "newlines" * Restore the spaces manually **NOTES** This is not any known specification but it's what @nowrep wants Refs: * [CommonMark](http://commonmark.org/) * [Daring Fireballs](http://daringfireball.net/projects/markdown/) --- BUILDING => BUILDING.md | 4 +++- CHANGELOG | 2 +- README.md | 2 +- src/lib/lib.pro | 5 +++-- 4 files changed, 8 insertions(+), 5 deletions(-) rename BUILDING => BUILDING.md (96%) diff --git a/BUILDING b/BUILDING.md similarity index 96% rename from BUILDING rename to BUILDING.md index 5c5a813b6..fc6544f0c 100644 --- a/BUILDING +++ b/BUILDING.md @@ -44,7 +44,9 @@ Linux / Unix MAC OS X ---------------------------------------------------------------------------------- - There is no extra dependency, you only need Qt tools and XCode. + You need to have Xcode from the Apple App Store installed in Applications, [Command Line Tools for the same Xcode version](https://developer.apple.com/), + [Homebrew](http://brew.sh/), and `$ brew install openssl` for openssl. + Next compulsory requirement is Qt 5 (>= 5.6) with QtWebEngine. After successful compilation, you need to run macdeploy.sh script to correctly build the application bundle. You will do it with following command: diff --git a/CHANGELOG b/CHANGELOG index 0fa301c87..161f2c4f5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -344,7 +344,7 @@ Version 1.4.0 * use .qupzilla/tmp instead of /tmp for temporary data * saving passwords should now work for much more sites * don't steal Ctrl+B/U/I shortcuts from page - * disabled by default opacity effect on tab previews - see BUILDING + * disabled by default opacity effect on tab previews - see BUILDING.md * improved showing navigation toolbar in fullscreen * moved config directory into ~/.config/qupzilla * certificates bundle is now only used on windows diff --git a/README.md b/README.md index 4fb1a539a..0c1ddcecd 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Compiling ---------------------------------------------------------------------------------------- Before you start compiling, make sure that you have installed the Qt (>= 5.6) development libraries -and you have read the [BUILDING](https://github.com/QupZilla/qupzilla/blob/master/BUILDING) information. +and you have read the [BUILDING.md](https://github.com/QupZilla/qupzilla/blob/master/BUILDING.md) information. **Linux** diff --git a/src/lib/lib.pro b/src/lib/lib.pro index ccaeda9d0..88cbcea80 100644 --- a/src/lib/lib.pro +++ b/src/lib/lib.pro @@ -480,8 +480,9 @@ os2 { mac { # homebrew openssl - INCLUDEPATH += /opt/local/include - LIBS += -L/opt/local/lib + BREW_OPENSSL = $$system("brew --prefix openssl") + INCLUDEPATH += $$BREW_OPENSSL/include + LIBS += -L$$BREW_OPENSSL/lib LIBS += -lcrypto -framework CoreServices }