1
1
#! /usr/bin/env bash
2
2
set -e
3
3
4
+ # Remove patch version component
5
+ without_patch () {
6
+ echo " ${1% .[[:digit:]]* } "
7
+ }
8
+ # Remove prerelease suffix
9
+ without_prerelease () {
10
+ echo " ${1% -[[:alnum:]]* } "
11
+ }
12
+
4
13
# Environment / working directories
5
14
case ${PLATFORM} in
6
15
linux* )
@@ -9,15 +18,15 @@ case ${PLATFORM} in
9
18
TARGET=/target
10
19
PACKAGE=/packaging
11
20
ROOT=/root
12
- VIPS_CPP_DEP=libvips-cpp.so.42
21
+ VIPS_CPP_DEP=libvips-cpp.so.$( without_prerelease $VERSION_VIPS )
13
22
;;
14
23
darwin* )
15
24
DARWIN=true
16
25
DEPS=$PWD /deps
17
26
TARGET=$PWD /target
18
27
PACKAGE=$PWD
19
28
ROOT=$PWD /platforms/$PLATFORM
20
- VIPS_CPP_DEP=libvips-cpp.42 .dylib
29
+ VIPS_CPP_DEP=libvips-cpp.$( without_prerelease $VERSION_VIPS ) .dylib
21
30
;;
22
31
esac
23
32
@@ -120,15 +129,6 @@ VERSION_AOM=3.10.0
120
129
VERSION_HEIF=1.18.2
121
130
VERSION_CGIF=0.4.1
122
131
123
- # Remove patch version component
124
- without_patch () {
125
- echo " ${1% .[[:digit:]]* } "
126
- }
127
- # Remove prerelease suffix
128
- without_prerelease () {
129
- echo " ${1% -[[:alnum:]]* } "
130
- }
131
-
132
132
# Check for newer versions
133
133
# Skip by setting the VERSION_LATEST_REQUIRED environment variable to "false"
134
134
ALL_AT_VERSION_LATEST=true
@@ -447,13 +447,15 @@ meson install -C _build --tag devel
447
447
mkdir ${DEPS} /vips
448
448
$CURL https://github.com/libvips/libvips/releases/download/v${VERSION_VIPS} /vips-${VERSION_VIPS} .tar.xz | tar xJC ${DEPS} /vips --strip-components=1
449
449
cd ${DEPS} /vips
450
+ # Use version number in SONAME
451
+ $CURL https://gist.githubusercontent.com/lovell/313a6901e9db1bf285f2a1f1180499e4/raw/3988223c7dfa4d22745d9392034b0117abef1446/libvips-cpp-soversion.patch | patch -p1
450
452
# Disable HBR support in heifsave
451
453
$CURL https://github.com/libvips/build-win64-mxe/raw/v${VERSION_VIPS} /build/patches/vips-8-heifsave-disable-hbr-support.patch | patch -p1
452
- # Link libvips.so.42 statically into libvips-cpp.so.42
454
+ # Link libvips.so statically into libvips-cpp.so
453
455
sed -i' .bak' " s/library('vips'/static_&/" libvips/meson.build
454
456
sed -i' .bak' " /version: library_version/{N;d;}" libvips/meson.build
455
457
if [ " $LINUX " = true ]; then
456
- # Ensure libvips-cpp.so.42 is linked with -z nodelete
458
+ # Ensure libvips-cpp.so is linked with -z nodelete
457
459
sed -i' .bak' " /gnu_symbol_visibility: 'hidden',/a link_args: nodelete_link_args," cplusplus/meson.build
458
460
# Ensure symbols from external libs (except for libglib-2.0.a and libgobject-2.0.a) are not exposed
459
461
EXCLUDE_LIBS=$( find ${TARGET} /lib -maxdepth 1 -name ' *.a' ! -name ' libglib-2.0.a' ! -name ' libgobject-2.0.a' -printf " -Wl,--exclude-libs=%f " )
0 commit comments