Skip to content

Instantly share code, notes, and snippets.

@geoff-nixon
Created March 22, 2016 00:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geoff-nixon/d8c16ada1de10e6387b3 to your computer and use it in GitHub Desktop.
Save geoff-nixon/d8c16ada1de10e6387b3 to your computer and use it in GitHub Desktop.
class Sc < Formula
desc "Curses-based CLI spreadsheet editor"
homepage "https://launchpad.net/ubuntu/dapper/+package/sc"
url "https://launchpad.net/ubuntu/+archive/primary/+files/sc_7.16.orig.tar.gz"
version "7.16-4"
sha256 "e541f98bcf78ded2de2ce336abda9705a24b6ce67fc82806107880bf6504642a"
patch do
url "http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/wily/sc/wily/download/head:/use_varadic_macro-20140519043026-mefjtvccutu8tnaa-24/use_varadic_macro"
sha256 "781d041bd6da4fce895d905bd82b20efed69837ab19c40cb3216eb7e49bcc915"
end
patch do
url "http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/wily/sc/wily/download/head:/call_function_not_ta-20140519043026-mefjtvccutu8tnaa-15/call_function_not_take_its_address"
sha256 "82a47851595cf23d4e1e0194e69747a5ef042a8e943020d01a7112c346338d65"
end
patch do
url "http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/wily/sc/wily/download/head:/upstreamchangesfromo-20140519043026-mefjtvccutu8tnaa-34/Upstream-changes-from-old-versions"
sha256 "69be2ae5389cd94094da4637dde4fb8efb66aa0fc50434c324dc1f7a63ebfaca"
end
patch do
url "http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/wily/sc/wily/download/head:/function_definitions-20140519043026-mefjtvccutu8tnaa-9/function_definitions"
sha256 "0355b1b918e05c73399d07a2e5a1497c56127087c3967a9dc0dfc0cc38453376"
end
def install
inreplace "Makefile", "NO_NOTIMEOUT=", "NO_NOTIMEOUT=-DNONOTIMEOUT"
inreplace "Makefile", "MANDIR=${prefix}/man/man1", "MANDIR=#{man1}"
inreplace "Makefile", "prefix=/usr", "prefix=#{prefix}"
inreplace "Makefile", "CFLAGS=", "CFLAGS+="
inreplace "Makefile", "CC=gcc", ""
[bin, man1, share/"doc"].each { |dir| mkdir_p dir }
system "make", "install"
end
test do
system "sc", "-W%", share/"doc/sc/tutorial.sc"
end
end
@n8henrie
Copy link

n8henrie commented Feb 5, 2017

Have you tried to submit this to Homebrew? Would be nice to have in the official catalog.

@danpolanco
Copy link

Same! Nice work btw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment