diff options
| author | Andrew Childs | 2013-01-16 00:08:03 +1300 |
|---|---|---|
| committer | Adam Vandenberg | 2013-01-15 07:25:59 -0800 |
| commit | 2ec12d9cd366198dbf6901c9e2161b96faca5830 (patch) | |
| tree | 66b7b0574a6b6e52fecf965b76ec75155d642d43 /Library/Formula | |
| parent | cc25e3f9862fa05d0b8c12db6ec45a71d24db5f5 (diff) | |
| download | homebrew-2ec12d9cd366198dbf6901c9e2161b96faca5830.tar.bz2 | |
opensc 0.13.0
Closes #17089.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/opensc.rb | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/Library/Formula/opensc.rb b/Library/Formula/opensc.rb new file mode 100644 index 000000000..c4a506201 --- /dev/null +++ b/Library/Formula/opensc.rb @@ -0,0 +1,52 @@ +require 'formula' + +class Opensc < Formula + homepage 'https://github.com/OpenSC/OpenSC/wiki' + url 'http://sourceforge.net/projects/opensc/files/OpenSC/opensc-0.13.0/opensc-0.13.0.tar.gz' + sha1 '9285ccbed7b49f63e488c8fb1b3e102994a28218' + head 'https://github.com/OpenSC/OpenSC.git' + + if build.head? + depends_on :automake + depends_on :libtool + end + + option 'with-man-pages', 'Build manual pages' + + depends_on 'docbook' if build.include? 'with-man-pages' + + def install + extra_args = [] + + # If OpenSC's configure script detects docbook it will build manual + # pages. This extends the spirit of that logic to support homebrew + # installed docbook. + docbook = Formula.factory 'docbook' + if docbook.installed? + # Docbookxsl is a Formula defined in docbook.rb. Formula.factory + # for 'docbook' will cause 'docbook.rb' to be required, which + # makes Docbookxsl available. It would be nice if this didn't + # depend on internal implementation details of the docbook + # formula. + docbookxsl = Docbookxsl.new + + # OpenSC looks in a set of common paths for docbook's xsl files, + # but not in /usr/local, and certainly not in homebrew's + # cellar. This specifies the correct homebrew path. + extra_args << "--with-xsl-stylesheetsdir=" + + docbook.prefix/docbookxsl.catalog + end + + system "./bootstrap" if build.head? + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}", + *extra_args + + system "make install" + end + + def caveats; <<-EOS.undent + Manual pages will be installed if docbook is installed. + EOS + end +end |
