From f28f8e54cd7f2bf956804e7ad6a71cd651ba612f Mon Sep 17 00:00:00 2001 From: "A. Jesse Jiryu Davis" Date: Sat, 26 Nov 2016 11:02:54 -0500 Subject: [PATCH] yelp-tools: convert yelp-xsl to a resource. yelp-tools is the only package that depends on yelp-xsl, and both packages must have the same version. Better to make yelp-xsl a resource of yelp-tools instead of a distinct package that can get out of sync. Closes #7243 Closes #7260. Signed-off-by: Mike McQuaid --- Formula/yelp-tools.rb | 37 ++++++++++++++++++++++++++++++++++--- Formula/yelp-xsl.rb | 40 ---------------------------------------- 2 files changed, 34 insertions(+), 43 deletions(-) delete mode 100644 Formula/yelp-xsl.rb diff --git a/Formula/yelp-tools.rb b/Formula/yelp-tools.rb index 08d8b3857f..14f463a91d 100644 --- a/Formula/yelp-tools.rb +++ b/Formula/yelp-tools.rb @@ -12,20 +12,51 @@ class YelpTools < Formula sha256 "66721baa2d6c6978cceac29f35e8112e96804b6ae0197d89175867f17caca2cd" => :mavericks end + depends_on "gettext" => :build + depends_on "gtk+3" + depends_on "intltool" => :build depends_on "itstool" => :build - depends_on "pkg-config" => :build - depends_on "libxslt" => :build depends_on "libxml2" => :build - depends_on "yelp-xsl" + depends_on "libxslt" => :build + depends_on "pkg-config" => :build + + yelp_tools_version = version + + resource "yelp-xsl" do + url "https://download.gnome.org/sources/yelp-xsl/3.18/yelp-xsl-#{yelp_tools_version}.tar.xz" + sha256 "893620857b72b3b43ee3b462281240b7ca4d80292f469552827f0597bf60d2b2" + end def install + resource("yelp-xsl").stage do + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + ENV.append_path "PKG_CONFIG_PATH", "#{share}/pkgconfig" + end + system "./configure", "--prefix=#{prefix}" system "make", "install" end + def post_install + system "#{Formula["gtk+3"].opt_bin}/gtk3-update-icon-cache", + "-f", "-t", "#{HOMEBREW_PREFIX}/share/icons/hicolor" + end + test do system "#{bin}/yelp-new", "task", "ducksinarow" system "#{bin}/yelp-build", "html", "ducksinarow.page" system "#{bin}/yelp-check", "validate", "ducksinarow.page" + [ + prefix/"share/yelp-xsl/icons/hicolor/24x24/status/yelp-note-warning.png", + prefix/"share/yelp-xsl/js/jquery.syntax.brush.smalltalk.js", + prefix/"share/yelp-xsl/xslt/mallard/html/mal2html-links.xsl", + share/"pkgconfig/yelp-xsl.pc", + ].each do |filename| + assert filename.exist?, "#{filename} doesn't exist" + end end end diff --git a/Formula/yelp-xsl.rb b/Formula/yelp-xsl.rb deleted file mode 100644 index 6e49f5a272..0000000000 --- a/Formula/yelp-xsl.rb +++ /dev/null @@ -1,40 +0,0 @@ -class YelpXsl < Formula - desc "Yelp's universal stylesheets for Mallard and DocBook" - homepage "https://github.com/GNOME/yelp-xsl" - url "https://download.gnome.org/sources/yelp-xsl/3.20/yelp-xsl-3.20.1.tar.xz" - sha256 "dc61849e5dca473573d32e28c6c4e3cf9c1b6afe241f8c26e29539c415f97ba0" - - bottle do - cellar :any_skip_relocation - sha256 "efe44d4aff341789627222362d37ead81012b8326a371da7f11a1b038495e883" => :sierra - sha256 "aeb96fe4c29ceebad023ef93a537d112eb4c49fc0de581e96a74d158350b201c" => :el_capitan - sha256 "c19c5c3c3476d24c33e234b93df7532f2f9b15a8d213750463716edc087cd7a6" => :yosemite - sha256 "641d4b336701a5e82cfea2c349b14d012e1f2579b42b2f7a3cd1c72d18aac364" => :mavericks - end - - depends_on "itstool" => :build - depends_on "intltool" => :build - depends_on "gettext" => :build - depends_on "libxslt" - depends_on "libxml2" - depends_on "gtk+3" => :run - - def install - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - system "make", "install" - end - - def post_install - system "#{Formula["gtk+3"].opt_bin}/gtk3-update-icon-cache", "-f", "-t", "#{HOMEBREW_PREFIX}/share/icons/hicolor" - end - - test do - assert (pkgshare/"xslt/mallard/html/mal2html-links.xsl").exist? - assert (pkgshare/"js/jquery.syntax.brush.smalltalk.js").exist? - assert (pkgshare/"icons/hicolor/24x24/status/yelp-note-warning.png").exist? - assert (share/"pkgconfig/yelp-xsl.pc").exist? - end -end