From 60a3dc734f9cab7622a884328fc6d4eaa9d808d1 Mon Sep 17 00:00:00 2001 From: Aaron Liu Date: Tue, 7 Jul 2020 18:52:39 +0800 Subject: [PATCH] Update terminalimageviewer.rb Full credit to @cxwx ! --- terminalimageviewer.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/terminalimageviewer.rb b/terminalimageviewer.rb index 0353528..c33340d 100644 --- a/terminalimageviewer.rb +++ b/terminalimageviewer.rb @@ -11,15 +11,16 @@ class Terminalimageviewer < Formula cd "src/main/cpp" do system "make" if OS.mac? - # No expermimental/filesystem.h on mac - system "#{Formula["gcc"].opt_bin}/gcc-#{Formula["gcc"].version_suffix}", "-std=c++17", + # No expermimental/filesystem.h on mac. + system "/usr/local/bin/gcc-#{Formula["gcc"].version_suffix}", "-std=c++17", "-Wall", "-fpermissive", "-fexceptions", "-O2", "-c", + "-L/usr/local/opt/gcc/lib/gcc/10/", "tiv.cpp", "-o", "tiv.o" - system "#{Formula["gcc"].opt_bin}/gcc-#{Formula["gcc"].version_suffix}", "tiv.o", "-o", - "tiv", "-lstdc++fs", + system "/usr/local/bin/gcc-#{Formula["gcc"].version_suffix}", "tiv.o", "-o", + "tiv", "-L/usr/local/opt/gcc/lib/gcc/10/", "-pthread", "-s" else system "make"