aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/multimarkdown.rb
blob: 906ab8d1f5ddb639a84739e0de566ddf96f8b315 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
require 'formula'

class Multimarkdown < Formula
  homepage 'http://fletcherpenney.net/multimarkdown/'

  # Use the tag instead of the tarball to get submodules
  url 'https://github.com/fletcher/peg-multimarkdown.git', :tag => '3.6'
  version '3.6'

  head 'https://github.com/fletcher/peg-multimarkdown.git', :branch => 'development'

  def install
    # Since we want to use our CFLAGS, we need to add the following:
    ENV.append_to_cflags '-include GLibFacade.h'
    ENV.append_to_cflags '-D MD_USE_GET_OPT=1'
    ENV.append_to_cflags '-I..'
    system "make", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}"
    bin.install 'multimarkdown'
    bin.install Dir['scripts/*']
    # The support stuff will be put into the Cellar only
    prefix.install Dir['Support']
  end

  def caveats; <<-EOS.undent
    Support files have been installed to:
      #{prefix}/Support
    EOS
  end
end