Homebrew!
Almost forgot to add macOS support
This commit is contained in:
parent
58ff3e47e6
commit
f78b65c1f3
1 changed files with 15 additions and 1 deletions
|
@ -4,12 +4,26 @@ class Terminalimageviewer < Formula
|
||||||
url "https://github.com/stefanhaustein/TerminalImageViewer/archive/v1.0.0.tar.gz"
|
url "https://github.com/stefanhaustein/TerminalImageViewer/archive/v1.0.0.tar.gz"
|
||||||
sha256 "d28c5746d25d83ea707db52b54288c4fc1851c642ae021951967e69296450c8c"
|
sha256 "d28c5746d25d83ea707db52b54288c4fc1851c642ae021951967e69296450c8c"
|
||||||
head "https://github.com/stefanhaustein/TerminalImageViewer.git"
|
head "https://github.com/stefanhaustein/TerminalImageViewer.git"
|
||||||
|
depends_on "gcc" => :build unless OS.linux?
|
||||||
depends_on "imagemagick"
|
depends_on "imagemagick"
|
||||||
|
|
||||||
def install
|
def install
|
||||||
cd "src/main/cpp" do
|
cd "src/main/cpp" do
|
||||||
# No expermimental/filesystem.h on clang
|
|
||||||
system "make"
|
system "make"
|
||||||
|
if OS.mac?
|
||||||
|
# No expermimental/filesystem.h on mac
|
||||||
|
system "#{Formula["gcc"].opt_bin}/gcc-#{Formula["gcc"].version_suffix}", "-std=c++17",
|
||||||
|
"-Wall",
|
||||||
|
"-fpermissive",
|
||||||
|
"-fexceptions",
|
||||||
|
"-O2", "-c",
|
||||||
|
"tiv.cpp", "-o", "tiv.o"
|
||||||
|
system "#{Formula["gcc"].opt_bin}/gcc-#{Formula["gcc"].version_suffix}", "tiv.o", "-o",
|
||||||
|
"tiv", "-lstdc++fs",
|
||||||
|
"-pthread", "-s"
|
||||||
|
else
|
||||||
|
system "make"
|
||||||
|
end
|
||||||
bin.install "tiv"
|
bin.install "tiv"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue