mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 18:40:16 +02:00
Add PPA details for Ubuntu LTS
Remove Mac OS from preinstall script - please use homebrew
This commit is contained in:
parent
8b50f15a44
commit
de333eb02d
@ -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
|
||||
|
||||
[](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
|
||||
|
@ -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
|
||||
|
@ -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,31 +200,10 @@ 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
|
||||
# Debian Linux
|
||||
DISTRO=$(lsb_release -c -s)
|
||||
@ -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
|
||||
@ -360,5 +322,3 @@ case $(uname -s) in
|
||||
# Unsupported OS
|
||||
sorry "vips" "$(uname -a)"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user