@ohos-ports/sharp 0.34.5-beta.2 → 0.34.5-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
package/lib/sharp.js CHANGED
@@ -10,7 +10,29 @@ const { familySync, versionSync } = require('detect-libc');
10
10
  const { runtimePlatformArch, isUnsupportedNodeRuntime, prebuiltPlatforms, minimumLibvipsVersion } = require('./libvips');
11
11
  const runtimePlatform = runtimePlatformArch();
12
12
 
13
+ // OpenHarmony: create soname symlink for transitive .so dependency
14
+ // sharp.node NEEDED is patched to use full filename (libvips-cpp.so.42.20.3),
15
+ // but libvips-cpp.so.42.20.3 still NEEDED libvips.so.42 (soname).
16
+ // The libvips package only ships libvips.so.42.20.3, no soname symlink.
17
+ try {
18
+ const path = require('node:path');
19
+ const fs = require('node:fs');
20
+ const libvipsLibPath = require(`@ohos-ports/img-sharp-libvips-${runtimePlatform}/lib`);
21
+ if (libvipsLibPath) {
22
+ for (const file of fs.readdirSync(libvipsLibPath)) {
23
+ const m = file.match(/^(.+\.so\.\d+)\.\d+\.\d+$/);
24
+ if (m) {
25
+ const soname = path.join(libvipsLibPath, m[1]);
26
+ if (!fs.existsSync(soname)) {
27
+ try { fs.symlinkSync(file, soname); } catch (_) {}
28
+ }
29
+ }
30
+ }
31
+ }
32
+ } catch (_e) { /* skip */ }
33
+
13
34
  const paths = [
35
+ `./sharp-${runtimePlatform}.node`,
14
36
  `../src/build/Release/sharp-${runtimePlatform}.node`,
15
37
  '../src/build/Release/sharp-wasm32.node',
16
38
  `@ohos-ports/img-sharp-${runtimePlatform}/sharp.node`,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ohos-ports/sharp",
3
3
  "description": "High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images",
4
- "version": "0.34.5-beta.2",
4
+ "version": "0.34.5-beta.4",
5
5
  "author": "Lovell Fuller <npm@lovell.info>",
6
6
  "homepage": "https://sharp.pixelplumbing.com",
7
7
  "contributors": [
@@ -15,7 +15,7 @@
15
15
  "Brandon Aaron <hello.brandon@aaron.sh>",
16
16
  "Andreas Lind <andreas@one.com>",
17
17
  "Maurus Cuelenaere <mcuelenaere@gmail.com>",
18
- "Linus Unnebäck <linus@folkdatorn.se>",
18
+ "Linus Unneb\u00e4ck <linus@folkdatorn.se>",
19
19
  "Victor Mateevitsi <mvictoras@gmail.com>",
20
20
  "Alaric Holloway <alaric.holloway@gmail.com>",
21
21
  "Bernhard K. Weisshuhn <bkw@codingforce.com>",
@@ -23,7 +23,7 @@
23
23
  "David Carley <dacarley@gmail.com>",
24
24
  "John Tobin <john@limelightmobileinc.com>",
25
25
  "Kenton Gray <kentongray@gmail.com>",
26
- "Felix Bünemann <Felix.Buenemann@gmail.com>",
26
+ "Felix B\u00fcnemann <Felix.Buenemann@gmail.com>",
27
27
  "Samy Al Zahrani <samyalzahrany@gmail.com>",
28
28
  "Chintan Thakkar <lemnisk8@gmail.com>",
29
29
  "F. Orlando Galashan <frulo@gmx.de>",
@@ -31,7 +31,7 @@
31
31
  "Matt Hirsch <mhirsch@media.mit.edu>",
32
32
  "Matthias Thoemmes <thoemmes@gmail.com>",
33
33
  "Patrick Paskaris <patrick@paskaris.gr>",
34
- "Jérémy Lal <kapouer@melix.org>",
34
+ "J\u00e9r\u00e9my Lal <kapouer@melix.org>",
35
35
  "Rahul Nanwani <r.nanwani@gmail.com>",
36
36
  "Alice Monday <alice0meta@gmail.com>",
37
37
  "Kristo Jorgenson <kristo.jorgenson@gmail.com>",
@@ -41,7 +41,7 @@
41
41
  "Matt Parrish <matt.r.parrish@gmail.com>",
42
42
  "Marcel Bretschneider <marcel.bretschneider@gmail.com>",
43
43
  "Matthew McEachen <matthew+github@mceachen.org>",
44
- "Jarda Kotěšovec <jarda.kotesovec@gmail.com>",
44
+ "Jarda Kot\u011b\u0161ovec <jarda.kotesovec@gmail.com>",
45
45
  "Kenric D'Souza <kenric.dsouza@gmail.com>",
46
46
  "Oleh Aleinyk <oleg.aleynik@gmail.com>",
47
47
  "Marcel Bretschneider <marcel.bretschneider@gmail.com>",
@@ -70,7 +70,7 @@
70
70
  "Roman Malieiev <aromaleev@gmail.com>",
71
71
  "Tomas Szabo <tomas.szabo@deftomat.com>",
72
72
  "Robert O'Rourke <robert@o-rourke.org>",
73
- "Guillermo Alfonso Varela Chouciño <guillevch@gmail.com>",
73
+ "Guillermo Alfonso Varela Chouci\u00f1o <guillevch@gmail.com>",
74
74
  "Christian Flintrup <chr@gigahost.dk>",
75
75
  "Manan Jadhav <manan@motionden.com>",
76
76
  "Leon Radley <leon@radley.se>",
@@ -79,7 +79,7 @@
79
79
  "Michael Nutt <michael@nutt.im>",
80
80
  "Brad Parham <baparham@gmail.com>",
81
81
  "Taneli Vatanen <taneli.vatanen@gmail.com>",
82
- "Joris Dugué <zaruike10@gmail.com>",
82
+ "Joris Dugu\u00e9 <zaruike10@gmail.com>",
83
83
  "Chris Banks <christopher.bradley.banks@gmail.com>",
84
84
  "Ompal Singh <ompal.hitm09@gmail.com>",
85
85
  "Brodan <christopher.hranj@gmail.com>",
@@ -200,4 +200,4 @@
200
200
  "funding": {
201
201
  "url": "https://opencollective.com/libvips"
202
202
  }
203
- }
203
+ }