Skip to content

Commit

Permalink
fix bashisms in configure script
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasp85 committed Feb 25, 2020
1 parent 71e2415 commit 7cbb3c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 6 additions & 2 deletions configure
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#! /bin/sh

# Anticonf (tm) script by Jeroen Ooms, Jim Hester (2019)
# This script will query 'pkg-config' for the required cflags and ldflags.
# If pkg-config is unavailable or does not find the library, try setting
# INCLUDE_DIR and LIB_DIR manually via e.g:
# R CMD INSTALL --configure-vars='INCLUDE_DIR=/.../include LIB_DIR=/.../lib'

PLATFORM=`uname`

# Library settings
PKG_CONFIG_NAME="freetype2 libpng libtiff-4"
PKG_DEB_NAME="libfreetype6-dev, libpng-dev, libtiff5-dev"
Expand All @@ -27,12 +31,12 @@ if [ "$INCLUDE_DIR" ] || [ "$LIB_DIR" ]; then
echo "Found INCLUDE_DIR and/or LIB_DIR!"
PKG_CFLAGS="-I$INCLUDE_DIR $PKG_CFLAGS"
PKG_LIBS="-L$LIB_DIR $PKG_LIBS"
elif [[ "$OSTYPE" == "darwin"* ]]; then
elif [ "$PLATFORM" = "darwin" ]; then
brew --version 2>/dev/null
if [ $? -eq 0 ]; then
BREWDIR=`brew --prefix`
else
source tools/autobrew
. tools/autobrew
fi
PKG_CFLAGS="-I$BREWDIR/opt/freetype/include/freetype2 -I$BREWDIR/opt/libpng/include -I$BREWDIR/opt/libtiff/include"
PKG_LIBS="-L$BREWDIR/opt/freetype/lib -L$BREWDIR/opt/libpng/lib -L$BREWDIR/opt/libtiff/lib -L$BREWDIR/opt/libjpeg/lib ${PKG_LIBS}"
Expand Down
5 changes: 3 additions & 2 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
This release fixes some small bugs and tries to optimise the compilation for
the CRAN macOS builder
This release fixes a bug in the AGG source code where the font index was not
considered in the freetype font manager, thus returning the wrong font when
using font collection files.

## Test environments
* local OS X install, R 3.6.0
Expand Down

0 comments on commit 7cbb3c2

Please sign in to comment.