Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (2)
Add upstream patch to use pkg-config for freetype2.
· cd32506d
Bas Couwenberg
authored
Oct 25, 2018
cd32506d
Set distribution to unstable.
· 37851b12
Bas Couwenberg
authored
Oct 25, 2018
37851b12
Show whitespace changes
Inline
Side-by-side
debian/changelog
View file @
37851b12
mapnik (3.0.21+ds-2) unstable; urgency=medium
* Add upstream patch to use pkg-config for freetype2.
-- Bas Couwenberg <sebastic@debian.org> Thu, 25 Oct 2018 15:24:53 +0200
mapnik (3.0.21+ds-1) unstable; urgency=medium
* Move from experimental to unstable.
...
...
debian/patches/
freetyp
e-pkgconfig.patch
→
debian/patches/
0001-Us
e-pkg
-
config
-to-find-FreeType2-if-available
.patch
View file @
37851b12
Description: Use pkg-config when freetype-config is not available.
Author: Bas Couwenberg <sebastic@debian.org>
Description: Use pkg-config to find FreeType2 if available
Author: Raul Marin <rmrodriguez@cartodb.com>
Origin: https://github.com/mapnik/mapnik/pull/3892/commits/23755a527a5e0f24a7591fcc41dece7ce5f080b7
Bug: https://github.com/mapnik/mapnik/issues/3870
Bug-Debian: https://bugs.debian.org/892451
--- a/SConstruct
+++ b/SConstruct
@@ -1393,6 +1393,
8
@@
if not preconfigured:
@@ -1393,6 +1393,
7
@@
if not preconfigured:
['harfbuzz', 'harfbuzz/hb.h',True,'C++']
]
+ CHECK_PKG_CONFIG = conf.CheckPKGConfig('0.15.0')
+
if env.get('FREETYPE_LIBS') or env.get('FREETYPE_INCLUDES'):
REQUIRED_LIBSHEADERS.insert(0,['freetype','ft2build.h',True,'C'])
if env.get('FREETYPE_INCLUDES'):
@@ -1413,6 +1415,15 @@
if not preconfigured:
env['EXTRA_FREETYPE_LIBS'].append('bz2')
except OSError as e:
pass
+ elif env['RUNTIME_LINK'] == 'static':
+ temp_env = env.Clone()
+ temp_env['LIBS'] = []
@@ -1401,6 +1402,21 @@
if not preconfigured:
if env.get('FREETYPE_LIBS'):
lib_path = env['FREETYPE_LIBS']
env.AppendUnique(LIBPATH = fix_path(lib_path))
+ elif CHECK_PKG_CONFIG and conf.CheckPKG('freetype2'):
+ # Freetype 2.9+ doesn't use freetype-config and uses pkg-config instead
+ cmd = 'pkg-config freetype2 --libs --cflags'
+ if env['RUNTIME_LINK'] == 'static':
+ cmd += ' --static'
+
+ temp_env = Environment(ENV=os.environ)
+ try:
+ temp_env.ParseConfig('pkg-config freetype2 --libs')
+ if 'bz2' in temp_env['LIBS']:
+ env['EXTRA_FREETYPE_LIBS'].append('bz2')
+ temp_env.ParseConfig(cmd)
+ for lib in temp_env['LIBS']:
+ env.AppendUnique(LIBPATH = fix_path(lib))
+ for inc in temp_env['CPPPATH']:
+ env.AppendUnique(CPPPATH = fix_path(inc))
+ except OSError as e:
+ pass
# libxml2 should be optional but is currently not
# https://github.com/mapnik/mapnik/issues/913
@@ -1635,8 +1646,6 @@
if not preconfigured:
elif conf.parse_config('FREETYPE_CONFIG'):
# check if freetype links to bz2
if env['RUNTIME_LINK'] == 'static':
@@ -1634,9 +1650,6 @@
if not preconfigured:
color_print(1,'%s not detected on your system' % env['QUERIED_ICU_DATA'] )
env['MISSING_DEPS'].append('ICU_DATA')
-
- CHECK_PKG_CONFIG = conf.CheckPKGConfig('0.15.0')
-
if len(env['REQUESTED_PLUGINS']):
...
...
debian/patches/series
View file @
37851b12
freetyp
e-pkgconfig.patch
0001-Us
e-pkg
-
config
-to-find-FreeType2-if-available
.patch