Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add a formula for Proof General 4.1. #14827

Closed
wants to merge 2 commits into from

2 participants

@mht208

Proof General is a generic front-end for proof assistants, based on Emacs.

mht208 added some commits
@mht208 mht208 Add a formula for Proof General 4.1.
Proof General is a generic front-end for proof assistants, based on
Emacs.
d367621
@mht208 mht208 Simplify the formula of ProofGeneral. bb4f1a8
@adamv
Owner

What do other maintainers think of this? I'd almost suggest starting homebrew-emacs for this and #10643.

@adamv adamv closed this pull request from a commit
@mht208 mht208 Proof General 4.1
Closes #14827.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
ecd40ee
@adamv adamv closed this in ecd40ee
@gwydirsam gwydirsam referenced this pull request from a commit
@mht208 mht208 Proof General 4.1
Closes #14827.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
0bbbb6b
@guyzmo guyzmo referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@cooljeanius cooljeanius referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@rajeeja rajeeja referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 10, 2012
  1. @mht208

    Add a formula for Proof General 4.1.

    mht208 authored
    Proof General is a generic front-end for proof assistants, based on
    Emacs.
Commits on Sep 11, 2012
  1. @mht208
This page is out of date. Refresh to see the latest.
Showing with 64 additions and 0 deletions.
  1. +64 −0 Library/Formula/proof-general.rb
View
64 Library/Formula/proof-general.rb
@@ -0,0 +1,64 @@
+require 'formula'
+
+class ProofGeneral < Formula
+ homepage 'http://proofgeneral.inf.ed.ac.uk'
+ url 'http://proofgeneral.inf.ed.ac.uk/releases/ProofGeneral-4.1.tgz'
+ sha1 '0dd18bd0bdad8faab76f61bffc8e432c3ed7aeaf'
+
+ option 'with-doc', 'Install documentations'
+ option 'with-emacs=</path/to/emacs>', 'Re-compile the lisp files with a specified emacs'
+
+ def which_emacs
+ ARGV.each do |a|
+ if a.index('--with-emacs')
+ emacs = a.sub('--with-emacs=', '')
+ raise "#{emacs} not found" if not File.exists? "#{emacs}"
+ ohai "Use Emacs: #{emacs}"
+
+ version = `#{emacs} --version | grep -Eo "GNU Emacs \\d+(\\.\\d+)+"`.gsub /\n/, ""
+ ohai "Emacs version: #{version}"
+ major = `echo "#{version}" | awk {'print $3'} | cut -d "." -f 1`.gsub /\n/, ""
+ raise "Only Emacs of major version 23 is supported." if major != "23"
+ return emacs
+ end
+ end
+ return ""
+ end
+
+ def install
+ emacs = which_emacs
+ args = ["PREFIX=#{prefix}",
+ "DEST_PREFIX=#{prefix}",
+ "ELISPP=share/emacs/site-lisp/ProofGeneral",
+ "ELISP_START=#{share}/emacs/site-lisp/site-start.d",
+ "EMACS=#{emacs}"];
+
+ Dir.chdir "ProofGeneral" do
+ if emacs != ""
+ system "make clean"
+ system "make", "compile", *args
+ end
+ system "make", "install", *args
+ man1.install "doc/proofgeneral.1"
+ info.install "doc/ProofGeneral.info", "doc/PG-adapting.info"
+
+ doc.install "doc/ProofGeneral", "doc/PG-adapting" if build.include? 'with-doc'
+ end
+ end
+
+ def caveats
+ doc = ""
+ if build.include? 'with-doc'
+ doc += <<-EOS.undent
+ The HTML documentations are available in:
+ #{HOMEBREW_PREFIX}/share/doc/proof-general
+ EOS
+ end
+
+ <<-EOS.undent
+ To use ProofGeneral with Emacs, add the following line to your ~/.emacs file:
+ (load-file "#{HOMEBREW_PREFIX}/share/emacs/site-lisp/ProofGeneral/generic/proof-site.el")
+ #{doc}
+ EOS
+ end
+end
Something went wrong with that request. Please try again.