Add PPA details for Ubuntu LTS

Remove Mac OS from preinstall script - please use homebrew
This commit is contained in:
Lovell Fuller 2015-07-16 09:28:54 +01:00
parent 8b50f15a44
commit de333eb02d
4 changed files with 219 additions and 243 deletions

View File

@ -25,7 +25,6 @@ libvips and its dependencies on the following Operating Systems:
* Fedora 21, 22
* Amazon Linux 2014.09, 2015.03
* OpenSuse 13
* Mac OS
run the following as a user with `sudo` access:
@ -47,11 +46,31 @@ Add `--with-openslide` to enable OpenSlide support:
curl -s https://raw.githubusercontent.com/lovell/sharp/master/preinstall.sh | sudo bash -s -- --with-openslide
```
#### Ubuntu LTS
libvips v7.40.6 is available via a PPA.
##### 12.04
```sh
sudo add-apt-repository -y ppa:lovell/precise-backport-vips
sudo apt-get update
sudo apt-get install -y libvips-dev libgsf-1-dev
```
##### 14.04
```sh
sudo add-apt-repository -y ppa:lovell/trusty-backport-vips
sudo apt-get update
sudo apt-get install -y libvips-dev libgsf-1-dev
```
### Mac OS
[![OS X 10.9.5 Build Status](https://travis-ci.org/lovell/sharp-osx-ci.png?branch=master)](https://travis-ci.org/lovell/sharp-osx-ci)
Manual install via homebrew:
Install libvips via homebrew:
```sh
brew install homebrew/science/vips --with-webp --with-graphicsmagick

View File

@ -4,11 +4,8 @@ repo_url: https://github.com/lovell/sharp
site_description: The fastest Node.js module for resizing JPEG, PNG, WebP and TIFF images. Uses the libvips library.
copyright: <a href="https://dimens.io/">dimens.io</a>
google_analytics: ['UA-13034748-12', 'sharp.dimens.io']
theme: flatly
theme: readthedocs
dev_addr: 0.0.0.0:10101
markdown_extensions:
- toc:
permalink: " ♯"
pages:
- Home: index.md
- Installation: install.md

View File

@ -2,7 +2,6 @@
# Ensures libvips is installed and attempts to install it if not
# Currently supports:
# * Mac OS
# * Debian Linux
# * Debian 7, 8
# * Ubuntu 12.04, 14.04, 14.10, 15.04
@ -10,7 +9,7 @@
# * Red Hat Linux
# * RHEL/Centos/Scientific 6, 7
# * Fedora 21, 22
# * Amazon Linux 2014.09
# * Amazon Linux 2014.09, 2015.03
vips_version_minimum=7.40.0
vips_version_latest_major_minor=8.0
@ -55,8 +54,7 @@ sorry() {
exit 1
}
pkg_config_path_homebrew=`which brew >/dev/null 2>&1 && eval $(brew --env) && echo $PKG_CONFIG_LIBDIR || true`
pkg_config_path="$pkg_config_path_homebrew:$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig"
pkg_config_path="$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig"
check_if_library_exists() {
PKG_CONFIG_PATH=$pkg_config_path pkg-config --exists $1
@ -122,21 +120,6 @@ fi
# OS-specific installations of libopenslide follows
# Either openslide does not exist, or vips is installed without openslide support
if [ $enable_openslide -eq 1 ] && [ -z $vips_with_openslide ] && [ $openslide_exists -eq 0 ]; then
case $(uname -s) in
*[Dd]arwin*)
# Mac OS
echo "Detected Mac OS"
if type "brew" > /dev/null; then
echo "Installing libopenslide via homebrew"
brew install openslide
elif type "port" > /dev/null; then
echo "Installing libopenslide via MacPorts"
port install openslide
else
sorry "openslide" "Mac OS without homebrew or MacPorts"
fi
;;
*)
if [ -f /etc/debian_version ]; then
# Debian Linux
DISTRO=$(lsb_release -c -s)
@ -147,7 +130,7 @@ if [ $enable_openslide -eq 1 ] && [ -z $vips_with_openslide ] && [ $openslide_ex
echo "Installing libopenslide via apt-get"
apt-get install -y libopenslide-dev
;;
trusty|utopic|qiana|rebecca)
trusty|utopic|qiana|rebecca|rafaela)
# Ubuntu 14, Mint 17
echo "Installing libopenslide dependencies via apt-get"
apt-get install -y automake build-essential curl zlib1g-dev libopenjpeg-dev libpng12-dev libjpeg-dev libtiff5-dev libgdk-pixbuf2.0-dev libxml2-dev libsqlite3-dev libcairo2-dev libglib2.0-dev sqlite3 libsqlite3-dev
@ -217,32 +200,11 @@ if [ $enable_openslide -eq 1 ] && [ -z $vips_with_openslide ] && [ $openslide_ex
# Unsupported OS
sorry "openslide" "$(uname -a)"
fi
;;
esac
fi
# OS-specific installations of libvips follows
case $(uname -s) in
*[Dd]arwin*)
# Mac OS
echo "Detected Mac OS"
if type "brew" > /dev/null; then
echo "Installing libvips via homebrew"
if [ $enable_openslide -eq 1 ]; then
brew install homebrew/science/vips --with-webp --with-graphicsmagick --with-openslide
else
brew install homebrew/science/vips --with-webp --with-graphicsmagick
fi
elif type "port" > /dev/null; then
echo "Installing libvips via MacPorts"
port install vips
else
sorry "vips" "Mac OS without homebrew or MacPorts"
fi
;;
*)
if [ -f /etc/debian_version ]; then
if [ -f /etc/debian_version ]; then
# Debian Linux
DISTRO=$(lsb_release -c -s)
echo "Detected Debian Linux '$DISTRO'"
@ -257,7 +219,7 @@ case $(uname -s) in
apt-get install -y libvips-dev libgsf-1-dev
fi
;;
trusty|utopic|qiana|rebecca)
trusty|utopic|qiana|rebecca|rafaela)
# Ubuntu 14, Mint 17
echo "Installing libvips dependencies via apt-get"
apt-get install -y automake build-essential gobject-introspection gtk-doc-tools libglib2.0-dev libjpeg-dev libpng12-dev libwebp-dev libtiff5-dev libexif-dev libgsf-1-dev liblcms2-dev libxml2-dev swig libmagickcore-dev curl
@ -276,7 +238,7 @@ case $(uname -s) in
sorry "vips" "Debian-based $DISTRO"
;;
esac
elif [ -f /etc/redhat-release ]; then
elif [ -f /etc/redhat-release ]; then
# Red Hat Linux
RELEASE=$(cat /etc/redhat-release)
echo "Detected Red Hat Linux '$RELEASE'"
@ -317,7 +279,7 @@ case $(uname -s) in
sorry "vips" "$RELEASE"
;;
esac
elif [ -f /etc/system-release ]; then
elif [ -f /etc/system-release ]; then
# Probably Amazon Linux
RELEASE=$(cat /etc/system-release)
case $RELEASE in
@ -334,7 +296,7 @@ case $(uname -s) in
sorry "vips" "$RELEASE"
;;
esac
elif [ -f /etc/os-release ]; then
elif [ -f /etc/os-release ]; then
RELEASE=$(cat /etc/os-release | grep VERSION)
echo "Detected OpenSuse Linux '$RELEASE'"
case $RELEASE in
@ -345,7 +307,7 @@ case $(uname -s) in
install_libvips_from_source
;;
esac
elif [ -f /etc/SuSE-brand ]; then
elif [ -f /etc/SuSE-brand ]; then
RELEASE=$(cat /etc/SuSE-brand | grep VERSION)
echo "Detected OpenSuse Linux '$RELEASE'"
case $RELEASE in
@ -356,9 +318,7 @@ case $(uname -s) in
install_libvips_from_source
;;
esac
else
else
# Unsupported OS
sorry "vips" "$(uname -a)"
fi
;;
esac
fi

View File

@ -8,20 +8,20 @@
// Verify platform and compiler compatibility
#if (VIPS_MAJOR_VERSION < 7 || (VIPS_MAJOR_VERSION == 7 && VIPS_MINOR_VERSION < 40))
#error libvips version 7.40.0+ required - see https://github.com/lovell/sharp#prerequisites
#error libvips version 7.40.0+ required - see http://sharp.dimens.io/page/install
#endif
#ifdef _WIN64
#error Windows 64-bit is currently unsupported - see https://github.com/lovell/sharp#windows
#error Windows 64-bit is currently unsupported - see http://sharp.dimens.io/page/install#windows
#endif
#if ((!defined(__clang__)) && defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6)))
#error GCC version 4.6+ is required for C++11 features - see https://github.com/lovell/sharp#prerequisites
#error GCC version 4.6+ is required for C++11 features - see http://sharp.dimens.io/page/install#prerequisites
#endif
#if (defined(__clang__) && defined(__has_feature))
#if (!__has_feature(cxx_range_for))
#error clang version 3.0+ is required for C++11 features - see https://github.com/lovell/sharp#prerequisites
#error clang version 3.0+ is required for C++11 features - see http://sharp.dimens.io/page/install#prerequisites
#endif
#endif