From da93c96b3e44ad937146db156b8080efd26d0599 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Jul 16 2013 21:22:33 +0000 Subject: Correct system font paths --- diff --git a/nodejs-mapnik-fonts.patch b/nodejs-mapnik-fonts.patch new file mode 100644 index 0000000..afcd65b --- /dev/null +++ b/nodejs-mapnik-fonts.patch @@ -0,0 +1,21 @@ +commit 791b073589e362572e4938dee6230385262590af +Author: Tom Hughes +Date: Tue Jul 16 22:19:00 2013 +0100 + + Fix system font paths + +diff --git a/lib/mapnik.js b/lib/mapnik.js +index 5245da9..1e5ddf6 100644 +--- a/lib/mapnik.js ++++ b/lib/mapnik.js +@@ -41,8 +41,8 @@ exports.register_system_fonts = function() { + if (process.platform == 'linux' || + (process.platform.indexOf('bsd') != -1) || + process.platform.indexOf('bsd') == 'sunos') { +- dirs.push('/usr/share/fonts/truetype/'); +- dirs.push('/usr/local/share/fonts/truetype/'); ++ dirs.push('/usr/share/fonts/'); ++ dirs.push('/usr/local/share/fonts/'); + dirs.push(path.join(process.env.HOME, '.fonts')); + } + else if (process.platform == 'darwin') { diff --git a/nodejs-mapnik.spec b/nodejs-mapnik.spec index 8a83945..23722d4 100644 --- a/nodejs-mapnik.spec +++ b/nodejs-mapnik.spec @@ -2,7 +2,7 @@ Name: nodejs-mapnik Version: 1.1.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Bindings to Mapnik tile rendering library for Node.js License: BSD @@ -12,6 +12,8 @@ Source0: http://registry.npmjs.org/mapnik/-/mapnik-%{version}.tgz Patch0: nodejs-mapnik-geojson.patch # Reported upstream - https://github.com/mapnik/node-mapnik/issues/163 Patch1: nodejs-mapnik-color.patch +# Correct system font paths +Patch2: nodejs-mapnik-fonts.patch ExclusiveArch: %{nodejs_arches} BuildRequires: nodejs-devel @@ -40,6 +42,7 @@ BuildRequires: npm(sphericalmercator) %setup -q -n package %patch0 -p1 -b .geojson %patch1 -p1 -b .color +%patch2 -p1 -b .color rm -rf node_modules %nodejs_symlink_deps --check @@ -75,6 +78,9 @@ NODE_PATH=lib %{nodejs_sitelib}/mocha/bin/mocha -R spec -t 5000 %changelog +* Tue Jul 16 2013 Tom Hughes - 1.1.0-2 +- Correct system font paths + * Mon Jul 15 2013 Tom Hughes - 1.1.0-1 - Update to 1.1.0 upstream release - Remove mapnik-vector-tile from run time dependencies