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

Commit

Permalink
Merge pull request #52 from lemzwerg/fontconfig-freetype-update
Browse files Browse the repository at this point in the history
freetype: update to 2.9.1, fontconfig: update to 2.12.6.
  • Loading branch information
PhilHolmes authored Dec 29, 2018
2 parents eec9d36 + 03b5d21 commit 2041679
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 815 deletions.
48 changes: 24 additions & 24 deletions gub/specs/fontconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,26 @@
from gub import target
from gub import tools

#"0596d7296c94b2bb9817338b8c1a76da91673fb9"

# v2.5.91 - there was a late 2007 windows fix. Let's try to see if it
# fixes caching problems on vista.
#version = '0dffe625d43c1165f8b84f97e8ba098793e2cf7b'

class Fontconfig (target.AutoBuild):
'''Generic font configuration library
Fontconfig is a font configuration and customization library, which
does not depend on the X Window System. It is designed to locate
fonts within the system and select them according to requirements
specified by applications.'''

source = 'http://fontconfig.org/release/fontconfig-2.12.1.tar.bz2'
source = 'http://fontconfig.org/release/fontconfig-2.12.6.tar.bz2'
patches = [
'fontconfig-2.11.1-conf-relative-symlink.patch',
# This patch will not be needed from fontconfig 2.12.2.
'fontconfig-2.12.1-fix-psfont-alias.patch',
# This patch will not be needed from fontconfig 2.12.2.
'fontconfig-2.12.1-urw-june-2016.patch',
# This patch will not be needed from fontconfig 2.12.2.
'fontconfig-2.12.1-fix-FcCacheOffsetValid.patch',
]
#source = 'git://anongit.freedesktop.org/git/fontconfig?branch=master&revision=' + version
dependencies = ['libtool', 'expat-devel', 'freetype-devel', 'tools::freetype', 'tools::pkg-config', 'tools::bzip2']
dependencies = [
'libtool',
'expat-devel',
'freetype-devel',
'tools::freetype',
'tools::pkg-config',
'tools::bzip2',
'tools::gperf'
]
# FIXME: system dir vs packaging install
## UGH - this breaks on Darwin!
## UGH2 - the added /cross/ breaks Cygwin; possibly need
Expand All @@ -55,6 +50,8 @@ def __init__ (self, settings, source):
def patch (self):
self.dump ('\nAC_SUBST(LT_AGE)', '%(srcdir)s/configure.in', mode='a', permissions=octal.o755)
target.AutoBuild.patch (self)
# https://bugs.freedesktop.org/show_bug.cgi?id=101280
self.system('rm -f %(srcdir)s/src/fcobjshash.h')
@context.subst_method
def freetype_cflags (self):
# this is shady: we're using the flags from the tools version
Expand Down Expand Up @@ -82,8 +79,7 @@ def configure (self):
self.file_sub ([('DOCSRC *=.*', 'DOCSRC=')],
'%(builddir)s/Makefile')
make_flags = ('man_MANS=' # either this, or add something like tools::docbook-utils
# librestrict: stuff in fc-case, fc-lang,
# fc-glyphname, fc-arch' is FOR-BUILD and has
# librestrict: stuff in fc-case, fc-lang is FOR-BUILD and has
# dependencies .deps/*.Po /usr/include/stdio.h:
+ ''' 'SUBDIRS=fontconfig src fc-cache fc-cat fc-list fc-match conf.d' ''')
def compile (self):
Expand All @@ -95,7 +91,7 @@ def compile (self):
relax = ''
if 'stat' in misc.librestrict ():
relax = 'LIBRESTRICT_IGNORE=%(tools_prefix)s/bin/bash:%(tools_prefix)s/bin/make '
for i in ('fc-case', 'fc-lang', 'fc-glyphname'):
for i in ('fc-case', 'fc-lang'):
self.system ('''
cd %(builddir)s/%(i)s && %(relax)s make "CFLAGS=%(cflags)s" "LIBS=%(libs)s" CPPFLAGS= LD_LIBRARY_PATH=%(tools_prefix)s/lib LDFLAGS=-L%(tools_prefix)s/lib INCLUDES=
''', locals ())
Expand All @@ -117,9 +113,6 @@ def install (self):
'%(install_prefix)s/etc/fonts/conf.d/98-gub-fonts-dir.conf')

class Fontconfig__mingw (Fontconfig):
patches = Fontconfig.patches + [
'fontconfig-2.12.1-fix-cache-mingw.patch'
]
def patch (self):
Fontconfig.patch (self)
self.file_sub ([('<cachedir>@FC_CACHEDIR@</cachedir>', '')],
Expand All @@ -138,8 +131,6 @@ class Fontconfig__darwin (Fontconfig):
+ ' --with-add-fonts=/Library/Fonts,/System/Library/Fonts ')
def configure (self):
Fontconfig.configure (self)
self.file_sub ([('-Wl,[^ ]+ ', '')],
'%(builddir)s/src/Makefile')

class Fontconfig__linux (Fontconfig):
def configure (self):
Expand All @@ -165,7 +156,16 @@ class Fontconfig__tools (tools.AutoBuild):
def patch (self):
self.dump ('\nAC_SUBST(LT_AGE)', '%(srcdir)s/configure.in', mode='a', permissions=octal.o755)
tools.AutoBuild.patch (self)
dependencies = ['libtool', 'freetype', 'expat', 'pkg-config', 'bzip2']
# https://bugs.freedesktop.org/show_bug.cgi?id=101280
self.system('rm -f %(srcdir)s/src/fcobjshash.h')
dependencies = [
'libtool',
'freetype',
'expat',
'pkg-config',
'bzip2',
'gperf'
]
make_flags = ('man_MANS=' # either this, or add something like tools::docbook-utils
+ ' DOCSRC="" ')
def install (self):
Expand Down
3 changes: 2 additions & 1 deletion gub/specs/freetype.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Freetype (target.AutoBuild):
libraries, display servers, font conversion tools, text image generation
tools, and many other products as well.'''

source = 'http://download.savannah.gnu.org/releases/freetype/freetype-2.6.5.tar.bz2'
source = 'http://download.savannah.gnu.org/releases/freetype/freetype-2.9.1.tar.bz2'
dependencies = [
'libtool-devel',
'zlib-devel',
Expand All @@ -20,6 +20,7 @@ class Freetype (target.AutoBuild):
configure_flags = (target.AutoBuild.configure_flags
+ ' --without-png'
+ ' --without-harfbuzz'
+ ' --enable-freetype-config'
)

class Freetype__tools (tools.AutoBuild, Freetype):
Expand Down
4 changes: 4 additions & 0 deletions gub/specs/gperf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from gub import tools

class Gperf__tools (tools.AutoBuild):
source = 'https://ftp.gnu.org/pub/gnu/gperf/gperf-3.1.tar.gz'
Loading

0 comments on commit 2041679

Please sign in to comment.