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
|
* Fedora 21, 22
|
||||||
* Amazon Linux 2014.09, 2015.03
|
* Amazon Linux 2014.09, 2015.03
|
||||||
* OpenSuse 13
|
* OpenSuse 13
|
||||||
* Mac OS
|
|
||||||
|
|
||||||
run the following as a user with `sudo` access:
|
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
|
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
|
### Mac OS
|
||||||
|
|
||||||
[](https://travis-ci.org/lovell/sharp-osx-ci)
|
[](https://travis-ci.org/lovell/sharp-osx-ci)
|
||||||
|
|
||||||
Manual install via homebrew:
|
Install libvips via homebrew:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
brew install homebrew/science/vips --with-webp --with-graphicsmagick
|
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.
|
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>
|
copyright: <a href="https://dimens.io/">dimens.io</a>
|
||||||
google_analytics: ['UA-13034748-12', 'sharp.dimens.io']
|
google_analytics: ['UA-13034748-12', 'sharp.dimens.io']
|
||||||
theme: flatly
|
theme: readthedocs
|
||||||
dev_addr: 0.0.0.0:10101
|
dev_addr: 0.0.0.0:10101
|
||||||
markdown_extensions:
|
|
||||||
- toc:
|
|
||||||
permalink: " ♯"
|
|
||||||
pages:
|
pages:
|
||||||
- Home: index.md
|
- Home: index.md
|
||||||
- Installation: install.md
|
- Installation: install.md
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
# Ensures libvips is installed and attempts to install it if not
|
# Ensures libvips is installed and attempts to install it if not
|
||||||
# Currently supports:
|
# Currently supports:
|
||||||
# * Mac OS
|
|
||||||
# * Debian Linux
|
# * Debian Linux
|
||||||
# * Debian 7, 8
|
# * Debian 7, 8
|
||||||
# * Ubuntu 12.04, 14.04, 14.10, 15.04
|
# * Ubuntu 12.04, 14.04, 14.10, 15.04
|
||||||
@ -10,7 +9,7 @@
|
|||||||
# * Red Hat Linux
|
# * Red Hat Linux
|
||||||
# * RHEL/Centos/Scientific 6, 7
|
# * RHEL/Centos/Scientific 6, 7
|
||||||
# * Fedora 21, 22
|
# * Fedora 21, 22
|
||||||
# * Amazon Linux 2014.09
|
# * Amazon Linux 2014.09, 2015.03
|
||||||
|
|
||||||
vips_version_minimum=7.40.0
|
vips_version_minimum=7.40.0
|
||||||
vips_version_latest_major_minor=8.0
|
vips_version_latest_major_minor=8.0
|
||||||
@ -55,8 +54,7 @@ sorry() {
|
|||||||
exit 1
|
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:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig"
|
||||||
pkg_config_path="$pkg_config_path_homebrew:$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig"
|
|
||||||
|
|
||||||
check_if_library_exists() {
|
check_if_library_exists() {
|
||||||
PKG_CONFIG_PATH=$pkg_config_path pkg-config --exists $1
|
PKG_CONFIG_PATH=$pkg_config_path pkg-config --exists $1
|
||||||
@ -122,21 +120,6 @@ fi
|
|||||||
# OS-specific installations of libopenslide follows
|
# OS-specific installations of libopenslide follows
|
||||||
# Either openslide does not exist, or vips is installed without openslide support
|
# 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
|
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
|
if [ -f /etc/debian_version ]; then
|
||||||
# Debian Linux
|
# Debian Linux
|
||||||
DISTRO=$(lsb_release -c -s)
|
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"
|
echo "Installing libopenslide via apt-get"
|
||||||
apt-get install -y libopenslide-dev
|
apt-get install -y libopenslide-dev
|
||||||
;;
|
;;
|
||||||
trusty|utopic|qiana|rebecca)
|
trusty|utopic|qiana|rebecca|rafaela)
|
||||||
# Ubuntu 14, Mint 17
|
# Ubuntu 14, Mint 17
|
||||||
echo "Installing libopenslide dependencies via apt-get"
|
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
|
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
|
# Unsupported OS
|
||||||
sorry "openslide" "$(uname -a)"
|
sorry "openslide" "$(uname -a)"
|
||||||
fi
|
fi
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# OS-specific installations of libvips follows
|
# OS-specific installations of libvips follows
|
||||||
|
|
||||||
case $(uname -s) in
|
if [ -f /etc/debian_version ]; then
|
||||||
*[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
|
# Debian Linux
|
||||||
DISTRO=$(lsb_release -c -s)
|
DISTRO=$(lsb_release -c -s)
|
||||||
echo "Detected Debian Linux '$DISTRO'"
|
echo "Detected Debian Linux '$DISTRO'"
|
||||||
@ -257,7 +219,7 @@ case $(uname -s) in
|
|||||||
apt-get install -y libvips-dev libgsf-1-dev
|
apt-get install -y libvips-dev libgsf-1-dev
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
trusty|utopic|qiana|rebecca)
|
trusty|utopic|qiana|rebecca|rafaela)
|
||||||
# Ubuntu 14, Mint 17
|
# Ubuntu 14, Mint 17
|
||||||
echo "Installing libvips dependencies via apt-get"
|
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
|
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"
|
sorry "vips" "Debian-based $DISTRO"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
elif [ -f /etc/redhat-release ]; then
|
elif [ -f /etc/redhat-release ]; then
|
||||||
# Red Hat Linux
|
# Red Hat Linux
|
||||||
RELEASE=$(cat /etc/redhat-release)
|
RELEASE=$(cat /etc/redhat-release)
|
||||||
echo "Detected Red Hat Linux '$RELEASE'"
|
echo "Detected Red Hat Linux '$RELEASE'"
|
||||||
@ -317,7 +279,7 @@ case $(uname -s) in
|
|||||||
sorry "vips" "$RELEASE"
|
sorry "vips" "$RELEASE"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
elif [ -f /etc/system-release ]; then
|
elif [ -f /etc/system-release ]; then
|
||||||
# Probably Amazon Linux
|
# Probably Amazon Linux
|
||||||
RELEASE=$(cat /etc/system-release)
|
RELEASE=$(cat /etc/system-release)
|
||||||
case $RELEASE in
|
case $RELEASE in
|
||||||
@ -334,7 +296,7 @@ case $(uname -s) in
|
|||||||
sorry "vips" "$RELEASE"
|
sorry "vips" "$RELEASE"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
elif [ -f /etc/os-release ]; then
|
elif [ -f /etc/os-release ]; then
|
||||||
RELEASE=$(cat /etc/os-release | grep VERSION)
|
RELEASE=$(cat /etc/os-release | grep VERSION)
|
||||||
echo "Detected OpenSuse Linux '$RELEASE'"
|
echo "Detected OpenSuse Linux '$RELEASE'"
|
||||||
case $RELEASE in
|
case $RELEASE in
|
||||||
@ -345,7 +307,7 @@ case $(uname -s) in
|
|||||||
install_libvips_from_source
|
install_libvips_from_source
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
elif [ -f /etc/SuSE-brand ]; then
|
elif [ -f /etc/SuSE-brand ]; then
|
||||||
RELEASE=$(cat /etc/SuSE-brand | grep VERSION)
|
RELEASE=$(cat /etc/SuSE-brand | grep VERSION)
|
||||||
echo "Detected OpenSuse Linux '$RELEASE'"
|
echo "Detected OpenSuse Linux '$RELEASE'"
|
||||||
case $RELEASE in
|
case $RELEASE in
|
||||||
@ -356,9 +318,7 @@ case $(uname -s) in
|
|||||||
install_libvips_from_source
|
install_libvips_from_source
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
# Unsupported OS
|
# Unsupported OS
|
||||||
sorry "vips" "$(uname -a)"
|
sorry "vips" "$(uname -a)"
|
||||||
fi
|
fi
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
@ -8,20 +8,20 @@
|
|||||||
// Verify platform and compiler compatibility
|
// Verify platform and compiler compatibility
|
||||||
|
|
||||||
#if (VIPS_MAJOR_VERSION < 7 || (VIPS_MAJOR_VERSION == 7 && VIPS_MINOR_VERSION < 40))
|
#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
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN64
|
#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
|
#endif
|
||||||
|
|
||||||
#if ((!defined(__clang__)) && defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6)))
|
#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
|
#endif
|
||||||
|
|
||||||
#if (defined(__clang__) && defined(__has_feature))
|
#if (defined(__clang__) && defined(__has_feature))
|
||||||
#if (!__has_feature(cxx_range_for))
|
#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
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user