Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libftdi 1.5 #1080

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 23 additions & 6 deletions Library/Formula/libftdi.rb
Original file line number Diff line number Diff line change
@@ -1,23 +1,40 @@
class Libftdi < Formula
desc "Library to talk to FTDI chips"
homepage "http://www.intra2net.com/en/developer/libftdi"
url "http://www.intra2net.com/en/developer/libftdi/download/libftdi1-1.1.tar.bz2"
sha256 "c0b1af1a13e2c6682a1d8041e5b164a1e0d90267cd378bb51e059bd62f821e21"
homepage "https://www.intra2net.com/en/developer/libftdi"
url "https://www.intra2net.com/en/developer/libftdi/download/libftdi1-1.5.tar.bz2"
sha256 "7c7091e9c86196148bd41177b4590dccb1510bfe6cea5bf7407ff194482eb049"
license "LGPL-2.1-only"

bottle do
cellar :any
end

depends_on "cmake" => :build
depends_on "pkg-config" => :build
depends_on "confuse"
depends_on "libusb"
depends_on "boost" => :optional

# Patch to fix pkg-config flags issue. Homebrew/homebrew-core#71623
# http://developer.intra2net.com/git/?p=libftdi;a=commit;h=cdb28383402d248dbc6062f4391b038375c52385
patch do
url "http://developer.intra2net.com/git/?p=libftdi;a=patch;h=cdb28383402d248dbc6062f4391b038375c52385;hp=5c2c58e03ea999534e8cb64906c8ae8b15536c30"
sha256 "db4c3e558e0788db00dcec37929f7da2c4ad684791977445d8516cc3e134a3c4"
end

def install
ENV.enable_warnings if ENV.compiler == :gcc_4_0
mkdir "libftdi-build" do
system "cmake", "..", *std_cmake_args
system "cmake", "..", "-DPYTHON_BINDINGS=OFF",
"-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON",
"-DFTDIPP=OFF",
*std_cmake_args
system "make", "install"
pkgshare.install "../examples"
(pkgshare/"examples/bin").install Dir["examples/*"] \
- Dir["examples/{CMake*,Makefile,*.cmake}"]
end
end

test do
system pkgshare/"examples/bin/find_all"
end
end