Skip to content

Commit

Permalink
Switch CI to Arch Linux Archive.
Browse files Browse the repository at this point in the history
  • Loading branch information
anntzer committed Jan 26, 2020
1 parent 5b50abb commit 1901048
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
22 changes: 16 additions & 6 deletions tools/build-manylinux-wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ else
echo 'Setting up gcc.'
(
cd workdir
curl -L https://github.com/Noctem/pogeo-toolchain/releases/download/v1.5/gcc-7.3-centos5-x86-64.tar.bz2 -o toolchain.tar.bz2
curl -L \
https://github.com/Noctem/pogeo-toolchain/releases/download/v1.5/gcc-7.3-centos5-x86-64.tar.bz2 \
-o toolchain.tar.bz2
tar -C / -xf toolchain.tar.bz2
)

Expand All @@ -50,13 +52,21 @@ else
echo 'Setting up headers for dependencies.'
(
cd workdir
for dep in cairo fontconfig freetype2 python-cairo; do
mkdir "$dep"
# Use the last versions before Arch switched to zstd.
filenames=(
cairo-1.17.2%2B17%2Bg52a7c79fd-2-x86_64.pkg.tar.xz
fontconfig-2%3A2.13.91%2B24%2Bg75eadca-1-x86_64.pkg.tar.xz
freetype2-2.10.1-1-x86_64.pkg.tar.xz
python-cairo-1.18.2-3-x86_64.pkg.tar.xz
)
for filename in "${filenames[@]}"; do
name="$(rev <<<"$filename" | cut -d- -f4- | rev)"
mkdir "$name"
# In tar, ignore "ignoring unknown extended header keyword" warning.
curl -L "https://www.archlinux.org/packages/extra/x86_64/$dep/download" |
curl -L "https://archive.org/download/archlinux_pkg_$name/$filename" |
xz -cd - |
(tar -C "$dep" -xf - 2>/dev/null || true)
mv "$dep/usr/include/"* /usr/include
(tar -C "$name" -xf - 2>/dev/null || true)
mv "$name/usr/include/"* /usr/include
done
# Provide a shim to access pycairo's header.
mv "$(find python-cairo -name py3cairo.h)" /usr/include
Expand Down
9 changes: 6 additions & 3 deletions tools/build-windows-wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,16 @@
Path("build").mkdir(exist_ok=True)

# Download the cairo headers from Arch Linux (<1Mb, vs >40Mb for the official
# tarball, which contains baseline images), and the "official" FreeType build.
# tarball, which contains baseline images) from before Arch switched to zstd,
# and the "official" FreeType build.
os.chdir("build")
urls = {
Path("cairo.txz"):
"https://www.archlinux.org/packages/extra/x86_64/cairo/download",
"https://archive.org/download/archlinux_pkg_cairo/"
"cairo-1.17.2%2B17%2Bg52a7c79fd-2-x86_64.pkg.tar.xz",
Path("fontconfig.txz"):
"https://www.archlinux.org/packages/extra/x86_64/fontconfig/download",
"https://archive.org/download/archlinux_pkg_fontconfig/"
"fontconfig-2%3A2.13.91%2B24%2Bg75eadca-1-x86_64.pkg.tar.xz",
Path("freetype.zip"):
"https://github.com/ubawurinna/freetype-windows-binaries/"
"releases/download/v2.9.1/freetype-2.9.1.zip",
Expand Down

0 comments on commit 1901048

Please sign in to comment.