Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Update fltk.rb to support HEAD for OS X El Capitan #44806

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 26 additions & 13 deletions Library/Formula/fltk.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
class Fltk < Formula
desc "Cross-platform C++ GUI toolkit"
homepage "http://www.fltk.org/"
url "https://fossies.org/linux/misc/fltk-1.3.3-source.tar.gz"
sha256 "f8398d98d7221d40e77bc7b19e761adaf2f1ef8bb0c30eceb7beb4f2273d0d97"

bottle do
sha1 "33c75cce41deadbfe54bdcc22ae91d17d3ecc782" => :mavericks
Expand All @@ -11,27 +9,42 @@ class Fltk < Formula

option :universal

stable do
url "https://fossies.org/linux/misc/fltk-1.3.3-source.tar.gz"
sha256 "f8398d98d7221d40e77bc7b19e761adaf2f1ef8bb0c30eceb7beb4f2273d0d97"

# Fixes issue with -lpng not found.
# Based on: https://trac.macports.org/browser/trunk/dports/aqua/fltk/files/patch-src-Makefile.diff
patch :DATA

# Fltk 1.3.4 include support for El Capitan. Remove on update.
depends_on MaximumMacOSRequirement => :yosemite
end

head do
url "http://seriss.com/public/fltk/fltk/branches/branch-1.3/", :using => :svn
depends_on "cmake" => :build
end

depends_on "libpng"
depends_on "jpeg"

# Fltk 1.3.4 include support for El Capitan. Remove on update.
depends_on MaximumMacOSRequirement => :yosemite

fails_with :clang do
build 318
cause "http://llvm.org/bugs/show_bug.cgi?id=10338"
end

# Fixes issue with -lpng not found.
# Based on: https://trac.macports.org/browser/trunk/dports/aqua/fltk/files/patch-src-Makefile.diff
patch :DATA

def install
ENV.universal_binary if build.universal?
system "./configure", "--prefix=#{prefix}",
"--enable-threads",
"--enable-shared"
system "make", "install"
if build.head?
system "cmake", ".", *std_cmake_args
system "make", "install"
else
system "./configure", "--prefix=#{prefix}",
"--enable-threads",
"--enable-shared"
system "make", "install"
end
end
end

Expand Down