@@ -36,9 +36,8 @@ SHELL ["/bin/bash", "-c"]
36
36
# We need a base path for all the sourcecode we will build from.
37
37
ENV BUILD_DIR="/tmp/build"
38
38
39
- # We need a base path for the builds to install to. This path must
40
- # match the path that bref will be unpackaged to in Lambda.
41
- ENV INSTALL_DIR="/opt/bref"
39
+ # Target installation path for all the packages we will compile
40
+ ENV INSTALL_DIR="/tmp/bref"
42
41
43
42
# We need some default compiler variables setup
44
43
ENV PKG_CONFIG_PATH="${INSTALL_DIR}/lib64/pkgconfig:${INSTALL_DIR}/lib/pkgconfig" \
@@ -76,7 +75,7 @@ RUN mkdir -p ${BUILD_DIR} \
76
75
# Used By:
77
76
# - xml2
78
77
ENV VERSION_ZLIB=1.2.13
79
- ENV ZLIB_BUILD_DIR=${BUILD_DIR}/xml2
78
+ ENV ZLIB_BUILD_DIR=${BUILD_DIR}/zlib
80
79
RUN set -xe; \
81
80
mkdir -p ${ZLIB_BUILD_DIR}; \
82
81
curl -Ls http://zlib.net/zlib-${VERSION_ZLIB}.tar.xz \
@@ -319,6 +318,26 @@ RUN cd ${POSTGRES_BUILD_DIR}/src/backend && make generated-headers
319
318
RUN cd ${POSTGRES_BUILD_DIR}/src/include && make install
320
319
321
320
321
+ # ##############################################################################
322
+ # Oniguruma
323
+ # This library is not packaged in PHP since PHP 7.4.
324
+ # See https://github.com/php/php-src/blob/43dc7da8e3719d3e89bd8ec15ebb13f997bbbaa9/UPGRADING#L578-L581
325
+ # We do not install the system version because I didn't manage to make it work...
326
+ # Ideally we shouldn't compile it ourselves.
327
+ # https://github.com/kkos/oniguruma/releases
328
+ # Needed by:
329
+ # - php mbstring
330
+ ENV VERSION_ONIG=6.9.8
331
+ ENV ONIG_BUILD_DIR=${BUILD_DIR}/oniguruma
332
+ RUN set -xe; \
333
+ mkdir -p ${ONIG_BUILD_DIR}; \
334
+ curl -Ls https://github.com/kkos/oniguruma/releases/download/v${VERSION_ONIG}/onig-${VERSION_ONIG}.tar.gz \
335
+ | tar xzC ${ONIG_BUILD_DIR} --strip-components=1
336
+ WORKDIR ${ONIG_BUILD_DIR}
337
+ RUN ./configure --prefix=${INSTALL_DIR}
338
+ RUN make && make install
339
+
340
+
322
341
# ##############################################################################
323
342
# Install some dev files for using old libraries already on the system
324
343
# readline-devel : needed for the --with-libedit flag
0 commit comments