aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/multimarkdown.rb
blob: d0b4bc8326399a1a6f00c7abca71ff8cbd6d55a5 (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.7'
  version '3.7'

  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 'Support'
  end

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