Add fontconfig

This commit is contained in:
Jeremy Soller 2019-07-16 17:18:06 -06:00
parent 6b8e8b4090
commit 8c969f8383
No known key found for this signature in database
GPG Key ID: E988B49EE78A7FB1
2 changed files with 67 additions and 0 deletions

46
recipes/fontconfig/recipe.sh Executable file
View File

@ -0,0 +1,46 @@
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_update {
echo "skipping update"
skip=1
}
function recipe_build {
wget -O config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub
sysroot="$(realpath ../sysroot)"
export CFLAGS="-I$sysroot/include"
export LDFLAGS="-L$sysroot/lib --static"
./configure \
--build=${BUILD} \
--host=${HOST} \
--prefix=/ \
--disable-shared \
--enable-static \
ac_cv_func_XML_SetDoctypeDeclHandler=yes
make -j"$(nproc)"
skip=1
}
function recipe_test {
echo "skipping test"
skip=1
}
function recipe_clean {
make clean
skip=1
}
function recipe_stage {
echo "skipping stage"
dest="$(realpath $1)"
make DESTDIR="$dest" install
skip=1
}

View File

@ -0,0 +1,21 @@
diff -ruwN source/src/fccache.c source-new/src/fccache.c
--- source/src/fccache.c 2019-06-10 05:36:37.000000000 -0600
+++ source-new/src/fccache.c 2019-07-16 17:13:18.730013599 -0600
@@ -1526,7 +1526,7 @@
#if defined(_WIN32)
if (_locking (fd, _LK_LOCK, 1) == -1)
goto bail;
-#else
+#elif !defined(__redox__)
struct flock fl;
fl.l_type = F_WRLCK;
@@ -1556,7 +1556,7 @@
{
#if defined(_WIN32)
_locking (fd, _LK_UNLCK, 1);
-#else
+#elif !defined(__redox__)
struct flock fl;
fl.l_type = F_UNLCK;