Skip to content

Commit e0c12f2

Browse files
author
crashdev226
committed
Move the compilation of Oniguruma to base-devel
1 parent 983576a commit e0c12f2

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

base-devel/cpu-x86.Dockerfile

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ SHELL ["/bin/bash", "-c"]
3636
# We need a base path for all the sourcecode we will build from.
3737
ENV BUILD_DIR="/tmp/build"
3838

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"
4241

4342
# We need some default compiler variables setup
4443
ENV PKG_CONFIG_PATH="${INSTALL_DIR}/lib64/pkgconfig:${INSTALL_DIR}/lib/pkgconfig" \
@@ -76,7 +75,7 @@ RUN mkdir -p ${BUILD_DIR} \
7675
# Used By:
7776
# - xml2
7877
ENV VERSION_ZLIB=1.2.13
79-
ENV ZLIB_BUILD_DIR=${BUILD_DIR}/xml2
78+
ENV ZLIB_BUILD_DIR=${BUILD_DIR}/zlib
8079
RUN set -xe; \
8180
mkdir -p ${ZLIB_BUILD_DIR}; \
8281
curl -Ls http://zlib.net/zlib-${VERSION_ZLIB}.tar.xz \
@@ -319,6 +318,26 @@ RUN cd ${POSTGRES_BUILD_DIR}/src/backend && make generated-headers
319318
RUN cd ${POSTGRES_BUILD_DIR}/src/include && make install
320319

321320

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+
322341
###############################################################################
323342
# Install some dev files for using old libraries already on the system
324343
# readline-devel : needed for the --with-libedit flag

0 commit comments

Comments
 (0)