Skip to content

Commit

Permalink
OSX build: Add fribidi package
Browse files Browse the repository at this point in the history
  • Loading branch information
morevnaproject committed Oct 20, 2021
1 parent ca44bad commit bc951af
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 1-setup-osx-brew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ ccache \
cmake \
fftw \
fontconfig \
fribidi \
gettext \
glibmm \
gtkmm3 \
Expand Down Expand Up @@ -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;
Expand Down
34 changes: 34 additions & 0 deletions autobuild/osx/fribidi.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit bc951af

Please sign in to comment.