Skip to content

Commit 2d85f41

Browse files
Update to libpcre2 (#219)
Co-authored-by: Beta Ziliani <[email protected]>
1 parent b668df0 commit 2d85f41

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

docker/alpine.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM alpine:3.16 as runtime
33
RUN \
44
apk add --update --no-cache --force-overwrite \
55
# core dependencies
6-
gcc gmp-dev libevent-static musl-dev pcre-dev \
6+
gcc gmp-dev libevent-static musl-dev pcre-dev pcre2-dev \
77
# stdlib dependencies
88
libxml2-dev openssl-dev openssl-libs-static tzdata yaml-static zlib-static \
99
# dev tools

docker/ubuntu.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ RUN \
77
apt-get update && \
88
DEBIAN_FRONTEND=noninteractive \
99
apt-get install -y tzdata gcc pkg-config libssl-dev libxml2-dev libyaml-dev libgmp-dev git make \
10-
libpcre3-dev libevent-dev libz-dev && \
10+
libpcre3-dev libpcre2-dev libevent-dev libz-dev && \
1111
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
1212

1313
ARG crystal_targz

linux/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ PREVIOUS_CRYSTAL_RELEASE_LINUX64_TARGZ ?= https://github.com/crystal-lang/crysta
2222

2323
SHARDS_VERSION = v0.17.2
2424
GC_VERSION = v8.2.2
25-
LIBPCRE_VERSION = 8.45
25+
LIBPCRE2_VERSION = 10.42
2626
LIBEVENT_VERSION = release-2.1.12-stable
2727

2828
OUTPUT_DIR = build
@@ -44,7 +44,7 @@ BUILD_ARGS64 = $(BUILD_ARGS_COMMON) \
4444
--build-arg gnu_target=x86_64-unknown-linux-gnu
4545

4646
BUILD_ARGS64_BUNDLED = $(BUILD_ARGS64) \
47-
--build-arg libpcre_version=$(LIBPCRE_VERSION) \
47+
--build-arg libpcre2_version=$(LIBPCRE2_VERSION) \
4848
--build-arg libevent_version=$(LIBEVENT_VERSION)
4949

5050
.PHONY: all

linux/bundled.dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ RUN apt-get update \
55

66
ENV CFLAGS="-fPIC -pipe ${release:+-O2}"
77

8-
# build libpcre
9-
FROM debian AS libpcre
10-
ARG libpcre_version
11-
RUN curl https://ftp.exim.org/pub/pcre/pcre-${libpcre_version}.tar.gz | tar -zx \
12-
&& cd pcre-${libpcre_version} \
8+
# build libpcre2
9+
FROM debian AS libpcre2
10+
ARG libpcre2_version
11+
RUN curl -L https://github.com/PCRE2Project/pcre2/releases/download/pcre2-${libpcre2_version}/pcre2-${libpcre2_version}.tar.gz | tar -zx \
12+
&& cd pcre2-${libpcre2_version} \
1313
&& ./configure --disable-shared --disable-cpp --enable-jit --enable-utf --enable-unicode-properties \
1414
&& make -j$(nproc)
1515

@@ -27,13 +27,13 @@ RUN git clone https://github.com/libevent/libevent \
2727
FROM debian
2828
ARG crystal_version
2929
ARG package_iteration
30-
ARG libpcre_version
30+
ARG libpcre2_version
3131
ARG libevent_version
3232

3333
RUN mkdir -p /output/lib/crystal/lib/
3434

3535
# Copy libraries
36-
COPY --from=libpcre pcre-${libpcre_version}/.libs/libpcre.a /output/lib/crystal/
36+
COPY --from=libpcre2 pcre2-${libpcre2_version}/.libs/libpcre2-8.a /output/lib/crystal/
3737
COPY --from=libevent libevent/.libs/libevent.a libevent/.libs/libevent_pthreads.a /output/lib/crystal/
3838

3939
# Create tarball

snapcraft/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The following are the suggested packages to be able to use the whole standard li
4444
4545
```
4646
$ sudo apt-get install gcc pkg-config git tzdata \
47-
libpcre3-dev libevent-dev libyaml-dev \
47+
libpcre2-dev libevent-dev libyaml-dev \
4848
libgmp-dev libssl-dev libxml2-dev
4949
```
5050

snapcraft/crystal-snap-wrapper

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if [ ! -f $SNAP_USER_COMMON/env-check-success ]; then
1414
The following are the suggested packages to be able to use the whole standard library capabilities.
1515
1616
$ sudo apt-get install gcc pkg-config git tzdata \\
17-
libpcre3-dev libevent-dev libyaml-dev \\
17+
libpcre2-dev libevent-dev libyaml-dev \\
1818
libgmp-dev libssl-dev libxml2-dev
1919
2020
You can find more detailed information in:

0 commit comments

Comments
 (0)