From 2d33872a1b9cd9e9f863a424dea9358757faf3a6 Mon Sep 17 00:00:00 2001 From: equal-l2 Date: Wed, 18 Oct 2017 04:10:19 +0900 Subject: [PATCH] jemalloc: fix head build (#19503) --- Formula/jemalloc.rb | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/Formula/jemalloc.rb b/Formula/jemalloc.rb index 898624c977..fd3af74340 100644 --- a/Formula/jemalloc.rb +++ b/Formula/jemalloc.rb @@ -1,9 +1,8 @@ class Jemalloc < Formula desc "malloc implementation emphasizing fragmentation avoidance" - homepage "http://www.canonware.com/jemalloc/" + homepage "http://jemalloc.net/" url "https://github.com/jemalloc/jemalloc/releases/download/5.0.1/jemalloc-5.0.1.tar.bz2" sha256 "4814781d395b0ef093b21a08e8e6e0bd3dab8762f9935bbfb71679b0dea7c3e9" - head "https://github.com/jemalloc/jemalloc.git" bottle do cellar :any @@ -13,8 +12,28 @@ class Jemalloc < Formula sha256 "49a8f071338b3ec42cd89280681c338ad2e1d242a389e65f63f64e60257c5733" => :yosemite end + head do + url "https://github.com/jemalloc/jemalloc.git" + + depends_on "autoconf" => :build + depends_on "docbook-xsl" => :build + end + def install - system "./configure", "--disable-debug", "--prefix=#{prefix}", "--with-jemalloc-prefix=" + args = %W[ + --disable-debug + --prefix=#{prefix} + --with-jemalloc-prefix= + ] + + if build.head? + args << "--with-xslroot=#{Formula["docbook-xsl"].opt_prefix}/docbook-xsl" + system "./autogen.sh", *args + system "make", "dist" + else + system "./configure", *args + end + system "make" system "make", "check" system "make", "install"