ci: Move over FreeBSD build image into a standalone folder.

This commit is contained in:
Dorian 2020-02-22 11:11:29 -05:00
parent e5d6242dca
commit 7d544440dd
3 changed files with 20 additions and 4 deletions

View File

@ -145,7 +145,7 @@ workflows:
docker-username: DOCKER_USER
docker-password: DOCKER_PASS
tag: freebsd-latest
dockerfile: Dockerfile.freebsd
path: freebsd-builder
cache_from: "dorianpula/rookeries-build:freebsd-latest"
extra_build_args: "--target BUILD"
@ -179,7 +179,7 @@ workflows:
docker-username: DOCKER_USER
docker-password: DOCKER_PASS
tag: freebsd-latest
dockerfile: Dockerfile.freebsd
path: freebsd-builder
cache_from: "dorianpula/rookeries-build:freebsd-latest"
extra_build_args: "--target BUILD"

View File

@ -38,8 +38,8 @@ RUN sed -i'' \
/freebsd/x86_64-pc-freebsd12/lib/libc++.so
# Fix symlinks broken by moving libraries
COPY fix-links /src
RUN /src/fix-links /freebsd/x86_64-pc-freebsd12/lib
COPY fix-links.sh /src
RUN /src/fix-links.sh /freebsd/x86_64-pc-freebsd12/lib
RUN tar -C /src -Jxf binutils-2.32.tar.xz && \
tar -C /src -Jxf gcc-6.4.0.tar.xz && \

View File

@ -0,0 +1,16 @@
#!/bin/sh
# From https://github.com/wezm/freebsd-cross-build/blob/master/fix-links
set -e
cd "$1"
BROKEN_LINKS=$(find . -xtype l)
for link in $BROKEN_LINKS; do
src=$(readlink "$link")
if echo "$src" | grep -q '^\.\./\.\./lib/'; then
# Relink without relative part
new_src=$(echo "$src" | sed 's!^\.\./\.\./lib/!!')
ln -vsf "$new_src" "$link"
fi
done