Skip to content

Commit

Permalink
Bump required Pango version from 1.21.3 to 1.22.0
Browse files Browse the repository at this point in the history
Just enough to get rid of that conditional use of pango_cairo_font_map_create_context.
  • Loading branch information
Vultraz committed Feb 17, 2018
1 parent 29f0486 commit 5c57084
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -466,7 +466,7 @@ if(ENABLE_GAME OR ENABLE_TESTS)
find_package(VorbisFile REQUIRED)
find_package( PkgConfig REQUIRED )
pkg_check_modules( CAIRO REQUIRED cairo>=1.10 )
pkg_check_modules( PANGOCAIRO REQUIRED pangocairo>=1.21.3 )
pkg_check_modules( PANGOCAIRO REQUIRED pangocairo>=1.22.0 )
pkg_check_modules( FONTCONFIG REQUIRED fontconfig>=2.4.1 )
pkg_check_modules( SYSTEMD systemd )
endif(ENABLE_GAME OR ENABLE_TESTS)
Expand Down
2 changes: 1 addition & 1 deletion INSTALL.md
Expand Up @@ -33,7 +33,7 @@ order to build Wesnoth:
* SDL2_ttf >= 2.0.12
* Fontconfig >= 2.4.1
* Cairo >= 1.10.0
* Pango >= 1.21.3 (with Cairo backend)
* Pango >= 1.22.0 (with Cairo backend)
* Vorbisfile
* libbz2
* libz
Expand Down
2 changes: 1 addition & 1 deletion SConstruct
Expand Up @@ -385,7 +385,7 @@ if env["prereqs"]:
conf.CheckPNG() & \
conf.CheckJPG() & \
conf.CheckCairo(min_version = "1.10") & \
conf.CheckPango("cairo", require_version = "1.21.3") & \
conf.CheckPango("cairo", require_version = "1.22.0") & \
conf.CheckPKG("fontconfig") & \
conf.CheckBoost("program_options", require_version = boost_version) & \
conf.CheckBoost("thread") & \
Expand Down
5 changes: 0 additions & 5 deletions src/font/text.cpp
Expand Up @@ -41,12 +41,7 @@
namespace font {

pango_text::pango_text()
#if PANGO_VERSION_CHECK(1,22,0)
: context_(pango_font_map_create_context(pango_cairo_font_map_get_default()), g_object_unref)
#else
: context_(pango_cairo_font_map_create_context((
reinterpret_cast<PangoCairoFontMap*>(pango_cairo_font_map_get_default()))), g_object_unref)
#endif
, layout_(pango_layout_new(context_.get()), g_object_unref)
, rect_()
, sublayouts_()
Expand Down

0 comments on commit 5c57084

Please sign in to comment.