sidneys / homebrew-homebrew

sidneys.github.io Homebrew Tap
23 stars 12 forks source link

Patch OpenSSL for ARM64/M1 Macs #4

Closed itsmattkc closed 1 year ago

itsmattkc commented 3 years ago

Fixes #2

Uses this patch to add ARM64 support to OpenSSL's Configure script and the Ruby constant #{Hardware::CPU.arch} to correctly select the current architecture (which is also used on homebrew-core's OpenSSL formula).

ItzSwirlz commented 3 years ago

Matt, just some friendly advice (not trying to be an annoying creep or anything, it also may make sense that @sidneys should know), you may want to run RuboCop or some other Ruby linter, linters exist for basically anything so if you want to run it feel free, you can relax on the " and use ' instead (trying to say this respectfully although it'll probably sound mean)

itsmattkc commented 3 years ago

Hmm? Have I done something wrong?

ItzSwirlz commented 3 years ago

No, the code will still work. It's fine, linting is just a way of code cleanup. The PR so far is acceptable to merge. Just can't find a way to privately message you two or whatnot. If you want to just ignore what I said and that's fine.

itsmattkc commented 3 years ago

Are you saying the double quotes are incorrect? That's how patch code is written on every brew script: https://github.com/Homebrew/homebrew-core/blob/master/Formula/jemalloc.rb#L27

ItzSwirlz commented 3 years ago

It's correct, it's just code style that can be improved. I didn't mean to confuse you, just forget what I said :P

themacmarketer commented 3 years ago

Can someone please advise me how I can apply this patch manually ?

Thanks !

pixluser commented 3 years ago

Can someone please advise me how I can apply this patch manually ?

Thanks !

pico /opt/homebrew/Library/Taps/sidneys/homebrew-homebrew/Formula/openssl@1.0.rb

1> after the line 'version_scheme 1'

and between the line
'bottle do'

add that :

patch do url "https://gist.githubusercontent.com/felixbuenemann/5f4dcb30ebb3b86e1302e2ec305bac89/raw/b339a33ff072c9747df21e2558c36634dd62c195/openssl-1.0.2u-darwin-arm64.patch" sha256 "4ad22bcfc85171a25f035b6fc47c7140752b9ed7467bb56081c76a0a3ebf1b9f" end

2> change this line

arch_args = %w[darwin64-x86_64-cc enable-ec_nistp_64_gcc_128]

by arch_args = %W[darwin64-#{Hardware::CPU.arch}-cc enable-ec_nistp_64_gcc_128]

and redo your brew install.

it works on my m1.

bye !

pixluser commented 3 years ago

Can someone please advise me how I can apply this patch manually ?

Thanks !

All the infos came from that url : https://github.com/sidneys/homebrew-homebrew/pull/4/commits/271a5783cd83ac160d936ead9a14d4b305d0f216

bye !

Kakise commented 3 years ago

This PR works amazingly on my MBP M1 on macOS 12, is there a reason why it isn't merged yet ? @sidneys ?

sebdanielsson commented 2 years ago

Any reason why OpenSSL 1.1.1 isn't used? Isn't 1.0.2 unmaintained?

ChrisDev8 commented 2 years ago

This works flawlessly on MacOS M1 if combined with Pull Request #5. This fix is greatly going to help with uup dump!!! :) Thank you!!!

omerien commented 2 years ago

Amazing to know that one of my favourite YouTubers help me installing brew tools xD