Skip to content

Commit d26db4d

Browse files
committed
on manylinux, build and install a modern pkg-config
1 parent b2ccb65 commit d26db4d

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

Dockerfile.mri.erb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,10 @@ RUN for f in addr2line gcc gcov-tool ranlib ar dwp gcc-ranlib nm readelf as elfe
233233
COPY build/math_h.patch /root/
234234
RUN cd /usr/include/ && \
235235
patch -p1 < /root/math_h.patch
236+
237+
# Update pkg-config because the distro ships 0.27.1 which is old and has bugs and performance issues.
238+
COPY build/mk_pkg_config.sh /root/
239+
RUN /root/mk_pkg_config.sh
236240
<% end %>
237241

238242
<% if platform =~ /arm64-darwin/ %>

build/mk_pkg_config.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#! /usr/bin/env bash
2+
3+
set -o errexit
4+
set -o pipefail
5+
set -x
6+
7+
# sha256 from https://lists.freedesktop.org/archives/pkg-config/2017-March/001084.html
8+
TARFILE=pkg-config-0.29.2.tar.gz
9+
DIR=pkg-config-0.29.2
10+
CHECKSUM=6fc69c01688c9458a57eb9a1664c9aba372ccda420a02bf4429fe610e7e7d591
11+
12+
cd /tmp
13+
14+
wget https://pkgconfig.freedesktop.org/releases/${TARFILE}
15+
sha256sum ${TARFILE} | grep "${CHECKSUM}"
16+
17+
tar -xzvf ${TARFILE}
18+
cd $DIR
19+
20+
./configure --prefix=/usr/local
21+
make install
22+
23+
pkg-config --version
24+
echo "OK"

0 commit comments

Comments
 (0)