File tree Expand file tree Collapse file tree 3 files changed +20
-14
lines changed Expand file tree Collapse file tree 3 files changed +20
-14
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ install:
84
84
- ./bin/install-libzip
85
85
- ./bin/install-libsodium
86
86
- ./bin/install-password-argon2
87
+ - . ./bin/install-onig # sourced to export ONIG_LIBS
87
88
- |
88
89
if [[ -f default_configure_options.$RELEASE-${VERSION%*.*} ]]; then
89
90
cp default_configure_options.$RELEASE-${VERSION%*.*} $HOME/.php-build/share/php-build/default_configure_options
@@ -155,5 +156,4 @@ addons:
155
156
- libcurl4-openssl-dev
156
157
- libzip-dev
157
158
- libgmp3-dev
158
- - libonig-dev
159
159
- expect
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # Keep using the bundled library on versions that have it
4
+ if [[ ! $VERSION =~ ^7.4 && ! $VERSION =~ ^master$ ]]; then
5
+ echo ' PHP < 7.4 has bundled libonig, skip installation'
6
+ return 0
7
+ fi
8
+
9
+ mkdir onig
10
+ pushd onig
11
+ wget -O - https://github.com/kkos/oniguruma/releases/download/v6.9.1/onig-6.9.1.tar.gz \
12
+ | tar -xz --strip-components=1
13
+ ./configure
14
+ make
15
+ popd
16
+
17
+ # Link against libonig statically
18
+ export ONIG_CFLAGS=" -I$PWD /onig/src"
19
+ export ONIG_LIBS=" -L$PWD /onig/src/.libs -l:libonig.a"
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments