Skip to content

Loading…

Unaccent library #5790

Closed
wants to merge 2 commits into from

3 participants

@derencius

Hi,

I wrote a formula for Unac. This library is useful for the unaccented full text search with postgresql.

PostgreSQL Information about unnacented search.
http://developer.postgresql.org/pgdocs/postgres/unaccent.html

Marcus

@adamv

What is the source and function of the patch?

@derencius

Sorry, forgot to comment about the patch on the commit. going to send another pull request. I wrote that patch, because it was failing to compile a test binary. the issue was about two multiline strings in the begging of the file.

@adamv

We're trying to adopt a harder stance on patches; can we get the patch sent upstream w/ a bug report?

@mikemcquaid
Homebrew member

+1 on upstreaming patch. Thanks!

@derencius derencius closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Showing with 20 additions and 0 deletions.
  1. +20 −0 Library/Formula/unac.rb
View
20 Library/Formula/unac.rb
@@ -0,0 +1,20 @@
+require 'formula'
+
+class Unac < Formula
+ url 'http://download.savannah.gnu.org/releases/unac/unac-1.7.0.tar.gz'
+ homepage 'http://savannah.nongnu.org/projects/unac/'
+ md5 '884d057e644d3f26ec503b0780fbcb2b'
+
+ def patches
+ # I wrote this patch to fix compiling by removing long strings that supposed to be comments on the first lines of unactest1.c.
+ # Also unactest1.c seems to be just a test file. This patch then would not have impact on the utility.
+ # Author: marcus derencius (github.com/derencius)
+ "https://gist.github.com/raw/992290/34b3ad99904001efc509ab72c5b1478d25a0dd0a/a.patch"
+ end
+
+ def install
+ ENV.append 'LDFLAGS', '-liconv'
+ system "./configure", "--prefix=#{prefix}"
+ system "make install"
+ end
+end
Something went wrong with that request. Please try again.