Skip to content

Commit

Permalink
Drop support for old pcre
Browse files Browse the repository at this point in the history
pcre2 has been the default for a long time now
  • Loading branch information
carlhoerberg committed Jan 8, 2024
1 parent 7caa059 commit 46aa4ea
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ ARG crystal_version=1.9.1
RUN git clone --depth=1 --single-branch --branch=$crystal_version https://github.com/crystal-lang/crystal.git . && \
gzip -9 man/crystal.1 && \
mkdir .build && \
make crystal static=1 release=1 target=$TARGETARCH-alpine-linux-musl PREFIX=/usr FLAGS="--no-debug -Duse_pcre2" | tail -1 > .build/crystal.sh && \
make crystal static=1 release=1 target=$TARGETARCH-alpine-linux-musl PREFIX=/usr FLAGS="--no-debug" | tail -1 > .build/crystal.sh && \
rm src/llvm/ext/llvm_ext.o
# Build shards
WORKDIR /usr/src/shards
ARG shards_version=0.17.2
RUN git clone --depth=1 --single-branch --branch=v${shards_version} https://github.com/crystal-lang/shards.git . && \
gzip -9 man/shards.1 man/shard.yml.5 && \
make bin/shards static=1 release=1 FLAGS="--no-debug --cross-compile --target=$TARGETARCH-alpine-linux-musl -Duse_pcre2" | tail -1 > bin/shards.sh
make bin/shards static=1 release=1 FLAGS="--no-debug --cross-compile --target=$TARGETARCH-alpine-linux-musl" | tail -1 > bin/shards.sh

# link on target platform
FROM alpine:$alpine_version AS target-builder
ARG llvm_version=16
RUN apk add --update --no-cache \
llvm${llvm_version}-dev llvm${llvm_version}-static \
zstd-static zlib-static yaml-static libxml2-static pcre-dev pcre2-dev libevent-static \
zstd-static zlib-static yaml-static libxml2-static pcre2-dev libevent-static \
libffi-dev git g++ make automake libtool autoconf curl
# Build libgc
WORKDIR /usr/src/libc
Expand All @@ -55,7 +55,7 @@ RUN sh -ex bin/shards.sh && strip bin/shards
# start from a clean image
FROM alpine:$alpine_version
# add dependencies commonly required for building crystal applications
RUN apk add --update --no-cache musl-dev gcc pcre-dev pcre2-dev libevent-dev libevent-static openssl-dev openssl-libs-static libxml2-dev zlib-dev zlib-static git make yaml-dev libxml2-static gmp-dev
RUN apk add --update --no-cache musl-dev gcc pcre2-dev libevent-dev libevent-static openssl-dev openssl-libs-static libxml2-dev zlib-dev zlib-static git make yaml-dev libxml2-static gmp-dev
# copy the binaries + stdlib + libgc from the build stage
COPY --from=builder /usr/src/crystal/*.md /usr/share/doc/crystal/
COPY --from=builder /usr/src/crystal/man/crystal.1.gz /usr/share/man/man1/
Expand Down
6 changes: 3 additions & 3 deletions centos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ RUN git clone --depth=1 --single-branch --branch=$crystal_version https://github
gzip -9 man/crystal.1 && \
mkdir .build && \
make crystal interpreter=1 release=1 target=$TARGETARCH-unknown-linux-gnu \
PREFIX=/usr FLAGS="--no-debug -Duse_pcre2" CRYSTAL_CONFIG_LIBRARY_PATH=/usr/lib64/crystal | tail -1 > .build/crystal.sh && \
PREFIX=/usr FLAGS="--no-debug" CRYSTAL_CONFIG_LIBRARY_PATH=/usr/lib64/crystal | tail -1 > .build/crystal.sh && \
rm src/llvm/ext/llvm_ext.o
# Build shards
WORKDIR /tmp/shards
ARG shards_version=0.17.2
RUN git clone --depth=1 --single-branch --branch=v${shards_version} https://github.com/crystal-lang/shards.git . && \
gzip -9 man/shards.1 man/shard.yml.5 && \
make bin/shards FLAGS="--release --no-debug --cross-compile --target=$TARGETARCH-unknown-linux-gnu -Duse_pcre2" | tail -1 > bin/shards.sh
make bin/shards FLAGS="--release --no-debug --cross-compile --target=$TARGETARCH-unknown-linux-gnu" | tail -1 > bin/shards.sh

# link on target platform
FROM $base_image:$base_image_tag AS target-builder
Expand Down Expand Up @@ -90,7 +90,7 @@ RUN fpm -s dir -t rpm -n crystal -v $(sed 's/-/~/' pkg/usr/share/crystal/src/VER
--url https://crystal-lang.org --maintainer "84codes <[email protected]>" \
--description "a general-purpose, object-oriented programming language" \
--depends gcc --depends pkgconfig --depends libevent-devel \
--depends pcre-devel --depends pcre2-devel \
--depends pcre2-devel \
--depends gmp-devel --depends openssl-devel --depends libxml2-devel \
--depends libyaml-devel --depends zlib-devel \
--depends llvm${llvm_version}-libs --depends libffi \
Expand Down
2 changes: 1 addition & 1 deletion debian-static/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ RUN fpm -s dir -t deb -n crystal -v $(cat pkg/usr/share/crystal/src/VERSION) --i
--url https://crystal-lang.org --maintainer "84codes <[email protected]>" \
--description "a general-purpose, object-oriented programming language" \
--depends gcc --depends pkg-config --depends libevent-dev \
--depends libpcre2-dev --depends libpcre3-dev \
--depends libpcre2-dev \
--depends libz-dev \
--deb-recommends libssl-dev --deb-recommends libxml2-dev \
--deb-recommends libgmp-dev --deb-recommends libyaml-dev \
Expand Down
6 changes: 3 additions & 3 deletions debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ ARG crystal_version
RUN git clone --depth=1 --single-branch --branch=$crystal_version https://github.com/crystal-lang/crystal.git . && \
gzip -9 man/crystal.1 && \
mkdir .build && \
make crystal interpreter=1 release=1 target=$TARGETARCH-unknown-linux-gnu PREFIX=/usr FLAGS="--no-debug -Duse_pcre2" \
make crystal interpreter=1 release=1 target=$TARGETARCH-unknown-linux-gnu PREFIX=/usr FLAGS="--no-debug" \
CRYSTAL_CONFIG_LIBRARY_PATH=/usr/lib/crystal | tail -1 > .build/crystal.sh && \
rm src/llvm/ext/llvm_ext.o
# Build shards
WORKDIR /tmp/shards
ARG shards_version=0.17.3
RUN git clone --depth=1 --single-branch --branch=v${shards_version} https://github.com/crystal-lang/shards.git . && \
gzip -9 man/shards.1 man/shard.yml.5 && \
make bin/shards FLAGS="--release --no-debug --cross-compile --target=$TARGETARCH-unknown-linux-gnu -Duse_pcre2" | tail -1 > bin/shards.sh
make bin/shards FLAGS="--release --no-debug --cross-compile --target=$TARGETARCH-unknown-linux-gnu" | tail -1 > bin/shards.sh

# link on target platform
FROM $base_image:$codename AS target-builder
Expand Down Expand Up @@ -89,7 +89,7 @@ RUN fpm -s dir -t deb -n crystal -v $(cat pkg/usr/share/crystal/src/VERSION) --i
--url https://crystal-lang.org --maintainer "84codes <[email protected]>" \
--description "a general-purpose, object-oriented programming language" \
--depends gcc --depends pkg-config --depends libevent-dev \
--depends libpcre2-dev --depends libpcre3-dev \
--depends libpcre2-dev \
--depends llvm-$llvm_version --depends libz-dev --depends libffi-dev \
--deb-recommends libssl-dev --deb-recommends libxml2-dev \
--deb-recommends libgmp-dev --deb-recommends libyaml-dev \
Expand Down
8 changes: 4 additions & 4 deletions fedora/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ ARG crystal_version
RUN git clone --depth=1 --single-branch --branch=$crystal_version https://github.com/crystal-lang/crystal.git . && \
gzip -9 man/crystal.1 && \
mkdir .build && \
make crystal interpreter=1 release=1 target=$TARGETARCH-unknown-linux-gnu \
PREFIX=/usr FLAGS="--no-debug -Duse_pcre2" CRYSTAL_CONFIG_LIBRARY_PATH=/usr/lib64/crystal | tail -1 > .build/crystal.sh && \
make crystal interpreter=1 target=$TARGETARCH-unknown-linux-gnu \
PREFIX=/usr FLAGS="--no-debug" CRYSTAL_CONFIG_LIBRARY_PATH=/usr/lib64/crystal | tail -1 > .build/crystal.sh && \
rm src/llvm/ext/llvm_ext.o
# Build shards
WORKDIR /usr/src/shards
ARG shards_version=0.17.2
RUN git clone --depth=1 --single-branch --branch=v${shards_version} https://github.com/crystal-lang/shards.git . && \
gzip -9 man/shards.1 man/shard.yml.5 && \
make bin/shards FLAGS="--release --no-debug --cross-compile --target=$TARGETARCH-unknown-linux-gnu -Duse_pcre2" | tail -1 > bin/shards.sh
make bin/shards FLAGS="--no-debug --cross-compile --target=$TARGETARCH-unknown-linux-gnu" | tail -1 > bin/shards.sh

# link on target platform
FROM $base_image:$base_image_tag AS target-builder
Expand Down Expand Up @@ -90,7 +90,7 @@ RUN fpm -s dir -t rpm -n crystal -v $(sed 's/-/~/' pkg/usr/share/crystal/src/VER
--url https://crystal-lang.org --maintainer "84codes <[email protected]>" \
--description "a general-purpose, object-oriented programming language" \
--depends gcc --depends pkgconfig --depends libevent-devel \
--depends pcre-devel --depends pcre2-devel \
--depends pcre2-devel \
--depends gmp-devel --depends openssl-devel --depends libxml2-devel \
--depends libyaml-devel --depends zlib-devel \
--depends llvm${llvm_version}-libs --depends libffi \
Expand Down
4 changes: 2 additions & 2 deletions pkgs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ ARG pkg_revision=1
RUN fpm -s dir -t deb -n crystal -v ${crystal_version} --iteration ${pkg_revision} -a native \
--url https://crystal-lang.org --maintainer "84codes <[email protected]>" \
--description "a general-purpose, object-oriented programming language" \
--depends gcc --depends libpcre2-dev --depends libpcre3-dev --depends pkg-config --depends libevent-dev \
--depends gcc --depends libpcre2-dev --depends pkg-config --depends libevent-dev \
--deb-recommends libssl-dev --deb-recommends libz-dev --deb-recommends libxml2-dev \
--deb-recommends libgmp-dev --deb-recommends libyaml-dev --deb-recommends git \
--license "Apache 2.0" --chdir pkg .
RUN fpm -s dir -t rpm -n crystal -v ${crystal_version} --iteration ${pkg_revision} -a native \
--url https://crystal-lang.org --maintainer "84codes <[email protected]>" \
--description "a general-purpose, object-oriented programming language" \
--depends gcc --depends pcre-devel --depends pcre2-devel --depends pkgconfig --depends libevent-devel \
--depends gcc --depends pcre2-devel --depends pkgconfig --depends libevent-devel \
--depends gmp-devel --depends openssl-devel --depends libxml2-devel \
--depends libyaml-devel --depends zlib-devel \
--license "ASL 2.0" --chdir pkg .
Expand Down

0 comments on commit 46aa4ea

Please sign in to comment.