diff --git a/1-setup-osx-brew.sh b/1-setup-osx-brew.sh index a22b3fa7ba6..079dda7c4cb 100755 --- a/1-setup-osx-brew.sh +++ b/1-setup-osx-brew.sh @@ -33,6 +33,7 @@ ccache \ cmake \ fftw \ fontconfig \ +fribidi \ gettext \ glibmm \ gtkmm3 \ @@ -66,6 +67,7 @@ if [ $OS -lt 15 ] && [ -z "$TRAVIS_BUILD_DIR" ]; then # For OSX < 10.11 cd /usr/local/Homebrew/ git checkout 1.4.1 brew info gobject-introspection | grep >/dev/null 'Not installed' && brew install ${WORKDIR}/autobuild/osx/gobject-introspection.rb + brew info fribidi | grep >/dev/null 'Not installed' && brew install ${WORKDIR}/autobuild/osx/fribidi.rb # broken url in original formula fi for pkg in $PACKAGES; diff --git a/autobuild/osx/fribidi.rb b/autobuild/osx/fribidi.rb new file mode 100644 index 00000000000..f8d75fd2803 --- /dev/null +++ b/autobuild/osx/fribidi.rb @@ -0,0 +1,34 @@ +class Fribidi < Formula + desc "Implementation of the Unicode BiDi algorithm" + homepage "https://fribidi.org/" + url "https://github.com/fribidi/fribidi/releases/download/0.19.7/fribidi-0.19.7.tar.bz2" + sha256 "08222a6212bbc2276a2d55c3bf370109ae4a35b689acbc66571ad2a670595a8e" + revision 1 + + bottle do + cellar :any + sha256 "328217d2ad90d4f183a44572c59cef7ec0cae37fdfb5b03ace41b37c48d8c72d" => :high_sierra + sha256 "5d1e95fc89934750643b1a684cd6738839ecc2d05721282dcf72b9c3481092fd" => :sierra + sha256 "6ba76553f8ec26d4de32e84ce0a99e758d1bb5b7272ac2a985ff71322957d1ac" => :el_capitan + sha256 "e414b99827d9a472609639ab5030bf5344077763bc178ce743a082008874f232" => :yosemite + sha256 "70caed8cb2f44044c41e0b91c2645111b9f177d98b4d49cef01fb0d8558c0f98" => :mavericks + end + + depends_on "pkg-config" => :build + depends_on "glib" + depends_on "pcre" + + def install + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--with-glib", "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.input").write <<~EOS + a _lsimple _RteST_o th_oat + EOS + + assert_match /a simple TSet that/, shell_output("#{bin}/fribidi --charset=CapRTL --test test.input") + end +end