Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to libpcre2 #219

Merged
merged 9 commits into from
Feb 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/alpine.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM alpine:3.16 as runtime
RUN \
apk add --update --no-cache --force-overwrite \
# core dependencies
gcc gmp-dev libevent-static musl-dev pcre-dev \
gcc gmp-dev libevent-static musl-dev pcre-dev pcre2-dev \
# stdlib dependencies
libxml2-dev openssl-dev openssl-libs-static tzdata yaml-static zlib-static \
# dev tools
Expand Down
2 changes: 1 addition & 1 deletion docker/ubuntu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN \
apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y tzdata gcc pkg-config libssl-dev libxml2-dev libyaml-dev libgmp-dev git make \
libpcre3-dev libevent-dev libz-dev && \
libpcre3-dev libpcre2-dev libevent-dev libz-dev && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

ARG crystal_targz
Expand Down
4 changes: 2 additions & 2 deletions linux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ PREVIOUS_CRYSTAL_RELEASE_LINUX64_TARGZ ?= https://github.com/crystal-lang/crysta

SHARDS_VERSION = v0.17.2
GC_VERSION = v8.2.2
LIBPCRE_VERSION = 8.45
LIBPCRE2_VERSION = 10.42
LIBEVENT_VERSION = release-2.1.12-stable

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

BUILD_ARGS64_BUNDLED = $(BUILD_ARGS64) \
--build-arg libpcre_version=$(LIBPCRE_VERSION) \
--build-arg libpcre2_version=$(LIBPCRE2_VERSION) \
--build-arg libevent_version=$(LIBEVENT_VERSION)

.PHONY: all
Expand Down
14 changes: 7 additions & 7 deletions linux/bundled.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ RUN apt-get update \

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

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

Expand All @@ -27,13 +27,13 @@ RUN git clone https://github.com/libevent/libevent \
FROM debian
ARG crystal_version
ARG package_iteration
ARG libpcre_version
ARG libpcre2_version
ARG libevent_version

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

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

# Create tarball
Expand Down
2 changes: 1 addition & 1 deletion snapcraft/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The following are the suggested packages to be able to use the whole standard li

```
$ sudo apt-get install gcc pkg-config git tzdata \
libpcre3-dev libevent-dev libyaml-dev \
libpcre2-dev libevent-dev libyaml-dev \
libgmp-dev libssl-dev libxml2-dev
```

Expand Down
2 changes: 1 addition & 1 deletion snapcraft/crystal-snap-wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if [ ! -f $SNAP_USER_COMMON/env-check-success ]; then
The following are the suggested packages to be able to use the whole standard library capabilities.

$ sudo apt-get install gcc pkg-config git tzdata \\
libpcre3-dev libevent-dev libyaml-dev \\
libpcre2-dev libevent-dev libyaml-dev \\
libgmp-dev libssl-dev libxml2-dev

You can find more detailed information in:
Expand Down