Skip to content
This repository has been archived by the owner on Sep 29, 2022. It is now read-only.

Commit

Permalink
[WIP] r-base: cairo-with-pango-but-not-X11 on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
mingwandroid committed Dec 2, 2016
1 parent 637aa09 commit b7abdf5
Show file tree
Hide file tree
Showing 28 changed files with 565 additions and 170 deletions.
19 changes: 10 additions & 9 deletions automake/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
package:
name: automake
version: 1.14
version: 1.15

source:
fn: automake-1.14.tar.gz
url: http://ftp.gnu.org/gnu/automake/automake-1.14.tar.gz

build:
number: 2
url: http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
sha256: 7946e945a96e28152ba5a6beb0625ca715c6e32ac55f2e353ef54def0c8ed924

requirements:
build:
Expand All @@ -16,13 +13,17 @@ requirements:
run:
- m4
- autoconf

test:
commands:
- automake --help

about:
home: http://www.gnu.org/software/automake/
license: GPL 3
license: GPL3
license_file: COPYING
summary: Tool to automatically generate Makefile.in files
description: |
Automake automatically generates Makefile.in files compliant with
the GNU Coding Standards. Note: Automake requires the use of Autoconf.
doc_url: https://www.gnu.org/software/automake/#documentation

# vim:set ts=8 sw=2 sts=2 tw=78 et:
21 changes: 9 additions & 12 deletions cairo/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
package:
name: cairo
version: 1.12.18
version: 1.14.6

source:
fn: cairo-1.12.18.tar.xz
url: http://cairographics.org/releases/cairo-1.12.18.tar.xz
md5: 8e4ff32b82c3b39387eb6f5c59ef848e
url: http://cairographics.org/releases/cairo-1.14.6.tar.xz
md5: 23a0b2f0235431d35238df1d3a517fdb

build:
number: 0 [win or osx]
number: 3 [linux]
features:
build: [win]
features: [win]
- vc9 [win and py27]
- vc10 [win and py34]
- vc14 [win and py35]
Expand All @@ -22,15 +19,15 @@ requirements:
- pkg-config [osx]
- xz [unix]
- freetype 2.5.* [unix]
- fontconfig 2.11.* [linux]
- pixman 0.32.*
- fontconfig 2.12.* [unix]
- pixman 0.34.*
- libpng 1.6.*
- zlib 1.2.*
run:
- freetype 2.5.* [unix]
- fontconfig 2.11.* [linux]
- fontconfig 2.12.* [unix]
- libpng 1.6.*
- pixman 0.32.*
- pixman 0.34.*
- zlib 1.2.*

about:
Expand Down
10 changes: 6 additions & 4 deletions fontconfig/build.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/bin/bash

sed s:'@PREFIX@':"$PREFIX":g -i src/fccfg.c

chmod +x configure
./configure --prefix $PREFIX --enable-libxml2 --disable-docs
./configure --prefix $PREFIX --enable-libxml2 --disable-docs --disable-iconv

if [[ $(uname) == Darwin ]]; then
export DYLD_FALLBACK_LIBRARY_PATH=${PREFIX}/lib
fi

make
make V=1
make install

# Remove computed cache with local fonts
Expand Down
11 changes: 0 additions & 11 deletions fontconfig/fc-cache.patch

This file was deleted.

17 changes: 6 additions & 11 deletions fontconfig/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
package:
name: fontconfig
version: 2.11.1
version: 2.12.1

source:
fn: fontconfig-2.11.1.tar.bz2
url: http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.11.1.tar.bz2
md5: 824d000eb737af6e16c826dd3b2d6c90
url: https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.12.1.tar.bz2
md5: b5af5a423ee3b5cfc34846838963c058
patches:
- fc-cache.patch [linux]
- fcf.patch [linux]

build:
number: 4
binary_has_prefix_files:
- lib/libfontconfig.so.1.8.0 [linux]
- fcf.patch
- patch-2.12.1-fccache.diff

requirements:
build:
- freetype >=2.5.2
- libxml2
- libpng
- pkg-config
run:
- freetype >=2.5.2
- libxml2
Expand Down
37 changes: 37 additions & 0 deletions fontconfig/patch-2.12.1-fccache.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
diff --git a/src/fccache.c b/src/fccache.c
index 02ec301..7e4e600 100644
--- a/src/fccache.c
+++ b/src/fccache.c
@@ -640,6 +640,8 @@ FcCacheOffsetsValid (FcCache *cache)
FcPattern *font = FcFontSetFont (fs, i);
FcPatternElt *e;
FcValueListPtr l;
+ ssize_t c;
+ char *begin;

if ((char *) font < base ||
(char *) font > end - sizeof (FcFontSet) ||
@@ -653,11 +655,18 @@ FcCacheOffsetsValid (FcCache *cache)
if (e->values != 0 && !FcIsEncodedOffset(e->values))
return FcFalse;

- for (j = font->num, l = FcPatternEltValues(e); j >= 0 && l; j--, l = FcValueListNext(l))
- if (l->next != NULL && !FcIsEncodedOffset(l->next))
- break;
- if (j < 0)
- return FcFalse;
+ for (j = 0; j < font->num; j++)
+ {
+ begin = (char *)FcPatternEltValues(&e[j]);
+ c = (end - begin) / sizeof (FcValueList);
+ for (l = FcPatternEltValues(&e[j]); l; l = FcValueListNext(l))
+ {
+ if ((char *) l < begin || (char *)l > end - sizeof (*l) ||
+ (l->next != NULL && !FcIsEncodedOffset(l->next)) ||
+ c-- <= 0)
+ return FcFalse;
+ }
+ }
}
}

Loading

0 comments on commit b7abdf5

Please sign in to comment.