Convert fontconfig to recipe.toml

This commit is contained in:
Jeremy Soller 2022-11-30 08:12:23 -07:00
parent 10a8221779
commit b9ddf201aa
No known key found for this signature in database
GPG Key ID: 87F211AF2BE4C2FE
2 changed files with 24 additions and 37 deletions

View File

@ -1,37 +0,0 @@
VERSION="2.13.91"
TAR="https://www.freedesktop.org/software/fontconfig/release/fontconfig-${VERSION}.tar.xz"
BUILD_DEPENDS=(expat freetype libpng zlib)
function recipe_version {
echo "$VERSION"
skip=1
}
function recipe_build {
wget -O config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false"
sysroot="$(realpath ../sysroot)"
export CFLAGS="-I$sysroot/include"
export LDFLAGS="-L$sysroot/lib --static"
./configure \
--build=${BUILD} \
--host=${HOST} \
--prefix=/ \
--disable-shared \
--enable-static \
--disable-docs \
ac_cv_func_XML_SetDoctypeDeclHandler=yes
"$REDOX_MAKE" -j"$($NPROC)"
skip=1
}
function recipe_clean {
"$REDOX_MAKE" clean
skip=1
}
function recipe_stage {
dest="$(realpath $1)"
"$REDOX_MAKE" DESTDIR="$dest" install
rm -f "$dest/lib/"*.la
skip=1
}

24
recipes/fontconfig/recipe.toml Executable file
View File

@ -0,0 +1,24 @@
[source]
tar = "https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.13.91.tar.xz"
patches = [
"redox.patch"
]
script = """
wget -O config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false"
"""
[build]
template = "custom"
dependencies = [
"expat",
"freetype",
"libpng",
"zlib",
]
script = """
COOKBOOK_CONFIGURE_FLAGS+=(
--disable-docs \
ac_cv_func_XML_SetDoctypeDeclHandler=yes
)
cookbook_configure
"""