From: Lars Schneider <larsxschneider@gmail.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, tboegi@web.de, gitster@pobox.com
Subject: Re: [PATCH v1 1/2] config.mak.in: set NO_OPENSSL and APPLE_COMMON_CRYPTO for macOS >10.11
Date: Sun, 6 Nov 2016 20:35:04 +0100 [thread overview]
Message-ID: <8C67FF53-C26F-4993-908F-A5183C5E48D9@gmail.com> (raw)
In-Reply-To: <20161017095002.bbqyp2hkbuyau66t@sigill.intra.peff.net>
> On 17 Oct 2016, at 11:50, Jeff King <peff@peff.net> wrote:
>
> On Sun, Oct 16, 2016 at 05:25:49PM -0700, larsxschneider@gmail.com wrote:
>
>> From: Lars Schneider <larsxschneider@gmail.com>
>>
>> Apple removed the OpenSSL header files in macOS 10.11 and above. OpenSSL
>> was deprecated since macOS 10.7.
>>
>> Set `NO_OPENSSL` and `APPLE_COMMON_CRYPTO` to `YesPlease` as default for
>> macOS. Make it possible to override this and use OpenSSL by defining
>> `DARWIN_OPENSSL`.
>
> I like that you gave an override, but I don't think it works in all
> cases:
>
>> diff --git a/config.mak.uname b/config.mak.uname
>> index b232908..f0c94a9 100644
>> --- a/config.mak.uname
>> +++ b/config.mak.uname
>> @@ -108,6 +108,12 @@ ifeq ($(uname_S),Darwin)
>> ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -ge 11 && echo 1),1)
>> HAVE_GETDELIM = YesPlease
>> endif
>> + ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -ge 15 && echo 1),1)
>> + ifndef DARWIN_OPENSSL
>> + NO_OPENSSL = YesPlease
>> + APPLE_COMMON_CRYPTO=YesPlease
>> + endif
>> + endif
>
> This is in config.mak.uname, which gets sourced before config.mak (and
> ifndef is evaluated at the time of parsing). So it would work to do:
>
> make DARWIN_OPENSSL=Yep
>
> but not:
>
> echo DARWIN_OPENSSL=Yep >>config.mak
> make
>
> I think you'd have to set a flag in config.mak.uname, and then resolve
> it in the Makefile proper like:
>
> ifdef DARWIN_OPENSSL
> # Overrides AUTO_AVOID_OPENSSL, do nothing.
> else ifdef AUTO_AVOID_OPENSSL
> NO_OPENSSL = YesPlease
> APPLE_COMMON_CRYPTO = YesPlease
> endif
>
> but that's totally untested.
Good point. I think I found an even easier way to achieve the same.
What do you think about the patch below?
Thanks,
Lars
-- >8 --
Subject: Makefile: set NO_OPENSSL on macOS by default
Apple removed the OpenSSL header files in macOS 10.11 and above. OpenSSL
was deprecated since macOS 10.7.
Set `NO_OPENSSL` and `APPLE_COMMON_CRYPTO` to `YesPlease` as default for
macOS. It is possible to override this and use OpenSSL by defining
`NO_APPLE_COMMON_CRYPTO`.
Original-patch-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
---
Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile b/Makefile
index 9d6c245..f53fcc9 100644
--- a/Makefile
+++ b/Makefile
@@ -1047,6 +1047,7 @@ ifeq ($(uname_S),Darwin)
endif
endif
ifndef NO_APPLE_COMMON_CRYPTO
+ NO_OPENSSL = YesPlease
APPLE_COMMON_CRYPTO = YesPlease
COMPAT_CFLAGS += -DAPPLE_COMMON_CRYPTO
endif
--
next prev parent reply other threads:[~2016-11-06 19:50 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-17 0:25 [PATCH v1 0/2] Fix default macOS build locally and on Travis CI larsxschneider
2016-10-17 0:25 ` [PATCH v1 1/2] config.mak.in: set NO_OPENSSL and APPLE_COMMON_CRYPTO for macOS >10.11 larsxschneider
2016-10-17 9:50 ` Jeff King
2016-11-06 19:35 ` Lars Schneider [this message]
2016-11-07 17:26 ` Jeff King
2016-11-07 17:36 ` Paul Smith
2016-11-07 17:46 ` Jeff King
2016-11-07 17:49 ` Paul Smith
2016-11-09 8:18 ` Torsten Bögershausen
2016-11-09 9:29 ` Lars Schneider
2016-11-09 10:51 ` Torsten Bögershausen
2016-11-10 11:13 ` [PATCH v2] Makefile: set NO_OPENSSL on macOS by default larsxschneider
2016-10-17 0:25 ` [PATCH v1 2/2] travis-ci: disable GIT_TEST_HTTPD for macOS larsxschneider
2016-11-06 21:42 ` Lars Schneider
2016-11-07 21:20 ` Jeff King
2016-11-10 11:07 ` Lars Schneider
2016-11-10 16:10 ` Jeff King
2016-11-10 21:33 ` Junio C Hamano
2016-11-10 21:43 ` Jeff King
2016-11-10 21:49 ` Junio C Hamano
2016-11-10 21:54 ` Jeff King
2016-11-11 8:22 ` Lars Schneider
2016-11-11 8:47 ` Jeff King
2016-11-11 9:13 ` Lars Schneider
2016-11-11 9:28 ` Jeff King
2016-11-15 12:07 ` Heiko Voigt
2016-11-15 14:18 ` Lars Schneider
2016-11-15 15:31 ` Jeff King
2016-11-16 14:39 ` Heiko Voigt
2016-11-16 20:01 ` Torsten Bögershausen
2016-11-09 23:39 ` [PATCH v1 0/2] Fix default macOS build locally and on Travis CI Junio C Hamano
2016-11-10 6:41 ` Torsten Bögershausen
2016-11-10 11:19 ` Lars Schneider
2016-11-10 21:34 ` Junio C Hamano
2016-11-11 9:01 ` Lars Schneider
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8C67FF53-C26F-4993-908F-A5183C5E48D9@gmail.com \
--to=larsxschneider@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--cc=tboegi@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).