2010-07-22 22:14:19 +00:00
|
|
|
#
|
|
|
|
# This file is part of Mapnik (c++ mapping toolkit)
|
|
|
|
#
|
|
|
|
# Copyright (C) 2010 Artem Pavlenko, Jean-Francois Doyon
|
|
|
|
#
|
|
|
|
# Mapnik is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
|
|
# License as published by the Free Software Foundation; either
|
|
|
|
# version 2.1 of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This library is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
# Lesser General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Lesser General Public
|
|
|
|
# License along with this library; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
|
|
|
|
Import ('env')
|
|
|
|
import os
|
|
|
|
import platform
|
|
|
|
|
2012-03-14 22:44:48 +00:00
|
|
|
lib_dir = os.path.normpath(env['DESTDIR'] + '/' + env['PREFIX'] + '/' + env['LIBDIR_SCHEMA'] + '/mapnik')
|
2010-07-22 22:14:19 +00:00
|
|
|
|
|
|
|
fonts = 1
|
|
|
|
ini_template = '''
|
|
|
|
[mapnik]
|
|
|
|
plugins_dir=%(lib_dir)s/input
|
2010-09-10 13:15:15 +00:00
|
|
|
fonts/1/dir=%(lib_dir)s/fonts
|
2010-07-22 22:14:19 +00:00
|
|
|
'''
|
|
|
|
|
|
|
|
if platform.uname()[0] == 'Darwin':
|
2010-09-10 13:15:15 +00:00
|
|
|
ini_template += 'fonts/2/dir=/Library/Fonts\n'
|
2010-07-22 22:14:19 +00:00
|
|
|
fonts += 1
|
|
|
|
|
2010-09-10 13:15:15 +00:00
|
|
|
ini_template += 'fonts/size=%d\n' % fonts
|
2010-07-22 22:14:19 +00:00
|
|
|
|
|
|
|
ini = ini_template % locals()
|
|
|
|
|
|
|
|
open('viewer.ini','w').write(ini)
|
|
|
|
|
|
|
|
try:
|
2010-12-12 18:21:45 +00:00
|
|
|
os.chmod('viewer.ini',0666)
|
2010-07-22 22:14:19 +00:00
|
|
|
except: pass
|