mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
Upgrade to libvips v8.9.1-alpha1 prebuild
This commit is contained in:
parent
c17807c995
commit
8b3c0daab2
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## v0.25 - *yield*
|
## v0.25 - *yield*
|
||||||
|
|
||||||
Requires libvips TBD
|
Requires libvips v8.9.1
|
||||||
|
|
||||||
### v0.25.0 - TBD
|
### v0.25.0 - TBD
|
||||||
|
|
||||||
|
@ -14,8 +14,8 @@ const agent = require('../lib/agent');
|
|||||||
const libvips = require('../lib/libvips');
|
const libvips = require('../lib/libvips');
|
||||||
const platform = require('../lib/platform');
|
const platform = require('../lib/platform');
|
||||||
|
|
||||||
const minimumLibvipsVersion = libvips.minimumLibvipsVersion;
|
const { minimumLibvipsVersion, minimumLibvipsVersionLabelled } = libvips;
|
||||||
const distBaseUrl = process.env.npm_config_sharp_dist_base_url || process.env.SHARP_DIST_BASE_URL || `https://github.com/lovell/sharp-libvips/releases/download/v${minimumLibvipsVersion}/`;
|
const distBaseUrl = process.env.npm_config_sharp_dist_base_url || process.env.SHARP_DIST_BASE_URL || `https://github.com/lovell/sharp-libvips/releases/download/v${minimumLibvipsVersionLabelled}/`;
|
||||||
|
|
||||||
const fail = function (err) {
|
const fail = function (err) {
|
||||||
npmLog.error('sharp', err.message);
|
npmLog.error('sharp', err.message);
|
||||||
|
@ -8,8 +8,9 @@ const semver = require('semver');
|
|||||||
const platform = require('./platform');
|
const platform = require('./platform');
|
||||||
|
|
||||||
const env = process.env;
|
const env = process.env;
|
||||||
const minimumLibvipsVersion = env.npm_package_config_libvips || /* istanbul ignore next */
|
const minimumLibvipsVersionLabelled = env.npm_package_config_libvips || /* istanbul ignore next */
|
||||||
require('../package.json').config.libvips;
|
require('../package.json').config.libvips;
|
||||||
|
const minimumLibvipsVersion = semver.coerce(minimumLibvipsVersionLabelled).version;
|
||||||
|
|
||||||
const spawnSyncOptions = {
|
const spawnSyncOptions = {
|
||||||
encoding: 'utf8',
|
encoding: 'utf8',
|
||||||
@ -93,11 +94,12 @@ const useGlobalLibvips = function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
minimumLibvipsVersion: minimumLibvipsVersion,
|
minimumLibvipsVersion,
|
||||||
cachePath: cachePath,
|
minimumLibvipsVersionLabelled,
|
||||||
globalLibvipsVersion: globalLibvipsVersion,
|
cachePath,
|
||||||
hasVendoredLibvips: hasVendoredLibvips,
|
globalLibvipsVersion,
|
||||||
pkgConfigPath: pkgConfigPath,
|
hasVendoredLibvips,
|
||||||
useGlobalLibvips: useGlobalLibvips,
|
pkgConfigPath,
|
||||||
mkdirSync: mkdirSync
|
useGlobalLibvips,
|
||||||
|
mkdirSync
|
||||||
};
|
};
|
||||||
|
@ -135,7 +135,7 @@
|
|||||||
},
|
},
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"config": {
|
"config": {
|
||||||
"libvips": "8.9.0"
|
"libvips": "8.9.1-alpha1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.16.0"
|
"node": ">=10.16.0"
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
// Verify platform and compiler compatibility
|
// Verify platform and compiler compatibility
|
||||||
|
|
||||||
#if (VIPS_MAJOR_VERSION < 8 || (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION < 9))
|
#if (VIPS_MAJOR_VERSION < 8 || (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION < 9))
|
||||||
#error "libvips version 8.9.0+ is required - please see https://sharp.pixelplumbing.com/install"
|
#error "libvips version 8.9.1+ is required - please see https://sharp.pixelplumbing.com/install"
|
||||||
#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)))
|
||||||
|
@ -1320,7 +1320,7 @@ Napi::Value pipeline(const Napi::CallbackInfo& info) {
|
|||||||
baton->heifQuality = sharp::AttrAsUint32(options, "heifQuality");
|
baton->heifQuality = sharp::AttrAsUint32(options, "heifQuality");
|
||||||
baton->heifLossless = sharp::AttrAsBool(options, "heifLossless");
|
baton->heifLossless = sharp::AttrAsBool(options, "heifLossless");
|
||||||
baton->heifCompression = static_cast<VipsForeignHeifCompression>(
|
baton->heifCompression = static_cast<VipsForeignHeifCompression>(
|
||||||
vips_enum_from_nick(nullptr, VIPS_TYPE_FOREIGN_HEIF_COMPRESSION,
|
vips_enum_from_nick(nullptr, VIPS_TYPE_FOREIGN_HEIF_COMPRESSION,
|
||||||
sharp::AttrAsStr(options, "heifCompression").data()));
|
sharp::AttrAsStr(options, "heifCompression").data()));
|
||||||
// Tile output
|
// Tile output
|
||||||
baton->tileSize = sharp::AttrAsUint32(options, "tileSize");
|
baton->tileSize = sharp::AttrAsUint32(options, "tileSize");
|
||||||
|
@ -150,7 +150,7 @@ struct PipelineBaton {
|
|||||||
double tiffXres;
|
double tiffXres;
|
||||||
double tiffYres;
|
double tiffYres;
|
||||||
int heifQuality;
|
int heifQuality;
|
||||||
int heifCompression; // TODO(libvips 8.9.0): VipsForeignHeifCompression
|
VipsForeignHeifCompression heifCompression;
|
||||||
bool heifLossless;
|
bool heifLossless;
|
||||||
std::string err;
|
std::string err;
|
||||||
bool withMetadata;
|
bool withMetadata;
|
||||||
@ -258,7 +258,7 @@ struct PipelineBaton {
|
|||||||
tiffXres(1.0),
|
tiffXres(1.0),
|
||||||
tiffYres(1.0),
|
tiffYres(1.0),
|
||||||
heifQuality(80),
|
heifQuality(80),
|
||||||
heifCompression(1), // TODO(libvips 8.9.0): VIPS_FOREIGN_HEIF_COMPRESSION_HEVC
|
heifCompression(VIPS_FOREIGN_HEIF_COMPRESSION_HEVC),
|
||||||
heifLossless(false),
|
heifLossless(false),
|
||||||
withMetadata(false),
|
withMetadata(false),
|
||||||
withMetadataOrientation(-1),
|
withMetadataOrientation(-1),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user