From 56f5ac02d1c79a256e3da11ff433e012daeae367 Mon Sep 17 00:00:00 2001 From: Andrew Childs Date: Mon, 25 Mar 2013 19:55:42 +1300 Subject: opensc: locate docbook xsl via filesystem The opensc formula currently uses the docbook formula to find the docbook xsl path, which always refers to the newest version. When a version of docbook is installed, but is not the latest, opensc will fail to install. This change adopts the same approach as kdelibs in homebrew-boneyard and globs the appropriate directory to find the path. Closes #18715. Signed-off-by: Adam Vandenberg --- Library/Formula/opensc.rb | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'Library/Formula/opensc.rb') diff --git a/Library/Formula/opensc.rb b/Library/Formula/opensc.rb index 9adb70787..779bda477 100644 --- a/Library/Formula/opensc.rb +++ b/Library/Formula/opensc.rb @@ -23,18 +23,15 @@ class Opensc < Formula # 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. + + # Avoid using information from the docbook formula here, as it + # will always refer to the latest version which is not + # necessarily the installed version. extra_args << "--with-xsl-stylesheetsdir=" + - docbook.prefix/docbookxsl.catalog + Dir[docbook.opt_prefix/'docbook/xsl/*'].first end system "./bootstrap" if build.head? -- cgit v1.2.3