Skip to content

Instantly share code, notes, and snippets.

@maz-1
Created January 30, 2017 07:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maz-1/2c797fa2ccf5aa815017676bbb884a73 to your computer and use it in GitHub Desktop.
Save maz-1/2c797fa2ccf5aa815017676bbb884a73 to your computer and use it in GitHub Desktop.
Homebrew Formula for natspec
desc "Library for national and language-specific issues"
homepage "http://sourceforge.net/projects/natspec/"
url "http://sourceforge.net/projects/natspec/files/natspec/0.3.0/libnatspec-0.3.0.tar.bz2"
sha256 "678db5f2e25be3e79183ecc9ff6b19fb66775bcb6c3c962ba7716bc4a8ecce71"
bottle do
cellar :any
sha256 "84aefa7e2449d8162aca396921a568c556f2191db72fd5f03ee2daf6cf9485bd" => :sierra
sha256 "2efac098c764845cae4a33c4788fd2f811a6a62a9345e4dcdebe4097cd1e09f3" => :el_capitan
sha256 "7a70c24489fcd92a6f3845dd945eb0822d4018ef937747c720522a1e70e90fdb" => :yosemite
end
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "pkg-config" => :build
depends_on "popt"
patch :DATA
def install
system "autoreconf", "-fiv"
system "./configure", "--prefix=#{prefix}",
"--enable-python",
"--enable-static",
"--disable-shared"
system "make", "install"
end
test do
system "#{bin}/natspec"
end
end
__END__
diff -Naur libnatspec-0.3.0-orig/lib/Makefile.am libnatspec-0.3.0/lib/Makefile.am
--- libnatspec-0.3.0-orig/lib/Makefile.am 2017-01-30 13:50:10.000000000 +0800
+++ libnatspec-0.3.0/lib/Makefile.am 1970-01-01 08:00:00.000000000 +0800
@@ -2,6 +2,7 @@
libnatspec_la_SOURCES = get_charset.c get_locale.c enrich_fs_options.c convert.c \
filesystem.c detect.c \
natspec.h data/get_charset_data.h unicode/uni_7b.h
+libnatspec_la_LDFLAGS = -liconv
#libdir = /lib
#-version-info 0:0:1
#-release 1
@aonez
Copy link

aonez commented Jan 30, 2017

The formula lacks the first line:

class Natspec < Formula

Other than that, works perfectly! Thanks!!!

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