Last active
August 29, 2015 14:05
-
-
Save danigiri/bc1b576201ff65eecd28 to your computer and use it in GitHub Desktop.
Interactive install of freeling on Mac OS X using homebrew
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install boost dependency | |
brew install -v boost --with-icu | |
# interactively install freeling | |
brew install -i freeling | |
# setup environment, for some reason the boost headers are not detected, so we specify them | |
# note that it needs to reflect the appropriate boost version number installed | |
export LDFLAGS="-L/usr/local/opt/libtool/lib -L/usr/local/opt/icu4c/lib -L/usr/local/Cellar/boost/1.56.0/lib" | |
export CPPFLAGS="-I/usr/local/opt/libtool/include -I/usr/local/opt/icu4c/include -I/usr/local/Cellar/boost/1.56.0/include" | |
# build and install freeling | |
./configure --prefix=/usr/local/Cellar/freeling/3.1_1 --enable-boost-locale | |
make | |
make install | |
# cleanup (I imagine we're using the dylib and not the .la) | |
rm /usr/local/Cellar/freeling/3.1_1/lib/libfreeling.la | |
# link executables | |
cd /usr/local/bin | |
ln -s ../Cellar/freeling/3.1_1/bin/analyze analyze | |
ln -s ../Cellar/freeling/3.1_1/bin/analyzer analyzer | |
ln -s ../Cellar/freeling/3.1_1/bin/analyzer_client analyzer_client | |
ln -s ../Cellar/freeling/3.1_1/bin/dicc2phon dicc2phon | |
ln -s ../Cellar/freeling/3.1_1/bin/threaded_analyzer threaded_analyzer | |
cd /usr/local/include | |
ln -s ../Cellar/freeling/3.1_1/include/freeling freeling | |
ln -s ../Cellar/freeling/3.1_1/include/freeling.h freeling.h | |
ln -s ../Cellar/freeling/3.1_1/share/freeling freeling | |
ln -s ../Cellar/freeling/3.1_1/lib/libfreeling-3.1.dylib libfreeling-3.1.dylib | |
ln -s ../Cellar/freellibfreeling.a libfreeling.a | |
ln -s ../Cellar/freeling/3.1_1/lib/libfreeling.dylib libfreeling.dylib | |
ln -s ../../Cellar/freeling/3.1_1/lib/pkgconfig/freeling.pc freeling.pc | |
# this seems to be missing | |
ln -s ../Cellar/freeling/3.1_1/bin/fl_initialize fl_initialize | |
# testing | |
export FREELINGSHARE=/usr/local/Cellar/freeling/3.1_1/share/freeling | |
echo 'Hello world' | analyze -f /usr/local/Cellar/freeling/3.1_1/share/freeling/config/en.cfg | |
# calling server | |
./analyze --flush -f ca.cfg --server --port 5050 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment