Skip to content

Commit cdd6844

Browse files
committed
Add archFlag and archBits for alpine
Ref Perl#43, thanks @tianon for reminding!
1 parent 4304b46 commit cdd6844

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

alpine,threaded/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ COPY *.patch /usr/src/perl/
55
WORKDIR /usr/src/perl
66

77
RUN set -x \
8-
&& apk add --no-cache --virtual .build-deps curl procps tar build-base make xz \
8+
&& apk add --no-cache --virtual .build-deps curl dpkg dpkg-dev procps tar build-base make xz \
99
&& curl -SL https://www.cpan.org/src/5.0/perl-5.32.0.tar.xz -o perl-5.32.0.tar.xz \
1010
&& echo '6f436b447cf56d22464f980fac1916e707a040e96d52172984c5d184c09b859b *perl-5.32.0.tar.xz' | sha256sum -c - \
1111
&& tar --strip-components=1 -xaf perl-5.32.0.tar.xz -C /usr/src/perl \
1212
&& rm perl-5.32.0.tar.xz \
1313
&& cat *.patch | patch -p1 \
14-
&& ./Configure -Duse64bitall -Dusethreads -Duseshrplib -des \
14+
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
15+
&& archBits="$(dpkg-architecture --query DEB_BUILD_ARCH_BITS)" \
16+
&& archFlag="$([ "$archBits" = '64' ] && echo '-Duse64bitall' || echo '-Duse64bitint')" \
17+
&& ./Configure -Darchname="$gnuArch" "$archFlag" -Dusethreads -Duseshrplib -Dvendorprefix=/usr/local -des \
1518
&& make -j$(nproc) \
1619
&& TEST_JOBS=$(nproc) make test_harness \
1720
&& make install \

alpine/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ COPY *.patch /usr/src/perl/
55
WORKDIR /usr/src/perl
66

77
RUN set -x \
8-
&& apk add --no-cache --virtual .build-deps curl procps tar build-base make xz \
8+
&& apk add --no-cache --virtual .build-deps curl dpkg dpkg-dev procps tar build-base make xz \
99
&& curl -SL https://www.cpan.org/src/5.0/perl-5.32.0.tar.xz -o perl-5.32.0.tar.xz \
1010
&& echo '6f436b447cf56d22464f980fac1916e707a040e96d52172984c5d184c09b859b *perl-5.32.0.tar.xz' | sha256sum -c - \
1111
&& tar --strip-components=1 -xaf perl-5.32.0.tar.xz -C /usr/src/perl \
1212
&& rm perl-5.32.0.tar.xz \
1313
&& cat *.patch | patch -p1 \
14-
&& ./Configure -Duse64bitall -Duseshrplib -des \
14+
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
15+
&& archBits="$(dpkg-architecture --query DEB_BUILD_ARCH_BITS)" \
16+
&& archFlag="$([ "$archBits" = '64' ] && echo '-Duse64bitall' || echo '-Duse64bitint')" \
17+
&& ./Configure -Darchname="$gnuArch" "$archFlag" -Duseshrplib -Dvendorprefix=/usr/local -des \
1518
&& make -j$(nproc) \
1619
&& TEST_JOBS=$(nproc) make test_harness \
1720
&& make install \

0 commit comments

Comments
 (0)