diff --git a/osx/Info.plist b/osx/Info.plist deleted file mode 100644 index b195d8abd..000000000 --- a/osx/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - Mapnik - CFBundleGetInfoString - Mapnik 2.0.0-1 - CFBundleIdentifier - org.mapnik - CFBundleInfoDictionaryVersion - 2.0 - CFBundleName - Mapnik - CFBundlePackageType - FMWK - CFBundleShortVersionString - 0.2.0 - CFBundleSignature - ???? - CFBundleVersion - Mapnik 2.0.0-1 - - diff --git a/osx/README.txt b/osx/README.txt deleted file mode 100644 index 3aba10d38..000000000 --- a/osx/README.txt +++ /dev/null @@ -1,7 +0,0 @@ -A few scripts to assist with building a Mapnik.framework for OS X. - -It is not currently meant for others to use, but eventually I may -add docs and instructions such that others can build their own -framework packages. - -Contact Dane (dane@dbsgeo.com) with any questions. diff --git a/osx/config.py b/osx/config.py deleted file mode 100644 index a9f662859..000000000 --- a/osx/config.py +++ /dev/null @@ -1,29 +0,0 @@ -CXX = 'clang++' -CC = 'clang' -CUSTOM_CXXFLAGS = '-arch i386 -arch x86_64 -mmacosx-version-min=10.6 -isysroot /Developer/SDKs/MacOSX10.6.sdk -isystem osx/sources/include' -CUSTOM_LDFLAGS = '-arch i386 -arch x86_64 -Wl,-search_paths_first -Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk -Losx/sources/lib ' -RUNTIME_LINK = 'static' -INPUT_PLUGINS = 'gdal,ogr,postgis,shape,sqlite' -DESTDIR = './osx/sources/' -PATH_INSERT = './osx/sources/bin/' -BOOST_INCLUDES = 'osx/sources/include' -BOOST_LIBS = 'osx/sources/lib' -FREETYPE_CONFIG = './osx/sources/bin/freetype-config' -ICU_INCLUDES = './osx/sources/include' -ICU_LIB_NAME = 'icucore' -PNG_INCLUDES = './osx/sources/include' -PNG_LIBS = './osx/sources/lib' -JPEG_INCLUDES = './osx/sources/include' -JPEG_LIBS = './osx/sources/lib' -TIFF_INCLUDES = './osx/sources/include' -TIFF_LIBS = './osx/sources/lib' -PROJ_INCLUDES = './osx/sources/include' -PROJ_LIBS = './osx/sources/lib' -PKG_CONFIG_PATH = './osx/sources/lib/pkgconfig' -CAIRO_INCLUDES = './osx/sources/include/' -CAIRO_LIBS = './osx/sources/lib' -SQLITE_INCLUDES = './osx/sources/include' -SQLITE_LIBS = './osx/sources/lib' -BINDINGS = 'none' -DEMO = True -PGSQL2SQLITE = True diff --git a/osx/config_framework.py b/osx/config_framework.py deleted file mode 100644 index 99c8dda16..000000000 --- a/osx/config_framework.py +++ /dev/null @@ -1,29 +0,0 @@ -CXX = 'clang++' -CC = 'clang' -CUSTOM_CXXFLAGS = '-arch i386 -arch x86_64 -mmacosx-version-min=10.6 -isysroot /Developer/SDKs/MacOSX10.6.sdk -isystem osx/sources/include' -CUSTOM_LDFLAGS = '-arch i386 -arch x86_64 -headerpad_max_install_names -Wl,-search_paths_first -Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk -Losx/sources/lib ' -INPUT_PLUGINS = 'gdal,geos,ogr,osm,postgis,raster,shape,sqlite' -PREFIX = '/Library/Frameworks/Mapnik.framework/Versions/2.0/unix' -PYTHON_PREFIX = '/Library/Frameworks/Mapnik.framework/Versions/2.0/unix' -DESTDIR = '/Users/dane/projects/mapnik-dev/trunk-build/osx/' -PATH_INSERT = './osx/sources/bin/' -BOOST_INCLUDES = 'osx/sources/include' -BOOST_LIBS = 'osx/sources/lib' -BOOST_PYTHON_LIB = 'boost_python32' -PNG_INCLUDES = '/Library/Frameworks/UnixImageIO.framework/unix/include' -PNG_LIBS = '/Library/Frameworks/UnixImageIO.framework/unix/lib' -JPEG_INCLUDES = '/Library/Frameworks/UnixImageIO.framework/unix/include' -JPEG_LIBS = '/Library/Frameworks/UnixImageIO.framework/unix/lib' -TIFF_INCLUDES = '/Library/Frameworks/UnixImageIO.framework/unix/include' -TIFF_LIBS = '/Library/Frameworks/UnixImageIO.framework/unix/lib' -PROJ_INCLUDES = '/Library/Frameworks/PROJ.framework/unix/include' -PROJ_LIBS = '/Library/Frameworks/PROJ.framework/unix/lib' -PKG_CONFIG_PATH = './osx/sources/lib/pkgconfig' -GEOS_CONFIG = '/Library/Frameworks/GEOS.framework/unix/bin/geos-config' -SQLITE_INCLUDES = './osx/sources/include' -SQLITE_LIBS = './osx/sources/lib' -PYTHON = '/Library/Frameworks/Python.framework/Versions/3.2/bin/python3.2m' -PYTHON_DYNAMIC_LOOKUP = True -BINDINGS = 'all' -DEMO = True -PGSQL2SQLITE = True diff --git a/osx/installer/media/finish_up.rtf b/osx/installer/media/finish_up.rtf deleted file mode 100644 index 5b33fc4ee..000000000 --- a/osx/installer/media/finish_up.rtf +++ /dev/null @@ -1,17 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350 -{\fonttbl\f0\fswiss\fcharset0 Helvetica;} -{\colortbl;\red255\green255\blue255;} -\margl1440\margr1440\vieww9000\viewh8400\viewkind0 -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\f0\b\fs24 \cf0 Learning Mapnik\ -\ - -\b0 Find documentation at: {\field{\*\fldinst{HYPERLINK "http://mapnik.org/documentation/"}}{\fldrslt mapnik.org}}\ - -\b \ - -\b0 Join Mapnik IRC (chat): at {\field{\*\fldinst{HYPERLINK "irc://irc.freenode.net#mapnik"}}{\fldrslt irc.freenode.net}}\ -\ -Sign up and post to the community mailing list: {\field{\*\fldinst{HYPERLINK "http://lists.berlios.de/mailman/listinfo/mapnik-users"}}{\fldrslt Mapnik users}}\ -} \ No newline at end of file diff --git a/osx/installer/media/intro.rtf b/osx/installer/media/intro.rtf deleted file mode 100644 index d9de75119..000000000 --- a/osx/installer/media/intro.rtf +++ /dev/null @@ -1,28 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350 -{\fonttbl\f0\fnil\fcharset0 LucidaGrande;} -{\colortbl;\red255\green255\blue255;\red0\green0\blue153;} -\margl1440\margr1440\vieww18660\viewh8460\viewkind0 -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\f0\b\fs28 \cf0 Mapnik -\b0 is an OpenSource C++/Python toolkit for developing mapping applications. -\fs26 \ - -\fs24 \ -At the core is a C++ shared library providing algorithms/patterns for spatial data access and visualization.\ -\ -Essentially a collection of geographic objects (map, layer, datasource, feature, geometry), the library doesn't rely on "windowing systems" and can be deployed in any server environment. \ -\ -It is intended to play fair in a multi-threaded environment and is aimed primarily, but not exclusively, at web-based development.\ -\ -High-level Python bindings (boost.python) facilitate rapid application development, targeting zope3, django etc.\ -\ -Mapnik is a free software and is released under LGPL (GNU Lesser General Public Licence) (see COPYING)\ -\ -For further information see:\ - \'95 {\field{\*\fldinst{HYPERLINK "http://mapnik.org"}}{\fldrslt \cf2 \expnd0\expndtw0\kerning0 -\ul \ulc2 http://mapnik.org}}\ - \'95 {\field{\*\fldinst{HYPERLINK "http://trac.mapnik.org"}}{\fldrslt \cf2 \expnd0\expndtw0\kerning0 -\ul \ulc2 http://trac.mapnik.org}}\ - \'95 {\field{\*\fldinst{HYPERLINK "http://ohloh.net/p/mapnik"}}{\fldrslt \cf2 \expnd0\expndtw0\kerning0 -\ul \ulc2 http://ohloh.net/p/mapnik}}} \ No newline at end of file diff --git a/osx/installer/media/license.rtf b/osx/installer/media/license.rtf deleted file mode 100644 index cd7d9704e..000000000 --- a/osx/installer/media/license.rtf +++ /dev/null @@ -1,177 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf540 -{\fonttbl\f0\fnil\fcharset0 LucidaGrande;} -{\colortbl;\red255\green255\blue255;\red0\green0\blue153;} -\margl1440\margr1440\vieww9000\viewh8400\viewkind0 -\deftab720 -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ql\qnatural\pardirnatural - -\f0\b\fs22 \cf0 \expnd0\expndtw0\kerning0 -GNU LESSER GENERAL PUBLIC LICENSE -\b0 \ - -\b Version 3, 29 June 2007 -\b0 \ -\ - Copyright (C) 2007 Free Software Foundation, Inc. <{\field{\*\fldinst{HYPERLINK "http://fsf.org"}}{\fldrslt \cf2 \expnd0\expndtw0\kerning0 -\ul \ulc2 http://fsf.org/}}>\ - Everyone is permitted to copy and distribute verbatim copies\ - of this license document, but changing it is not allowed.\ -\ -\ - This version of the GNU Lesser General Public License incorporates\ -the terms and conditions of version 3 of the GNU General Public\ -License, supplemented by the additional permissions listed below.\ -\ - 0. Additional Definitions.\ -\ - As used herein, "this License" refers to version 3 of the GNU Lesser\ -General Public License, and the "GNU GPL" refers to version 3 of the GNU\ -General Public License.\ -\ - "The Library" refers to a covered work governed by this License,\ -other than an Application or a Combined Work as defined below.\ -\ - An "Application" is any work that makes use of an interface provided\ -by the Library, but which is not otherwise based on the Library.\ -Defining a subclass of a class defined by the Library is deemed a mode\ -of using an interface provided by the Library.\ -\ - A "Combined Work" is a work produced by combining or linking an\ -Application with the Library. The particular version of the Library\ -with which the Combined Work was made is also called the "Linked\ -Version".\ -\ - The "Minimal Corresponding Source" for a Combined Work means the\ -Corresponding Source for the Combined Work, excluding any source code\ -for portions of the Combined Work that, considered in isolation, are\ -based on the Application, and not on the Linked Version.\ -\ - The "Corresponding Application Code" for a Combined Work means the\ -object code and/or source code for the Application, including any data\ -and utility programs needed for reproducing the Combined Work from the\ -Application, but excluding the System Libraries of the Combined Work.\ -\ - 1. Exception to Section 3 of the GNU GPL.\ -\ - You may convey a covered work under sections 3 and 4 of this License\ -without being bound by section 3 of the GNU GPL.\ -\ - 2. Conveying Modified Versions.\ -\ - If you modify a copy of the Library, and, in your modifications, a\ -facility refers to a function or data to be supplied by an Application\ -that uses the facility (other than as an argument passed when the\ -facility is invoked), then you may convey a copy of the modified\ -version:\ -\ - a) under this License, provided that you make a good faith effort to\ - ensure that, in the event an Application does not supply the\ - function or data, the facility still operates, and performs\ - whatever part of its purpose remains meaningful, or\ -\ - b) under the GNU GPL, with none of the additional permissions of\ - this License applicable to that copy.\ -\ - 3. Object Code Incorporating Material from Library Header Files.\ -\ - The object code form of an Application may incorporate material from\ -a header file that is part of the Library. You may convey such object\ -code under terms of your choice, provided that, if the incorporated\ -material is not limited to numerical parameters, data structure\ -layouts and accessors, or small macros, inline functions and templates\ -(ten or fewer lines in length), you do both of the following:\ -\ - a) Give prominent notice with each copy of the object code that the\ - Library is used in it and that the Library and its use are\ - covered by this License.\ -\ - b) Accompany the object code with a copy of the GNU GPL and this license\ - document.\ -\ - 4. Combined Works.\ -\ - You may convey a Combined Work under terms of your choice that,\ -taken together, effectively do not restrict modification of the\ -portions of the Library contained in the Combined Work and reverse\ -engineering for debugging such modifications, if you also do each of\ -the following:\ -\ - a) Give prominent notice with each copy of the Combined Work that\ - the Library is used in it and that the Library and its use are\ - covered by this License.\ -\ - b) Accompany the Combined Work with a copy of the GNU GPL and this license\ - document.\ -\ - c) For a Combined Work that displays copyright notices during\ - execution, include the copyright notice for the Library among\ - these notices, as well as a reference directing the user to the\ - copies of the GNU GPL and this license document.\ -\ - d) Do one of the following:\ -\ - 0) Convey the Minimal Corresponding Source under the terms of this\ - License, and the Corresponding Application Code in a form\ - suitable for, and under terms that permit, the user to\ - recombine or relink the Application with a modified version of\ - the Linked Version to produce a modified Combined Work, in the\ - manner specified by section 6 of the GNU GPL for conveying\ - Corresponding Source.\ -\ - 1) Use a suitable shared library mechanism for linking with the\ - Library. A suitable mechanism is one that (a) uses at run time\ - a copy of the Library already present on the user's computer\ - system, and (b) will operate properly with a modified version\ - of the Library that is interface-compatible with the Linked\ - Version.\ -\ - e) Provide Installation Information, but only if you would otherwise\ - be required to provide such information under section 6 of the\ - GNU GPL, and only to the extent that such information is\ - necessary to install and execute a modified version of the\ - Combined Work produced by recombining or relinking the\ - Application with a modified version of the Linked Version. (If\ - you use option 4d0, the Installation Information must accompany\ - the Minimal Corresponding Source and Corresponding Application\ - Code. If you use option 4d1, you must provide the Installation\ - Information in the manner specified by section 6 of the GNU GPL\ - for conveying Corresponding Source.)\ -\ - 5. Combined Libraries.\ -\ - You may place library facilities that are a work based on the\ -Library side by side in a single library together with other library\ -facilities that are not Applications and are not covered by this\ -License, and convey such a combined library under terms of your\ -choice, if you do both of the following:\ -\ - a) Accompany the combined library with a copy of the same work based\ - on the Library, uncombined with any other library facilities,\ - conveyed under the terms of this License.\ -\ - b) Give prominent notice with the combined library that part of it\ - is a work based on the Library, and explaining where to find the\ - accompanying uncombined form of the same work.\ -\ - 6. Revised Versions of the GNU Lesser General Public License.\ -\ - The Free Software Foundation may publish revised and/or new versions\ -of the GNU Lesser General Public License from time to time. Such new\ -versions will be similar in spirit to the present version, but may\ -differ in detail to address new problems or concerns.\ -\ - Each version is given a distinguishing version number. If the\ -Library as you received it specifies that a certain numbered version\ -of the GNU Lesser General Public License "or any later version"\ -applies to it, you have the option of following the terms and\ -conditions either of that published version or of any later version\ -published by the Free Software Foundation. If the Library as you\ -received it does not specify a version number of the GNU Lesser\ -General Public License, you may choose any version of the GNU Lesser\ -General Public License ever published by the Free Software Foundation.\ -\ - If the Library as you received it specifies that a proxy can decide\ -whether future versions of the GNU Lesser General Public License shall\ -apply, that proxy's public statement of acceptance of any version is\ -permanent authorization for you to choose that version for the\ -Library.} \ No newline at end of file diff --git a/osx/installer/media/mapnik.png b/osx/installer/media/mapnik.png deleted file mode 100644 index 32265f91d..000000000 Binary files a/osx/installer/media/mapnik.png and /dev/null differ diff --git a/osx/installer/pkg/readme.rtf b/osx/installer/pkg/readme.rtf deleted file mode 100644 index eb322f53b..000000000 --- a/osx/installer/pkg/readme.rtf +++ /dev/null @@ -1,150 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350 -{\fonttbl\f0\fnil\fcharset0 LucidaGrande;\f1\fnil\fcharset0 AndaleMono;} -{\colortbl;\red255\green255\blue255;} -\margl1440\margr1440\vieww11580\viewh11940\viewkind0 -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\f0\fs32 \cf0 Welcome to Mapnik! -\fs34 \ - -\fs24 \ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\b\fs28 \cf0 Quickstart -\b0\fs22 \ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\fs24 \cf0 \ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\b \cf0 \'95 -\b0 Install the "Mapnik.pkg".\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\b\fs22 \cf0 \ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\fs24 \cf0 \'95 -\b0 Test your installation via Python:\ -\ - Open the Terminal.app and confirm that below command returns 'True':\ -\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\f1 \cf0 $ python -c "import mapnik2; print 'Mapnik.framework' in mapnik2.__file__" -\f0 \ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\fs26 \cf0 \ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\fs24 \cf0 If it does then Mapnik is installed correctly! You can now head along to {\field{\*\fldinst{HYPERLINK "http://mapnik.org"}}{\fldrslt http://mapnik.org}} for documentation. -\b\fs22 \ - -\b0\fs24 \ - If it does not then you may need to add this line to your environment settings:\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\f1 \cf0 \ - export PYTHONPATH=/Library/Frameworks/Mapnik.framework/Python:$PYTHONPATH\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\f0 \cf0 \ -\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\b\fs28 \cf0 Details\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\b0\fs24 \cf0 \ -This installer only works for Snow Leopard (10.6).\ -\ -This install should play nicely with any existing installations of Mapnik.\ -\ -It automatically puts the following lines in your ~/.bash_profile to enable Mapnik:\ -\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\f1 \cf0 export PATH=/Library/Frameworks/Mapnik.framework/Programs:$PATH\ - export PYTHONPATH=/Library/Frameworks/Mapnik.framework/Python:$PYTHONPATH\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\f0 \cf0 \ -It also enables the Mapnik python bindings for QGIS/Python2.6 by putting a 'mapnik2.pth' file in:\ -\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\f1 \cf0 /Library/Python/2.6/site-packages\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\f0 \cf0 \ -This Mapnik installer includes:\ -\ - * -\b Mapnik Core -\b0 (mapnik library)\ - * -\b Python bindings -\b0 compatible with versions:\ - - 2.5, 2.6, 2.7, and 3.1\ - * -\b Datasources -\b0 (aka "input plugins"):\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\fs22 \cf0 - Shapefile, PostGIS, Raster, GDAL, OGR,\ - GEOS, SQLite, Rasterlite, OSM, Kismet \ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\fs24 \cf0 * -\b Dependencies: -\b0 Boost, ICU, Cairo, Freetype2 and other minor libraries\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\fs26 \cf0 * -\b GDAL_Complete-1.8.dmg -\b0 from:\ - -\fs24 - http://www.kyngchaos.com/software/frameworks -\fs26 \ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\fs24 \cf0 \ -\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\b\fs28 \cf0 Uninstalling\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\b0\fs24 \cf0 \ -To disable this installation remove the lines including ' -\f1 /Library/Frameworks/Mapnik.framework' -\f0 from your ~/.bash_profile\ -\ -And remove this file\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\f1 \cf0 \ - /Library/Python/2.6/site-packages/mapnik2.pth\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\f0 \cf0 \ -To fully remove the Installation remove this folder:\ -\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\f1 \cf0 /Library/Frameworks/Mapnik.framework\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\f0 \cf0 \ -\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\b\fs28 \cf0 Issues?\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural - -\b0\fs24 \cf0 \ -Any questions or problems with the installer please get in touch with Dane ( -\b dane@dbsgeo.com -\b0 ).\ -} \ No newline at end of file diff --git a/osx/installer/scripts/setup.sh b/osx/installer/scripts/setup.sh deleted file mode 100755 index ea887d4bd..000000000 --- a/osx/installer/scripts/setup.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -# TODO -# - find safer way to do this: http://trac.mapnik.org/ticket/776 -# - check for ~/.profile so that adding a new bash_profile does not override - -# backup bash_profile -cp ~/.bash_profile ~/.bash_profile.mapnik.backup - -# add installer Programs to PATH -# by appending new entries to bash_profile -echo '' >> ~/.bash_profile -echo '# Settings for Mapnik.framework Installer to enable Mapnik programs and python bindings' >> ~/.bash_profile -echo 'export PATH=/Library/Frameworks/Mapnik.framework/Programs:$PATH' >> ~/.bash_profile -echo 'export PYTHONPATH=/Library/Frameworks/Mapnik.framework/Python:$PYTHONPATH' >> ~/.bash_profile \ No newline at end of file diff --git a/osx/patches/boost_python1_46_1_for_3.2.diff b/osx/patches/boost_python1_46_1_for_3.2.diff deleted file mode 100644 index 46c33cb54..000000000 --- a/osx/patches/boost_python1_46_1_for_3.2.diff +++ /dev/null @@ -1,14 +0,0 @@ -Index: libs/python/src/converter/builtin_converters.cpp -=================================================================== ---- libs/python/src/converter/builtin_converters.cpp (revision 56305) -+++ libs/python/src/converter/builtin_converters.cpp (revision 71050) -@@ -432,5 +432,8 @@ - { - int err = PyUnicode_AsWideChar( -- (PyUnicodeObject *)intermediate -+#if PY_VERSION_HEX < 0x03020000 -+ (PyUnicodeObject *) -+#endif -+ intermediate - , &result[0] - , result.size()); diff --git a/osx/patches/boost_python3k_bytes.diff b/osx/patches/boost_python3k_bytes.diff deleted file mode 100644 index 8c6450cd4..000000000 --- a/osx/patches/boost_python3k_bytes.diff +++ /dev/null @@ -1,14 +0,0 @@ -Index: libs/python/src/converter/builtin_converters.cpp -=================================================================== ---- libs/python/src/converter/builtin_converters.cpp (revision 67415) -+++ libs/python/src/converter/builtin_converters.cpp (working copy) -@@ -375,7 +375,8 @@ - static unaryfunc* get_slot(PyObject* obj) - { - #if PY_VERSION_HEX >= 0x03000000 -- return (PyUnicode_Check(obj)) ? &py_unicode_as_string_unaryfunc : 0; -+ return (PyUnicode_Check(obj)) ? &py_unicode_as_string_unaryfunc : -+ PyBytes_Check(obj) ? &py_object_identity : 0; - #else - return (PyString_Check(obj)) ? &obj->ob_type->tp_str : 0; - diff --git a/osx/patches/mapnik-config.diff b/osx/patches/mapnik-config.diff deleted file mode 100644 index 776f48592..000000000 --- a/osx/patches/mapnik-config.diff +++ /dev/null @@ -1,15 +0,0 @@ -Index: utils/mapnik-config/SConscript -=================================================================== ---- utils/mapnik-config/SConscript (revision 2594) -+++ utils/mapnik-config/SConscript (working copy) -@@ -64,8 +64,8 @@ - version='%(version)s' - mapnik_libname=%(mapnik_libname)s - private_libs='%(private_libs)s' --other_libs='%(other_libs)s' --other_includes='%(other_includes)s' -+other_libs='-arch i386 -arch x86_64 -headerpad_max_install_names -L/Library/Frameworks/Mapnik.framework/unix/lib -L/Library/Frameworks/UnixImageIO.framework/unix/lib -L/Library/Frameworks/PROJ.framework/unix/lib -lfreetype -licuuc -lboost_filesystem -lboost_regex -lboost_thread -lboost_system -lcairomm-1.0 -lcairo' -+other_includes='-arch i386 -arch x86_64 -I/Library/Frameworks/Mapnik.framework/unix/include -I/Library/Frameworks/Mapnik.framework/unix/include/cairo -I/Library/Frameworks/Mapnik.framework/unix/include/cairomm-1.0 -I/Library/Frameworks/Mapnik.framework/unix/include/sigc++-2.0 -I/Library/Frameworks/Mapnik.framework/unix/lib/sigc++-2.0/include/ -I/Library/Frameworks/Mapnik.framework/unix/include/freetype2 -I/Library/Frameworks/UnixImageIO.framework/unix/include -I/Library/Frameworks/PROJ.framework/unix/include -I/usr/include/libxml2' - fonts='%(fonts)s' - input_plugins='%(input_plugins)s' - svn_revision='%(svn_revision)s' diff --git a/osx/patches/postgis_static.diff b/osx/patches/postgis_static.diff deleted file mode 100644 index 97e72a6fd..000000000 --- a/osx/patches/postgis_static.diff +++ /dev/null @@ -1,26 +0,0 @@ -Index: plugins/input/postgis/SConscript -=================================================================== ---- plugins/input/postgis/SConscript (revision 2476) -+++ plugins/input/postgis/SConscript (working copy) -@@ -33,7 +33,11 @@ - """ - ) - --libraries = ['pq'] -+static = '-lintl -liconv -lxml2 -lpam -lssl -lcrypto -lkrb5 -lldap -lreadline -lz' -+libraries = ['pq_s'] -+libraries.extend(static.split(' ')) -+ldflags = env['CUSTOM_LDFLAGS'] -+ldflags += ' -framework CoreFoundation' - - if env['PLATFORM'] == 'Darwin': - libraries.append('mapnik2') -@@ -41,7 +45,7 @@ - if env['THREADING'] == 'multi': - libraries.append('boost_thread%s' % env['BOOST_APPEND']) - --input_plugin = plugin_env.SharedLibrary('../postgis', source=postgis_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries, LINKFLAGS=env['CUSTOM_LDFLAGS']) -+input_plugin = plugin_env.SharedLibrary('../postgis', source=postgis_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries, LINKFLAGS=ldflags) - - if env['PLATFORM'] == 'Darwin': - # if the plugin links to libmapnik2 ensure it is built first diff --git a/osx/patches/tests.diff b/osx/patches/tests.diff deleted file mode 100644 index 7c4a4f7ae..000000000 --- a/osx/patches/tests.diff +++ /dev/null @@ -1,14 +0,0 @@ -Index: tests/run_tests.py -=================================================================== ---- tests/run_tests.py (revision 2488) -+++ tests/run_tests.py (working copy) -@@ -46,7 +46,8 @@ - - if not quiet: - print "- mapnik2 path: %s" % mapnik2.__file__ -- print "- _mapnik2.so path: %s" % mapnik2._mapnik2.__file__ -+ if hasattr(mapnik2,'_mapnik2'): -+ print "- _mapnik2.so path: %s" % mapnik2._mapnik2.__file__ - print "- Input plugins path: %s" % mapnik2.inputpluginspath - print "- Font path: %s" % mapnik2.fontscollectionpath - print diff --git a/osx/patches/viewer.diff b/osx/patches/viewer.diff deleted file mode 100644 index d43dc38f0..000000000 --- a/osx/patches/viewer.diff +++ /dev/null @@ -1,82 +0,0 @@ -Index: demo/viewer/viewer.pro -=================================================================== ---- demo/viewer/viewer.pro (revision 2594) -+++ demo/viewer/viewer.pro (working copy) -@@ -5,14 +5,33 @@ - TEMPLATE = app - - INCLUDEPATH += /usr/local/include/ --INCLUDEPATH += /usr/boost/include/ --INCLUDEPATH += /usr/X11/include/ --INCLUDEPATH += /usr/X11/include/freetype2 -+INCLUDEPATH += /Library/Frameworks/Mapnik.framework/unix/include -+INCLUDEPATH += /Library/Frameworks/Mapnik.framework/unix/include/cairo -+INCLUDEPATH += /Library/Frameworks/Mapnik.framework/unix/include/cairomm-1.0 -+INCLUDEPATH += /Library/Frameworks/Mapnik.framework/unix/include/sigc++-2.0 -+INCLUDEPATH += /Library/Frameworks/Mapnik.framework/unix/lib/sigc++-2.0/include/ -+INCLUDEPATH += /Library/Frameworks/Mapnik.framework/unix/include/freetype2 -+INCLUDEPATH += /Library/Frameworks/UnixImageIO.framework/unix/include -+INCLUDEPATH += /Library/Frameworks/PROJ.framework/unix/include -+INCLUDEPATH += /usr/include/libxml2 - INCLUDEPATH += . - --QMAKE_CXXFLAGS +=' -DDARWIN -Wno-missing-field-initializers -ansi' --unix:LIBS = -L/usr/local/lib -L/usr/X11/lib -lmapnik2 -lfreetype --unix:LIBS += -lboost_system -licuuc -lboost_filesystem -lboost_regex -+QMAKE_CXXFLAGS +=' -arch i386 -arch x86_64 -DDARWIN -Wno-missing-field-initializers -ansi' -+unix:LIBS = -arch i386 -+unix:LIBS += -arch x86_64 -+unix:LIBS += -headerpad_max_install_names -+unix:LIBS += -L/Library/Frameworks/Mapnik.framework/unix/lib -+unix:LIBS += -lmapnik2 -+unix:LIBS += -L/Library/Frameworks/UnixImageIO.framework/unix/lib -+unix:LIBS += -L/Library/Frameworks/PROJ.framework/unix/lib -+unix:LIBS += -lfreetype -+unix:LIBS += -licuuc -+unix:LIBS += -lboost_filesystem -+unix:LIBS += -lboost_regex -+unix:LIBS += -lboost_thread -+unix:LIBS += -lboost_system -+unix:LIBS += -lcairomm-1.0 -+unix:LIBS += -lcairo - - # Input - -Index: demo/viewer/main.cpp -=================================================================== ---- demo/viewer/main.cpp (revision 2594) -+++ demo/viewer/main.cpp (working copy) -@@ -43,22 +43,24 @@ - - // register input plug-ins - QString plugins_dir = settings.value("mapnik/plugins_dir", -- QVariant("/usr/local/lib/mapnik2/input/")).toString(); -+ QVariant("/Library/Frameworks/Mapnik.framework/Versions/2.0/unix/lib/mapnik2/input/")).toString(); - datasource_cache::instance()->register_datasources(plugins_dir.toStdString()); - // register fonts -- int count = settings.beginReadArray("mapnik/fonts"); -- for (int index=0; index < count; ++index) -- { -- settings.setArrayIndex(index); -- QString font_dir = settings.value("dir").toString(); -- freetype_engine::register_fonts(font_dir.toStdString()); -- } -+ //int count = settings.beginReadArray("mapnik/fonts"); -+ //for (int index=0; index < count; ++index) -+ //{ -+ // settings.setArrayIndex(index); -+ // QString font_dir = settings.value("dir").toString(); -+ freetype_engine::register_fonts("/Library/Frameworks/Mapnik.framework/Versions/2.0/unix/lib/mapnik2/fonts"); -+ //} - settings.endArray(); - - QApplication app( argc, argv ); - MainWindow window; - window.show(); -- if (argc > 1) window.open(argv[1]); -+ if (argc > 1) { -+ window.open(argv[1]); -+ } - if (argc >= 3) - { - QStringList list = QString(argv[2]).split(","); diff --git a/osx/python/cairo.py b/osx/python/cairo.py deleted file mode 100644 index 1c55276e8..000000000 --- a/osx/python/cairo.py +++ /dev/null @@ -1,17 +0,0 @@ -import sys - -ver_int = int('%s%s' % (sys.version_info[0],sys.version_info[1])) -ver_str = '%s.%s' % (sys.version_info[0],sys.version_info[1]) - -path_insert = '/Library/Frameworks/Mapnik.framework/Versions/2.0/unix/lib/python%s/site-packages/' - -if ver_int < 26: - raise ImportError('Cairo bindings are only available for python versions >= 2.6') -elif ver_int in (26,27,31): - sys.path.insert(0, path_insert % ver_str) - from cairo import * -elif ver_int > 31: - raise ImportError('Cairo bindings are only available for python versions <= 3.1') -else: - raise ImportError('Cairo bindings are only available for python versions 2.6, 2.7, and 3.1') - diff --git a/osx/python/mapnik.py b/osx/python/mapnik.py deleted file mode 100644 index c10775b5d..000000000 --- a/osx/python/mapnik.py +++ /dev/null @@ -1,779 +0,0 @@ -# -# This file is part of Mapnik (C++/Python mapping toolkit) -# Copyright (C) 2009 Artem Pavlenko, Dane Springmeyer -# -# Mapnik is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or any later version. -# -# This program 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# - -"""Mapnik Python module. - -Boost Python bindings to the Mapnik C++ shared library. - -Several things happen when you do: - - >>> import mapnik - - 1) Mapnik C++ objects are imported via the '__init__.py' from the '_mapnik.so' shared object - (_mapnik.pyd on win) which references libmapnik.so (linux), libmapnik.dylib (mac), or - mapnik.dll (win32). - - 2) The paths to the input plugins and font directories are imported from the 'paths.py' - file which was constructed and installed during SCons installation. - - 3) All available input plugins and TrueType fonts are automatically registered. - - 4) Boost Python metaclass injectors are used in the '__init__.py' to extend several - objects adding extra convenience when accessed via Python. - -""" - -import os -import sys -import warnings - -try: - from ctypes import RTLD_NOW, RTLD_GLOBAL -except ImportError: - try: - from DLFCN import RTLD_NOW, RTLD_GLOBAL - except ImportError: - RTLD_NOW = 2 - RTLD_GLOBAL = 256 - -flags = sys.getdlopenflags() -sys.setdlopenflags(RTLD_NOW | RTLD_GLOBAL) - -ver_int = int('%s%s' % (sys.version_info[0],sys.version_info[1])) -ver_str = '%s.%s' % (sys.version_info[0],sys.version_info[1]) - -path_insert = '/Library/Frameworks/Mapnik.framework/Versions/2.0/unix/lib/python%s/site-packages/mapnik2' - -if ver_int < 25: - raise ImportError('Mapnik bindings are only available for python versions >= 2.5') -elif ver_int in (25,26,27,31,32): - sys.path.insert(0, path_insert % ver_str) - from _mapnik2 import * -elif ver_int > 32: - raise ImportError('Mapnik bindings are only available for python versions <= 3.1') -else: - raise ImportError('Mapnik bindings are only available for python versions 2.5, 2.6, 2.7, and 3.1') - -from paths import inputpluginspath, fontscollectionpath - -#import printing -#printing.renderer = render - -# The base Boost.Python class -BoostPythonMetaclass = Coord.__class__ - -class _MapnikMetaclass(BoostPythonMetaclass): - def __init__(self, name, bases, dict): - for b in bases: - if type(b) not in (self, type): - for k,v in list(dict.items()): - if hasattr(b, k): - setattr(b, '_c_'+k, getattr(b, k)) - setattr(b,k,v) - return type.__init__(self, name, bases, dict) - -# metaclass injector compatible with both python 2 and 3 -# http://mikewatkins.ca/2008/11/29/python-2-and-3-metaclasses/ -_injector = _MapnikMetaclass('_injector', (object, ), {}) - -def render_grid(m,layer,key,resolution=4,fields=[]): - return render_grid_(m,layer,key,resolution,fields) - -def Filter(*args,**kwargs): - warnings.warn("'Filter' is deprecated and will be removed in Mapnik 2.0.1, use 'Expression' instead", - DeprecationWarning, 2) - return Expression(*args, **kwargs) - -class Envelope(Box2d): - def __init__(self, *args, **kwargs): - warnings.warn("'Envelope' is deprecated and will be removed in Mapnik 2.0.1, use 'Box2d' instead", - DeprecationWarning, 2) - Box2d.__init__(self, *args, **kwargs) - -class _Coord(Coord,_injector): - """ - Represents a point with two coordinates (either lon/lat or x/y). - - Following operators are defined for Coord: - - Addition and subtraction of Coord objects: - - >>> Coord(10, 10) + Coord(20, 20) - Coord(30.0, 30.0) - >>> Coord(10, 10) - Coord(20, 20) - Coord(-10.0, -10.0) - - Addition, subtraction, multiplication and division between - a Coord and a float: - - >>> Coord(10, 10) + 1 - Coord(11.0, 11.0) - >>> Coord(10, 10) - 1 - Coord(-9.0, -9.0) - >>> Coord(10, 10) * 2 - Coord(20.0, 20.0) - >>> Coord(10, 10) / 2 - Coord(5.0, 5.0) - - Equality of coords (as pairwise equality of components): - >>> Coord(10, 10) is Coord(10, 10) - False - >>> Coord(10, 10) == Coord(10, 10) - True - """ - def __repr__(self): - return 'Coord(%s,%s)' % (self.x, self.y) - - def forward(self, projection): - """ - Projects the point from the geographic coordinate - space into the cartesian space. The x component is - considered to be longitude, the y component the - latitude. - - Returns the easting (x) and northing (y) as a - coordinate pair. - - Example: Project the geographic coordinates of the - city center of Stuttgart into the local - map projection (GK Zone 3/DHDN, EPSG 31467) - >>> p = Projection('+init=epsg:31467') - >>> Coord(9.1, 48.7).forward(p) - Coord(3507360.12813,5395719.2749) - """ - return forward_(self, projection) - - def inverse(self, projection): - """ - Projects the point from the cartesian space - into the geographic space. The x component is - considered to be the easting, the y component - to be the northing. - - Returns the longitude (x) and latitude (y) as a - coordinate pair. - - Example: Project the cartesian coordinates of the - city center of Stuttgart in the local - map projection (GK Zone 3/DHDN, EPSG 31467) - into geographic coordinates: - >>> p = Projection('+init=epsg:31467') - >>> Coord(3507360.12813,5395719.2749).inverse(p) - Coord(9.1, 48.7) - """ - return inverse_(self, projection) - -class _Box2d(Box2d,_injector): - """ - Represents a spatial envelope (i.e. bounding box). - - - Following operators are defined for Box2d: - - Addition: - e1 + e2 is equvalent to e1.expand_to_include(e2) but yields - a new envelope instead of modifying e1 - - Subtraction: - Currently e1 - e2 returns e1. - - Multiplication and division with floats: - Multiplication and division change the width and height of the envelope - by the given factor without modifying its center.. - - That is, e1 * x is equivalent to: - e1.width(x * e1.width()) - e1.height(x * e1.height()), - except that a new envelope is created instead of modifying e1. - - e1 / x is equivalent to e1 * (1.0/x). - - Equality: two envelopes are equal if their corner points are equal. - """ - - def __repr__(self): - return 'Box2d(%s,%s,%s,%s)' % \ - (self.minx,self.miny,self.maxx,self.maxy) - - def forward(self, projection): - """ - Projects the envelope from the geographic space - into the cartesian space by projecting its corner - points. - - See also: - Coord.forward(self, projection) - """ - return forward_(self, projection) - - def inverse(self, projection): - """ - Projects the envelope from the cartesian space - into the geographic space by projecting its corner - points. - - See also: - Coord.inverse(self, projection). - """ - return inverse_(self, projection) - -class _Projection(Projection,_injector): - - def __repr__(self): - return "Projection('%s')" % self.params() - - def forward(self,obj): - """ - Projects the given object (Box2d or Coord) - from the geographic space into the cartesian space. - - See also: - Box2d.forward(self, projection), - Coord.forward(self, projection). - """ - return forward_(obj,self) - - def inverse(self,obj): - """ - Projects the given object (Box2d or Coord) - from the cartesian space into the geographic space. - - See also: - Box2d.inverse(self, projection), - Coord.inverse(self, projection). - """ - return inverse_(obj,self) - -def get_types(num): - dispatch = {1: int, - 2: float, - 3: float, - 4: str, - 5: Geometry2d, - 6: object} - return dispatch.get(num) - -class _Datasource(Datasource,_injector): - - def describe(self): - return Describe(self) - - def field_types(self): - return map(get_types,self._field_types()) - - def all_features(self,fields=None): - query = Query(self.envelope()) - attributes = fields or self.fields() - for fld in attributes: - query.add_property_name(fld) - return self.features(query).features - - def featureset(self,fields=None): - query = Query(self.envelope()) - attributes = fields or self.fields() - for fld in attributes: - query.add_property_name(fld) - return self.features(query) - -class _DeprecatedFeatureProperties(object): - - def __init__(self, feature): - self._feature = feature - - def __getitem__(self, name): - warnings.warn("indexing feature.properties is deprecated, index the " - "feature object itself for the same effect", DeprecationWarning, 2) - return self._feature[name] - - def __iter__(self): - warnings.warn("iterating feature.properties is deprecated, iterate the " - "feature object itself for the same effect", DeprecationWarning, 2) - return iter(self._feature) - -class _Feature(Feature, _injector): - """ - A Feature. - - TODO: docs - """ - @property - def properties(self): - return _DeprecatedFeatureProperties(self) - - @property - def attributes(self): - #XXX Returns a copy! changes to it won't affect feat.'s attrs. - # maybe deprecate? - return dict(self) - - @property - def geometries(self): - return [self.get_geometry(i) for i in xrange(self.num_geometries())] - - def __init__(self, id, geometry=None, **properties): - Feature._c___init__(self, id) - if geometry is not None: - self.add_geometry(geometry) - for k, v in properties.iteritems(): - self[k] = v - -class _Color(Color,_injector): - - def __repr__(self): - return "Color(%r)" % self.to_hex_string() - -class _Symbolizers(Symbolizers,_injector): - - def __getitem__(self, idx): - sym = Symbolizers._c___getitem__(self, idx) - return sym.symbol() - -def _add_symbol_method_to_symbolizers(vars=globals()): - - def symbol_for_subcls(self): - return self - - def symbol_for_cls(self): - return getattr(self,self.type())() - - for name, obj in vars.items(): - if name.endswith('Symbolizer') and not name.startswith('_'): - if name == 'Symbolizer': - symbol = symbol_for_cls - else: - symbol = symbol_for_subcls - type('dummy', (obj,_injector), {'symbol': symbol}) -_add_symbol_method_to_symbolizers() - -def Datasource(**keywords): - """Wrapper around CreateDatasource. - - Create a Mapnik Datasource using a dictionary of parameters. - - Keywords must include: - - type='plugin_name' # e.g. type='gdal' - - See the convenience factory methods of each input plugin for - details on additional required keyword arguments. - - """ - - return CreateDatasource(keywords) - -# convenience factory methods - -def Shapefile(**keywords): - """Create a Shapefile Datasource. - - Required keyword arguments: - file -- path to shapefile without extension - - Optional keyword arguments: - base -- path prefix (default None) - encoding -- file encoding (default 'utf-8') - - >>> from mapnik import Shapefile, Layer - >>> shp = Shapefile(base='/home/mapnik/data',file='world_borders') - >>> lyr = Layer('Shapefile Layer') - >>> lyr.datasource = shp - - """ - keywords['type'] = 'shape' - return CreateDatasource(keywords) - -def PostGIS(**keywords): - """Create a PostGIS Datasource. - - Required keyword arguments: - dbname -- database name to connect to - table -- table name or subselect query - - *Note: if using subselects for the 'table' value consider also - passing the 'geometry_field' and 'srid' and 'extent_from_subquery' - options and/or specifying the 'geometry_table' option. - - Optional db connection keyword arguments: - user -- database user to connect as (default: see postgres docs) - password -- password for database user (default: see postgres docs) - host -- portgres hostname (default: see postgres docs) - port -- postgres port (default: see postgres docs) - initial_size -- integer size of connection pool (default: 1) - max_size -- integer max of connection pool (default: 10) - persist_connection -- keep connection open (default: True) - - Optional table-level keyword arguments: - extent -- manually specified data extent (comma delimited string, default: None) - estimate_extent -- boolean, direct PostGIS to use the faster, less accurate `estimate_extent` over `extent` (default: False) - extent_from_subquery -- boolean, direct Mapnik to query Postgis for the extent of the raw 'table' value (default: uses 'geometry_table') - geometry_table -- specify geometry table to use to look up metadata (default: automatically parsed from 'table' value) - geometry_field -- specify geometry field to use (default: first entry in geometry_columns) - srid -- specify srid to use (default: auto-detected from geometry_field) - row_limit -- integer limit of rows to return (default: 0) - cursor_size -- integer size of binary cursor to use (default: 0, no binary cursor is used) - multiple_geometries -- boolean, direct the Mapnik wkb reader to interpret as multigeometries (default False) - - >>> from mapnik import PostGIS, Layer - >>> params = dict(dbname='mapnik',table='osm',user='postgres',password='gis') - >>> params['estimate_extent'] = False - >>> params['extent'] = '-20037508,-19929239,20037508,19929239' - >>> postgis = PostGIS(**params) - >>> lyr = Layer('PostGIS Layer') - >>> lyr.datasource = postgis - - """ - keywords['type'] = 'postgis' - return CreateDatasource(keywords) - - -def Raster(**keywords): - """Create a Raster (Tiff) Datasource. - - Required keyword arguments: - file -- path to stripped or tiled tiff - lox -- lowest (min) x/longitude of tiff extent - loy -- lowest (min) y/latitude of tiff extent - hix -- highest (max) x/longitude of tiff extent - hiy -- highest (max) y/latitude of tiff extent - - Hint: lox,loy,hix,hiy make a Mapnik Box2d - - Optional keyword arguments: - base -- path prefix (default None) - - >>> from mapnik import Raster, Layer - >>> raster = Raster(base='/home/mapnik/data',file='elevation.tif',lox=-122.8,loy=48.5,hix=-122.7,hiy=48.6) - >>> lyr = Layer('Tiff Layer') - >>> lyr.datasource = raster - - """ - keywords['type'] = 'raster' - return CreateDatasource(keywords) - -def Gdal(**keywords): - """Create a GDAL Raster Datasource. - - Required keyword arguments: - file -- path to GDAL supported dataset - - Optional keyword arguments: - base -- path prefix (default None) - shared -- boolean, open GdalDataset in shared mode (default: False) - bbox -- tuple (minx, miny, maxx, maxy). If specified, overrides the bbox detected by GDAL. - - >>> from mapnik import Gdal, Layer - >>> dataset = Gdal(base='/home/mapnik/data',file='elevation.tif') - >>> lyr = Layer('GDAL Layer from TIFF file') - >>> lyr.datasource = dataset - - """ - keywords['type'] = 'gdal' - if 'bbox' in keywords: - if isinstance(keywords['bbox'], (tuple, list)): - keywords['bbox'] = ','.join([str(item) for item in keywords['bbox']]) - return CreateDatasource(keywords) - -def Occi(**keywords): - """Create a Oracle Spatial (10g) Vector Datasource. - - Required keyword arguments: - user -- database user to connect as - password -- password for database user - host -- oracle host to connect to (does not refer to SID in tsnames.ora) - table -- table name or subselect query - - Optional keyword arguments: - initial_size -- integer size of connection pool (default 1) - max_size -- integer max of connection pool (default 10) - extent -- manually specified data extent (comma delimited string, default None) - estimate_extent -- boolean, direct Oracle to use the faster, less accurate estimate_extent() over extent() (default False) - encoding -- file encoding (default 'utf-8') - geometry_field -- specify geometry field (default 'GEOLOC') - use_spatial_index -- boolean, force the use of the spatial index (default True) - multiple_geometries -- boolean, direct the Mapnik wkb reader to interpret as multigeometries (default False) - - >>> from mapnik import Occi, Layer - >>> params = dict(host='myoracle',user='scott',password='tiger',table='test') - >>> params['estimate_extent'] = False - >>> params['extent'] = '-20037508,-19929239,20037508,19929239' - >>> oracle = Occi(**params) - >>> lyr = Layer('Oracle Spatial Layer') - >>> lyr.datasource = oracle - """ - keywords['type'] = 'occi' - return CreateDatasource(keywords) - -def Ogr(**keywords): - """Create a OGR Vector Datasource. - - Required keyword arguments: - file -- path to OGR supported dataset - layer -- name of layer to use within datasource (optional if layer_by_index is used) - - Optional keyword arguments: - layer_by_index -- choose layer by index number instead of by layer name. - base -- path prefix (default None) - encoding -- file encoding (default 'utf-8') - multiple_geometries -- boolean, direct the Mapnik wkb reader to interpret as multigeometries (default False) - - >>> from mapnik import Ogr, Layer - >>> datasource = Ogr(base='/home/mapnik/data',file='rivers.geojson',layer='OGRGeoJSON') - >>> lyr = Layer('OGR Layer from GeoJSON file') - >>> lyr.datasource = datasource - - """ - keywords['type'] = 'ogr' - return CreateDatasource(keywords) - -def SQLite(**keywords): - """Create a SQLite Datasource. - - Required keyword arguments: - file -- path to SQLite database file - table -- table name or subselect query - - Optional keyword arguments: - base -- path prefix (default None) - encoding -- file encoding (default 'utf-8') - extent -- manually specified data extent (comma delimited string, default None) - metadata -- name of auxillary table containing record for table with xmin, ymin, xmax, ymax, and f_table_name - geometry_field -- name of geometry field (default 'the_geom') - key_field -- name of primary key field (default 'OGC_FID') - row_offset -- specify a custom integer row offset (default 0) - row_limit -- specify a custom integer row limit (default 0) - wkb_format -- specify a wkb type of 'spatialite' (default None) - multiple_geometries -- boolean, direct the Mapnik wkb reader to interpret as multigeometries (default False) - use_spatial_index -- boolean, instruct sqlite plugin to use Rtree spatial index (default True) - - >>> from mapnik import SQLite, Layer - >>> sqlite = SQLite(base='/home/mapnik/data',file='osm.db',table='osm',extent='-20037508,-19929239,20037508,19929239') - >>> lyr = Layer('SQLite Layer') - >>> lyr.datasource = sqlite - - """ - keywords['type'] = 'sqlite' - return CreateDatasource(keywords) - -def Rasterlite(**keywords): - """Create a Rasterlite Datasource. - - Required keyword arguments: - file -- path to Rasterlite database file - table -- table name or subselect query - - Optional keyword arguments: - base -- path prefix (default None) - extent -- manually specified data extent (comma delimited string, default None) - - >>> from mapnik import Rasterlite, Layer - >>> rasterlite = Rasterlite(base='/home/mapnik/data',file='osm.db',table='osm',extent='-20037508,-19929239,20037508,19929239') - >>> lyr = Layer('Rasterlite Layer') - >>> lyr.datasource = rasterlite - - """ - keywords['type'] = 'rasterlite' - return CreateDatasource(keywords) - -def Osm(**keywords): - """Create a Osm Datasource. - - Required keyword arguments: - file -- path to OSM file - - Optional keyword arguments: - encoding -- file encoding (default 'utf-8') - url -- url to fetch data (default None) - bbox -- data bounding box for fetching data (default None) - - >>> from mapnik import Osm, Layer - >>> datasource = Osm(file='test.osm') - >>> lyr = Layer('Osm Layer') - >>> lyr.datasource = datasource - - """ - # note: parser only supports libxml2 so not exposing option - # parser -- xml parser to use (default libxml2) - keywords['type'] = 'osm' - return CreateDatasource(keywords) - -def Kismet(**keywords): - """Create a Kismet Datasource. - - Required keyword arguments: - host -- kismet hostname - port -- kismet port - - Optional keyword arguments: - encoding -- file encoding (default 'utf-8') - extent -- manually specified data extent (comma delimited string, default None) - - >>> from mapnik import Kismet, Layer - >>> datasource = Kismet(host='localhost',port=2501,extent='-179,-85,179,85') - >>> lyr = Layer('Kismet Server Layer') - >>> lyr.datasource = datasource - - """ - keywords['type'] = 'kismet' - return CreateDatasource(keywords) - -def Geos(**keywords): - """Create a GEOS Vector Datasource. - - Required keyword arguments: - wkt -- inline WKT text of the geometry - - Optional keyword arguments: - multiple_geometries -- boolean, direct the GEOS wkt reader to interpret as multigeometries (default False) - extent -- manually specified data extent (comma delimited string, default None) - - >>> from mapnik import Geos, Layer - >>> datasource = Geos(wkt='MULTIPOINT(100 100, 50 50, 0 0)') - >>> lyr = Layer('GEOS Layer from WKT string') - >>> lyr.datasource = datasource - - """ - keywords['type'] = 'geos' - return CreateDatasource(keywords) - -def mapnik_version_string(version=mapnik_version()): - """Return the Mapnik version as a string.""" - patch_level = version % 100 - minor_version = version / 100 % 1000 - major_version = version / 100000 - return '%s.%s.%s' % ( major_version, minor_version,patch_level) - -def mapnik_version_from_string(version_string): - """Return the Mapnik version from a string.""" - n = version_string.split('.') - return (int(n[0]) * 100000) + (int(n[1]) * 100) + (int(n[2])); - -def register_plugins(path=inputpluginspath): - """Register plugins located by specified path""" - DatasourceCache.instance().register_datasources(path) - -def register_fonts(path=fontscollectionpath,valid_extensions=['.ttf','.otf','.ttc','.pfa','.pfb','.ttc','.dfont']): - """Recursively register fonts using path argument as base directory""" - for dirpath, _, filenames in os.walk(path): - for filename in filenames: - if os.path.splitext(filename)[1] in valid_extensions: - FontEngine.instance().register_font(os.path.join(dirpath, filename)) - -# auto-register known plugins and fonts -register_plugins() -register_fonts() - -#set dlopen flags back to the original -sys.setdlopenflags(flags) - -# Explicitly export API members to avoid namespace pollution -# and ensure correct documentation processing -__all__ = [ - # classes - 'Color', - 'Coord', - #'ColorBand', - 'CompositeOp', - 'DatasourceCache', - 'Box2d', - 'Feature', - 'Featureset', - 'FontEngine', - 'Geometry2d', - 'GlyphSymbolizer', - 'Image', - 'ImageView', - 'Layer', - 'Layers', - 'LinePatternSymbolizer', - 'LineSymbolizer', - 'Map', - 'MarkersSymbolizer', - 'Names', - 'Parameter', - 'Parameters', - 'PointDatasource', - 'PointSymbolizer', - 'PolygonPatternSymbolizer', - 'PolygonSymbolizer', - 'ProjTransform', - 'Projection', - 'Query', - 'RasterSymbolizer', - 'RasterColorizer', - 'Rule', 'Rules', - 'ShieldSymbolizer', - 'Singleton', - 'Stroke', - 'Style', - 'Symbolizer', - 'Symbolizers', - 'TextSymbolizer', - 'ViewTransform', - # enums - 'aspect_fix_mode', - 'point_placement', - 'label_placement', - 'line_cap', - 'line_join', - 'text_transform', - 'vertical_alignment', - 'horizontal_alignment', - 'justify_alignment', - 'pattern_alignment', - 'filter_mode', - # functions - # datasources - 'Datasource', - 'CreateDatasource', - 'Shapefile', - 'PostGIS', - 'Raster', - 'Gdal', - 'Occi', - 'Ogr', - 'SQLite', - 'Osm', - 'Kismet', - 'Describe', - # version and environment - 'mapnik_version_string', - 'mapnik_version', - 'mapnik_svn_revision', - 'has_cairo', - 'has_pycairo', - # factory methods - 'Expression', - 'PathExpression', - # load/save/render - 'load_map', - 'load_map_from_string', - 'save_map', - 'save_map_to_string', - 'render', - 'render_grid', - 'render_tile_to_file', - 'render_to_file', - # other - 'register_plugins', - 'register_fonts', - 'scale_denominator', - # deprecated - 'Filter', - 'Envelope', - ] diff --git a/osx/scripts/build_boost_pythons.py b/osx/scripts/build_boost_pythons.py deleted file mode 100644 index df68524ff..000000000 --- a/osx/scripts/build_boost_pythons.py +++ /dev/null @@ -1,43 +0,0 @@ -# script to build boost python versions -# this should be run with the boost source directory as the cwd - -import os -import sys - -USER_JAM = """ -import option ; -import feature ; -if ! darwin in [ feature.values ] -{ - using darwin ; -} -project : default-build darwin ; -using python - : %(ver)s # version - : %(system)s/Library/Frameworks/Python.framework/Versions/%(ver)s/bin/python%(ver)s%(variant)s # cmd-or-prefix - : %(system)s/Library/Frameworks/Python.framework/Versions/%(ver)s/include/python%(ver)s%(variant)s # includes - : %(system)s/Library/Frameworks/Python.framework/Versions/%(ver)s/lib/python%(ver)s/config%(variant)s # a lib actually symlink - : darwin # condition - ; -libraries = --with-python ; -""" - -def compile_lib(ver,arch='32_64'): - if ver in ('3.2'): - open('user-config.jam','w').write(USER_JAM % {'ver':ver,'system':'','variant':'m'}) - elif ver in ('2.5','2.6'): - # build against system pythons so we can reliably link against FAT binaries - open('user-config.jam','w').write(USER_JAM % {'ver':ver,'system':'/System','variant':''}) - else: - # for 2.7 and above hope that python.org provides 64 bit ready binaries... - open('user-config.jam','w').write(USER_JAM % {'ver':ver,'system':'','variant':''}) - cmd = "./bjam -q --with-python -a -j2 --ignore-site-config --user-config=user-config.jam link=shared toolset=darwin -d2 address-model=%s architecture=x86 variant=release stage" % arch#linkflags=-search_paths_first - print cmd - os.system(cmd) - -if __name__ == '__main__': - if not len(sys.argv) > 2: - sys.exit('usage: %s ' % os.path.basename(sys.argv[0])) - compile_lib(sys.argv[1],sys.argv[2]) - - \ No newline at end of file diff --git a/osx/scripts/fetch_py_releases.sh b/osx/scripts/fetch_py_releases.sh deleted file mode 100755 index 3e924103d..000000000 --- a/osx/scripts/fetch_py_releases.sh +++ /dev/null @@ -1,18 +0,0 @@ -# http://www.python.org/download/releases/ -# http://www.python.org/ftp/python/ - -# 2.5.4 (2.5.5 did not provide binaries) -wget http://www.python.org/ftp/python/2.5.4/python-2.5.4-macosx.dmg - -# 2.6.6 -wget http://www.python.org/ftp/python/2.6.6/python-2.6.6-macosx10.3.dmg - -# 2.7 -wget http://www.python.org/ftp/python/2.7.2/python-2.7.2-macosx10.6.dmg - -# 3.1.x does not provide 64 bit versions for some reasons, so skip... -#wget http://www.python.org/ftp/python/3.1.3/python-3.1.3-macosx10.3.dmg -#wget http://www.python.org/ftp/python/3.1.2/Python-3.1.2.tar.bz2 - -# 3.2 -wget http://www.python.org/ftp/python/3.2.1/python-3.2.1-macosx10.6.dmg \ No newline at end of file diff --git a/osx/scripts/package.py b/osx/scripts/package.py deleted file mode 100644 index 06913533c..000000000 --- a/osx/scripts/package.py +++ /dev/null @@ -1,68 +0,0 @@ -import os -import re -import sys -import datetime -from subprocess import PIPE, Popen, call as subcall - -now = datetime.datetime.now() -date = now.strftime('%Y_%m_%d') # year, mon, day - -INSTALL = False - -plat = 'snow_leopard' -arch = 'intel' -version = '2.0.0'#-dev - -def get(cmd): - try: - sub = cmd.split(' ') - response = Popen(sub, stdin=PIPE, stdout=PIPE, stderr=PIPE) - cm = response.communicate() - return cm[0] - if not cm[0]: - sys.exit(cm[1]) - except OSError, E: - sys.exit(E) - -if plat == 'snow_leopard': - short_plat = 'snow' -else: - short_plat = plat - -def get_svn(): - pattern = r'(\d+)(.*)' - svn_version = get('svnversion ../') - return re.match(pattern,svn_version).groups()[0] - -svn = get_svn() - -identifier = '''mapnik build log ----------------- -version: %(version)s -os: %(plat)s -arch: %(arch)s -date: %(date)s -svn revision: %(svn)s - -''' % locals() - -if __name__ == '__main__': - - - if not os.path.exists('installer'): - sys.exit("must be run from directory below 'installer' dir") - - print 'removing old files' - #os.system('rm installer/pkg/Mapnik.pkg') - os.system('rm installer/*dmg') - - print 'writing build log' - open('installer/pkg/build_log.txt','w').write(identifier) - - cmd = 'packagemaker --doc installer/mapnik.pmdoc --out installer/pkg/Mapnik.pkg' - print cmd - #os.system(cmd) - - cmd = 'hdiutil create "installer/mapnik_%s_%s_%s_%s_%s.dmg" -volname "Mapnik %s" -fs HFS+ -srcfolder installer/pkg' % (version,short_plat,arch,date,svn,version) - print cmd - os.system(cmd) diff --git a/osx/scripts/setup.sh b/osx/scripts/setup.sh deleted file mode 100644 index 59e5ac70f..000000000 --- a/osx/scripts/setup.sh +++ /dev/null @@ -1,421 +0,0 @@ - -# start here -cd osx/sources - -# build icu and boost for packaging up within Mapnik Framework - -# local install location -PREFIX=/Users/dane/projects/mapnik-dev/trunk-build/osx/sources -mkdir -p $PREFIX -export DYLD_LIBRARY_PATH=$PREFIX/lib -# final resting place -INSTALL=/Library/Frameworks/Mapnik.framework/unix/lib -export DYLD_LIBRARY_PATH=$PREFIX/lib -export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig -export CFLAGS="-O3 -arch i386 -arch x86_64" -export CXXFLAGS="-O3 -arch i386 -arch x86_64" -export LDFLAGS="-arch i386 -arch x86_64 -headerpad_max_install_names" -# universal flags -export CFLAGS="-O3 -arch i386 -arch x86_64" -export CXXFLAGS="-O3 -arch i386 -arch x86_64" -export LDFLAGS="-arch i386 -arch x86_64 -headerpad_max_install_names" - - -# make a directory to hold icu and boost -mkdir -p ../deps -cd ../deps - -# ICU -wget http://download.icu-project.org/files/icu4c/4.6/icu4c-4_6-src.tgz -tar xvf icu4c-4_6-src.tgz -cd icu/source - -# universal flags -#./runConfigureICU MacOSX --prefix=$PREFIX --disable-static --enable-shared --disable-samples --disable-icuio --disable-layout --disable-tests --disable-extras --with-library-bits=64 -./runConfigureICU MacOSX --prefix=$PREFIX --disable-static --enable-shared --with-library-bits=64 -make install -j4 -# note -R is needed to preserve the symlinks -#cp -R lib/libicuuc.* ../../../sources/lib/ -#cp -R lib/libicudata.* ../../../sources/lib/ -cd ../../../sources/lib/ - - -# libicuuc -install_name_tool -id $INSTALL/libicuuc.46.dylib libicuuc.46.0.dylib -# --enable-layout -#install_name_tool -change ../lib/libicudata.46.0.dylib $INSTALL/libicudata.46.dylib libicuuc.46.0.dylib -#--disable-layout -install_name_tool -change libicudata.46.dylib $INSTALL/libicudata.46.dylib libicuuc.46.0.dylib -# libicudata -install_name_tool -id $INSTALL/libicudata.46.dylib libicudata.46.0.dylib -# libicui18n - needed by boost_regex -install_name_tool -id $INSTALL/libicui18n.46.dylib libicui18n.46.0.dylib -# --enable-layout -#install_name_tool -change ../lib/libicudata.46.0.dylib $INSTALL/libicudata.46.dylib libicui18n.46.0.dylib -#--disable-layout -install_name_tool -change libicudata.46.dylib $INSTALL/libicudata.46.dylib libicui18n.46.0.dylib -install_name_tool -change libicuuc.46.dylib $INSTALL/libicuuc.46.dylib libicui18n.46.0.dylib -cd ../ - - -# freetype2 -wget http://download.savannah.gnu.org/releases/freetype/freetype-2.4.4.tar.gz -tar xvf freetype-2.4.4.tar.gz -export CFLAGS="-O3 -arch i386 -arch x86_64" -export LDFLAGS="-arch i386 -arch x86_64 -headerpad_max_install_names" -cd freetype-2.4.4 -./configure --prefix=$PREFIX -make -j4 -make install -install_name_tool -id $INSTALL/libfreetype.6.dylib ../../sources/lib/libfreetype.6.dylib -cd ../ - -# pkg-config so we get cairo and friends configured correctly -wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.26.tar.gz -tar xvf pkg-config-0.26.tar.gz -cd pkg-config-0.26 -./configure --disable-dependency-tracking --prefix=$PREFIX -make -j4 -make install - -# pixman -wget http://cairographics.org/releases/pixman-0.22.2.tar.gz -tar xvf pixman-0.22.2.tar.gz -cd pixman-0.22.2 -./configure --disable-dependency-tracking --prefix=$PREFIX -make -j4 -make install -cd ../../sources/lib/ -install_name_tool -id $INSTALL/libpixman-1.0.dylib ../../sources/lib/libpixman-1.0.dylib -cd ../ - -# fontconfig -wget http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.8.0.tar.gz -tar xvf fontconfig-2.8.0.tar.gz -cd fontconfig-2.8.0 -./configure --disable-dependency-tracking --prefix=$PREFIX \ - --with-freetype-config=$PREFIX/bin/freetype-config -make -j4 -make install -install_name_tool -id $INSTALL/libfontconfig.1.dylib ../../sources/lib/libfontconfig.1.dylib -cd ../ - -# Cairo -wget http://cairographics.org/releases/cairo-1.10.2.tar.gz -tar xvf cairo-1.10.2.tar.gz -cd cairo-1.10.2 -# NOTE: PKG_CONFIG_PATH must be correctly set by this point -export LDFLAGS="-L/Library/Frameworks/UnixImageIO.framework/unix/lib "$LDFLAGS -export CFLAGS="-I/Library/Frameworks/UnixImageIO.framework/unix/include "$CFLAGS -export png_CFLAGS="-I/Library/Frameworks/UnixImageIO.framework/unix/include" -export png_LIBS="-I/Library/Frameworks/UnixImageIO.framework/unix/lib -lpng15" -./configure \ - --disable-valgrind \ - --enable-gobject=no \ - --enable-static=no \ - --enable-xlib=no \ - --enable-xlib-xrender=no \ - --enable-xcb=no \ - --enable-xlib-xcb=no \ - --enable-xcb-shm=no \ - --enable-xcb-drm=no \ - --disable-dependency-tracking \ - --prefix=$PREFIX - -make -j4 -make install -install_name_tool -id $INSTALL/libcairo.2.dylib ../../sources/lib/libcairo.2.dylib -cd ../ - -# since linking to libpng framework (which does not provide a pkg-config) fake it: -# match to /Library/Frameworks/UnixImageIO.framework/unix/ -# vim ../sources/lib/pkgconfig/libpng.pc - -prefix=/Library/Frameworks/UnixImageIO.framework/unix -exec_prefix=${prefix} -libdir=${exec_prefix}/lib -includedir=${prefix}/include/libpng15 - -Name: libpng -Description: Loads and saves PNG files -Version: 1.5 -Libs: -L${libdir} -lpng15 -Libs.private: -lz -Cflags: -I${includedir} - - -# libsigcxx -wget http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.2/libsigc++-2.2.10.tar.bz2 -tar xvf libsigc++-2.2.10.tar.bz2 -cd libsigc++-2.2.10 -./configure --disable-dependency-tracking --prefix=$PREFIX -make -j4 -make install -install_name_tool -id $INSTALL/libsigc-2.0.dylib ../../sources/lib/libsigc-2.0.dylib -cd ../ - -wget http://cairographics.org/releases/cairomm-1.9.8.tar.gz -tar xvf cairomm-1.9.8.tar.gz -cd cairomm-1.9.8 -# NOTE: PKG_CONFIG_PATH must be correctly set by this point -export LDFLAGS="-L$PREFIX/lib -lcairo -lsigc-2.0 "$LDFLAGS -export CFLAGS="-I$PREFIX/include -I$PREFIX/include/cairo -I$PREFIX/include/freetype2 -I$PREFIX/lib/sigc++-2.0/include -I$PREFIX/include/sigc++-2.0 -I$PREFIX/include/sigc++-2.0/sigc++ "$CFLAGS -export CXXFLAGS="-I$PREFIX/include "$CFLAGS - -./configure --disable-dependency-tracking --prefix=$PREFIX -make -j4 -make install - -install_name_tool -id $INSTALL/libcairomm-1.0.1.dylib ../../sources/lib/libcairomm-1.0.1.dylib - -# also make sure cairo and friends did not link against anything in /opt/local or /usr/local -otool -L ../../sources/lib/*dylib | grep local - -# ensure we're linking to the right image libs -otool -L ../../sources/lib/*dylib | grep UnixImageIO - -# pycairo -# >= python 3.1 -#wget http://cairographics.org/releases/pycairo-1.8.10.tar.bz2 -#tar xvf pycairo-1.8.10.tar.bz2 -#./waf configure - -#wget http://cairographics.org/releases/pycairo-1.8.8.tar.gz -#tar xvf pycairo-1.8.8.tar.gz -#cd pycairo-1.8.8 - -# py25 -# line 35 of configure.ac AM_PATH_PYTHON(2.5) -#export PATH=/Library/Frameworks/Python.framework/Versions/2.5/bin/:$PATH -#./configure --prefix=$PREFIX -#make -j4 install - -# py26 -#export PATH=/Library/Frameworks/Python.framework/Versions/2.6/bin/:$PATH -#./configure --prefix=$PREFIX -#make -j4 install - -#py27 -#export PATH=/Library/Frameworks/Python.framework/Versions/2.7/bin/:$PATH -#make clean -#./configure --prefix=$PREFIX -#make -j4 install - - -# boost -cd ../../deps -wget http://voxel.dl.sourceforge.net/project/boost/boost/1.47.0/boost_1_47_0.tar.bz2 -tar xjvf boost_1_47_0.tar.bz2 -cd boost_1_47_0 - -# edit tools/build/v2/tools/python.jam, line 980, replace with: - if $(target-os) in windows cygwin - { - alias python_for_extensions : python : $(target-requirements) ; - } - else if $(target-os) = darwin - { - alias python_for_extensions - : - : $(target-requirements) - : - : $(usage-requirements) "-undefined dynamic_lookup" - ; - } - -./bootstrap.sh -./bjam --prefix=$PREFIX --with-thread --with-filesystem \ - --with-regex --with-program_options --with-system --with-chrono \ - -sHAVE_ICU=1 -sICU_PATH=$PREFIX \ - toolset=darwin \ - address-model=32_64 \ - architecture=x86 \ - link=shared \ - variant=release \ - stage - -./bjam --prefix=$PREFIX --with-thread --with-filesystem \ - --with-regex --with-program_options --with-system --with-chrono \ - -sHAVE_ICU=1 -sICU_PATH=$PREFIX \ - toolset=darwin \ - address-model=32_64 \ - architecture=x86 \ - link=shared \ - variant=release \ - install - -# if needed, rebuild regex without icu.. -./bjam --prefix=$PREFIX --with-regex \ - --disable-icu -a \ - toolset=darwin \ - address-model=32_64 \ - architecture=x86 \ - link=shared \ - variant=release \ - install - -# toolset=clang-darwin cxxflags="-fPIC" linkflags="-undefined dynamic_lookup" - -# boost python for various versions are done in python script -python ../../scripts/build_boost_pythons.py 2.5 32_64 -mv stage/lib/libboost_python.dylib stage/lib/libboost_python25.dylib -cp stage/lib/libboost_python25.dylib ../../sources/lib/libboost_python25.dylib - -python ../../scripts/build_boost_pythons.py 2.6 32_64 -mv stage/lib/libboost_python.dylib stage/lib/libboost_python26.dylib -cp stage/lib/libboost_python26.dylib ../../sources/lib/libboost_python26.dylib - -python ../../scripts/build_boost_pythons.py 2.7 32_64 -mv stage/lib/libboost_python.dylib stage/lib/libboost_python27.dylib -cp stage/lib/libboost_python27.dylib ../../sources/lib/libboost_python27.dylib - -python ../../scripts/build_boost_pythons.py 3.1 32_64 -mv stage/lib/libboost_python3.dylib stage/lib/libboost_python31.dylib -cp stage/lib/libboost_python31.dylib ../../sources/lib/libboost_python31.dylib - -python ../../scripts/build_boost_pythons.py 3.2 32_64 -mv stage/lib/libboost_python3.dylib stage/lib/libboost_python32.dylib -cp stage/lib/libboost_python32.dylib ../../sources/lib/libboost_python32.dylib - - -#cp stage/lib/libboost_*dylib ../../sources/lib/ - -cd ../../sources/lib - -# fix boost pythons -install_name_tool -id $INSTALL/libboost_python25.dylib libboost_python25.dylib -install_name_tool -id $INSTALL/libboost_python26.dylib libboost_python26.dylib -install_name_tool -id $INSTALL/libboost_python27.dylib libboost_python27.dylib -install_name_tool -id $INSTALL/libboost_python31.dylib libboost_python31.dylib -install_name_tool -id $INSTALL/libboost_python32.dylib libboost_python32.dylib - -# fix boost libs -install_name_tool -id $INSTALL/libboost_system.dylib libboost_system.dylib -install_name_tool -id $INSTALL/libboost_filesystem.dylib libboost_filesystem.dylib -install_name_tool -id $INSTALL/libboost_regex.dylib libboost_regex.dylib -install_name_tool -id $INSTALL/libboost_program_options.dylib libboost_program_options.dylib -install_name_tool -id $INSTALL/libboost_thread.dylib libboost_thread.dylib -install_name_tool -change libboost_system.dylib $INSTALL/libboost_system.dylib libboost_filesystem.dylib -#install_name_tool -change libicui18n.46.dylib $INSTALL/libicui18n.46.dylib libboost_regex.dylib - -# currently broken, waiting on http://www.gaia-gis.it/rasterlite2/ -# rasterlite we must bundle as it is not available in the SQLite.framework -#cd ../../deps -#svn co https://www.gaia-gis.it/svn/librasterlite -#export LDFLAGS="-arch i386 -arch x86_64 -headerpad_max_install_names -L/Library/Frameworks/SQLite3.framework/unix/lib -L/Library/Frameworks/UnixImageIO.framework/unix/lib -L/Library/Frameworks/PROJ.framework/unix/lib" -#export CFLAGS="-Os -arch i386 -arch x86_64 -I/Library/Frameworks/SQLite3.framework/unix/include -I/Library/Frameworks/UnixImageIO.framework/unix/include -I/Library/Frameworks/PROJ.framework/unix/include" -#export CXXFLAGS=$CFLAGS -#cd librasterlite -#./configure --disable-dependency-tracking --prefix=$PREFIX -#make clean -#make -j4 -#make install -#cd ../../sources/lib -#install_name_tool -id $INSTALL/librasterlite.0.dylib librasterlite.0.dylib - -# sqlite with rtree -cd ../../deps -wget http://www.sqlite.org/sqlite-autoconf-3070701.tar.gz -tar xvf sqlite-autoconf-3070701.tar.gz -cd sqlite-autoconf-3070701 -export CFLAGS="-DSQLITE_ENABLE_RTREE=1 -O3 "$CFLAGS -./configure --prefix=$PREFIX --enable-static=yes --enable-shared=no --disable-dependency-tracking -make -j4 && make install - - -### MAPNIK ### - -# make sure we set DYLD path so we can link to libs without installing -export DYLD_LIBRARY_PATH=$PREFIX/lib - -# compile mapnik using osx/config.py -scons PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig -j2 install BINDINGS='' - -# then compile each python version.. - -# 2.5 -rm bindings/python/*os -rm bindings/python/mapnik/_mapnik2.so -scons configure BINDINGS=python PYTHON=/usr/bin/python2.5 BOOST_PYTHON_LIB=boost_python25 -scons -j2 install -cp bindings/python/mapnik/_mapnik2.so osx/python/_mapnik2_25.so - -# 2.6 -rm bindings/python/*os -rm bindings/python/mapnik/_mapnik2.so -scons configure BINDINGS=python PYTHON=/usr/bin/python2.6 BOOST_PYTHON_LIB=boost_python26 -scons -j2 install -cp bindings/python/mapnik/_mapnik2.so osx/python/_mapnik2_26.so - -# 2.7 -rm bindings/python/*os -rm bindings/python/mapnik/_mapnik2.so -scons configure BINDINGS=python PYTHON=/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 BOOST_PYTHON_LIB=boost_python27 -scons -j2 install -cp bindings/python/mapnik/_mapnik2.so osx/python/_mapnik2_27.so - - -# 3.1 -# needs patch: http://trac.mapnik.org/wiki/Python3k -rm bindings/python/*os -rm bindings/python/mapnik/_mapnik2.so -scons configure BINDINGS=python PYTHON=/Library/Frameworks/Python.framework/Versions/3.1/bin/python3.1 BOOST_PYTHON_LIB=boost_python31 -scons -j2 install -cp bindings/python/mapnik/_mapnik2.so osx/python/_mapnik2_31.so - -# 3.2 -rm bindings/python/*os -rm bindings/python/mapnik/_mapnik2.so -scons configure BINDINGS=python PYTHON=/Library/Frameworks/Python.framework/Versions/3.2/bin/python3.2m BOOST_PYTHON_LIB=boost_python32 -scons -j2 install -cp bindings/python/mapnik/_mapnik2.so osx/python/_mapnik2_32.so - - - - -# build a ton of versions of node (just to be safe about ABI) -cd ../../deps - -for VER in {"0.2.4","0.2.5","0.2.6","0.3.0","0.3.1","0.3.2","0.3.3","0.3.4","0.3.5","0.3.6","0.3.7"} -do - wget http://nodejs.org/dist/node-v$VER.tar.gz - tar xvf node-v$VER.tar.gz - cd node-v$VER - ./configure --prefix=$PREFIX/node$VER - make - make install - cd ../ -done - -# node-mapnik -cd ../../deps -git clone git://github.com/mapnik/node-mapnik.git -cd node-mapnik -#export PATH=../../Library/Frameworks/Mapnik.framework/Programs:$PATH -export PATH=/Library/Frameworks/Mapnik.framework/Programs:$PATH - -# TODO - needs work -# only 64 bit -# versioned module -# all targets -# custom node prefix -# cairo support - -#CXXFLAGS=" -g -DNDEBUG -O3 -Wall -DBOOST_SPIRIT_THREADSAFE -DMAPNIK_THREADSAFE -ansi -finline-functions -Wno-inline -fPIC -arch x86_64 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DEV_MULTIPLICITY=0 -I/Library/Frameworks/Mapnik.framework/Versions/2.0/unix/include -I/Library/Frameworks/Mapnik.framework/Versions/2.0/unix/include/freetype2 " - -#for VER in {"0.2.4","0.2.5","0.2.6","0.3.0","0.3.1","0.3.2","0.3.3","0.3.4"} -#for VER in {"0.3.4","0.3.5","0.3.6","0.3.7"} -#do -# mkdir build/default/src/$VER -# mkdir lib/$VER -# NODE_PREFIX="$PREFIX/node$VER" -# export PATH=$NODE_PREFIX/bin:$PATH -# OBJ="build/default/src/$VER/_mapnik_1.o" -# TARGET="lib/$VER/_mapnik.node" -# g++ $CXXFLAGS -I$NODE_PREFIX/include/node src/_mapnik.cc -c -o $OBJ -# LDFLAGS="-L/Library/Frameworks/Mapnik.framework/Versions/2.0/unix/lib -lmapnik2 -bundle -#undefined dynamic_lookup" -# g++ $OBJ -o $TARGET $LDFLAGS -#done - - -# then re-run wrap.py \ No newline at end of file diff --git a/osx/scripts/static-universal.sh b/osx/scripts/static-universal.sh deleted file mode 100644 index 510680746..000000000 --- a/osx/scripts/static-universal.sh +++ /dev/null @@ -1,340 +0,0 @@ -# build notes for compiling mapnik deps statically -# and "FAT" (aka. universal) in order to allow -# linking a fully standalone libmapnik.a - -PREFIX=`pwd`/osx/sources -mkdir -p $PREFIX -export DYLD_LIBRARY_PATH=$PREFIX/lib -export DYLD_LIBRARY_PATH=$PREFIX/lib -export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig -export PATH=$PREFIX/bin:$PATH -export CORE_CFLAGS="-O3 -arch x86_64 -arch i386 -mmacosx-version-min=10.6 -isysroot /Developer/SDKs/MacOSX10.6.sdk" -export CORE_CXXFLAGS=$CORE_CFLAGS -export CORE_LDFLAGS="-Wl,-search_paths_first -arch x86_64 -arch i386 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk" -export ARCHFLAGS="-arch x86_64 -arch i386" - - -cd osx -mkdir -p deps -cd deps - - -# icucore headers - temporary workaround until I can get more recent icu versions working -wget http://www.opensource.apple.com/tarballs/ICU/ICU-400.38.tar.gz -tar xvf ICU-400.38.tar.gz -cd ICU-400.38 -make install -cp -R build/usr/local/include/unicode/ ../../sources/include/unicode -cd ../ - -# boost -wget http://voxel.dl.sourceforge.net/project/boost/boost/1.47.0/boost_1_47_0.tar.bz2 -tar xjvf boost_1_47_0.tar.bz2 -cd boost_1_47_0 -./bootstrap.sh - -# no icu variant -./bjam --prefix=$PREFIX -j2 -d2 \ - --with-thread \ - --with-filesystem \ - --with-program_options --with-system --with-chrono \ - --with-regex --disable-icu \ - toolset=darwin \ - macosx-version=10.6 \ - address-model=32_64 \ - architecture=x86 \ - link=static \ - variant=release \ - stage - -./bjam --prefix=$PREFIX -j2 -d2 \ - --with-thread \ - --with-filesystem \ - --with-program_options --with-system --with-chrono \ - --with-regex --disable-icu \ - toolset=darwin \ - macosx-version=10.6 \ - address-model=32_64 \ - architecture=x86 \ - link=static \ - variant=release \ - install - -cd ../ - -# universal flags -export CFLAGS=$CORE_CFLAGS -export CXXFLAGS=$CORE_CXXFLAGS -export LDFLAGS=$CORE_LDFLAGS - -# sqlite -wget http://www.sqlite.org/sqlite-autoconf-3070701.tar.gz -tar xvf sqlite-autoconf-3070701.tar.gz -cd sqlite-autoconf-3070701 -export CFLAGS="-DSQLITE_ENABLE_RTREE=1 -O3 "$CFLAGS -./configure --prefix=$PREFIX --enable-static --disable-shared --disable-dependency-tracking -make -j4 -make install -cd ../ - - -# freetype -wget http://download.savannah.gnu.org/releases/freetype/freetype-2.4.6.tar.bz2 -tar xvf freetype-2.4.6.tar.bz2 -cd freetype-2.4.6 -./configure --prefix=$PREFIX --enable-static --disable-shared --disable-dependency-tracking -make -j4 -make install -cd ../ - -# proj4 -wget http://download.osgeo.org/proj/proj-datumgrid-1.5.zip -#wget http://download.osgeo.org/proj/proj-4.7.0.tar.gz -#tar xvf proj-4.7.0.tar.gz -#cd proj-4.7.0 -# we use trunk instead for better threading support -svn co http://svn.osgeo.org/metacrs/proj/trunk/proj proj-trunk # at the time pre-release 4.8.0 -cd proj-trunk/nad -unzip ../../proj-datumgrid-1.5.zip -cd ../ -./configure --prefix=$PREFIX --enable-static --disable-shared --disable-dependency-tracking -make -j4 -make install -cd ../ - -# libpng -wget ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.5.5.tar.gz -tar xvf libpng-1.5.5.tar.gz -cd libpng-1.5.5 -./configure --prefix=$PREFIX --enable-static --disable-shared --disable-dependency-tracking -make -j4 -make install -cd ../ - -# libjpeg -wget http://www.ijg.org/files/jpegsrc.v8c.tar.gz -tar xvf jpegsrc.v8c.tar.gz -cd jpeg-8c -./configure --prefix=$PREFIX --enable-static --disable-shared --disable-dependency-tracking -make -j4 -make install -cd ../ - -# libtiff -wget http://download.osgeo.org/libtiff/tiff-3.9.5.tar.gz -tar xvf tiff-3.9.5.tar.gz -cd tiff-3.9.5 -./configure --prefix=$PREFIX --enable-static --disable-shared --disable-dependency-tracking -make -j4 -make install -cd ../ - -# gettext which provides libintl for libpq -wget http://ftp.gnu.org/pub/gnu/gettext/gettext-0.18.1.1.tar.gz -tar xvf gettext-0.18.1.1.tar.gz -cd gettext-0.18.1.1 -export CC=gcc -export CXX=g++ -./configure --prefix=$PREFIX --enable-static --disable-shared --disable-dependency-tracking \ ---without-included-gettext --disable-debug --without-included-glib \ ---without-included-libcroco --without-included-libxml \ ---without-emacs --without-git --without-cvs -make -j4 -make install -cd ../ - - -# postgis -# install postgres 9.x client from somewhere. -# http://www.kyngchaos.com/software/postgres works nicely -# then copy the clients static libpq.a to a prioritized directory: -cp /usr/local/pgsql/lib/libpq.a osx/sources/lib/libpq.a -# then edit plugins/input/postgis/SConscript adding more libs to link to - - -# gdal 1.8.1 -wget http://download.osgeo.org/gdal/gdal-1.8.1.tar.gz -tar xvf gdal-1.8.1.tar.gz -cd gdal-1.8.1 -./configure --prefix=$PREFIX --enable-static --disable-shared --disable-dependency-tracking \ ---with-libtiff=$PREFIX \ ---with-jpeg=$PREFIX \ ---with-png=$PREFIX \ ---with-static-proj4=$PREFIX \ ---with-sqlite3=no \ ---with-spatialite=no \ ---with-curl=no \ ---with-geos=no \ ---with-pcraster=no \ ---with-cfitsio=no \ ---with-odbc=no \ ---with-libkml=no \ ---with-pcidsk=no \ ---with-jasper=no \ ---with-gif=no \ ---with-pg=no \ ---with-hide-internal-symbols=yes \ ---with-vfk=no \ ---with-grib=no - -make -j4 -make install -cd ../ - - -# cairo and friends - -# pkg-config so we get cairo and friends configured correctly -# note: we use 0.25 because >= 0.26 no long bundles glib and we don't -# want to have to depend on an external glib dep -wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.25.tar.gz -tar xvf pkg-config-0.25.tar.gz -cd pkg-config-0.25 -# patch glib.h -# change line 198 to: -# ifndef G_INLINE_FUNC inline -./configure --disable-debug --disable-dependency-tracking --prefix=$PREFIX -make -j4 -make install -cd ../ - -# pixman -wget http://cairographics.org/releases/pixman-0.22.2.tar.gz -tar xvf pixman-0.22.2.tar.gz -cd pixman-0.22.2 -./configure --enable-static --disable-shared --disable-dependency-tracking --prefix=$PREFIX -make -j4 -make install -cd ../ - -# fontconfig -wget http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.8.0.tar.gz -tar xvf fontconfig-2.8.0.tar.gz -cd fontconfig-2.8.0 -./configure --enable-static --disable-shared --disable-dependency-tracking --prefix=$PREFIX \ - --with-freetype-config=$PREFIX/bin/freetype-config -make -j4 -make install -cd ../ - - -# cairo -wget http://cairographics.org/releases/cairo-1.10.2.tar.gz -tar xvf cairo-1.10.2.tar.gz -cd cairo-1.10.2 -# NOTE: PKG_CONFIG_PATH must be correctly set by this point -export LDFLAGS="-L$PREFIX/lib "$CORE_LDFLAGS -export CFLAGS="-I$PREFIX/include "$CORE_CFLAGS -export png_CFLAGS="-I$PREFIX/include" -export png_LIBS="-I$PREFIX/lib -lpng" -./configure \ - --enable-static --disable-shared \ - --enable-pdf=yes \ - --enable-ft=yes \ - --enable-png=yes \ - --enable-svg=yes \ - --enable-ps=yes \ - --enable-fc=yes \ - --enable-trace=no \ - --enable-gtk-doc=no \ - --enable-qt=no \ - --enable-quartz=no \ - --enable-quartz-font=no \ - --enable-quartz-image=no \ - --enable-win32=no \ - --enable-win32-font=no \ - --enable-skia=no \ - --enable-os2=no \ - --enable-beos=no \ - --enable-drm=no \ - --enable-drm-xr=no \ - --enable-gallium=no \ - --enable-gl=no \ - --enable-directfb=no \ - --enable-vg=no \ - --enable-egl=no \ - --enable-glx=no \ - --enable-wgl=no \ - --enable-test-surfaces=no \ - --enable-tee=no \ - --enable-xml=no \ - --enable-interpreter=no \ - --disable-valgrind \ - --enable-gobject=no \ - --enable-static=no \ - --enable-xlib=no \ - --enable-xlib-xrender=no \ - --enable-xcb=no \ - --enable-xlib-xcb=no \ - --enable-xcb-shm=no \ - --enable-xcb-drm=no \ - --disable-dependency-tracking \ - --prefix=$PREFIX -make -j4 -make install -cd ../ - - -# libsigcxx -wget http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.2/libsigc++-2.2.10.tar.bz2 -tar xvf libsigc++-2.2.10.tar.bz2 -cd libsigc++-2.2.10 -export CFLAGS=$CORE_CFLAGS -export CXXFLAGS=$CORE_CXXFLAGS -export LDFLAGS=$CORE_LDFLAGS -./configure --enable-static --disable-shared --disable-dependency-tracking --prefix=$PREFIX -make -j4 -make install -cd ../ - -# cairomm -wget http://cairographics.org/releases/cairomm-1.10.0.tar.gz -tar xvf cairomm-1.10.0.tar.gz -cd cairomm-1.10.0 -# NOTE: PKG_CONFIG_PATH must be correctly set by this point -export LDFLAGS="-L$PREFIX/lib -lcairo -lfontconfig -lsigc-2.0 "$CORE_LDFLAGS -export CFLAGS="-I$PREFIX/include -I$PREFIX/include/cairo -I$PREFIX/include/freetype2 -I$PREFIX/include/fontconfig -I$PREFIX/lib/sigc++-2.0/include -I$PREFIX/include/sigc++-2.0 -I$PREFIX/include/sigc++-2.0/sigc++ "$CORE_CFLAGS -export CXXFLAGS="-I$PREFIX/include "$CFLAGS - -./configure --enable-static --disable-shared \ - --disable-dependency-tracking --prefix=$PREFIX -make -j4 -make install -cd ../ - -# mapnik - -# config.py - -CXX = 'clang++' -CC = 'clang++' -CUSTOM_CXXFLAGS = '-arch x86_64 -arch i386 -mmacosx-version-min=10.6 -isysroot /Developer/SDKs/MacOSX10.6.sdk' -CUSTOM_LDFLAGS = '-Wl,-search_paths_first -arch x86_64 -arch i386 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk' -INPUT_PLUGINS = 'gdal,ogr,postgis,shape' -DESTDIR = './osx/sources/' -BOOST_INCLUDES = './osx/sources/include' -BOOST_LIBS = './osx/sources/lib' -FREETYPE_CONFIG = './osx/sources/bin/freetype-config' -ICU_INCLUDES = './osx/sources/include' -ICU_LIB_NAME = 'icucore' -PNG_INCLUDES = './osx/sources/include' -PNG_LIBS = './osx/sources/lib' -JPEG_INCLUDES = './osx/sources/include' -JPEG_LIBS = './osx/sources/lib' -TIFF_INCLUDES = './osx/sources/include' -TIFF_LIBS = './osx/sources/lib' -PROJ_INCLUDES = './osx/sources/include' -PROJ_LIBS = './osx/sources/lib' -PKG_CONFIG_PATH = './osx/sources/lib/pkgconfig' -SQLITE_INCLUDES = './osx/sources/include' -SQLITE_LIBS = './osx/sources/lib' -BINDINGS = 'none' - - -# fixup the mapnik-config -# we need to remove the local paths so that 'other-libs' and 'other-includes' look something like: - -other_libs='-Wl,-search_paths_first -arch x86_64 -arch i386 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk -L/usr/lib -lfreetype -licucore -lboost_filesystem -lboost_regex -lcairomm-1.0 -lcairo -lboost_thread -lboost_system' - -other_includes='-arch x86_64 -arch i386 -mmacosx-version-min=10.6 -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch x86_64 -arch i386 -mmacosx-version-min=10.6 -isysroot /Developer/SDKs/MacOSX10.6.sdk -DU_HIDE_DRAFT_API -DUDISABLE_RENAMING -DHAVE_JPEG -ansi -Wall -ftemplate-depth-200 -DDARWIN -DBOOST_SPIRIT_THREADSAFE -DMAPNIK_THREADSAFE -O3 -finline-functions -Wno-inline -DNDEBUG -DHAVE_CAIRO -I/usr/include/libxml2 -DHAVE_CAIRO -DLIBTOOL_SUPPORTS_ADVISE' - diff --git a/osx/scripts/static.sh b/osx/scripts/static.sh deleted file mode 100644 index 861e7d739..000000000 --- a/osx/scripts/static.sh +++ /dev/null @@ -1,286 +0,0 @@ - -PREFIX=/Users/dane/projects/mapnik-dev/trunk-build-static/osx/sources -mkdir -p $PREFIX -export DYLD_LIBRARY_PATH=$PREFIX/lib -# final resting place -INSTALL=/Library/Frameworks/Mapnik.framework/unix/lib -export DYLD_LIBRARY_PATH=$PREFIX/lib -export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig -export PATH=$PREFIX/bin:$PATH -export CFLAGS="-O3 -arch x86_64" -export CXXFLAGS="-O3 -arch x86_64" -export LDFLAGS="-arch x86_64" - - -cd osx -mkdir -p deps -cd deps - - -wget http://download.icu-project.org/files/icu4c/4.6.1/icu4c-4_6_1-src.tgz -tar xvf icu4c-4_6_1-src.tgz -cd icu/source - -# universal flags -export CFLAGS="-O3 -arch x86_64" -export CXXFLAGS="-O3 -arch x86_64" -export LDFLAGS="-arch x86_64" -./runConfigureICU MacOSX --prefix=$PREFIX --enable-static --disable-shared \ ---with-library-bits=64 --enable-release \ ---with-data-packaging=static - -#Data Packaging: archive -# This means: ICU data will be stored in a single .dat file. -# To locate data: ICU will look in /Users/dane/projects/mapnik-dev/trunk-build-static/osx/sources/share/icu/4.6 which is the #installation location. Call u_setDataDirectory() or use the ICU_DATA environment variable to override. - -make install -j4 - -ln -s `pwd`/../sources/lib `pwd`/../sources/lib64 - - - -wget http://voxel.dl.sourceforge.net/project/boost/boost/1.47.0/boost_1_47_0.tar.bz2 -tar xjvf boost_1_47_0.tar.bz2 -cd boost_1_47_0 -./bootstrap.sh -#--prefix-dir - -# architecture=x86 prevents icu link test from working? -l -./bjam --prefix=$PREFIX --with-python \ - --with-thread \ - --with-filesystem \ - --with-program_options --with-system --with-chrono \ - --with-regex define=U_STATIC_IMPLEMENTATION=1 \ - -sHAVE_ICU=1 -sICU_PATH=$PREFIX \ - toolset=darwin \ - address-model=64 \ - link=static \ - variant=release \ - stage - -./bjam --prefix=$PREFIX --with-python \ - --with-thread \ - --with-filesystem \ - --with-program_options --with-system --with-chrono \ - --with-regex define=U_STATIC_IMPLEMENTATION=1 \ - -sHAVE_ICU=1 -sICU_PATH=$PREFIX \ - toolset=darwin \ - address-model=64 \ - link=static \ - variant=release \ - install - -# no icu variant -./bjam --prefix=$PREFIX --with-python \ - --with-thread \ - --with-filesystem \ - --with-program_options --with-system --with-chrono \ - --with-regex --disable-icu \ - toolset=darwin \ - address-model=64 \ - link=static \ - variant=release \ - install - - -./bjam --prefix=$PREFIX -a \ - --with-regex define=U_STATIC_IMPLEMENTATION=1 \ - -sHAVE_ICU=1 -sICU_PATH=$PREFIX \ - toolset=darwin \ - address-model=64 \ - link=static \ - variant=release \ - stage - -cp stage/lib/libboost_regex.a ../../sources/lib/ - - -tar xvf ../deps/freetype-2.4.4.tar.gz -export CFLAGS="-O3 -arch x86_64" -export LDFLAGS="-arch x86_64" -cd freetype-2.4.4 -./configure --prefix=$PREFIX \ ---enable-static \ ---disable-shared -make -j4 -make install - - - -wget http://download.osgeo.org/proj/proj-4.7.0.tar.gz -tar xvf proj-4.7.0.tar.gz -cd proj-4.7.0 -export CFLAGS="-O3 -arch x86_64" -export CXXFLAGS="-O3 -arch x86_64" -export LDFLAGS="-arch x86_64" -./configure --prefix=$PREFIX --enable-static --disable-shared --disable-dependency-tracking -make -make install - - -wget http://downloads.sourceforge.net/project/libpng/libpng12/1.2.44/libpng-1.2.44.tar.bz2 -tar xvf libpng-1.2.44.tar.bz2 -./configure --prefix=$PREFIX --enable-static --disable-shared --disable-dependency-tracking -make -j4 -make install - -wget http://www.ijg.org/files/jpegsrc.v8c.tar.gz -tar xvf jpegsrc.v8c.tar.gz -cd jpeg-8c -export CFLAGS="-O3 -arch x86_64" -export CXXFLAGS="-O3 -arch x86_64" -export LDFLAGS="-arch x86_64" -./configure --prefix=$PREFIX --enable-static --disable-shared --disable-dependency-tracking -make -j4 -make install - -wget http://download.osgeo.org/libtiff/tiff-3.9.4.zip -tar xvf tiff-3.9.4.zip -export CFLAGS="-O3 -arch x86_64" -export CXXFLAGS="-O3 -arch x86_64" -export LDFLAGS="-arch x86_64" -cd tiff-3.9.4 -./configure --prefix=$PREFIX --enable-static --disable-shared --disable-dependency-tracking -make -j4 -make install - - -# gdal 1.8 -./configure --prefix=$PREFIX --disable-static --enable-shared --disable-dependency-tracking \ - -export CFLAGS="-O3 -arch x86_64" -export CXXFLAGS="-O3 -arch x86_64" -export LDFLAGS="-arch x86_64" -./configure --prefix=$PREFIX --enable-static --disable-shared --disable-dependency-tracking \ ---with-libtiff=$PREFIX \ ---with-jpeg=$PREFIX \ ---with-png=$PREFIX \ ---with-geos=no \ ---with-pcraster=no \ ---with-libkml=no \ ---with-pcidsk=no \ ---with-jasper=no \ ---with-gif=no \ ---with-pg=no - -make -j4 - -file ../../sources/lib/libgdal.a - -ldd ../../sources/lib/libgdal.dylib - - -# cairo and friends - -# pkg-config so we get cairo and friends configured correctly -wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.26.tar.gz -tar xvf pkg-config-0.26.tar.gz -cd pkg-config-0.26 -./configure --disable-dependency-tracking --prefix=$PREFIX -make -j4 -make install -cd ../ - -wget http://cairographics.org/releases/pixman-0.22.2.tar.gz -tar xvf pixman-0.22.2.tar.gz -cd pixman-0.22.2 -./configure --enable-static --disable-shared --disable-dependency-tracking --prefix=$PREFIX -make -j4 -make install -cd ../ - -wget http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.8.0.tar.gz -tar xvf fontconfig-2.8.0.tar.gz -cd fontconfig-2.8.0 -./configure --enable-static --disable-shared --disable-dependency-tracking --prefix=$PREFIX \ - --with-freetype-config=$PREFIX/bin/freetype-config -make -j4 -make install -cd ../ - - -# Cairo -wget http://cairographics.org/releases/cairo-1.10.2.tar.gz -tar xvf cairo-1.10.2.tar.gz -cd cairo-1.10.2 -# NOTE: PKG_CONFIG_PATH must be correctly set by this point -export LDFLAGS="-L$PREFIX/lib "$LDFLAGS -export CFLAGS="-I$PREFIX/include "$CFLAGS -export png_CFLAGS="-I$PREFIX/include" -export png_LIBS="-I$PREFIX/lib -lpng12" -./configure \ - --enable-static --disable-shared \ - --enable-pdf=yes \ - --enable-ft=yes \ - --enable-png=yes \ - --enable-svg=yes \ - --enable-ps=yes \ - --enable-fc=yes \ - --enable-trace=no \ - --enable-gtk-doc=no \ - --enable-qt=no \ - --enable-quartz=no \ - --enable-quartz-font=no \ - --enable-quartz-image=no \ - --enable-win32=no \ - --enable-win32-font=no \ - --enable-skia=no \ - --enable-os2=no \ - --enable-beos=no \ - --enable-drm=no \ - --enable-drm-xr=no \ - --enable-gallium=no \ - --enable-gl=no \ - --enable-directfb=no \ - --enable-vg=no \ - --enable-egl=no \ - --enable-glx=no \ - --enable-wgl=no \ - --enable-test-surfaces=no \ - --enable-tee=no \ - --enable-xml=no \ - --enable-interpreter=no \ - --disable-valgrind \ - --enable-gobject=no \ - --enable-static=no \ - --enable-xlib=no \ - --enable-xlib-xrender=no \ - --enable-xcb=no \ - --enable-xlib-xcb=no \ - --enable-xcb-shm=no \ - --enable-xcb-drm=no \ - --disable-dependency-tracking \ - --prefix=$PREFIX -make -j4 -make install -cd ../ - - -# libsigcxx -wget http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.2/libsigc++-2.2.10.tar.bz2 -tar xvf libsigc++-2.2.10.tar.bz2 -cd libsigc++-2.2.10 -./configure --enable-static --disable-shared --disable-dependency-tracking --prefix=$PREFIX -make -j4 -make install -cd ../ - -wget http://cairographics.org/releases/cairomm-1.10.0.tar.gz -tar xvf cairomm-1.10.0.tar.gz -cd cairomm-1.10.0 -# NOTE: PKG_CONFIG_PATH must be correctly set by this point -export CFLAGS="-O3 -arch x86_64" -export CXXFLAGS="-O3 -arch x86_64" -export LDFLAGS="-arch x86_64" -export LDFLAGS="-L$PREFIX/lib -lcairo -lfontconfig -lsigc-2.0 "$LDFLAGS -export CFLAGS="-I$PREFIX/include -I$PREFIX/include/cairo -I$PREFIX/include/freetype2 -I$PREFIX/include/fontconfig -I$PREFIX/lib/sigc++-2.0/include -I$PREFIX/include/sigc++-2.0 -I$PREFIX/include/sigc++-2.0/sigc++ "$CFLAGS -# undef CAIRO_HAS_FT_FONT in include/cairo/cairo-features.h -#mv ../../sources/lib/pkgconfig/cairo-ft.pc ../../sources/lib/pkgconfig/_cairo-ft.pc -#export CFLAGS="-DNCAIRO_HAS_FT_FONT -I$PREFIX/include -I$PREFIX/include/cairo -I$PREFIX/lib/sigc++-2.0/include -I$PREFIX/include/sigc++-2.0 -I$PREFIX/include/sigc++-2.0/sigc++ " -export CXXFLAGS="-I$PREFIX/include "$CFLAGS - -./configure --enable-static --disable-shared \ - --disable-dependency-tracking --prefix=$PREFIX -make -j4 -make install diff --git a/osx/wrap.py b/osx/wrap.py deleted file mode 100644 index 032a04446..000000000 --- a/osx/wrap.py +++ /dev/null @@ -1,257 +0,0 @@ -#!/usr/bin/env python - -import os -import glob -import shutil -from os.path import join -import sys - -def sym(target,link): - relative = os.path.relpath(target,link) - if relative.startswith('../'): - relative = relative.replace('../','',1) - try: - if os.path.exists(link): - os.unlink(link) - os.symlink(relative,link) - except OSError, e: - raise OSError('%s: %s' % (e,link)) - -def copy_all_items(pattern,place,recursive=True): - items = glob.glob(pattern) - for i in items: - if recursive: - # -R is needed to preserve symlinks - os.system('cp -R %s %s' % (i,place)) - else: - shutil.copy(i,place) - -def drop(path): - if os.path.islink(path) or os.path.lexists(path): - if os.path.isabs(path): - print 'not deleting item as it is an absolute path: %' % path - else: - os.system('rm -r %s' % path) - -if __name__ == "__main__": - - - # include headers for a full SDK? - INCLUDE_HEADERS = True - - INCLUDE_NODE = False - - INCLUDE_PYTHON = True - - INCLUDE_CAIRO = True - - INCLUDE_PYCAIRO = False - - # final resting place - install_path = '/Library/Frameworks' - - # move to this dir - here = os.path.dirname(os.path.realpath(__file__)) - os.chdir(here) - - # relative path to DESTDIR output - framework = 'Library/Frameworks/Mapnik.framework' - - # Framework version, likely should be 2.0.0.. - version = '2.0' - - # Versions/Current symlink - current = join(framework,'Versions',version) - - # HERE WE GO... - - # set up symlinks - # from existing directory, to link - active = join(framework,'Versions/Current') - #drop('rm -rf %s' % active) - sym(current,active) - - # point top level 'unix' to active one - sym(join(active,'unix'),join(framework,'unix')) - - # create headers directory if needed - if INCLUDE_HEADERS: - if not os.path.exists(join(active,'unix/include')): - os.mkdir(join(active,'unix/include')) - - # Mapnik Headers - if INCLUDE_HEADERS: - sym(join(active,'unix/include'),join(active,'Headers')) - sym(join(active,'Headers'),join(framework,'Headers')) - else: - # purge the installed headers of mapnik - drop('rm -rf %s' % join(active,'unix/include')) - - if INCLUDE_CAIRO: - - # install cairo libs and deps - copy_all_items('sources/lib/libcairo*dylib',join(active,'unix/lib'),recursive=True) - copy_all_items('sources/lib/libfontconfig*dylib',join(active,'unix/lib'),recursive=True) - copy_all_items('sources/lib/libsigc-2.0*dylib',join(active,'unix/lib'),recursive=True) - copy_all_items('sources/lib/libpixman*dylib',join(active,'unix/lib'),recursive=True) - - # install cairo includes - if INCLUDE_HEADERS: - # what is layout? - for group in ['cairo','cairomm-1.0','fontconfig','pixman-1','pycairo','sigc++-2.0','layout']: - if not os.path.exists(join(active,'unix/include/%s' % group)): - os.mkdir(join(active,'unix/include/%s' % group)) - copy_all_items('sources/include/%s/*' % group,join(active,'unix/include/%s' % group),recursive=True) - - if not INCLUDE_PYCAIRO: - drop('rm -rf %s' % join(active,'unix/include/pycairo')) - - # likely uneeded - if not os.path.exists(join(active,'unix/lib/sigc++-2.0')): - os.mkdir(join(active,'unix/lib/sigc++-2.0')) - copy_all_items('sources/lib/sigc++-2.0/*',join(active,'unix/lib/sigc++-2.0'),recursive=True) - - - # install icu libs - copy_all_items('sources/lib/libicuu*dylib',join(active,'unix/lib'),recursive=True) - copy_all_items('sources/lib/libicud*dylib',join(active,'unix/lib'),recursive=True) - copy_all_items('sources/lib/libicui1*dylib',join(active,'unix/lib'),recursive=True) - - # install icu includes - if INCLUDE_HEADERS: - if not os.path.exists(join(active,'unix/include/unicode')): - os.mkdir(join(active,'unix/include/unicode')) - copy_all_items('sources/include/unicode/*',join(active,'unix/include/unicode'),recursive=True) - - # install boost libs - copy_all_items('sources/lib/libboost*dylib',join(active,'unix/lib'),recursive=True) - - # install boost includes - if INCLUDE_HEADERS: - if not os.path.exists(join(active,'unix/include/boost')): - os.mkdir(join(active,'unix/include/boost')) - copy_all_items('sources/include/boost/*',join(active,'unix/include/boost'),recursive=True) - - # install rasterlite lib - copy_all_items('sources/lib/librasterlite*dylib',join(active,'unix/lib'),recursive=True) - - # install freetype2 libs - copy_all_items('sources/lib/libfreetype*dylib',join(active,'unix/lib'),recursive=True) - - # install freetype2 includes - if INCLUDE_HEADERS: - if not os.path.exists(join(active,'unix/include/freetype2')): - os.mkdir(join(active,'unix/include/freetype2')) - copy_all_items('sources/include/freetype2/*',join(active,'unix/include/freetype2'),recursive=True) - copy_all_items('sources/include/ft2build.h',join(active,'unix/include/'),recursive=True) - - # Node-mapnik bindings location - if INCLUDE_NODE: - if not os.path.exists(join(active,'unix/lib/node')): - os.mkdir(join(active,'unix/lib/node')) - os.mkdir(join(active,'unix/lib/node/mapnik')) - sym(join(active,'unix/lib/node'),join(active,'Node')) - sym(join(active,'Node'),join(framework,'Node')) - - # do this later... - copy_all_items('deps/node-mapnik/mapnik/*',join(active,'unix/lib/node/mapnik/'),recursive=True) - else: - drop('rm -r %s' % join(active,'Node')) - drop('rm -r %s' % join(framework,'Node')) - drop('rm -r %s' % join(active,'unix/lib/node/')) - - # Resources - if not os.path.exists(join(active,'Resources')): - os.mkdir(join(active,'Resources')) - # TODO - put docs and other stuff here... - # or link to /share - sym(join(active,'Resources'),join(framework,'Resources')) - shutil.copy('Info.plist',join(active,'Resources')) - - # Programs - sym(join(active,'unix/bin'),join(active,'Programs')) - sym(join(active,'Programs'),join(framework,'Programs')) - - # Datasources - sym(join(active,'unix/lib/mapnik2/input'),join(active,'Datasources')) - sym(join(active,'Datasources'),join(framework,'Datasources')) - - # Fonts - # TODO - move fonts to main level... - sym(join(active,'unix/lib/mapnik2/fonts'),join(active,'Fonts')) - sym(join(active,'Fonts'),join(framework,'Fonts')) - - # symlinks to user and system font directories. - # TODO - NEED TO BENCHMARK performance hit of extra loading time and memory usage - #sym('/Library/Fonts', join(fonts,'Library')) - #sym('/System/Library/Fonts', join(fonts,'System')) - - # symlink the lib - sym(join(active,'unix/lib/libmapnik2.dylib'),join(active,'Mapnik')) - sym(join(active,'Mapnik'),join(framework,'Mapnik')) - - # Python - if INCLUDE_PYTHON: - #python_versions = glob.glob('unix/lib/python*') - #for py in python_versions: - # py_dir = join(active,'%s/site-packages' % py) - if not os.path.exists(join(active,'Python')): - os.mkdir(join(active,'Python')) - os.mkdir(join(active,'Python/mapnik2')) - if INCLUDE_PYCAIRO: - os.mkdir(join(active,'Python/cairo')) - shutil.copy('python/mapnik.py',join(active,'Python/mapnik2/__init__.py')) - if INCLUDE_PYCAIRO: - if not os.path.exists(join(active,'Python/cairo/')): - os.mkdir(join(active,'Python/cairo/')) - shutil.copy('python/cairo.py',join(active,'Python/cairo/__init__.py')) - else: - drop('rm -rf %s' % join(active,'Python/cairo')) - - #sym(py_dir,join(active,'Python')) - sym(join(active,'Python'),join(framework,'Python')) - - - # pycairo module - for pyver in glob.glob('sources/lib/python*'): - ver = os.path.basename(pyver) - to = join(active,'unix/lib/%s/site-packages/cairo/' % ver) - if INCLUDE_PYCAIRO: - assert os.path.exists(join(active,'unix/lib/%s' % ver)) - assert os.path.exists(join(active,'unix/lib/%s/site-packages' % ver)) - if not os.path.exists(to): - os.mkdir(to) - copy_all_items('sources/lib/%s/site-packages/cairo/*' % ver,to,recursive=True) - else: - drop('rm -r %s' % to) - - # try to start using relative paths.. - #paths_py = ''' - #import os - #inputpluginspath = os.path.normpath(os.path.join(os.path.dirname(__file__),'../../../../Datasources')) - #fontscollectionpath = os.path.normpath(os.path.join(os.path.dirname(__file__),'../../../../Fonts')) - #''' - - #paths_py = ''' - #inputpluginspath = '%(install_path)s/Mapnik.framework/Datasources' - #fontscollectionpath = '%(install_path)s/Mapnik.framework/Fonts' - #''' - - # TODO - consider making _mapnik.so import dependent on version - # so we can simplify install.. - - # done via scons install... - #mapnik_module = join(py_dir,'mapnik2') - #open(mapnik_module+'/paths.py','w').write(paths_py % locals()) - #shutil.copy('../bindings/python/mapnik/__init__.py',mapnik_module) - - # pth file - pth ='''import sys; sys.path.insert(0,'%(install_path)s/Mapnik.framework/Python') - ''' % locals() - - # TODO - testing hack, will add this local python binding to sys path for snow leopard - #open('/Library/Python/2.6/site-packages/mapnik.pth','w').write(pth) - - # Stash in resources as well - open(join(active,'Resources/mapnik2.pth'),'w').write(pth) - \ No newline at end of file