Skip to content

Instantly share code, notes, and snippets.

@ELLIOTTCABLE
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ELLIOTTCABLE/9494128 to your computer and use it in GitHub Desktop.
Save ELLIOTTCABLE/9494128 to your computer and use it in GitHub Desktop.
require "formula"
class Globalplatform < Formula
homepage "http://sourceforge.net/p/globalplatform/wiki/Home/"
url "https://downloads.sourceforge.net/project/globalplatform/GlobalPlatform%20Library/GlobalPlatform%20Library%206.0.0/globalplatform-6.0.0.tar.gz"
sha1 "5a08bec4cbcc8caffa7c646a35600712f468553c"
resource "gppcscconnectionplugin" do
url "https://downloads.sourceforge.net/project/globalplatform/GlobalPlatform%20Library/GlobalPlatform%20Library%206.0.0/gppcscconnectionplugin-1.1.0.tar.gz"
sha1 "38eb3d739f1b75ba954f09a928a6e9db0178ea53"
end
resource "gpshell" do
url "https://downloads.sourceforge.net/project/globalplatform/GPShell/GPShell-1.4.4/gpshell-1.4.4.tar.gz"
sha1 "3efeb92263e881ff0886e73a7b790051a317df61"
end
depends_on "pkg-config" => :build
def install
globalplatform_include = (opt_include/"globalplatform")
globalplatform_lib = (opt_lib/"libglobalplatform.dylib")
ENV.append "PCSCLITE_CFLAGS", "-I#{MacOS.sdk_path}/System/Library/Frameworks/PCSC.framework/Versions/A/Headers/"
args = [ "--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}" ]
system "./configure", *args
system "make", "install"
resource("gppcscconnectionplugin").stage do
ENV.append "GLOBALPLATFORM_CFLAGS", "-I#{globalplatform_include}"
ENV.append "GLOBALPLATFORM_LIBS", globalplatform_lib
system "./configure", *args
system "make", "install"
end if build.include? "with-pcsc-plugin" or build.include? "with-shell"
resource("gpshell").stage do
#ENV.append "GLOBALPLATFORM_CFLAGS", "-I#{globalplatform_include}"
#ENV.append "GLOBALPLATFORM_LIBS", globalplatform_lib
system "./configure", *args
system "make", "install"
end if build.include? "with-shell"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment