Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions scripts/libpostal/1.1-alpha/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ language: generic
matrix:
include:
- os: osx
osx_image: xcode8
osx_image: xcode11
compiler: clang
- os: linux
sudo: false
Expand All @@ -14,8 +14,11 @@ matrix:
packages:
- libstdc++-4.8-dev
- pandoc
- autoconf
- automake
- libtool
- pkg-config

script:
- ./mason build ${MASON_NAME} ${MASON_VERSION}
- nm $(./mason prefix ${MASON_NAME} ${MASON_VERSION})/bin/libpostal | grep "GLIBC" | c++filt || true
- ./mason publish ${MASON_NAME} ${MASON_VERSION}
35 changes: 6 additions & 29 deletions scripts/libpostal/1.1-alpha/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

MASON_NAME=libpostal
MASON_VERSION=1.1-alpha
MASON_LIB_FILE=bin/libpostal
MASON_LIB_FILE=bin/libpostal_data

. ${MASON_DIR}/mason.sh

Expand All @@ -16,37 +16,14 @@ function mason_load_source {
export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}-${MASON_VERSION}
}

function mason_prepare_compile {

# installation instructions from https://github.com/openvenues/libpostal

if [[ $(uname -s) == 'Linux' ]]
then
yum install curl autoconf automake libtool pkgconfig
elif [[ $(uname -s) == 'Darwin' ]]
then
brew install curl autoconf automake libtool pkg-config
fi

}

function mason_compile {
./bootstrap.sh
./configure --datadir=${MASON_ROOT}/libpostal-data/

if [[ ${TRAVIS_OS_NAME:-} ]]; then
make VERBOSE=1 -j4
else
make VERBOSE=1 -j${MASON_CONCURRENCY}
fi

./configure ${MASON_HOST_ARG} --datadir=${MASON_ROOT}/data --prefix=${MASON_PREFIX}
make VERBOSE=1 -j${MASON_CONCURRENCY}
make install

if [[ $(uname -s) == 'Linux' ]]
then
ldconfig
fi

cp src/libpostal ${MASON_PREFIX}/bin/
cp src/address_parser ${MASON_PREFIX}/bin/
cp src/language_classifier ${MASON_PREFIX}/bin/
}

function mason_cflags {
Expand Down